/* ============================================================ GEC design system (light) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3.27.0/dist/tabler-icons.min.css');

:root {
  --brand-teal:        #0D9488;
  --brand-teal-strong: #14B8A6;
  --brand-teal-tint:   #E9F7F4;
  --brand-teal-hover:  #0B7E73;

  --page-bg:        #EEF0F3;
  --surface:        #FFFFFF;
  --surface-subtle: #FAFBFC;
  --border:         #E7EAEE;
  --border-soft:    #F0F2F5;
  --border-input:   #E2E5EA;
  --text:           #0F172A;
  --text-secondary: #475569;
  --text-muted:     #64748B;
  --text-faint:     #94A0B0;

  --nav-label:      #94A0B0;
  --nav-text:       #475569;

  --green:#0D9488;  --green-tint:#E9F7F4;
  --red:  #DC2626;  --red-tint:#FDECEC;
  --amber:#D97706;  --amber-tint:#FBF0E6;
  --blue: #2563EB;  --blue-tint:#EDF1FB;
  --purple:#7C3AED; --purple-tint:#EDE9FE;
  --pink: #DB2777;  --pink-tint:#FCE7F3;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--page-bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #CFD4DB; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
.tn { font-variant-numeric: tabular-nums; }

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

.sidebar {
  width: 248px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 22px 16px;
  position: sticky; top: 0; height: 100vh;
}
.sb-logo { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.sb-logo-chip {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(150deg, var(--brand-teal-strong), var(--brand-teal));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sb-logo-chip i { font-size: 20px; color: #fff; }
.sb-logo-title { font-size: 15px; font-weight: 800; letter-spacing: -0.2px; line-height: 1; color: var(--text); }
.sb-logo-sub { font-size: 11px; color: var(--text-faint); font-weight: 500; margin-top: 3px; }

.sb-label { font-size: 10.5px; font-weight: 700; color: var(--nav-label); letter-spacing: 0.6px; padding: 16px 10px 8px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; border-radius: 11px;
  color: var(--nav-text); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background 0.13s, color 0.13s;
}
.nav-item i { font-size: 18px; }
.nav-item:hover { background: var(--surface-subtle); }
.nav-item.active { background: var(--brand-teal-tint); color: var(--brand-teal); font-weight: 700; }
.nav-item .badge-count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--border-soft); color: var(--text-muted); padding: 1px 8px; border-radius: 20px; }
.nav-item.active .badge-count { background: #fff; color: var(--brand-teal); }
.nav-sub {
  font-size: 12.5px; padding: 8px 11px 8px 40px; color: var(--text-faint);
  border-radius: 9px; cursor: pointer; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-sub:hover { background: var(--surface-subtle); color: var(--text-secondary); }
.nav-sub.active { background: var(--brand-teal-tint); color: var(--brand-teal); font-weight: 700; }

.sb-user {
  margin-top: auto; display: flex; align-items: center; gap: 11px;
  padding: 11px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 13px;
}
.sb-user .av { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.sb-user .nm { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .rl { font-size: 11px; color: var(--text-faint); }
.sb-user a.logout { margin-left: auto; color: var(--text-faint); display: flex; }
.sb-user a.logout:hover { color: var(--red); }

.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 28px; background: rgba(238,240,243,.85);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-input);
  position: sticky; top: 0; z-index: 5;
}
.topbar .crumb { font-size: 12px; color: var(--text-faint); font-weight: 600; }
.topbar h1 { margin: 2px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 9px; background: var(--surface);
  border: 1px solid var(--border-input); border-radius: 11px; padding: 9px 13px; width: 230px;
}
.search input { border: none; outline: none; font-family: inherit; font-size: 13px; color: var(--text); background: transparent; width: 100%; }
.search i { color: var(--text-faint); font-size: 16px; }

.content { padding: 26px 28px 48px; max-width: 1240px; }

/* ============================================================ BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 11px;
  font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: 0.13s; white-space: nowrap;
}
.btn i { font-size: 16px; }
.btn-primary { background: var(--brand-teal); color: #fff; }
.btn-primary:hover { background: var(--brand-teal-hover); }
.btn-primary:disabled { background: #B4D7D2; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--text-secondary); border-color: var(--border-input); }
.btn-ghost:hover { border-color: var(--brand-teal); color: var(--brand-teal); }
.btn-sm { height: 36px; padding: 0 13px; font-size: 12.5px; border-radius: 9px; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 9px; }
.btn-link { background: var(--brand-teal-tint); color: var(--brand-teal); border: 0; padding: 7px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 700; cursor: pointer; }

/* ============================================================ KPI CARDS */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 20px;
}
.kpi-head { display: flex; align-items: center; justify-content: space-between; }
.kpi-icn { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.kpi-icn i { font-size: 19px; }
.kpi-pill { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 20px; }
.kpi-label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin-top: 14px; }
.kpi-value { font-size: 24px; font-weight: 800; letter-spacing: -0.7px; margin-top: 3px; }

