/* =========================================
   Simulador de Cotizaciones VAN
   Llosa Edificaciones – Estilos principales
   ========================================= */

:root {
  --navy: #0B2545;
  --navy-2: #13315C;
  --navy-3: #1B3A6B;
  --gold: #C9A24C;
  --gold-soft: #E8D49B;
  --bg: #F4F6FA;
  --card: #FFFFFF;
  --border: #E2E6EE;
  --text: #1F2937;
  --muted: #6B7280;
  --success: #16A34A;
  --success-bg: #E8F7EE;
  --danger: #DC2626;
  --danger-bg: #FDECEC;
  --warning: #D97706;
  --warning-bg: #FEF6E7;
  --input-bg: #EEF3FB;
  --readonly-bg: #F1F3F8;
  --shadow: 0 1px 2px rgba(11,37,69,.06), 0 8px 24px rgba(11,37,69,.06);
}

* { box-sizing: border-box }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}
.app { max-width: 1380px; margin: 0 auto; padding: 18px }

/* ── Topbar ── */
header.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff; padding: 14px 20px; border-radius: 14px;
  box-shadow: var(--shadow); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px }
.brand-logo {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--gold); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 20px; letter-spacing: 1px;
}
.brand h1 { margin: 0; font-size: 18px; letter-spacing: .3px }
.brand p  { margin: 2px 0 0; font-size: 12px; color: #cfd8e8 }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }

/* ── Botones ── */
.btn {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #fff; padding: 8px 14px; border-radius: 8px;
  cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all .15s;
}
.btn:hover { background: rgba(255,255,255,.16) }
.btn-primary { background: var(--gold); color: var(--navy); border-color: var(--gold) }
.btn-primary:hover { background: #d8b569 }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--border) }
.btn-ghost:hover { background: #f1f4fa }
.btn-sm { padding: 6px 10px; font-size: 12px }

/* ── Project switcher ── */
.project-switcher {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.10); padding: 6px 12px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
}
.project-switcher label {
  font-size: 10.5px; color: #cfd8e8;
  text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
}
.project-switcher select {
  background: #fff; color: var(--navy); border: none;
  padding: 6px 10px; border-radius: 7px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; min-width: 200px;
}
.project-switcher select:focus { outline: 2px solid var(--gold) }

/* ── KPIs ── */
.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 18px }
.kpi {
  background: var(--card); border-radius: 14px; padding: 16px 18px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.kpi .label { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .5px; font-weight: 600 }
.kpi .value { font-size: 24px; font-weight: 800; color: var(--navy); margin-top: 4px; font-variant-numeric: tabular-nums }
.kpi .sub   { font-size: 12px; color: var(--muted); margin-top: 2px }
.kpi.success::before, .kpi.danger::before, .kpi.warn::before, .kpi.gold::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--navy);
}
.kpi.success::before { background: var(--success) }
.kpi.danger::before  { background: var(--danger) }
.kpi.warn::before    { background: var(--warning) }
.kpi.gold::before    { background: var(--gold) }
.kpi.success .value  { color: var(--success) }
.kpi.danger .value   { color: var(--danger) }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 4px 10px; border-radius: 999px; font-weight: 700;
}
.badge.success { background: var(--success-bg); color: var(--success) }
.badge.danger  { background: var(--danger-bg);  color: var(--danger) }
.badge.warn    { background: var(--warning-bg); color: var(--warning) }

/* ── Grids ── */
.grid-two   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px }
.grid-three { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-top: 14px }
@media (max-width: 1180px) { .grid-two, .grid-three, .kpi-row { grid-template-columns: 1fr } }

/* ── Panels ── */
.panel {
  background: var(--card); border-radius: 14px;
  border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
}
.panel-head {
  padding: 14px 18px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.panel-head h2 {
  margin: 0; font-size: 14px; text-transform: uppercase;
  letter-spacing: .6px; color: var(--navy); font-weight: 800;
}
.panel-head .sub { font-size: 12px; color: var(--muted); font-weight: 500 }
.panel.pre .panel-head  { background: linear-gradient(90deg,#0B2545,#13315C); color: #fff }
.panel.pre .panel-head h2  { color: #fff }
.panel.pre .panel-head .sub { color: #dbe3ef }
.panel.real .panel-head { background: linear-gradient(90deg,#fff,#fafcff) }
.panel.real .panel-head h2 { color: var(--navy) }
.panel-body { padding: 16px 18px }

/* ── Section titles ── */
.section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .7px;
  color: var(--navy); font-weight: 800; margin: 6px 0 8px;
  padding-bottom: 4px; border-bottom: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.section-title .tag {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: var(--success-bg); color: var(--success);
  text-transform: uppercase; letter-spacing: .4px; font-weight: 800;
}
.section-title .tag.lock { background: #FEEFE4; color: #A2410B }

/* ── Lock banner ── */
.lock-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(90deg,#FFF6E1,#FFF1CC);
  border: 1px solid #F4DA9C; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
}
.lock-banner.unlocked { background: linear-gradient(90deg,#E7F6EC,#D7EEDE); border-color: #A8D9B7 }
.lock-banner .icon { font-size: 18px }
.lock-banner .txt  { font-size: 12.5px; color: #5A3D0E; flex: 1 }
.lock-banner.unlocked .txt { color: #155B2C }
.lock-banner button {
  background: var(--navy); color: #fff; border: none;
  padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.lock-banner button:hover { background: var(--navy-3) }
.lock-banner.unlocked button { background: #16A34A }

/* ── Form tables ── */
table.formtbl { width: 100%; border-collapse: collapse; font-size: 13px }
table.formtbl th {
  text-align: left; font-size: 11px; color: var(--muted); font-weight: 700;
  padding: 6px 6px; text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
}
table.formtbl th.num, table.formtbl td.num { text-align: right }
table.formtbl td { padding: 4px 6px; border-bottom: 1px solid #F2F4F8; vertical-align: middle }
table.formtbl td.lbl { color: #374151; font-weight: 500 }
table.formtbl tr.total td {
  font-weight: 700; background: #F8FAFD; color: var(--navy);
  border-top: 2px solid var(--gold);
}
table.formtbl tr.total td.num { font-variant-numeric: tabular-nums }

/* ── Data grid rows ── */
.dg-row {
  display: grid; grid-template-columns: 1fr 150px 150px;
  gap: 10px; align-items: center; padding: 7px 0;
  border-bottom: 1px solid #F2F4F8;
}
.dg-row:last-child { border-bottom: none }
.dg-row .lbl { font-size: 13px; color: #374151; font-weight: 500 }
.dg-row .lbl.always::before { content: "\2022"; color: var(--success); margin-right: 6px; font-size: 9px; vertical-align: middle }
.dg-row .lbl.lock::before { content: "\1F512"; font-size: 11px }
.dg-row .extra { font-size: 11.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums }
.dg-row.total-row {
  background: #F8FAFD; border-top: 2px solid var(--gold);
  font-weight: 700; color: var(--navy); padding: 9px 6px;
  border-bottom: none; margin-top: 4px; border-radius: 6px;
}
.dg-row.total-row .lbl { font-weight: 800; color: var(--navy); font-size: 13.5px }
.dg-row.piso-row {
  background: #F4F8FB; padding: 8px 6px;
  border-radius: 6px; border-bottom: none; margin-top: 4px;
}
.dg-row.piso-row .lbl { font-weight: 700; color: var(--navy) }

/* ── Alert piso ── */
.alert-piso {
  margin-top: 10px; padding: 8px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.alert-piso.ok   { background: var(--success-bg); color: var(--success); border: 1px solid #BCE2C8 }
.alert-piso.bad  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid #F5C6C6 }
.alert-piso.warn { background: var(--warning-bg); color: var(--warning); border: 1px solid #F2DDA8 }

/* ── Cuotas meta ── */
.cuotas-meta {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; font-size: 11.5px; color: var(--muted); margin-top: 4px;
}
.cuotas-meta .pill {
  padding: 3px 9px; border-radius: 999px; font-weight: 800; font-size: 11px;
  background: var(--success-bg); color: var(--success);
}
.cuotas-meta .pill.warn   { background: var(--warning-bg); color: var(--warning) }
.cuotas-meta .pill.danger { background: var(--danger-bg);  color: var(--danger) }

/* ── Inputs ── */
input.cell {
  width: 100%; border: 1px solid var(--border); background: var(--input-bg);
  color: #0033A0; padding: 6px 8px; border-radius: 6px;
  font-family: inherit; font-size: 13px; text-align: right;
  font-weight: 600; font-variant-numeric: tabular-nums; transition: all .12s;
}
input.cell:focus {
  outline: none; border-color: var(--gold); background: #fff;
  box-shadow: 0 0 0 3px rgba(201,162,76,.18);
}
input.cell.readonly {
  background: var(--readonly-bg); color: var(--navy);
  border-color: #E8ECF3; cursor: not-allowed; font-weight: 700; opacity: .85;
}
input.cell.formula {
  background: #FAFBFD; color: #111; border-style: dashed; cursor: not-allowed;
}
input.cell.always {
  background: #E9F5EE; color: #155B2C; border-color: #BCE2C8;
}
input.cell.always:focus {
  background: #fff; border-color: #16A34A;
  box-shadow: 0 0 0 3px rgba(22,163,74,.18);
}
input.cell.cell-date {
  text-align: left; font-weight: 600; color: #0033A0; padding: 6px 8px;
}

/* ── Modals ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(11,37,69,.55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 99;
}
.modal-backdrop.show { display: flex }
.modal {
  background: #fff; border-radius: 14px; padding: 24px 26px;
  max-width: 380px; width: 92%;
  box-shadow: 0 24px 60px rgba(0,0,0,.4); text-align: center;
}
.modal.wide { max-width: 620px }
.modal .icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.modal h3 { margin: 0 0 6px; color: var(--navy); font-size: 16px }
.modal p  { margin: 0 0 14px; color: var(--muted); font-size: 13px }
.modal input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: 14px; margin-bottom: 10px;
}
.modal .err { color: var(--danger); font-size: 12px; min-height: 16px; margin-top: 4px }
.modal-actions { display: flex; gap: 8px; margin-top: 6px }
.modal-actions button { flex: 1 }

/* ── Project list (modal) ── */
.proj-list {
  margin: 12px 0; max-height: 300px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 9px;
  text-align: left; background: #FAFBFD;
}
.proj-row {
  padding: 10px 12px; border-bottom: 1px solid #F2F4F8;
  display: flex; align-items: center; gap: 8px;
}
.proj-row:last-child { border-bottom: none }
.proj-row.active {
  background: linear-gradient(90deg,#FFF8E1,#fff);
  border-left: 4px solid var(--gold);
}
.proj-row .info { flex: 1; text-align: left; min-width: 0 }
.proj-row .info .name { font-weight: 700; color: var(--navy); font-size: 13.5px }
.proj-row .info .meta { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4 }
.proj-row .actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end }
.proj-row button {
  padding: 5px 9px; font-size: 11px; border-radius: 6px;
  border: 1px solid var(--border); background: #fff;
  cursor: pointer; font-weight: 600; color: var(--navy);
}
.proj-row button:hover { background: #F1F4FA; border-color: var(--gold) }
.proj-row button.primary { background: var(--navy); color: #fff; border-color: var(--navy) }
.proj-row button.primary:hover { background: var(--navy-3) }
.proj-row button.danger { color: var(--danger); border-color: #F5C6C6 }
.proj-row button.danger:hover { background: var(--danger-bg) }
.proj-form { display: flex; gap: 8px; margin-top: 14px; align-items: center }
.proj-form input {
  flex: 1; padding: 9px 11px; border: 1px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: 13.5px; margin: 0;
}
.proj-form button {
  padding: 9px 14px; border-radius: 8px; border: none;
  background: var(--navy); color: #fff; font-weight: 700;
  font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.proj-form button:hover { background: var(--navy-3) }
.proj-io { display: flex; gap: 8px; margin-top: 12px; justify-content: center; flex-wrap: wrap }
.proj-io button {
  padding: 8px 14px; font-size: 12px; font-weight: 700;
  border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--navy); cursor: pointer;
}
.proj-io button:hover { background: #F1F4FA; border-color: var(--gold) }
.lock-hint {
  font-size: 11.5px; color: #A2410B; background: #FEF6E7;
  border: 1px solid #F2DDA8; padding: 8px 12px; border-radius: 8px;
  margin-top: 12px; text-align: left; line-height: 1.45;
}
.lock-hint b { color: var(--navy) }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 10px 18px;
  border-radius: 10px; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) }

/* ── Suggestion cards ── */
.sug-card {
  background: linear-gradient(135deg,#FFFBF0 0%,#FFF8E1 100%);
  border: 1px solid #F4E0AC; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 12px;
}
.sug-card h4 {
  margin: 0 0 6px; color: var(--navy); font-size: 13.5px;
  display: flex; align-items: center; gap: 8px;
}
.sug-card .pill {
  background: var(--gold); color: var(--navy); font-size: 10px;
  padding: 2px 8px; border-radius: 999px; font-weight: 800; letter-spacing: .5px;
}
.sug-card .row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: #4B5563; padding: 3px 0;
}
.sug-card .row b { color: var(--navy); font-variant-numeric: tabular-nums }
.sug-card .desc {
  font-size: 12px; color: var(--muted); margin-top: 6px;
  line-height: 1.45; font-style: italic;
}

/* ── Chart ── */
.chart-wrap { height: 340px; position: relative }
.chart-wrap canvas { max-height: 100% }
.legend-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); margin-right: 14px;
}
.legend-pill::before {
  content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--navy);
}
.legend-pill.real::before { background: var(--gold) }

/* ── Flow table ── */
.flow-table-wrap {
  max-height: 360px; overflow: auto;
  border: 1px solid var(--border); border-radius: 10px;
}
table.flow { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums }
table.flow th {
  position: sticky; top: 0; background: var(--navy); color: #fff;
  font-weight: 600; padding: 8px 10px; text-align: right;
  font-size: 11px; letter-spacing: .3px; text-transform: uppercase;
}
table.flow th:first-child { text-align: left }
table.flow td {
  padding: 5px 10px; text-align: right;
  border-bottom: 1px solid #F1F4F8; color: #111;
}
table.flow td:first-child { text-align: left; color: var(--muted); font-weight: 600 }
table.flow tr.zero td { color: #C5CBD3 }
table.flow tr.hl { background: #FFFBF0 }

/* ── Footer ── */
footer {
  margin-top: 18px; padding: 14px 18px;
  background: #fff; border-radius: 12px; border: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
}
footer .leg span { margin-right: 14px }
footer .leg b { color: var(--navy) }

/* ── Utilities ── */
.tip {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  background: #D6DCE6; color: #fff; font-size: 9px;
  text-align: center; line-height: 14px; font-weight: 700;
  cursor: help; vertical-align: middle; margin-left: 4px;
}
.tip:hover { background: var(--navy) }

.small-muted { font-size: 11px; color: var(--muted) }
.toggle-flow { cursor: pointer; color: var(--navy); font-weight: 700; font-size: 12px; user-select: none }
.toggle-flow:hover { color: var(--gold) }
.hidden { display: none }

.suffix-input { position: relative; display: flex; align-items: center }
.suffix-input input { padding-right: 22px }
.suffix-input::after {
  content: attr(data-suffix); position: absolute; right: 8px;
  color: var(--muted); font-size: 11px; font-weight: 600; pointer-events: none;
}
.prefix-input { position: relative; display: flex; align-items: center }
.prefix-input input { padding-left: 30px }
.prefix-input::before {
  content: attr(data-prefix); position: absolute; left: 8px;
  color: var(--muted); font-size: 11px; font-weight: 600; pointer-events: none;
}

/* ── Print ── */
@media print {
  .top-actions, .modal-backdrop, .chart-wrap, .toast { display: none !important }
  body { background: #fff }
}

/* =========================================
   PANEL ADMIN – Gestión de Proyectos
   ========================================= */
.admin-panel {
  background: #fff; border-radius: 16px;
  width: 94vw; max-width: 900px;
  max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(11,37,69,.35);
  overflow: hidden;
}
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 18px 24px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff; flex-shrink: 0;
}
.admin-header h2 { margin: 0; font-size: 16px; letter-spacing: .3px }
.admin-header p  { margin: 4px 0 0; font-size: 12px; color: #cfd8e8 }
.admin-close {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1); color: #fff; font-size: 22px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.admin-close:hover { background: rgba(255,255,255,.2) }

.admin-body { flex: 1; overflow-y: auto; padding: 20px 24px }

/* Toolbar */
.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}

/* Project cards grid */
.admin-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 12px;
}
.admin-card {
  background: #FAFBFD; border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.admin-card:hover { border-color: var(--gold); box-shadow: 0 2px 12px rgba(201,162,76,.15) }
.admin-card.active { border-left: 4px solid var(--gold); background: linear-gradient(90deg,#FFFBF0,#FAFBFD) }
.admin-card .card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; flex-shrink: 0;
}
.admin-card .card-info { flex: 1; min-width: 0 }
.admin-card .card-name {
  font-weight: 700; color: var(--navy); font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
.admin-card .card-name .active-tag {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: var(--gold); color: var(--navy); font-weight: 800;
}
.admin-card .card-meta {
  font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.5;
}
.admin-card .card-meta b { color: var(--navy) }
.admin-card .card-actions { display: flex; gap: 6px; flex-shrink: 0 }
.admin-card .card-actions button {
  padding: 7px 12px; font-size: 12px; border-radius: 7px;
  border: 1px solid var(--border); background: #fff;
  cursor: pointer; font-weight: 600; color: var(--navy); transition: all .12s;
}
.admin-card .card-actions button:hover { background: #F1F4FA; border-color: var(--gold) }
.admin-card .card-actions button.primary { background: var(--navy); color: #fff; border-color: var(--navy) }
.admin-card .card-actions button.primary:hover { background: var(--navy-3) }
.admin-card .card-actions button.danger { color: var(--danger); border-color: #F5C6C6 }
.admin-card .card-actions button.danger:hover { background: var(--danger-bg) }

.admin-empty {
  text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px;
}
.admin-empty b { color: var(--navy); display: block; margin-bottom: 6px; font-size: 16px }

/* Form view */
.admin-form-nav {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 2px solid var(--gold);
}
.admin-form-nav h3 { margin: 0; color: var(--navy); font-size: 16px; flex: 1 }

.admin-form-scroll { overflow-y: auto }

.admin-section {
  background: #FAFBFD; border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px; margin-bottom: 16px;
}
.admin-section h4 {
  margin: 0 0 14px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .6px; color: var(--navy); font-weight: 800;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.admin-field-row {
  display: flex; gap: 14px; margin-bottom: 12px; flex-wrap: wrap;
}
.admin-field-row:last-child { margin-bottom: 0 }
.admin-field { flex: 1; min-width: 140px }
.admin-field label {
  display: block; font-size: 11.5px; color: var(--muted);
  font-weight: 600; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .3px;
}
.admin-field input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: 14px;
  color: var(--navy); font-weight: 600; background: #fff;
  transition: border-color .12s, box-shadow .12s;
}
.admin-field input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,76,.18);
}

/* Admin cuotas table */
.admin-cuotas-tbl { width: 100%; border-collapse: collapse; font-size: 13px }
.admin-cuotas-tbl th {
  text-align: left; font-size: 11px; color: var(--muted); font-weight: 700;
  padding: 8px 10px; text-transform: uppercase; letter-spacing: .4px;
  border-bottom: 2px solid var(--border); background: #F4F6FA;
}
.admin-cuotas-tbl td { padding: 6px 10px; border-bottom: 1px solid #F2F4F8 }
.admin-cuotas-tbl td:first-child { font-weight: 600; color: var(--navy); width: 80px }
.admin-cuotas-tbl input {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-family: inherit; font-size: 13px;
  text-align: right; font-weight: 600; color: var(--navy);
}
.admin-cuotas-tbl input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,162,76,.15);
}
.admin-cuotas-tbl tfoot td {
  border-top: 2px solid var(--gold); border-bottom: none;
  background: #F8FAFD; padding: 10px;
}

.admin-form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding-top: 18px; border-top: 1px solid var(--border); margin-top: 8px;
}

@media (max-width: 700px) {
  .admin-panel { width: 100vw; max-width: 100vw; border-radius: 0; max-height: 100vh }
  .admin-field-row { flex-direction: column }
  .admin-card { flex-direction: column; align-items: stretch }
  .admin-card .card-actions { justify-content: flex-end }
}
