/* ═══════════════════════════════════════════════════
   NexFlow CRM — Light Corporate Theme
   Fontes: Bricolage Grotesque (display) + Inter (body)
═══════════════════════════════════════════════════ */

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

:root {
  /* Base */
  --bg:        #f0f2f7;
  --surface:   #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #eef0f7;

  /* Borders */
  --border:    #e2e6f0;
  --border-hi: #cdd2e4;

  /* Brand */
  --brand:     #2563eb;
  --brand-dk:  #1d4ed8;
  --brand-lt:  #eff4ff;
  --brand-mid: #dbeafe;

  /* Semantic */
  --green:     #059669;
  --green-lt:  #ecfdf5;
  --red:       #dc2626;
  --red-lt:    #fef2f2;
  --amber:     #d97706;
  --amber-lt:  #fffbeb;
  --violet:    #7c3aed;
  --violet-lt: #f5f3ff;

  /* Text */
  --text:      #0f172a;
  --text-2:    #334155;
  --text-3:    #64748b;
  --text-4:    #94a3b8;

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.05);
  --shadow-sm: 0 2px 8px rgba(15,23,42,.08), 0 1px 3px rgba(15,23,42,.06);
  --shadow-md: 0 6px 24px rgba(15,23,42,.10), 0 2px 8px rgba(15,23,42,.06);
  --shadow-lg: 0 16px 48px rgba(15,23,42,.14), 0 4px 16px rgba(15,23,42,.08);
  --shadow-xl: 0 28px 80px rgba(15,23,42,.18), 0 8px 24px rgba(15,23,42,.10);

  /* Radii */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-2xl: 26px;
  --r-full: 999px;

  /* Sidebar */
  --sidebar-w: 248px;
}

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

html { font-size: 14px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: #b0b8d0; }
::-webkit-scrollbar-track { background: transparent; }

/* ════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
}

/* ════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════ */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
  box-shadow: var(--shadow-xs);
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  width: 34px; height: 34px;
  border-radius: var(--r-md);
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(37,99,235,.30);
  flex-shrink: 0;
}

.brand-mark svg { width: 18px; height: 18px; fill: #fff; }

.brand-text strong {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 15px; font-weight: 800; color: var(--text);
  display: block; line-height: 1.1;
}

.brand-text span {
  font-size: 11px; color: var(--text-3); font-weight: 500;
}

/* NAV */
.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section { margin-top: 18px; }
.nav-section:first-child { margin-top: 0; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-4);
  padding: 0 8px;
  margin-bottom: 5px;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .12s, color .12s;
  text-align: left;
}

.nav-btn i { font-size: 16px; flex-shrink: 0; opacity: .85; }
.nav-btn:hover { background: var(--surface-3); color: var(--text-2); }
.nav-btn.active {
  background: var(--brand-lt);
  color: var(--brand);
  font-weight: 600;
}
.nav-btn.active i { opacity: 1; }
.nav-btn.hidden { display: none !important; }

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-full);
  background: var(--brand-mid);
  color: var(--brand);
}

/* SIDEBAR FOOTER */
.sidebar-foot {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.user-avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

.user-info .name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-info .role { font-size: 11px; color: var(--text-3); }

.logout-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-3);
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: .12s;
}
.logout-btn:hover { background: var(--red-lt); color: var(--red); border-color: #fecaca; }
.logout-btn i { font-size: 14px; }

/* ════════════════════════════════════════════════
   MAIN AREA
════════════════════════════════════════════════ */
.main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* TOPBAR */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 22px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
  z-index: 10;
  box-shadow: var(--shadow-xs);
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

.page-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
}

.breadcrumb {
  font-size: 12px;
  color: var(--text-3);
  display: flex; align-items: center; gap: 5px;
}
.breadcrumb i { font-size: 10px; }

.topbar-right { display: flex; align-items: center; gap: 8px; }

/* ════════════════════════════════════════════════
   KANBAN TOOLS BAR
════════════════════════════════════════════════ */
.kanban-tools {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.metrics-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.metric-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px; font-weight: 600; color: var(--text-2);
}
.metric-chip b { font-weight: 700; color: var(--text); }
.metric-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.metric-chip.green .dot { background: var(--green); }
.metric-chip.red .dot { background: var(--red); }
.metric-chip.amber .dot { background: var(--amber); }

.tools-right { display: flex; align-items: center; gap: 8px; }

/* ════════════════════════════════════════════════
   INPUTS / BUTTONS
════════════════════════════════════════════════ */
.input {
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 500;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  background: #fff;
}
.input::placeholder { color: var(--text-4); }

