/* ============================================================
   GCNB Sistema de Gestão — Design System v3 (Mobile First)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg:           #0c0c0f;
  --bg2:          #111116;
  --surface:      #17171d;
  --surface2:     #1e1e26;
  --surface3:     #25252f;
  --border:       rgba(255,255,255,.07);
  --border2:      rgba(255,255,255,.04);
  --accent:       #5e7cff;
  --accent-dim:   rgba(94,124,255,.12);
  --accent-hover: #7b94ff;
  --gold:         #e8b84b;
  --gold-dim:     rgba(232,184,75,.12);
  --gold-hover:   #f5cc6a;
  --green:        #34c97a;
  --green-dim:    rgba(52,201,122,.11);
  --red:          #f05252;
  --red-dim:      rgba(240,82,82,.11);
  --orange:       #f59e0b;
  --orange-dim:   rgba(245,158,11,.11);
  --blue:         #5e7cff;
  --blue-dim:     rgba(94,124,255,.11);
  --purple:       #a78bfa;
  --purple-dim:   rgba(167,139,250,.11);
  --teal:         #2dd4bf;
  --teal-dim:     rgba(45,212,191,.11);
  --text:         #f0f0f5;
  --text2:        #9898b0;
  --text3:        #5a5a72;
  --sidebar-w:    256px;
  --header-h:     60px;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    22px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.4);
  --shadow:       0 4px 16px rgba(0,0,0,.35);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.5);
  --t:            .18s cubic-bezier(.4,0,.2,1);
}

[data-theme="light"] {
  --bg:           #f2f2f7;
  --bg2:          #e8e8f0;
  --surface:      #ffffff;
  --surface2:     #f4f4f9;
  --surface3:     #eaeaf2;
  --border:       rgba(0,0,0,.08);
  --border2:      rgba(0,0,0,.05);
  --accent:       #4060f0;
  --accent-dim:   rgba(64,96,240,.09);
  --accent-hover: #2a46e0;
  --gold:         #b07800;
  --gold-dim:     rgba(176,120,0,.1);
  --gold-hover:   #8a5e00;
  --green:        #16a34a;
  --green-dim:    rgba(22,163,74,.1);
  --red:          #dc2626;
  --red-dim:      rgba(220,38,38,.1);
  --orange:       #d97706;
  --orange-dim:   rgba(217,119,6,.1);
  --purple:       #7c3aed;
  --purple-dim:   rgba(124,58,237,.1);
  --teal:         #0d9488;
  --teal-dim:     rgba(13,148,136,.1);
  --text:         #0f0f18;
  --text2:        #44445e;
  --text3:        #9090b0;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.07);
  --shadow:       0 4px 16px rgba(0,0,0,.07);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.1);
}

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

body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t), color var(--t);
}

a { color: var(--accent); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent-dim); }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 200; overflow-y: auto;
  transition: transform var(--t);
  transform: translateX(-100%);
}
.sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
@media (min-width: 961px) { .sidebar { transform: translateX(0); box-shadow: none; } }

.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 199; backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

.sidebar-logo {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border2);
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 34px; height: 34px; border-radius: 8px;
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-logo-icon img { width: 34px; height: 34px; object-fit: contain; }
.sidebar-logo-text .org {
  font-size: 9px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.3px;
}
.sidebar-logo-text .name { font-size: 13.5px; font-weight: 700; color: var(--text); margin-top: 2px; }

.sidebar-nav { padding: 6px 0; flex: 1; }
.nav-section {
  padding: 14px 16px 4px;
  font-size: 9px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.5px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 16px; color: var(--text2);
  font-size: 13px; font-weight: 500;
  transition: all var(--t);
  border-left: 2px solid transparent;
  cursor: pointer; margin: 1px 0; min-height: 44px;
}
.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .6; }
.nav-item:hover { color: var(--text); background: var(--surface2); }
.nav-item.active { color: var(--accent); background: var(--accent-dim); border-left-color: var(--accent); font-weight: 600; }
.nav-item.active svg { opacity: 1; }
.nav-item.disabled { opacity: .28; cursor: default; pointer-events: none; }
.nav-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 20px; min-width: 18px; text-align: center;
}

.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border2); flex-shrink: 0; }
.sidebar-user { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.sidebar-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-dim); border: 1px solid rgba(94,124,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.sidebar-user-info .sname { font-size: 12.5px; font-weight: 600; color: var(--text); }
.sidebar-user-info .srole { font-size: 11px; color: var(--text3); }
.sidebar-actions { display: flex; gap: 6px; }

/* ── TOPBAR ── */
.topbar {
  position: fixed; left: 0; right: 0; top: 0;
  height: var(--header-h);
  background: var(--bg2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 190; transition: background var(--t);
}
@media (min-width: 961px) { .topbar { left: var(--sidebar-w); padding: 0 24px; } }
.topbar-left h1 { font-size: 15.5px; font-weight: 700; color: var(--text); }
.topbar-left p  { font-size: 11px; color: var(--text3); margin-top: 1px; }
.topbar-right   { display: flex; align-items: center; gap: 7px; }
#menuToggle { display: flex; }
@media (min-width: 961px) { #menuToggle { display: none; } }

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2); transition: all var(--t);
  min-width: 44px; min-height: 44px;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.icon-btn svg { width: 16px; height: 16px; }

/* ── MAIN ── */
.main { margin-left: 0; padding: calc(var(--header-h) + 18px) 14px 52px; min-height: 100vh; }
@media (min-width: 961px) {
  .main { margin-left: var(--sidebar-w); padding: calc(var(--header-h) + 28px) 28px 52px; }
}

/* ── STAT CARDS ── */
.cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
@media (min-width: 600px) {
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 14px 12px;
  position: relative; overflow: hidden;
  transition: box-shadow var(--t), border-color var(--t), transform var(--t);
}
@media (min-width: 600px) { .stat-card { padding: 18px 18px 16px; } }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.stat-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
@media (min-width: 600px) { .stat-icon { width: 34px; height: 34px; } }
.stat-icon svg { width: 15px; height: 15px; }
.c-accent .stat-icon  { background: var(--accent-dim);  color: var(--accent); }
.c-gold   .stat-icon  { background: var(--gold-dim);    color: var(--gold); }
.c-green  .stat-icon  { background: var(--green-dim);   color: var(--green); }
.c-red    .stat-icon  { background: var(--red-dim);     color: var(--red); }
.c-orange .stat-icon  { background: var(--orange-dim);  color: var(--orange); }
.c-purple .stat-icon  { background: var(--purple-dim);  color: var(--purple); }
.c-teal   .stat-icon  { background: var(--teal-dim);    color: var(--teal); }
.stat-value { font-size: 22px; font-weight: 800; font-family: 'DM Mono', monospace; color: var(--text); line-height: 1; margin-bottom: 3px; letter-spacing: -.5px; }
@media (min-width: 600px) { .stat-value { font-size: 28px; margin-bottom: 4px; } }
.stat-label { font-size: 11px; color: var(--text2); font-weight: 500; }
.stat-sub   { font-size: 10px; color: var(--text3); margin-top: 5px; }
.stat-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; opacity: 0; transition: opacity var(--t); }
.stat-card:hover::after { opacity: 1; }
.c-accent::after { background: var(--accent); }
.c-gold::after   { background: var(--gold); }
.c-green::after  { background: var(--green); }
.c-red::after    { background: var(--red); }
.c-orange::after { background: var(--orange); }
.c-purple::after { background: var(--purple); }
.c-teal::after   { background: var(--teal); }