.c-teal  { color: var(--brand-teal); } .bg-teal  { background: var(--brand-teal-tint); }
.c-red   { color: var(--red); }        .bg-red   { background: var(--red-tint); }
.c-amber { color: var(--amber); }       .bg-amber { background: var(--amber-tint); }
.c-blue  { color: var(--blue); }        .bg-blue  { background: var(--blue-tint); }
.c-purple{ color: var(--purple); }      .bg-purple{ background: var(--purple-tint); }
.c-pink  { color: var(--pink); }        .bg-pink  { background: var(--pink-tint); }

/* ============================================================ CARDS / PANELS */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 22px;
}
.card-flush { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 14px; }
.card-title { font-size: 14.5px; font-weight: 700; }
.card-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }
.mt-14 { margin-top: 14px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

/* ============================================================ BAR CHART */
.barchart { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; height: 150px; margin-top: 22px; }
.barcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.barpair { display: flex; align-items: flex-end; gap: 5px; height: 126px; }
.bar { width: 14px; border-radius: 4px 4px 0 0; }
.bar.rec { background: var(--brand-teal); }
.bar.exp { background: #F0B7B0; }
.barlabel { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.legend { display: flex; gap: 14px; }
.legend span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-secondary); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 3px; }

/* category progress bars */
.catlist { display: flex; flex-direction: column; gap: 13px; margin-top: 18px; }
.catrow .catrow-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.catrow .cn { font-size: 12.5px; font-weight: 600; color: #334155; }
.catrow .cv { font-size: 12.5px; font-weight: 700; color: var(--text); }
.cattrack { height: 6px; background: #F1F3F6; border-radius: 5px; overflow: hidden; }
.catfill { height: 100%; border-radius: 5px; }

/* ============================================================ TABLES */
.tbl-head, .tbl-row { display: grid; align-items: center; }
.tbl-head { padding: 11px 22px; font-size: 10.5px; font-weight: 700; color: var(--text-faint); letter-spacing: 0.4px; text-transform: uppercase; background: var(--surface-subtle); }
.tbl-row { padding: 13px 22px; border-top: 1px solid var(--border-soft); transition: background 0.12s; }
.tbl-row:hover { background: var(--surface-subtle); }
.tbl-row.clickable { cursor: pointer; }
.r { text-align: right; } .c { text-align: center; }
.av-emoji { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.av-icn { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.av-icn i { font-size: 15px; }
.row-nm { font-size: 13.5px; font-weight: 700; }
.row-mt { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.val { font-size: 13px; font-weight: 600; }
.val-strong { font-size: 13.5px; font-weight: 700; }
.tag { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; display: inline-block; }
.tag-teal  { background: var(--brand-teal-tint); color: var(--brand-teal); }
.tag-amber { background: var(--amber-tint); color: var(--amber); }
.tag-blue  { background: var(--blue-tint); color: var(--blue); }
.tag-red   { background: var(--red-tint); color: var(--red); }
.tbl-total { padding: 14px 22px; border-top: 2px solid var(--page-bg); background: var(--surface-subtle); }

/* ============================================================ EVENT BANNER (claro) */
.evt-banner {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px 26px;
  display: flex; align-items: center; gap: 18px;
}
.evt-banner .av { width: 58px; height: 58px; border-radius: 15px; background: var(--brand-teal-tint); display: flex; align-items: center; justify-content: center; font-size: 27px; flex-shrink: 0; }
.evt-banner .ttl { font-size: 21px; font-weight: 800; letter-spacing: -0.5px; }
.evt-meta { display: flex; gap: 18px; margin-top: 8px; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; }
.evt-meta span { display: flex; align-items: center; gap: 6px; }
.evt-meta i { color: var(--brand-teal); font-size: 15px; }

.evt-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.evt-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; }
.evt-tile .lbl { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.evt-tile .v { font-size: 21px; font-weight: 800; letter-spacing: -0.6px; margin-top: 4px; }
.evt-tile .barwrap { height: 7px; background: #F1F3F6; border-radius: 5px; overflow: hidden; margin-top: 12px; }
.evt-tile .barfill { height: 100%; background: linear-gradient(90deg, #F59E0B, var(--amber)); border-radius: 5px; }

.repasse {
  background: var(--brand-teal-tint); border: 1px solid #A7E0D5; border-radius: 14px;
  padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.repasse .l { display: flex; align-items: center; gap: 10px; }
.repasse i { font-size: 18px; color: var(--brand-teal); }

/* ============================================================ TABS */
.tabs { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border-soft); }
.tab {
  display: flex; align-items: center; gap: 7px; padding: 11px 15px;
  font-size: 13px; font-weight: 600; color: var(--text-faint);
  border-bottom: 2px solid transparent; margin-bottom: -7px; cursor: pointer;
}
.tab i { font-size: 15px; }
.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--brand-teal); font-weight: 700; border-bottom-color: var(--brand-teal); }

/* ============================================================ FORM / INPUTS */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.3px; }
.input, select.input, textarea.input {
  width: 100%; font-family: inherit; font-size: 13.5px; color: var(--text);
  border: 1px solid var(--border-input); border-radius: 11px; padding: 10px 13px;
  background: var(--surface); outline: none; transition: 0.13s;
}
.input:focus, select.input:focus, textarea.input:focus { border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.input-icn { display: flex; align-items: center; gap: 9px; border: 1px solid var(--border-input); border-radius: 11px; padding: 0 13px; background: var(--surface); }
.input-icn:focus-within { border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.input-icn i { color: var(--text-faint); font-size: 16px; }
.input-icn input { flex: 1; border: 0; outline: 0; font-family: inherit; font-size: 13.5px; padding: 11px 0; background: transparent; color: var(--text); }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--brand-teal); }
.check span { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; }

/* ============================================================ LOGIN */
.auth-wrap { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 60px 20px; background: var(--page-bg); }
.auth-box { width: 400px; }
.auth-hero { text-align: center; margin-bottom: 24px; }
.auth-hero .chip { width: 54px; height: 54px; border-radius: 15px; background: linear-gradient(150deg, var(--brand-teal-strong), var(--brand-teal)); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.auth-hero .chip i { font-size: 27px; color: #fff; }
.auth-hero h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.auth-hero p { font-size: 13px; color: var(--text-muted); font-weight: 600; margin: 5px 0 0; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
.auth-tabs { display: flex; gap: 3px; padding: 4px; background: var(--border-soft); border-radius: 11px; margin-bottom: 18px; }
.auth-tab { flex: 1; text-align: center; padding: 9px; font-size: 13px; font-weight: 600; color: var(--text-muted); border-radius: 8px; cursor: pointer; }
.auth-tab.active { background: var(--brand-teal); color: #fff; font-weight: 700; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 12px; color: var(--text-faint); }
.alert { padding: 10px 14px; border-radius: 11px; font-size: 13px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; }
.alert i { font-size: 17px; }
.alert-err { background: var(--red-tint); color: var(--red); border: 1px solid #FAC4C4; }
.alert-ok  { background: var(--brand-teal-tint); color: var(--brand-teal); border: 1px solid #A7E0D5; }
.alert-info{ background: var(--blue-tint); color: var(--blue); border: 1px solid #BFD3F5; }

/* ============================================================ STATUS BAR (editor) */
.statusbar { padding: 10px 14px; border-radius: 11px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.statusbar i { font-size: 17px; }
.statusbar.ok { background: var(--brand-teal-tint); color: var(--brand-teal); border: 1px solid #A7E0D5; }
.statusbar.dirty { background: var(--amber-tint); color: var(--amber); border: 1px solid #FAD9B0; }

/* editable expense row */
.exp-row { display: grid; grid-template-columns: 1.6fr 2.6fr 1.1fr 0.6fr 0.4fr; gap: 10px; align-items: center; padding: 8px 22px; border-top: 1px solid var(--border-soft); }
.exp-row select.input, .exp-row input.input { padding: 8px 11px; }
.exp-head { display: grid; grid-template-columns: 1.6fr 2.6fr 1.1fr 0.6fr 0.4fr; gap: 10px; padding: 11px 22px; font-size: 10.5px; font-weight: 700; color: var(--text-faint); letter-spacing: 0.4px; text-transform: uppercase; background: var(--surface-subtle); }
.del-btn { background: transparent; border: 0; color: var(--text-faint); cursor: pointer; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.del-btn:hover { color: var(--red); }

/* step cards (import) */
.step { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; margin-bottom: 12px; }
.step.active { border-color: var(--brand-teal); }
.step.done { background: var(--brand-teal-tint); border-color: transparent; }
.step-h { display: flex; align-items: center; gap: 12px; }
.step-n { width: 26px; height: 26px; border-radius: 999px; background: var(--brand-teal); color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.step-t { font-size: 14px; font-weight: 700; }
.gpill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border-input); border-radius: 20px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin: 0 6px 4px 0; }
.gpill.ok { background: var(--brand-teal-tint); color: var(--brand-teal); border-color: transparent; }
.gpill.warn { background: var(--amber-tint); color: var(--amber); border-color: transparent; }
.dropzone { border: 2px dashed var(--border-input); border-radius: 14px; background: var(--surface-subtle); padding: 28px; text-align: center; cursor: pointer; transition: 0.13s; }
.dropzone:hover { border-color: var(--brand-teal); background: var(--brand-teal-tint); }
.dropzone i { font-size: 30px; color: var(--brand-teal); }

/* radio pill group */
.pillgroup { display: flex; gap: 8px; flex-wrap: wrap; }
.pillopt { padding: 9px 15px; border: 1px solid var(--border-input); border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; background: var(--surface); }
.pillopt.active { background: var(--brand-teal); color: #fff; border-color: transparent; font-weight: 700; }

.section-label { font-size: 13px; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.muted { color: var(--text-faint); }
.empty { padding: 28px; text-align: center; color: var(--text-faint); font-size: 13.5px; }

@media (max-width: 900px) {
  .kpi-grid, .evt-tiles { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
