﻿/* accta · estilo del backoffice (paleta y tipografías de la marca) */
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/CormorantGaramond_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600 700; font-style: normal; font-display: swap; src: url("fonts/CormorantGaramond_700Bold.ttf") format("truetype"); }
@font-face { font-family: "Jost"; font-weight: 300 500; font-style: normal; font-display: swap; src: url("fonts/Jost_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Jost"; font-weight: 400 500; font-style: italic; font-display: swap; src: url("fonts/Jost_400Regular_Italic.ttf") format("truetype"); }
@font-face { font-family: "Jost"; font-weight: 600 700; font-style: normal; font-display: swap; src: url("fonts/Jost_700Bold.ttf") format("truetype"); }

:root {
    --ink: #1C2B2B;
    --ink-soft: #3B4A4A;
    --gold: #C9962C;
    --gold-text: #9A6F14;
    --gold-light: #E3C27A;
    --cream: #F6F3EC;
    --line: #E4DED0;
    --muted: #7C8584;
    --danger: #8C2F2F;
    --danger-bg: #F8ECEA;
    --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --sans: "Jost", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 32px 16px 48px;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.page { max-width: 1040px; margin: 0 auto; }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(28,43,43,.05), 0 12px 32px rgba(28,43,43,.08);
    overflow: hidden;
}

/* ---------- Encabezado ---------- */
.header {
    background: var(--ink);
    color: var(--cream);
    padding: 28px 40px 26px;
    border-bottom: 3px solid var(--gold);
}
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 0; }
.header-top + .eyebrow { margin: 14px 0 0; }
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.seal { width: 64px; height: 64px; display: block; flex: none; }
.eyebrow {
    font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase;
    color: var(--gold-light); margin-bottom: 8px;
}
.brand-name {
    display: block; font-family: var(--serif); font-weight: 600; font-size: 58px; line-height: 1.12;
    letter-spacing: .01em; color: var(--cream);
}
.userbar { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--gold-light); }
.user-name { letter-spacing: .04em; }
.link-salir {
    color: var(--cream); text-decoration: none; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
    padding: 7px 14px; border: 1px solid rgba(227,194,122,.55); border-radius: 3px; transition: background .15s, border-color .15s;
}
.link-salir:hover, .link-salir:focus-visible { background: rgba(227,194,122,.14); border-color: var(--gold-light); outline: none; }

/* ---------- Contenido ---------- */
.content { padding: 8px 40px 40px; }

.section-title {
    font-family: var(--serif); font-size: 28px; font-weight: 600; margin: 32px 0 14px; color: var(--ink);
    display: flex; align-items: center; gap: 14px; line-height: 1.2;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, var(--gold), transparent); }