/* ── TABLE BOX ── */
.table-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; }
.table-box .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-box > table, .table-box > .table-scroll > table { min-width: 500px; }
.table-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border2);
  gap: 10px; flex-wrap: wrap;
}
@media (min-width: 600px) { .table-header { padding: 14px 18px; } }
.table-header h2 { font-size: 13.5px; font-weight: 700; color: var(--text); }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--surface2); }
th { text-align: left; padding: 9px 12px; font-size: 9.5px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--border2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--t); }
tbody tr:hover { background: var(--surface2); }
.td-id { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text3); }
.td-nome { font-weight: 600; }
.row-expired td { background: rgba(240,82,82,.04); }
.row-warning td { background: rgba(245,158,11,.04); }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge svg { width: 10px; height: 10px; }
.badge-paga      { background: var(--green-dim);   color: var(--green); }
.badge-parcial   { background: var(--orange-dim);  color: var(--orange); }
.badge-pagar     { background: var(--red-dim);     color: var(--red); }
.badge-isento    { background: var(--accent-dim);  color: var(--accent); }
.badge-efetivo   { background: var(--gold-dim);    color: var(--gold); }
.badge-incubacao { background: var(--teal-dim);    color: var(--teal); }
.badge-desmob    { background: rgba(90,90,114,.1); color: var(--text3); }
.badge-honra     { background: var(--purple-dim);  color: var(--purple); }
.badge-neutral   { background: var(--surface3);    color: var(--text2); }
.badge-pt        { background: rgba(0,100,200,.1); color: #4d9fdf; }
.badge-gw        { background: rgba(220,38,38,.1); color: #e07878; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; font-family: 'Sora', sans-serif;
  cursor: pointer; border: none; transition: all var(--t);
  white-space: nowrap; text-decoration: none; line-height: 1; min-height: 46px;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(94,124,255,.3); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(94,124,255,.4); }
.btn-gold { background: var(--gold); color: #0c0c0f; }
.btn-gold:hover { background: var(--gold-hover); color: #0c0c0f; transform: translateY(-1px); }
.btn-ghost { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(240,82,82,.2); }
.btn-danger:hover { background: rgba(240,82,82,.18); }
.btn-green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(52,201,122,.2); }
.btn-green:hover { background: rgba(52,201,122,.2); }
.btn-sm   { padding: 10px 13px; font-size: 12px; min-height: 40px; }
.btn-xs   { padding: 7px 10px;  font-size: 11px; min-height: 34px; }
.btn-icon { padding: 10px; background: var(--surface2); color: var(--text2); border: 1px solid var(--border); border-radius: var(--radius-sm); min-height: 46px; min-width: 46px; }
.btn-icon:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.btn-icon svg { width: 15px; height: 15px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 24px; }

/* ── FORMS ── */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 14px; }
@media (min-width: 600px) { .form-card { padding: 22px; margin-bottom: 16px; } }
.form-card-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.1px;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border2); flex-wrap: wrap;
}
.form-card-title svg { width: 14px; height: 14px; color: var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) { .form-grid { grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 14px; } }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 11.5px; font-weight: 600; color: var(--text2); }
input[type=text], input[type=email], input[type=tel],
input[type=date], input[type=number], input[type=password],
select, textarea {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 10px 11px; font-size: 14px; font-family: 'Sora', sans-serif;
  outline: none; transition: border-color var(--t), box-shadow var(--t); width: 100%; min-height: 44px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
input::placeholder { color: var(--text3); }
select option { background: var(--surface2); }
textarea { resize: vertical; min-height: 88px; }
.input-wrap { position: relative; }
.input-wrap input { padding-left: 34px; }
.input-wrap .iico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; display: flex; }
.input-wrap .iico svg { width: 14px; height: 14px; }
.checkboxes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chk-item {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 11px; cursor: pointer;
  font-size: 13px; transition: all var(--t); user-select: none; color: var(--text2); min-height: 40px;
}
.chk-item:hover { border-color: var(--accent); color: var(--accent); }
.chk-item input { width: auto; padding: 0; box-shadow: none; accent-color: var(--accent); min-height: unset; }
.chk-item.checked { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.upload-area {
  display: flex; align-items: center; gap: 10px;
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 18px 16px; cursor: pointer; font-size: 13px; color: var(--text3); transition: all var(--t);
}
.upload-area svg { width: 18px; height: 18px; flex-shrink: 0; }
.upload-area:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.upload-area input { display: none; }
.pais-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.pais-opt { display: flex; align-items: center; gap: 7px; padding: 8px 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: var(--text2); transition: all var(--t); user-select: none; }
.pais-opt svg { width: 15px; height: 15px; }
.pais-opt:hover { border-color: var(--accent); }
.pais-opt.selected { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.pais-opt input { display: none; }

/* ── PAGE HEADER ── */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
@media (min-width: 600px) { .page-head h1 { font-size: 21px; } .page-head { margin-bottom: 22px; } }
.page-head p  { font-size: 12px; color: var(--text3); margin-top: 3px; }
.page-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── FILTERS ── */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-items: center; margin-bottom: 14px;
}
/* Mobile: selects ocupam linha toda */
.filters select,
.filters .filter-select {
  min-width: 130px; width: 100%;
}
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap input { padding-left: 34px; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }
/* Desktop: tudo na mesma linha */
@media (min-width: 961px) {
  .filters { flex-wrap: nowrap; }
  .filters .search-wrap { flex: 2; min-width: 0; }
  .filters select,
  .filters .filter-select { min-width: 0 !important; width: auto !important; flex: 1; }
}

/* ── DETAIL CARDS ── */
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; }
@media (min-width: 700px) { .detail-grid { grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; } }
.detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
@media (min-width: 600px) { .detail-card { padding: 20px; } }
.detail-card h3 { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border2); flex-wrap: wrap; }
.detail-card h3 svg { width: 13px; height: 13px; color: var(--accent); }
.detail-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--border2); gap: 12px; }
.detail-row:last-child { border-bottom: none; }
.detail-key { font-size: 11.5px; color: var(--text3); flex-shrink: 0; }
.detail-val { font-size: 13px; text-align: right; word-break: break-word; font-weight: 500; }