.input-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s, transform .1s;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
}
.btn:hover { background: var(--surface-3); border-color: var(--border-hi); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn.primary {
  background: var(--brand);
  border-color: var(--brand-dk);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.btn.primary:hover { background: var(--brand-dk); box-shadow: 0 4px 14px rgba(37,99,235,.35); }

.btn.success {
  background: var(--green-lt);
  border-color: #a7f3d0;
  color: var(--green);
}
.btn.success:hover { background: #d1fae5; }

.btn.danger {
  background: var(--red-lt);
  border-color: #fecaca;
  color: var(--red);
}
.btn.danger:hover { background: #fee2e2; }

.btn.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text-3);
}
.btn.ghost:hover { background: var(--surface-3); border-color: var(--border); }

.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; }

.iconbtn {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: .12s;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.iconbtn:hover { background: var(--surface-3); border-color: var(--border-hi); }
.iconbtn i { font-size: 16px; }

/* Switch */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: var(--border-hi); border-radius: var(--r-full);
  cursor: pointer; transition: .2s;
}
.slider::before {
  content: ""; position: absolute;
  width: 14px; height: 14px;
  top: 4px; left: 4px;
  background: #fff; border-radius: 50%;
  transition: .2s; box-shadow: var(--shadow-xs);
}
input:checked + .slider { background: var(--brand); }
input:checked + .slider::before { transform: translateX(16px); }

/* ════════════════════════════════════════════════
   CONTENT & PAGES
════════════════════════════════════════════════ */
.content { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

/* BOARD */
.board-area { flex: 1; display: none; overflow-x: auto; overflow-y: hidden; padding: 18px 18px 22px; gap: 12px; align-items: flex-start; }
.board-area.active { display: flex; }

/* PAGE */
.page { display: none; flex: 1; overflow-y: auto; padding: 20px 22px; flex-direction: column; gap: 16px; }
.page.active { display: flex; }

/* ════════════════════════════════════════════════
   KANBAN COLUMN
════════════════════════════════════════════════ */
.col {
  min-width: 280px; max-width: 280px; flex: 0 0 280px;
  display: flex; flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 12px;
  align-self: stretch;
}

.col-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 4px;
}

.col-title {
  font-size: 12px; font-weight: 700;
  color: var(--text-2);
  display: flex; align-items: center; gap: 6px;
}

.col-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

.col-count {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-3);
}

.col-avg { font-size: 11px; color: var(--text-4); font-weight: 500; margin-bottom: 10px; padding-left: 2px; }

.stack {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 2px;
  border-radius: var(--r-lg);
  position: relative;
  transition: background .12s;
  min-height: 40px;
}

.stack.drop-hover { background: var(--brand-lt); outline: 2px dashed var(--brand); outline-offset: 3px; }

.drop-hint {
  display: none; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; border-radius: var(--r-lg);
  background: var(--brand-lt); border: 1px dashed var(--brand);
  color: var(--brand); font-size: 12px; font-weight: 600;
}
.stack.drop-hover .drop-hint { display: flex; }

/* ════════════════════════════════════════════════
   LEAD CARD
════════════════════════════════════════════════ */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 11px 13px;
  cursor: pointer;
  transition: box-shadow .14s, transform .14s, border-color .14s;
  box-shadow: var(--shadow-xs);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hi);
  transform: translateY(-1px);
}
.card.dragging { opacity: .55; transform: scale(.97) rotate(-.5deg); }
.card.sla-warn { border-left: 3px solid var(--amber); }
.card.sla-danger { border-left: 3px solid var(--red); }

.card-actions {
  position: absolute; right: 8px; top: 8px;
  display: flex; gap: 4px;
  opacity: 0; pointer-events: none; transition: .13s;
}
.card:hover .card-actions { opacity: 1; pointer-events: auto; }

.card-act {
  width: 26px; height: 26px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-3); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: .12s;
  box-shadow: var(--shadow-xs);
}
.card-act:hover { background: var(--surface-3); color: var(--text); }
.card-act.wa:hover { background: #dcfce7; color: var(--green); border-color: #a7f3d0; }
.card-act.win:hover { background: var(--brand-lt); color: var(--brand); border-color: var(--brand-mid); }
.card-act i { font-size: 13px; }

.card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}

.card-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0; padding-right: 60px;
}

