@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   Design System - ProspectaR | My Farm Agro
   Dark, minimal, clean
   ============================================================ */
:root {
  --bg-base:      #0C0C0F;
  --bg-elevated:  #131318;
  --bg-card:      #18181F;
  --bg-input:     #1E1E27;
  --bg-hover:     #23232D;
  --bg-active:    #2A2A36;

  --border:       rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.12);
  --border-focus: rgba(34,197,94,0.45);

  --text-1:  #F2F2F6;
  --text-2:  #9B9BB0;
  --text-3:  #64647A;

  --accent:       #22C55E;
  --accent-hover: #1CA04C;
  --accent-muted: rgba(34,197,94,0.12);
  --accent-glow:  rgba(34,197,94,0.20);

  --red:      #F87171;
  --red-bg:   rgba(248,113,113,0.12);
  --amber:    #FBBF24;
  --amber-bg: rgba(251,191,36,0.12);
  --blue:     #60A5FA;
  --blue-bg:  rgba(96,165,250,0.12);
  --purple:   #A78BFA;
  --purple-bg: rgba(167,139,250,0.12);
  --gray:     #9CA3AF;
  --gray-bg:  rgba(156,163,175,0.12);

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow:    0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);

  --sidebar-width: 240px;
  --topbar-height: 58px;
  --t: 150ms ease;
}

/* ============================================================ Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg-base); color: var(--text-1); min-height: 100vh; line-height: 1.5; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ============================================================ Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--t);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo-icon {
  width: 32px; height: 32px;
  background: var(--accent-muted);
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.sidebar-logo-text { font-size: 13px; font-weight: 600; color: var(--text-1); }
.sidebar-logo-sub  { font-size: 10px; color: var(--text-3); letter-spacing: 0.05em; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.sidebar-section { margin-bottom: 20px; }
.sidebar-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-3);
  padding: 0 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  transition: all var(--t);
  cursor: pointer;
  margin-bottom: 2px;
}
.nav-item:hover  { background: var(--bg-hover); color: var(--text-1); }
.nav-item.active { background: var(--accent-muted); color: var(--accent); }
.nav-item svg    { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid var(--border);
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--t);
  cursor: pointer;
}
.user-card:hover { background: var(--bg-hover); }
.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-muted);
  border: 1px solid var(--accent-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--accent);
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name  { font-size: 12px; font-weight: 500; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role  { font-size: 10px; color: var(--text-3); }

/* Main */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-height);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 15px; font-weight: 600; color: var(--text-1); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.page-body { padding: 28px; flex: 1; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 20px; font-weight: 600; color: var(--text-1); }
.page-header p  { font-size: 13px; color: var(--text-2); margin-top: 3px; }

/* ============================================================ Components */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  transition: all var(--t);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent); color: #0C2010;
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-secondary {
  background: var(--bg-card); color: var(--text-1);
  border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-hover); }

.btn-ghost {
  background: transparent; color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-1); }

.btn-danger {
  background: var(--red-bg); color: var(--red);
  border-color: rgba(248,113,113,0.2);
}
.btn-danger:hover:not(:disabled) { background: rgba(248,113,113,0.2); }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; justify-content: center; }
.btn-icon.btn-sm { padding: 5px; width: 26px; height: 26px; }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.card-title   { font-size: 14px; font-weight: 600; color: var(--text-1); }
.card-body    { padding: 20px; }
.card-footer  { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }

/* Forms */
.form-group   { margin-bottom: 16px; }
.form-label   { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 13px;
  padding: 8px 12px;
  transition: border-color var(--t);
  outline: none;
}
.form-control:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-muted); }
.form-control::placeholder { color: var(--text-3); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px; font-weight: 500;
}
.badge-green  { background: var(--accent-muted);  color: var(--accent); }
.badge-red    { background: var(--red-bg);         color: var(--red); }
.badge-amber  { background: var(--amber-bg);       color: var(--amber); }
.badge-blue   { background: var(--blue-bg);        color: var(--blue); }
.badge-purple { background: var(--purple-bg);      color: var(--purple); }
.badge-gray   { background: var(--gray-bg);        color: var(--gray); }