/* ── MEMBER HEADER ── */
.member-header { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
@media (min-width: 600px) { .member-header { padding: 22px; gap: 18px; margin-bottom: 18px; align-items: center; } }
.member-avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--accent-dim); border: 2px solid rgba(94,124,255,.2); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: var(--accent); flex-shrink: 0; overflow: hidden; }
@media (min-width: 600px) { .member-avatar { width: 60px; height: 60px; font-size: 22px; } }
.member-avatar.sm { width: 34px; height: 34px; font-size: 13px; }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-header-info { flex: 1; min-width: 0; }
.member-header-info h2 { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
@media (min-width: 600px) { .member-header-info h2 { font-size: 19px; } }
.member-header-info p  { font-size: 12px; color: var(--text3); margin-top: 2px; }
.member-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.member-header-actions { display: flex; gap: 7px; flex-wrap: wrap; width: 100%; }
@media (min-width: 600px) { .member-header-actions { width: auto; flex-shrink: 0; } }
.member-header-actions .btn { flex: 1; }
@media (min-width: 600px) { .member-header-actions .btn { flex: none; } }

/* ── ALERTS ── */
.alert { display: flex; align-items: flex-start; gap: 9px; padding: 11px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 14px; line-height: 1.5; }
.alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--green-dim);  border: 1px solid rgba(52,201,122,.22);  color: var(--green); }
.alert-error   { background: var(--red-dim);    border: 1px solid rgba(240,82,82,.22);   color: var(--red); }
.alert-warn    { background: var(--orange-dim); border: 1px solid rgba(245,158,11,.22);  color: var(--orange); }
.alert-info    { background: var(--accent-dim); border: 1px solid rgba(94,124,255,.22);  color: var(--accent); }

/* ── MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 300; align-items: flex-end; justify-content: center; backdrop-filter: blur(4px); }
@media (min-width: 600px) { .modal-overlay { align-items: center; } }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 22px 18px; width: 100%; max-width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalInMobile .25s cubic-bezier(.34,1.2,.64,1); }
@media (min-width: 600px) { .modal-box { border-radius: var(--radius-xl); max-width: 520px; margin: 16px; animation: modalIn .2s cubic-bezier(.34,1.3,.64,1); } }
@keyframes modalInMobile { from { opacity:0; transform: translateY(40px); } to { opacity:1; transform: translateY(0); } }
@keyframes modalIn { from { opacity:0; transform: scale(.94) translateY(8px); } to { opacity:1; transform: scale(1) translateY(0); } }
.modal-box h2 { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.modal-sub    { font-size: 12px; color: var(--text3); margin-bottom: 18px; }

/* ── PAGINATION ── */
.pagination { display: flex; gap: 5px; padding: 12px 14px; border-top: 1px solid var(--border2); align-items: center; justify-content: center; flex-wrap: wrap; }
.page-btn { padding: 7px 11px; border-radius: var(--radius-sm); background: var(--surface2); border: 1px solid var(--border); color: var(--text3); font-size: 12px; cursor: pointer; font-family: 'Sora', sans-serif; transition: all var(--t); text-decoration: none; display: inline-flex; align-items: center; min-height: 38px; }
.page-btn:hover, .page-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ── PROGRESS ── */
.progress-bar { height: 4px; background: var(--surface3); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width .5s cubic-bezier(.4,0,.2,1); }

/* ── EMPTY STATE ── */
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 36px 20px; text-align: center; color: var(--text3); }
.empty-state svg { width: 38px; height: 38px; margin-bottom: 12px; opacity: .35; }
.empty-state p { font-size: 13px; }

/* ── LOGIN ── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(ellipse at 25% 20%, rgba(94,124,255,.07) 0%, transparent 55%), radial-gradient(ellipse at 85% 85%, rgba(52,201,122,.05) 0%, transparent 50%), var(--bg);
}
.login-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px 22px; width: 100%; max-width: 390px; box-shadow: var(--shadow-lg); }
@media (min-width: 480px) { .login-box { padding: 38px; } }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-icon { width: 56px; height: 56px; background: var(--accent-dim); border: 1px solid rgba(94,124,255,.2); border-radius: 15px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; color: var(--accent); }
.login-logo-icon svg { width: 28px; height: 28px; }
.login-logo h1 { font-size: 20px; font-weight: 800; letter-spacing: -.2px; }
.login-logo p  { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }