/* gestoria Alanel shell v20261025e — Inmoport/Gestión language (navy+teal) */
:root {
  --bg: #f6f7f9;
  --bg-soft: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e8ebf0;
  --border-strong: #d8dde4;
  --text: #101b2c;
  --muted: #6c7686;
  --primary: #1f6c7a;
  --primary-2: #061f43;
  --primary-soft: #e8f3f5;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --warn: #b54708;
  --warn-bg: #fffaeb;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --income: #067647;
  --expense: #b42318;
  --profit: #1f6c7a;
  --radius: 4px;
  --radius-sm: 2px;
  --shadow: 0 1px 2px rgba(16,27,44,.04), 0 4px 12px rgba(16,27,44,.04);
  --shadow-sm: 0 1px 2px rgba(16,27,44,.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Montserrat", "Inter", system-ui, sans-serif;
  --sidebar-w: 208px;
  --sidebar-w-collapsed: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }

.h1, .topbar-title, .brand-name, .login-title, .card-h h2, .card-h h3,
.kpi-label, .lbl, .tab, .board-tab, .op-card a.title, .cmdk-group {
  font-family: var(--font-display);
}
.h1 {
  margin: 0; font-size: 1.15rem; font-weight: 700;
  letter-spacing: -.02em; color: var(--text);
}
.lbl {
  display: grid; gap: .2rem;
  font-size: .72rem; color: var(--muted); font-weight: 600;
  letter-spacing: .02em;
}

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: .75rem .55rem;
  display: flex; flex-direction: column; gap: .7rem;
  position: sticky; top: 0; height: 100vh;
  z-index: 10;
  transition: width .18s ease; overflow: hidden;
}
.brand {
  display: flex; gap: .55rem; align-items: center;
  padding: .35rem .4rem .55rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .15rem;
}
.brand-logo {
  height: 28px; width: auto; max-width: 140px;
  display: block; flex-shrink: 0; border-radius: 0;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: var(--radius);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: .75rem; letter-spacing: .04em;
  background: var(--primary-2); color: #fff;
}
.brand-name {
  font-weight: 700; font-size: .82rem; color: var(--text);
  letter-spacing: .04em; text-transform: uppercase;
}
.brand-sub { color: var(--muted); font-size: .68rem; margin-top: .05rem; }
.nav { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: .5rem;
  padding: .48rem .6rem; border-radius: var(--radius);
  color: var(--muted); font-weight: 600; font-size: .82rem;
  text-decoration: none; border: 1px solid transparent;
}
.nav-link:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary-2); border-color: #c5dde2;
}
.nav-ico { width: 1rem; text-align: center; opacity: .9; font-size: .85rem; }
.sidebar-foot {
  margin-top: auto; display: grid; gap: .3rem;
  padding-top: .6rem; border-top: 1px solid var(--border);
}
.logout { color: var(--expense) !important; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .7rem 1.1rem;
  background: rgba(246,247,249,.92);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(8px);
}
.topbar-title {
  font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; color: var(--text);
}
.topbar-meta { font-size: .72rem; }
.content { padding: .85rem 1.1rem 4.5rem; }