/* Tables */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}
.table td:first-child { color: var(--text-1); font-weight: 500; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--bg-hover); }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
}
.stat-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon.green  { background: var(--accent-muted); color: var(--accent); }
.stat-icon.blue   { background: var(--blue-bg);   color: var(--blue); }
.stat-icon.amber  { background: var(--amber-bg);  color: var(--amber); }
.stat-icon.red    { background: var(--red-bg);    color: var(--red); }
.stat-icon.purple { background: var(--purple-bg); color: var(--purple); }
.stat-icon svg { width: 18px; height: 18px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--text-1); line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* Grid layout */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* Alerts */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid transparent;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--accent-muted); color: var(--accent); border-color: var(--accent-glow); }
.alert-danger   { background: var(--red-bg); color: var(--red); border-color: rgba(248,113,113,0.2); }
.alert-warning  { background: var(--amber-bg); color: var(--amber); border-color: rgba(251,191,36,0.2); }
.alert-info     { background: var(--blue-bg); color: var(--blue); border-color: rgba(96,165,250,0.2); }

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.empty-icon { width: 48px; height: 48px; color: var(--text-3); margin-bottom: 16px; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-desc  { font-size: 13px; color: var(--text-3); max-width: 360px; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px);
  transition: transform var(--t);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-title  { font-size: 15px; font-weight: 600; color: var(--text-1); }
.modal-close  { color: var(--text-3); transition: color var(--t); }
.modal-close:hover { color: var(--text-1); }
.modal-body   { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.modal-lg .modal { max-width: 720px; }
.modal-xl .modal { max-width: 960px; }

/* Toast */
.toast-container {
  position: fixed; top: 16px; right: 16px;
  z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  font-size: 13px; color: var(--text-1);
  pointer-events: all;
  animation: slideIn 200ms ease forwards;
  min-width: 280px; max-width: 380px;
}
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast.toast-success { border-color: var(--accent-glow); }
.toast.toast-success svg { color: var(--accent); }
.toast.toast-error svg  { color: var(--red); }
.toast.toast-warning svg { color: var(--amber); }
.toast.hiding { animation: slideOut 200ms ease forwards; }
@keyframes slideIn  { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideOut { from { transform: none; opacity: 1; } to { transform: translateX(24px); opacity: 0; } }

/* Loader */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 600ms linear infinite;
  flex-shrink: 0;
}
.spinner-sm { width: 14px; height: 14px; }
.spinner-lg { width: 28px; height: 28px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex; align-items: center; justify-content: center;
  padding: 48px; flex-direction: column; gap: 12px;
  color: var(--text-3);
}
.loading-overlay span { font-size: 13px; }

/* Search / filter bar */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.search-input-wrap {
  position: relative; flex: 1; min-width: 200px;
}
.search-input-wrap svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-3);
  pointer-events: none;
}
.search-input-wrap input { padding-left: 34px; }

/* Kanban */
.kanban-board {
  display: flex; gap: 16px;
  overflow-x: auto; padding-bottom: 16px;
  align-items: flex-start;
}
.kanban-col {
  min-width: 260px; max-width: 280px; flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
}
.kanban-col-header {
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.kanban-col-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--text-1);
}
.stage-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.kanban-count {
  background: var(--bg-active); color: var(--text-2);
  font-size: 11px; font-weight: 500;
  padding: 1px 7px; border-radius: 100px;
}
.kanban-cards {
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 80px; flex: 1;
}
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--t);
  position: relative;
}
.kanban-card:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.kanban-card.dragging { opacity: 0.5; }
.kcard-company { font-size: 13px; font-weight: 500; color: var(--text-1); margin-bottom: 4px; }
.kcard-segment { font-size: 11px; color: var(--text-3); margin-bottom: 8px; }
.kcard-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kcard-phone { font-size: 11px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.kcard-phone svg { width: 11px; height: 11px; }
.kcard-assigned {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 9px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto;
}

/* Prospect card */
.prospect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.prospect-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color var(--t);
  display: flex; flex-direction: column; gap: 8px;
}
.prospect-card:hover { border-color: var(--border-strong); }
.prospect-card.imported { border-color: var(--accent-glow); }
.pcard-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.pcard-segment { font-size: 12px; color: var(--accent); background: var(--accent-muted); padding: 2px 8px; border-radius: 100px; display: inline-block; }
.pcard-desc { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.pcard-contacts { display: flex; flex-direction: column; gap: 5px; }
.pcard-contact-item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); }
.pcard-contact-item svg { width: 13px; height: 13px; color: var(--text-3); flex-shrink: 0; }
.pcard-contact-item a { color: var(--blue); }
.pcard-contact-item a:hover { text-decoration: underline; }
.pcard-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.pcard-location { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.pcard-location svg { width: 12px; height: 12px; }
.pcard-rating { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--amber); }
.pcard-rating svg { width: 12px; height: 12px; }

/* Activity feed */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.activity-icon svg { width: 13px; height: 13px; }
.act-call      { background: var(--blue-bg);  color: var(--blue); }
.act-whatsapp  { background: var(--accent-muted); color: var(--accent); }
.act-email     { background: var(--amber-bg); color: var(--amber); }
.act-meeting   { background: var(--purple-bg); color: var(--purple); }
.act-note      { background: var(--gray-bg);  color: var(--gray); }
.activity-body { flex: 1; }
.activity-text { font-size: 13px; color: var(--text-1); line-height: 1.5; }
.activity-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* Pipeline stage selector */
.stage-selector {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.stage-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500;
  color: var(--text-2);
  background: transparent;
  cursor: pointer;
  transition: all var(--t);
}
.stage-btn:hover  { background: var(--bg-hover); color: var(--text-1); }
.stage-btn.active { color: var(--text-1); }

/* Progress bar */
.progress-bar-wrap { background: var(--bg-input); border-radius: 100px; height: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 100px; background: var(--accent); transition: width 400ms ease; }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px;
  font-size: 13px; font-weight: 500; color: var(--text-3);
  border-bottom: 2px solid transparent;
  transition: all var(--t); cursor: pointer;
  margin-bottom: -1px;
}
.tab-btn:hover  { color: var(--text-2); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel      { display: none; }
.tab-panel.active { display: block; }

/* Divider */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: center; margin-top: 24px; }
.page-btn {
  min-width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500; color: var(--text-2);
  border: 1px solid transparent;
  transition: all var(--t); cursor: pointer;
}
.page-btn:hover      { background: var(--bg-hover); color: var(--text-1); }
.page-btn.active     { background: var(--accent-muted); color: var(--accent); border-color: var(--accent-glow); }
.page-btn:disabled   { opacity: 0.4; cursor: not-allowed; }

/* Checkbox */
.checkbox-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-wrap input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Toggle switch */
.toggle {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.toggle input { display: none; }
.toggle-track {
  width: 38px; height: 22px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  position: relative;
  transition: all var(--t);
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: var(--text-3);
  border-radius: 50%;
  transition: all var(--t);
}
.toggle input:checked + .toggle-track { background: var(--accent-muted); border-color: var(--accent-glow); }
.toggle input:checked + .toggle-track::after { background: var(--accent); transform: translateX(16px); }
.toggle-label { font-size: 13px; color: var(--text-2); }

/* ============================================================ Login Page */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-base);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  text-align: center; margin-bottom: 28px;
}
.login-logo-icon {
  width: 52px; height: 52px;
  background: var(--accent-muted);
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  color: var(--accent);
}
.login-logo h1 { font-size: 18px; font-weight: 700; color: var(--text-1); }
.login-logo p  { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* ============================================================ Utils */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-sm   { font-size: 12px; }
.text-muted { color: var(--text-3); }
.text-2    { color: var(--text-2); }
.text-accent { color: var(--accent); }
.text-red  { color: var(--red); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.w-full   { width: 100%; }

/* Dropdown */
.dropdown { position: relative; display: inline-flex; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 160px; z-index: 150;
  padding: 6px;
  display: none;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  font-size: 13px; color: var(--text-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t);
}
.dropdown-item:hover  { background: var(--bg-hover); color: var(--text-1); }
.dropdown-item svg    { width: 14px; height: 14px; }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-bg); }
.dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* Sidebar toggle (mobile) */
.sidebar-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 6px;
  color: var(--text-2);
}

/* ============================================================ Responsive */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --sidebar-width: 240px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content { margin-left: 0; }
  .sidebar-overlay { display: block; }
  .sidebar-toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-body { padding: 16px; }
  .topbar { padding: 0 16px; }
  .modal { border-radius: var(--radius) var(--radius) 0 0; margin-bottom: 0; max-width: 100%; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .kanban-board { padding-bottom: 20px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 28px 20px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-input-wrap { min-width: unset; }
  .btn-lg { padding: 10px 18px; }
}

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-active); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }
