/* Tudolog CRM System Stylesheet */
:root {
  --crm-bg: #090d16;
  --crm-sidebar: #0f1422;
  --crm-card: #141b2d;
  --crm-card-hover: #1c263e;
  --crm-border: rgba(255, 255, 255, 0.07);
  --crm-orange: #ea7629;
  --crm-blue: #38bdf8;
  --crm-green: #22c55e;
  --crm-purple: #a855f7;
  --crm-red: #ef4444;
  --crm-text: #f8fafc;
  --crm-muted: #94a3b8;
  --font-family: 'Inter', system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--crm-bg);
  color: var(--crm-text);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.crm-sidebar {
  width: 260px;
  background: var(--crm-sidebar);
  border-right: 1px solid var(--crm-border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
}

.crm-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--crm-text);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 36px;
  padding: 0 8px;
}

.crm-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--crm-muted);
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.crm-nav li a.active, .crm-nav li a:hover {
  background: rgba(234, 118, 41, 0.12);
  color: var(--crm-orange);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--crm-border);
}

/* Main Area */
.crm-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.crm-header {
  height: 70px;
  background: var(--crm-sidebar);
  border-bottom: 1px solid var(--crm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.search-box {
  position: relative;
  width: 320px;
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  padding: 10px 14px 10px 38px;
  color: var(--crm-text);
  font-size: 14px;
  outline: none;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--crm-muted);
}

.crm-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Stats Header */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 24px 32px 16px;
}

.stat-card {
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 18px;
}

.stat-label {
  font-size: 12px;
  color: var(--crm-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--crm-text);
}

.stat-sub {
  font-size: 11px;
  color: var(--crm-green);
  margin-top: 4px;
}

/* Content Area */
.crm-content {
  flex: 1;
  padding: 16px 32px 32px;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 20px;
  height: 100%;
  padding-bottom: 20px;
}

.kanban-column {
  width: 300px;
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  max-height: 100%;
}

.kanban-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--crm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}

.badge-count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--crm-text);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.kanban-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Lead Cards */
.lead-card {
  background: #1a2336;
  border: 1px solid var(--crm-border);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.lead-card:hover {
  transform: translateY(-2px);
  border-color: var(--crm-orange);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.lead-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.lead-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--crm-text);
}

.lead-company {
  font-size: 13px;
  color: var(--crm-muted);
  margin-bottom: 12px;
}

.lead-tag {
  display: inline-block;
  background: rgba(234, 118, 41, 0.12);
  color: var(--crm-orange);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.lead-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--crm-muted);
}

.lead-value {
  font-weight: 700;
  color: var(--crm-green);
}

.lead-actions {
  display: flex;
  gap: 6px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--crm-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--crm-text);
}

.btn-wa {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
}

.btn-wa:hover {
  background: rgba(37, 211, 102, 0.3);
}

/* Modals & Forms */
.crm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.crm-modal.active {
  opacity: 1;
  visibility: visible;
}

.crm-modal-card {
  background: var(--crm-sidebar);
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  width: 650px;
  padding: 32px;
  max-height: 90vh;
  overflow-y: auto;
}