.grid { display: grid; gap: .7rem; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.span-2 { grid-column: span 2; }

.kpi, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.kpi {
  padding: .65rem .8rem .7rem;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 68px;
}
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--border-strong);
}
.kpi-income::before { background: var(--income); }
.kpi-expense::before { background: var(--expense); }
.kpi-profit::before { background: var(--profit); }
.kpi-warn::before { background: var(--warn); }
.kpi-label {
  color: var(--muted); font-size: .62rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.kpi-value {
  font-size: 1.12rem; font-weight: 700;
  letter-spacing: -.02em; margin-top: .15rem;
  font-variant-numeric: tabular-nums; color: var(--text);
  line-height: 1.2;
}
.kpi-hint { color: var(--muted); font-size: .68rem; margin-top: .12rem; }
.kpi-income .kpi-value { color: var(--income); }
.kpi-expense .kpi-value { color: var(--expense); }
.kpi-profit .kpi-value { color: var(--profit); }
.kpi-warn .kpi-value { color: var(--warn); }

.card { padding: .75rem .85rem .85rem; }
.card-h {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  margin-bottom: .55rem;
}
.card-h h2, .card-h h3 {
  margin: 0; font-size: .86rem; font-weight: 700;
  letter-spacing: -.01em; color: var(--text);
}
.card-chart { min-height: 0; }
.chart-wrap { position: relative; height: 220px; }
.chart-wrap.tall { height: 220px; }
.chart-wrap.sm { height: 180px; }

.badge {
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .12rem .4rem; border-radius: var(--radius-sm);
  font-size: .65rem; font-weight: 700; letter-spacing: .01em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: #067647; border-color: #abefc6; }
.badge-warn { background: var(--warn-bg); color: #b54708; border-color: #fedf89; }
.badge-muted { background: var(--bg-soft); color: #4b5563; border-color: var(--border); }
.badge-danger { background: var(--danger-bg); color: #b42318; border-color: #fecdca; }
.badge-info { background: var(--primary-soft); color: var(--primary-2); border-color: #c5dde2; }

.cat-badge {
  display: inline-flex; align-items: center;
  padding: .1rem .35rem; border-radius: var(--radius-sm);
  font-size: .64rem; font-weight: 650;
  background: var(--bg-soft); color: #374151; border: 1px solid var(--border);
}
.cat-compra_inmueble { background:#eef2ff; color:#3730a3; border-color:#c7d2fe; }
.cat-obra_reforma { background:#fff7ed; color:#9a3412; border-color:#fed7aa; }
.cat-materiales { background:#f0fdf4; color:#166534; border-color:#bbf7d0; }
.cat-instalaciones { background:#ecfeff; color:#155e75; border-color:#a5f3fc; }
.cat-honorarios_tecnicos { background:#faf5ff; color:#6b21a8; border-color:#e9d5ff; }
.cat-gestoria_notaria { background:#e8f3f5; color:#0f4c56; border-color:#c5dde2; }
.cat-impuestos_tasas { background:#fef2f2; color:#991b1b; border-color:#fecaca; }
.cat-suministros { background:#f0f9ff; color:#075985; border-color:#bae6fd; }
.cat-marketing_ventas { background:#fdf4ff; color:#86198f; border-color:#f5d0fe; }
.cat-financieros { background:#fffbeb; color:#92400e; border-color:#fde68a; }
.cat-otros { background:#f8fafc; color:#475569; border-color:#e2e8f0; }
.cat-venta_vivienda { background:#ecfdf5; color:#065f46; border-color:#a7f3d0; }
.cat-otros_ingresos { background:#ecfdf5; color:#047857; border-color:#a7f3d0; }

.table-wrap {
  overflow: auto; border-radius: var(--radius); border: 1px solid var(--border);
  max-height: min(62vh, 720px);
}
table.data {
  width: 100%; border-collapse: collapse; font-size: .8rem; min-width: 720px;
}
table.data th, table.data td {
  padding: .42rem .55rem; text-align: left; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data th {
  background: var(--surface-2); color: var(--muted);
  font-family: var(--font-display);
  font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
  position: sticky; top: 0; z-index: 1;
}
table.data tr:hover td { background: #f8f9fb; }
table.data td.num, table.data th.num {
  text-align: right; font-variant-numeric: tabular-nums; font-size: .78rem;
}
.kind-gasto { color: var(--expense); font-weight: 650; }
.kind-ingreso { color: var(--income); font-weight: 650; }
.money-pos { color: var(--income); font-weight: 700; font-variant-numeric: tabular-nums; }
.money-neg { color: var(--expense); font-weight: 700; font-variant-numeric: tabular-nums; }
.row-review { background: #fffbeb !important; }
.concept-cell { max-width: 280px; }
.concept-cell .sub { color: var(--muted); font-size: .68rem; margin-top: .08rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: var(--radius); padding: .38rem .7rem; font-weight: 650; cursor: pointer;
  font: inherit; font-size: .8rem; text-decoration: none; box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--bg-soft); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  border-color: var(--primary-2); color: #fff;
  box-shadow: 0 4px 10px rgba(6,31,67,.16);
}
.btn-primary:hover { filter: brightness(1.05); color: #fff; }
.btn-danger { background: var(--danger-bg); color: #b42318; border-color: #fecdca; }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-sm { padding: .28rem .5rem; font-size: .74rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

.form-grid { display: grid; gap: .55rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid .full { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--border);
  background: #fff; color: var(--text);
  padding: .45rem .6rem; font: inherit; font-size: .82rem;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #7aa8b2;
  box-shadow: 0 0 0 3px rgba(31,108,122,.14);
}
.form-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .2rem; }
.filters {
  display: flex; gap: .4rem; flex-wrap: wrap; align-items: end;
  margin-bottom: .55rem; padding: .5rem .55rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.filters .lbl { min-width: 120px; flex: 1; }

.alert {
  padding: .55rem .7rem; border-radius: var(--radius); margin-bottom: .7rem;
  border: 1px solid transparent; font-weight: 560; font-size: .8rem;
}
.alert-ok { background: var(--ok-bg); color: #067647; border-color: #abefc6; }
.alert-err { background: var(--danger-bg); color: #b42318; border-color: #fecdca; }
.alert-info { background: var(--primary-soft); color: var(--primary-2); border-color: #c5dde2; }
.alert-warn { background: var(--warn-bg); color: #92400e; border-color: #fedf89; }

.op-card {
  display: grid; gap: .5rem; padding: .75rem .8rem;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease;
}
.op-card:hover { border-color: #9fc4cc; box-shadow: var(--shadow); }
.op-card a.title {
  color: var(--text); font-size: .92rem; font-weight: 700; text-decoration: none;
}
.op-card a.title:hover { color: var(--primary); }
.op-meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.op-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: .35rem; }
.op-stat {
  background: var(--surface-2); border-radius: var(--radius); padding: .4rem .5rem;
  border: 1px solid var(--border);
}
.op-stat .l {
  color: var(--muted); font-size: .6rem; text-transform: uppercase; font-weight: 700;
  font-family: var(--font-display); letter-spacing: .04em;
}
.op-stat .v { font-weight: 720; font-size: .85rem; margin-top: .08rem; font-variant-numeric: tabular-nums; }

.deadline {
  display: grid; grid-template-columns: 64px 1fr auto; gap: .55rem; align-items: center;
  padding: .5rem 0; border-bottom: 1px solid var(--border);
}
.deadline:last-child { border-bottom: 0; }
.deadline-date {
  background: var(--primary-soft); color: var(--primary-2); border-radius: var(--radius);
  text-align: center; padding: .35rem .2rem; border: 1px solid #c5dde2;
}
.deadline-date .d { font-size: 1rem; font-weight: 800; line-height: 1; font-family: var(--font-display); }
.deadline-date .m { font-size: .6rem; text-transform: uppercase; letter-spacing: .04em; margin-top: .1rem; }
.deadline.soon .deadline-date { background: var(--warn-bg); color: #b54708; border-color: #fedf89; }
.deadline.overdue .deadline-date { background: var(--danger-bg); color: #b42318; border-color: #fecdca; }

.iva-box { display: grid; grid-template-columns: repeat(3,1fr); gap: .45rem; }
.iva-item {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .55rem .6rem;
}
.iva-item .l {
  color: var(--muted); font-size: .62rem; text-transform: uppercase; font-weight: 700;
  font-family: var(--font-display); letter-spacing: .04em;
}
.iva-item .v { font-size: .95rem; font-weight: 720; margin-top: .12rem; font-variant-numeric: tabular-nums; }

.timeline { display: grid; gap: 0; }
.tl-item {
  display: grid; grid-template-columns: 14px 1fr; gap: .5rem;
  padding: .35rem 0;
}
.tl-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
  margin-top: .35rem; box-shadow: 0 0 0 3px var(--primary-soft);
}
.tl-body { border-bottom: 1px solid var(--border); padding-bottom: .35rem; }
.tl-item:last-child .tl-body { border-bottom: 0; }

.stat-pill {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .18rem .4rem; border-radius: var(--radius-sm);
  background: var(--bg-soft); border: 1px solid var(--border);
  font-size: .7rem; color: var(--muted); font-weight: 600;
}

.cat-bars { display: grid; gap: .55rem; }
.cat-bar-row { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1.4fr) auto; gap: .55rem; align-items: center; }
.cat-bar-meta { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.cat-bar-track {
  height: 6px; border-radius: var(--radius-sm); background: var(--bg-soft); overflow: hidden;
  border: 1px solid var(--border);
}
.cat-bar-fill { height: 100%; border-radius: var(--radius-sm); background: var(--primary); }
.cat-bar-fill.tone-income { background: var(--income); }
.cat-bar-fill.tone-expense { background: var(--expense); }
.cat-bar-amt { font-variant-numeric: tabular-nums; font-size: .74rem; font-weight: 650; color: var(--text); white-space: nowrap; }
.cat-bar-pct { color: var(--muted); font-size: .68rem; margin-left: .25rem; }
.cat-bar-val { font-weight: 650; font-size: .8rem; white-space: nowrap; }

.tabs {
  display: flex; gap: .15rem; border-bottom: 1px solid var(--border);
  margin-bottom: .7rem; overflow-x: auto;
}
.tab {
  padding: .45rem .7rem; font-size: .78rem; font-weight: 650;
  color: var(--muted); border-bottom: 2px solid transparent;
  text-decoration: none; white-space: nowrap;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.op-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: .75rem; flex-wrap: wrap; margin-bottom: .7rem;
}
.op-header-main { display: flex; flex-direction: column; gap: .3rem; }
.op-header-kpis {
  display: flex; gap: .75rem; flex-wrap: wrap; align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.op-header-kpis .hk { text-align: right; }
.op-header-kpis .hk .l {
  font-size: .62rem; text-transform: uppercase; color: var(--muted); font-weight: 700;
  font-family: var(--font-display); letter-spacing: .04em;
}
.op-header-kpis .hk .v { font-size: .95rem; font-weight: 720; }

/* Login — navy→teal gradient like Inmoport */
.login-body {
  min-height: 100vh; display: grid; place-items: center; padding: 1.25rem;
  background: linear-gradient(135deg, #061f43, #1f6c7a);
}
.login-wrap { width: min(380px, 100%); }
.login-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: 0 20px 50px rgba(6,31,67,.28);
}
.login-brand { display: flex; gap: .75rem; align-items: center; margin-bottom: 1.1rem; }
.login-brand img { height: 36px; width: auto; max-width: 180px; border-radius: 0; }
.login-title {
  font-size: 1.02rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.login-sub { color: var(--muted); font-size: .78rem; }
.login-form { display: grid; gap: .75rem; }
.login-foot { text-align: center; color: var(--muted); font-size: .7rem; margin: .85rem 0 0; }

.empty {
  text-align: center; padding: 1.2rem .8rem; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface-2);
  font-size: .8rem;
}
.section-gap { margin-bottom: 1rem; }
.meta-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-bottom: .65rem; }

.search-chip {
  display: flex; align-items: center; gap: .45rem;
  width: 100%; padding: .42rem .55rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-soft); color: var(--muted);
  font: inherit; font-weight: 550; font-size: .78rem;
  cursor: pointer; text-align: left;
}
.search-chip:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.search-chip kbd {
  margin-left: auto; font-size: .65rem; font-weight: 600;
  padding: .1rem .35rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}
.topbar-search { width: auto; padding: .32rem .55rem; }
.topbar-left { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: .65rem; }
.topbar-collapse { display: none; }

.sidebar .brand-text,
.sidebar .nav-label,
.sidebar .search-chip .nav-label,
.sidebar .search-chip kbd { transition: opacity .12s ease; }

.app-shell.sidebar-collapsed { --sidebar-w: var(--sidebar-w-collapsed); }
.app-shell.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); padding-left: .4rem; padding-right: .4rem; }
.app-shell.sidebar-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .search-chip .nav-label,
.app-shell.sidebar-collapsed .search-chip kbd,
.app-shell.sidebar-collapsed .sidebar-foot .muted { display: none; }
.app-shell.sidebar-collapsed .nav-link,
.app-shell.sidebar-collapsed .search-chip {
  justify-content: center; padding-left: .55rem; padding-right: .55rem;
}
.app-shell.sidebar-collapsed .search-chip { width: 100%; }
.app-shell.sidebar-collapsed .sidebar-toggle .nav-ico { transform: rotate(180deg); display: inline-block; }
.app-shell.sidebar-collapsed .brand-logo { max-width: 36px; height: 22px; object-fit: cover; object-position: left; }

.board-tabs {
  display: flex; gap: .25rem; flex-wrap: wrap;
  padding: .2rem; margin-bottom: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.board-tab {
  appearance: none; border: 0; background: transparent;
  padding: .48rem .9rem; border-radius: var(--radius-sm);
  font: inherit; font-family: var(--font-display);
  font-weight: 600; font-size: .82rem;
  color: var(--muted); cursor: pointer;
}
.board-tab:hover { background: var(--bg-soft); color: var(--text); }
.board-tab.active {
  background: var(--primary-soft); color: var(--primary-2);
  box-shadow: inset 0 0 0 1px #c5dde2;
}
.board-panel[hidden] { display: none !important; }
.board-panel.active { display: block; }
.widget.card { margin: 0; }

.mov-mini { display: grid; gap: .15rem; }
.mov-mini-row {
  display: flex; justify-content: space-between; gap: .75rem; align-items: center;
  padding: .45rem .35rem; border-radius: var(--radius); color: inherit; text-decoration: none;
}
.mov-mini-row:hover { background: var(--bg-soft); text-decoration: none; }
.mov-mini-title { font-weight: 600; font-size: .82rem; }
.mov-mini-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Command palette */
.cmdk {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: flex-start; justify-content: center;
  padding: 12vh 1rem 1rem;
}
.cmdk.open { display: flex; }
.cmdk-backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 31, 67, .48);
  backdrop-filter: blur(3px);
}
.cmdk-panel {
  position: relative; width: min(560px, 100%);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 20px 50px rgba(6,31,67,.22);
  overflow: hidden; display: flex; flex-direction: column; max-height: min(70vh, 520px);
}
.cmdk-input-wrap {
  display: flex; align-items: center; gap: .55rem;
  padding: .85rem 1rem; border-bottom: 1px solid var(--border);
}
.cmdk-prefix { color: var(--muted); font-size: 1rem; }
.cmdk-input-wrap input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: .95rem; color: var(--text);
}
.cmdk-input-wrap kbd {
  font-size: .65rem; padding: .15rem .4rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); color: var(--muted); background: var(--bg-soft);
}
.cmdk-list { overflow: auto; padding: .4rem; }
.cmdk-hint, .cmdk-empty { padding: 1.2rem .85rem; color: var(--muted); font-size: .85rem; text-align: center; }
.cmdk-group {
  padding: .45rem .65rem .2rem; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.cmdk-item {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .55rem .65rem; border-radius: var(--radius);
  color: inherit; text-decoration: none;
}
.cmdk-item:hover, .cmdk-item.active { background: var(--primary-soft); text-decoration: none; }
.cmdk-ico {
  width: 1.4rem; height: 1.4rem; border-radius: var(--radius-sm);
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--bg-soft); color: var(--muted); font-size: .75rem; font-weight: 700;
}
.cmdk-item.active .cmdk-ico { background: #fff; color: var(--primary); }
.cmdk-body { display: grid; gap: .1rem; min-width: 0; }
.cmdk-title { font-weight: 650; font-size: .85rem; }
.cmdk-sub { color: var(--muted); font-size: .75rem; }

.mobile-nav { display: none; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .span-2 { grid-column: span 2; }
  .iva-box { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .sidebar { display: none; }
  .topbar { padding: .65rem .85rem; }
  .topbar-collapse { display: inline-flex; }
  .topbar-meta { display: none; }
  .content { padding: .7rem .85rem 5rem; padding-bottom: 4.5rem; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .op-stats { grid-template-columns: 1fr; }
  .deadline { grid-template-columns: 56px 1fr; }
  .deadline .badge { grid-column: 2; justify-self: start; }
  .iva-box { grid-template-columns: 1fr; }
  .cat-bar-row { grid-template-columns: 1fr; gap: .25rem; }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom));
    z-index: 20; gap: .15rem; justify-content: space-around;
  }
  .mobile-nav .nav-link {
    flex-direction: column; gap: .15rem; padding: .35rem .5rem;
    font-size: .65rem; flex: 1; text-align: center; justify-content: center;
    border-radius: var(--radius);
  }
  .mobile-nav .nav-ico { width: auto; font-size: 1rem; }
}