.card-timer {
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: var(--r-full);
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--text-4); font-variant-numeric: tabular-nums;
  white-space: nowrap; flex-shrink: 0;
}
.card-timer.warn { background: var(--amber-lt); border-color: #fde68a; color: var(--amber); }
.card-timer.danger { background: var(--red-lt); border-color: #fecaca; color: var(--red); }

.card-meta { display: flex; gap: 5px; flex-wrap: wrap; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 600;
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--text-3);
}
.tag i { font-size: 11px; }
.tag.blue { background: var(--brand-lt); border-color: var(--brand-mid); color: var(--brand); }
.tag.green { background: var(--green-lt); border-color: #a7f3d0; color: var(--green); }
.tag.amber { background: var(--amber-lt); border-color: #fde68a; color: var(--amber); }
.tag.red { background: var(--red-lt); border-color: #fecaca; color: var(--red); }
.tag.violet { background: var(--violet-lt); border-color: #ddd6fe; color: var(--violet); }
.tag.ghost { background: transparent; border-color: transparent; color: var(--text-4); }

/* ════════════════════════════════════════════════
   CARDS / PANELS
════════════════════════════════════════════════ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}

.panel-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.panel-title .left { display: flex; align-items: center; gap: 8px; }
.panel-title i { font-size: 16px; color: var(--text-3); }

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; gap: 4px;
}
.metric-card:hover { box-shadow: var(--shadow-sm); }

.metric-card .label {
  font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 2px;
}
.metric-card .value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 24px; font-weight: 800; color: var(--text);
  letter-spacing: -.5px; line-height: 1;
}
.metric-card .sub { font-size: 12px; color: var(--text-3); font-weight: 500; margin-top: 2px; }

.metric-card.brand  { border-top: 3px solid var(--brand); }
.metric-card.green  { border-top: 3px solid var(--green); }
.metric-card.amber  { border-top: 3px solid var(--amber); }
.metric-card.red    { border-top: 3px solid var(--red); }
.metric-card.violet { border-top: 3px solid var(--violet); }

/* Canvas */
.canvas-wrap { position: relative; width: 100%; height: 250px; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

/* ════════════════════════════════════════════════
   TABLE
════════════════════════════════════════════════ */
.table-wrap {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

thead tr { background: var(--surface-2); }
th {
  padding: 10px 14px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase;
  color: var(--text-3); text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 11px 14px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-2); }

/* ════════════════════════════════════════════════
   MODAL
════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 9999;
}
.modal-overlay.hidden { display: none; }

.modal {
  width: min(680px, 100%);
  max-height: 90vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  flex-shrink: 0;
}

.modal-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px; font-weight: 800; color: var(--text);
}
.modal-sub { font-size: 12px; color: var(--text-3); font-weight: 500; margin-top: 3px; }

.modal-body {
  flex: 1; overflow-y: auto;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 14px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--surface-2); flex-shrink: 0;
}
.modal-footer .left, .modal-footer .right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* FORM FIELDS */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text-3); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 500;
  outline: none; transition: .14s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.10);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-hi); }
.field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.info-box {
  display: flex; align-items: center;
  min-height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 13px; font-weight: 600; color: var(--text-2);
}

.wa-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 14px; height: 36px; border-radius: var(--r-full);
  background: var(--green-lt); border: 1px solid #a7f3d0;
  color: var(--green); font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: .12s;
}
.wa-link:hover { background: #d1fae5; }
.wa-link i { font-size: 15px; }

/* ════════════════════════════════════════════════
   TOAST
════════════════════════════════════════════════ */
.toast-wrap {
  position: fixed; right: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 2000; pointer-events: none;
}

.toast {
  width: min(360px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 11px 13px;
  display: flex; gap: 10px; align-items: flex-start;
  opacity: 0; transform: translateY(6px);
  animation: toastIn .16s ease forwards;
  pointer-events: none;
}
@keyframes toastIn { to { opacity: 1; transform: translateY(0); } }

.toast .ic {
  width: 32px; height: 32px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.toast .tx .t { font-size: 13px; font-weight: 700; color: var(--text); }
.toast .tx .d { font-size: 11px; color: var(--text-3); font-weight: 500; margin-top: 1px; }

.toast.success .ic { background: var(--green-lt); color: var(--green); }
.toast.error   .ic { background: var(--red-lt);   color: var(--red);   }
.toast.info    .ic { background: var(--brand-lt);  color: var(--brand); }
.toast.warn    .ic { background: var(--amber-lt);  color: var(--amber); }

/* ════════════════════════════════════════════════
   PERFORMANCE PAGE
════════════════════════════════════════════════ */
.seller-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.seller-tab {
  padding: 6px 14px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-3); font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: .12s;
  box-shadow: var(--shadow-xs);
}
.seller-tab:hover { background: var(--surface-3); color: var(--text-2); }
.seller-tab.active { background: var(--brand); border-color: var(--brand-dk); color: #fff; }

.perf-hero {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
}
.perf-avatar {
  width: 54px; height: 54px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}

.perf-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.perf-stat {
  padding: 12px 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.perf-stat .v {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 22px; font-weight: 800; color: var(--text); line-height: 1;
}
.perf-stat .l { font-size: 11px; font-weight: 600; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: .4px; }

.goal-bar-bg { height: 8px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.goal-bar-fill { height: 100%; border-radius: var(--r-full); transition: width .4s ease; }

/* Stage mini bars */
.stage-mini { display: flex; flex-direction: column; gap: 10px; }
.stage-mini-row { }
.stage-mini-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 600; margin-bottom: 4px;
}
.stage-mini-head .sname { display: flex; align-items: center; gap: 7px; color: var(--text-2); }
.stage-mini-head .scount { color: var(--text-3); }
.stage-bar-bg { height: 5px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.stage-bar-fill { height: 100%; border-radius: var(--r-full); opacity: .85; }

/* ════════════════════════════════════════════════
   SETTINGS
════════════════════════════════════════════════ */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.setting-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; padding-bottom: 0; }
.setting-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.setting-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ════════════════════════════════════════════════
   MISC
════════════════════════════════════════════════ */
.hidden { display: none !important; }
.flex-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sep { height: 1px; background: var(--border); margin: 4px 0; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 32px; color: var(--text-3);
}
.empty-state i { font-size: 28px; color: var(--text-4); }
.empty-state p { font-size: 13px; font-weight: 500; }

/* Status badge */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