.section-title .count { order: 2; font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.section-title .count:empty { display: none; }
.lead { margin: -4px 0 20px; color: var(--ink-soft); }

/* ---------- Inmobiliaria y suscripcion ---------- */
.plan { margin-bottom: 8px; }
.plan .section-title { margin-top: 0; }
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan-item { min-width: 0; padding: 14px 16px; background: var(--cream); border: 1px solid var(--line); border-radius: 4px; }
.plan-item .field-label { margin-bottom: 4px; letter-spacing: .16em; }
.plan-value { display: block; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.plan-value.plan-bad { color: var(--danger); }
.section-title .badge {
    order: 2; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    padding: 5px 12px; border-radius: 999px; border: 1px solid transparent;
}
.badge-ok { color: #2E7D4F; background: #E8F3EC; border-color: #BFDCCB; }
.badge-off { color: var(--danger); background: var(--danger-bg); border-color: #E6C9C4; }
@media (max-width: 720px) { .plan-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .plan-value { font-size: 22px; } }

/* ---------- Formularios ---------- */
.search-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; }
.field { min-width: 0; }
.field-label, .field label {
    display: block; font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
    color: var(--gold-text); margin-bottom: 6px;
}
.input {
    width: 100%; height: 50px; padding: 0 16px; font-family: var(--sans); font-size: 17px; font-weight: 500; color: var(--ink);
    background: var(--cream); border: 1px solid var(--line); border-radius: 4px; appearance: none; -webkit-appearance: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input:hover { border-color: #D3C9B0; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,150,44,.22); background: #fff; }
input[type="date"].input { min-height: 50px; }
.login .field + .field { margin-top: 16px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 30px;
    font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    border-radius: 4px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(201,150,44,.45); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: var(--cream); border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--gold); }
.btn-primary:hover { background: #26393A; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-text); }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-block { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
    font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .08em; padding: 7px 14px;
    color: var(--ink-soft); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.chip:hover, .chip:focus-visible { border-color: var(--gold); color: var(--gold-text); background: var(--cream); outline: none; }

.message {
    display: block; margin: 18px 0 0; padding: 13px 16px; border-radius: 4px; font-size: 15px;
    border: 1px solid var(--line); border-left: 4px solid var(--gold); background: var(--cream); color: var(--ink);
}
.message.error { color: var(--danger); background: var(--danger-bg); border-color: #E6C9C4; border-left-color: var(--danger); }

/* ---------- Tabla de inventarios ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.grid { width: 100%; border-collapse: collapse; font-size: 15px; }
.grid thead th {
    text-align: left; padding: 12px 16px; background: var(--ink); color: var(--gold-light);
    font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
}
.grid tbody tr { cursor: pointer; transition: background .12s; }
.grid tbody td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.grid tbody tr:first-child td { border-top: 0; }
.grid tbody tr:nth-child(even) { background: #FBF9F4; }
.grid tbody tr:hover { background: var(--cream); }
.grid tbody tr.selected { background: #F3EAD3; box-shadow: inset 4px 0 0 var(--gold); }
.grid .c-sel { width: 52px; text-align: center; padding-right: 0; }
.grid .c-main { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.grid input[type="radio"] { width: 19px; height: 19px; accent-color: var(--gold); cursor: pointer; margin: 0; }

.actions {
    position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-top: 20px; padding: 14px 0 2px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 28%);
}
.selection-summary { color: var(--muted); font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-summary strong { color: var(--ink); font-weight: 600; }

/* ---------- Login ---------- */
.login { max-width: 440px; margin: 0 auto; padding-bottom: 8px; }
.login .btn { margin-top: 24px; }

/* ---------- Pie ---------- */
.footer {
    padding: 18px 40px; background: var(--cream); border-top: 1px solid var(--line); text-align: center;
    font-size: 12px; letter-spacing: .12em; color: var(--muted);
}
.footer strong { color: var(--ink); font-weight: 600; letter-spacing: .04em; }
.wm-c { color: var(--gold); }
.footer .wm { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.footer .wm strong { font-family: var(--sans); font-size: 17px; font-weight: 700; letter-spacing: .02em; text-transform: none; }
.seal-sm { width: 22px; height: 22px; display: block; flex: none; }

/* ---------- Carga y visor ---------- */
.overlay {
    position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    background: rgba(28,43,43,.82); color: var(--cream); font-family: var(--serif); font-size: 24px; font-weight: 600;
}
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 3px solid rgba(227,194,122,.28); border-top-color: var(--gold); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.viewer { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--ink); }
.viewer-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 2px solid var(--gold); color: var(--cream); }
.viewer-title { flex: 1; min-width: 0; font-family: var(--serif); font-size: 20px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-bar .btn { height: 40px; padding: 0 18px; font-size: 12px; }
.viewer-bar .btn-ghost { color: var(--cream); border-color: rgba(227,194,122,.55); }
.viewer-bar .btn-ghost:hover { color: var(--gold-light); border-color: var(--gold-light); }
.viewer-bar .btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); box-shadow: none; }
.viewer-bar .btn-primary:hover { background: var(--gold-light); }
.viewer-body { flex: 1; min-height: 0; position: relative; background: #2A3A3A; }
.viewer-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.viewer-fallback { display: flex; height: 100%; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--gold-light); font-size: 16px; }
.viewer-note { padding: 6px 16px; background: #2A3A3A; color: var(--gold-light); font-size: 12px; letter-spacing: .06em; border-top: 1px solid rgba(227,194,122,.25); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .header { padding: 24px 24px 22px; }
    .content { padding: 4px 24px 32px; }
    .footer { padding: 16px 24px; }
}

@media (max-width: 720px) {
    body { padding: 12px 8px 32px; }
    .brand-name { font-size: 40px; }
    .seal { width: 52px; height: 52px; }
    .brand { gap: 12px; }
    .section-title { font-size: 24px; margin-top: 26px; }
    .search-grid { grid-template-columns: 1fr 1fr; }
    .search-grid .field-btn { grid-column: 1 / -1; }
    .search-grid .btn { width: 100%; }

    /* la tabla se vuelve una lista de tarjetas */
    .table-wrap { border: 0; border-radius: 0; overflow: visible; }
    .grid, .grid tbody { display: block; }
    .grid thead { display: none; }
    .grid tbody tr {
        display: grid; grid-template-columns: 40px 1fr 1fr; gap: 2px 12px; padding: 14px 14px 14px 6px; margin-bottom: 10px;
        background: #fff !important; border: 1px solid var(--line); border-radius: 5px;
    }
    .grid tbody tr.selected { background: #F3EAD3 !important; border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
    .grid tbody td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
    .grid tbody td::before {
        content: attr(data-label); display: block; font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text);
    }
    .grid .c-sel { grid-row: 1 / span 3; align-self: center; width: auto; padding: 0; }
    .grid .c-sel::before { display: none; }
    .grid td[data-label="Calle"] { grid-area: 1 / 2 / 2 / 4; margin-bottom: 6px; }
    .grid td[data-label="Calle"]::before { display: none; }
    .grid td[data-label="Fecha"] { grid-area: 2 / 2; }
    .grid td[data-label="Nro"] { grid-area: 2 / 3; }
    .grid td[data-label="Arrendatario"] { grid-area: 3 / 2; margin-top: 6px; }
    .grid td[data-label="Autor"] { grid-area: 3 / 3; margin-top: 6px; }
    .grid .c-main { font-size: 21px; line-height: 1.2; }

    .actions { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 2px solid var(--gold); box-shadow: 0 -8px 24px rgba(28,43,43,.12); }
    .actions .btn { flex: none; }
    .results { padding-bottom: 84px; }

    .viewer-bar { flex-wrap: wrap; }
    .viewer-title { flex-basis: 100%; }
    .viewer-bar .btn { flex: 1; }
}

@media (max-width: 420px) {
    .search-grid { grid-template-columns: 1fr; }
    .userbar .user-name { display: none; }
}

@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } * { transition: none !important; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Pantalla de ingreso: marca accta, panel centrado ---------- */
body.login-page { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-page .page { width: 100%; max-width: 460px; margin: 0; }
.login-page .header { text-align: center; padding: 32px 32px 28px; }
.login-page .header-top { justify-content: center; margin-bottom: 0; }
.login-page .brand { gap: 20px; }
.login-page .seal { width: 76px; height: 76px; }
.login-page .brand-name { font-size: 68px; letter-spacing: .02em; }
.login-page .content { padding: 4px 40px 36px; }
.login-page .login { max-width: none; }
.login-page .section-title { margin-top: 28px; }
@media (max-width: 720px) {
    body.login-page { padding: 16px 12px; }
    .login-page .content { padding: 0 22px 28px; }
    .login-page .brand-name { font-size: 50px; }
    .login-page .seal { width: 60px; height: 60px; }
    .login-page .brand { gap: 14px; }
}


/* ---------- Administracion del producto ---------- */
.subnav { display: flex; gap: 6px; margin: 22px 0 0; border-bottom: 1px solid var(--line); }
.subnav-link {
    padding: 10px 18px; margin-bottom: -1px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ink-soft); text-decoration: none; border-bottom: 3px solid transparent; transition: color .15s, border-color .15s;
}
.subnav-link:hover, .subnav-link:focus-visible { color: var(--gold-text); outline: none; }
.subnav-link.active { color: var(--ink); border-bottom-color: var(--gold); }

.tabs { display: flex; gap: 6px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.tabs .tab {
    padding: 10px 18px; margin: 0 0 -1px; font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ink-soft); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; transition: color .15s, border-color .15s;
}
.tabs .tab:hover, .tabs .tab:focus-visible { color: var(--gold-text); outline: none; }
.tabs .tab.active { color: var(--ink); border-bottom-color: var(--gold); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 14px; }
.toolbar .btn { height: 44px; padding: 0 22px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--muted); }
.legend .sem { min-width: 0; padding: 2px 10px; font-size: 11px; }
.legend span + span { margin-left: 0; }
.hint { display: block; margin: 10px 0 0; font-size: 13px; color: var(--muted); }

.table-scroll { border: 1px solid var(--line); border-radius: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gridx { width: 100%; border-collapse: collapse; font-size: 14px; }
.gridx thead th {
    text-align: left; padding: 12px 14px; background: var(--ink); color: var(--gold-light);
    font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
}
.gridx thead th.num, .gridx td.num { text-align: right; }
.gridx tbody td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.gridx tbody tr:first-child td { border-top: 0; }
.gridx tbody tr:nth-child(even) { background: #FBF9F4; }
.gridx tbody tr:hover { background: var(--cream); }
.gridx .c-main { display: block; font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.2; }
.gridx .sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.gridx .sub-bad { color: var(--danger); }
.gridx tr.inactiva .c-main { color: var(--muted); }
.gridx .acciones { display: flex; gap: 6px; justify-content: flex-end; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 11px; letter-spacing: .12em; }

/* semaforo de consumo: verde / amarillo / rojo (sin = el plan no tiene ese tope) */
.sem {
    display: inline-block; min-width: 68px; padding: 4px 10px; text-align: center; font-size: 13px; font-weight: 600;
    border: 1px solid transparent; border-radius: 999px; white-space: nowrap;
}
.sem-ok { color: #2E7D4F; background: #E8F3EC; border-color: #BFDCCB; }
.sem-amarillo { color: #8A5A00; background: #FBF1DC; border-color: #EBD39B; }
.sem-rojo { color: var(--danger); background: var(--danger-bg); border-color: #E6C9C4; }
.sem-sin { color: var(--muted); background: #F2EFE8; border-color: var(--line); font-weight: 500; }
.sem-det { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.sem-det:empty { display: none; }

/* formulario de alta / modificacion */
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 18px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .span4 { grid-column: 1 / -1; }
.form-grid.dos { grid-template-columns: 1fr 1fr; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.field .hint { margin-top: 6px; }
select.input {
    padding-right: 44px; cursor: pointer; text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5 7 7.5 13 1.5' fill='none' stroke='%239A6F14' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}
.check { display: flex; align-items: center; height: 50px; }
.check input { width: 19px; height: 19px; margin: 0 10px 0 0; accent-color: var(--gold); cursor: pointer; }
.field .check label { display: inline; margin: 0; font-size: 16px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
.filtros { grid-template-columns: 1fr 1fr; margin-bottom: 8px; }
.resumen { margin-bottom: 22px; }

/* informes por mes: barras y tabla */
.bars { display: flex; align-items: flex-end; gap: 8px; min-height: 200px; margin: 0 0 22px; padding: 14px 14px 10px; background: var(--cream); border: 1px solid var(--line); border-radius: 4px; }
.bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.bar-val { margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--ink); }
.bar { display: block; width: 100%; max-width: 44px; background: var(--gold); border-radius: 3px 3px 0 0; }
.bar-col.actual .bar { background: var(--ink); }
.bar-lbl { width: 100%; margin-top: 0; padding-top: 6px; border-top: 1px solid var(--line); text-align: center; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.gridx-meses { width: auto; min-width: 100%; }
.gridx-meses thead th, .gridx-meses tbody td { white-space: nowrap; }
.gridx-meses tbody td:first-child, .gridx-meses thead th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--line); }
.gridx-meses thead th:first-child { background: var(--ink); }
.gridx-meses tbody tr:nth-child(even) td:first-child { background: #FBF9F4; }
.gridx-meses tr.fila-global td { background: #F3EAD3 !important; font-weight: 600; }
.gridx-meses td.total { font-weight: 600; border-left: 1px solid var(--line); }
.gridx-meses td.cero { color: var(--line); }

@media (max-width: 1000px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .form-grid .span2 { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .form-grid, .form-grid.dos, .filtros { grid-template-columns: 1fr; }
    .toolbar .btn { width: 100%; }
    .subnav-link { padding: 10px 12px; letter-spacing: .1em; }
    .bars { gap: 4px; padding: 12px 8px 8px; }
    .bar-val { font-size: 10px; }
    .bar-lbl { font-size: 9px; letter-spacing: 0; }
}


/* ---------- Administracion del producto: pantallas anchas, grilla compacta, pagos ---------- */
body.ancho .page { max-width: 1560px; }
body.ancho .content { padding-left: 32px; padding-right: 32px; }

.gridx-lista { font-size: 13px; }
.gridx-lista thead th { padding: 8px 10px; font-size: 10px; letter-spacing: .14em; }
.gridx-lista thead th.grupo { text-align: center; border-bottom: 1px solid rgba(227,194,122,.3); padding-bottom: 6px; }
.gridx-lista thead th.subcol { padding: 5px 10px 7px; letter-spacing: .1em; color: #CDB98A; text-transform: none; font-size: 11px; }
.gridx-lista tbody td { padding: 5px 10px; line-height: 1.25; }
.gridx-lista .c-nombre { font-family: var(--serif); font-size: 16px; font-weight: 600; min-width: 190px; }
.gridx-lista tr.inactiva .c-nombre { color: var(--muted); }
.gridx-lista .sem { min-width: 52px; padding: 1px 8px; font-size: 12px; }
.gridx-lista .badge { font-size: 10px; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.gridx-lista .btn-sm { height: 26px; padding: 0 12px; font-size: 10px; }
.gridx-lista .acciones-col { width: 1%; text-align: right; white-space: nowrap; }
.gridx-lista .vence-bad { color: var(--danger); font-weight: 600; }
.gridx-lista .vence-na { color: var(--muted); font-style: italic; }
.gridx-lista td { white-space: nowrap; }
.gridx-lista td.c-nombre { white-space: normal; }

.form-sub { margin: 24px 0 12px; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-text); }
.form-sub:first-of-type { margin-top: 4px; }
.btn-danger { background: transparent; color: var(--danger); border-color: #E6C9C4; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.form-actions .push-right { margin-left: auto; }

.pago-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.3fr); gap: 28px; align-items: start; }
.input.lista { height: auto; margin-top: 8px; padding: 4px; font-size: 15px; font-weight: 400; }
.input.lista option { padding: 7px 10px; border-radius: 3px; }
.input.lista option:checked { background: #F3EAD3; color: var(--ink); }
.pago-datos .form-grid { margin-top: 14px; }
.pago-plan { margin-bottom: 4px; }
.pago-plan .plan-value { font-size: 22px; }
.pago-datos .form-actions { margin-top: 18px; }
.pago-datos .field + .form-actions { margin-top: 14px; }
.pago-grid.compacta { align-items: stretch; margin-bottom: 22px; }
.pago-grid.compacta > .field { display: flex; flex-direction: column; }
.pago-grid.compacta .input.lista { flex: 1 1 0; height: 0; min-height: 44px; }
@media (max-width: 860px) { .pago-grid { grid-template-columns: 1fr; gap: 18px; } }

/* ---------- Dialogo de confirmacion ---------- */
.dlg-fondo { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(28,43,43,.55); animation: dlgFade .15s ease-out; }
.dlg { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--danger); border-radius: 4px; padding: 28px 28px 22px; text-align: center; box-shadow: 0 18px 48px rgba(28,43,43,.35); animation: dlgUp .18s ease-out; }
.dlg-icono { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%; background: var(--danger-bg); color: var(--danger); font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 44px; }
.dlg-titulo { margin: 0 0 8px; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); }
.dlg-texto { margin: 0 0 22px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.dlg-acciones { display: flex; gap: 10px; justify-content: center; }
.dlg-acciones .btn { min-width: 130px; }
.input.num-ro { background: var(--cream); color: var(--ink); cursor: default; text-align: right; font-variant-numeric: tabular-nums; }
.input.total-ro { font-weight: 700; font-size: 18px; }
.btn-danger-fill { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger-fill:hover { background: #742525; }
@keyframes dlgFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dlgUp { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.pago-datos .subtitulo { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 14px; color: var(--ink); }
