/* ==========================================================================
   Quality Premier Homes · Panel de administración
   Tema claro / oscuro con variables (html[data-theme])
   ========================================================================== */
:root {
    --navy: #0d2347;
    --navy-2: #163262;
    --gold: #c9a46a;
    --gold-2: #e2c48f;
    --gold-dark: #a8844c;
    --gold-soft: rgba(201, 164, 106, .14);

    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #f8f9fb;
    --surface-3: #eef0f4;
    --line: #e5e7eb;
    --line-2: #d0d5dd;
    --text: #101828;
    --text-2: #344054;
    --muted: #667085;
    --ink: var(--navy);
    --heading: #0b1b38;
    --input: #ffffff;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .12);
    --shadow-lg: 0 24px 48px -16px rgba(16, 24, 40, .22);

    --side-bg: linear-gradient(180deg, #0d2347 0%, #0a1b38 100%);
    --side-text: rgba(255, 255, 255, .68);
    --side-line: rgba(255, 255, 255, .08);

    --venta: #12b76a;
    --renta: #2e90fa;
    --pendiente: #f79009;
    --vendida: #f04438;
    --ok: #079455;
    --danger: #d92d20;
    --warn: #b54708;

    --radius: 16px;
    --radius-sm: 10px;
    --side-w: 264px;
    --top-h: 68px;
    --ff-serif: "Playfair Display", Georgia, serif;
    --ff-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --ff-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --ease: cubic-bezier(.22, 1, .36, 1);
    color-scheme: light;
}
[data-theme="dark"] {
    --bg: #0a0f1b;
    --surface: #111827;
    --surface-2: #151e30;
    --surface-3: #1c2740;
    --line: #232f47;
    --line-2: #33415f;
    --text: #eef1f6;
    --text-2: #cdd3de;
    --muted: #8d99ae;
    --ink: #eef1f6;
    --heading: #f6f7fa;
    --input: #0e1626;
    --gold-soft: rgba(201, 164, 106, .16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .7);
    --side-bg: linear-gradient(180deg, #0b1427 0%, #080e1c 100%);
    --ok: #47cd89;
    --danger: #f97066;
    --warn: #fdb022;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.adm { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--ff-sans); -webkit-font-smoothing: antialiased; transition: background .3s; }
a { color: inherit; }
img { max-width: 100%; display: block; }
code { background: var(--surface-3); padding: 2px 6px; border-radius: 6px; font: .85em var(--ff-mono); }
em { font-style: italic; color: var(--gold); }
.ico { flex: none; }
[hidden] { display: none !important; }
::selection { background: var(--gold-soft); }

/* ==========================================================================
   Estructura: menú lateral + barra superior
   ========================================================================== */
.adm-side {
    position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 60;
    display: flex; flex-direction: column; padding: 22px 14px 14px;
    background: var(--side-bg); color: var(--side-text);
    border-right: 1px solid var(--side-line);
}
.adm-side__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px 22px; margin-bottom: 8px; border-bottom: 1px solid var(--side-line); }
.adm-side__brand { display: block; text-decoration: none; width: 100%; max-width: 210px; }
.adm-iconbtn.adm-side__close { display: none; color: #fff; border-color: var(--side-line); background: transparent; }

.adm-nav { display: grid; gap: 2px; overflow-y: auto; padding: 4px 2px; }
.adm-nav__label { margin: 16px 12px 6px; font-size: .66rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .36); }
.adm-nav__link {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
    text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--side-text);
    transition: background .2s, color .2s;
}
.adm-nav__link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.adm-nav__link.is-active { background: rgba(201, 164, 106, .16); color: #fff; }
.adm-nav__link.is-active::before { content: ""; position: absolute; left: -2px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--gold); }
.adm-nav__link.is-active .ico { color: var(--gold-2); }
.adm-nav__ext { margin-left: auto; opacity: .45; }

.adm-side__foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 6px 0; border-top: 1px solid var(--side-line); }
.adm-me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; text-decoration: none; transition: background .2s; }
.adm-me:hover, .adm-me.is-active { background: rgba(255, 255, 255, .06); }
.adm-me__txt { display: grid; min-width: 0; line-height: 1.25; }
.adm-me__txt b { color: #fff; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-me__txt small { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; }
.adm-iconbtn--side { color: var(--side-text); border-color: transparent !important; background: transparent !important; }
.adm-iconbtn--side:hover { color: #fff; background: rgba(255, 255, 255, .08) !important; }

.adm-avatar {
    display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-2), var(--gold-dark)); color: #0d2347;
    font-weight: 800; font-size: .82rem; letter-spacing: .02em;
}
.adm-avatar--sm { width: 32px; height: 32px; font-size: .72rem; }

.adm-shell { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.adm-shell--solo { margin: 0; }

.adm-top {
    position: sticky; top: 0; z-index: 40; height: var(--top-h);
    display: flex; align-items: center; gap: 16px; padding: 0 clamp(16px, 2.6vw, 36px);
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5);
    border-bottom: 1px solid var(--line);
}
.adm-iconbtn.adm-top__menu { display: none; }
.adm-top__crumb { display: flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); white-space: nowrap; min-width: 0; }
.adm-top__crumb b { color: var(--heading); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.adm-top__sep { transform: rotate(-90deg); opacity: .6; }
.adm-top__search {
    position: relative; flex: 1; max-width: 460px; margin-left: auto; display: flex; align-items: center;
    color: var(--muted);
}
.adm-top__search .ico { position: absolute; left: 13px; pointer-events: none; }
.adm-top__search input {
    width: 100%; height: 40px; padding: 0 40px 0 40px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--surface); color: var(--text); font: 500 .88rem var(--ff-sans); transition: border-color .2s, box-shadow .2s;
}
.adm-top__search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.adm-top__search kbd { position: absolute; right: 10px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); font: 700 .72rem var(--ff-mono); color: var(--muted); }
.adm-top__spacer { flex: 1; }
.adm-top__actions { display: flex; align-items: center; gap: 8px; }

.adm-iconbtn {
    display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-2);
    cursor: pointer; text-decoration: none; transition: background .2s, color .2s, border-color .2s;
}
.adm-iconbtn:hover { border-color: var(--line-2); color: var(--heading); background: var(--surface-2); }
.adm-iconbtn--sm { width: 34px; height: 34px; border-radius: 9px; }
.adm-iconbtn--danger:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); }
[data-theme="light"] .ico--sol, [data-theme="dark"] .ico--luna { display: none; }

.adm-menu { position: relative; }
.adm-menu__btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); font: 700 .86rem var(--ff-sans); cursor: pointer; }
.adm-menu__btn:hover { border-color: var(--line-2); }
.adm-menu__pop {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
    animation: admPop .18s var(--ease);
}
.adm-menu__head { display: grid; gap: 6px; justify-items: start; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.adm-menu__head b { color: var(--heading); }
.adm-menu__pop a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: .88rem; color: var(--text-2); }
.adm-menu__pop a:hover { background: var(--surface-3); color: var(--heading); }
@keyframes admPop { from { opacity: 0; transform: translateY(-4px); } }

.adm-main { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 30px clamp(16px, 2.6vw, 36px) 80px; }
.adm-main--solo { max-width: none; padding: 0; }
.adm-backdrop { display: none; }

/* ==========================================================================
   Tipografía y bloques
   ========================================================================== */
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.adm-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.adm-eyebrow { margin: 0 0 6px; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-dark); }
[data-theme="dark"] .adm-eyebrow { color: var(--gold); }
.adm-h1 { margin: 0; font: 800 clamp(1.6rem, 2.6vw, 2.1rem)/1.15 var(--ff-sans); letter-spacing: -.02em; color: var(--heading); }
.adm-sub { margin: 6px 0 0; color: var(--muted); font-size: .93rem; }
.adm-h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font: 800 1.02rem var(--ff-sans); color: var(--heading); }
.adm-h2 span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--gold-soft); color: var(--gold-dark); font-size: .8rem; }
[data-theme="dark"] .adm-h2 span { color: var(--gold-2); }
.adm-muted { color: var(--muted); }
.adm-tiny { font-size: .78rem; margin: 14px 0 0; }
.adm-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--muted); text-decoration: none; font-size: .86rem; font-weight: 700; }
.adm-back:hover { color: var(--gold-dark); }
.adm-hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0 18px; }
.adm-pre { white-space: pre-wrap; background: var(--surface-2); padding: 12px; border-radius: 10px; font-size: .8rem; }
.adm-link { display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; font-weight: 700; color: var(--gold-dark); text-decoration: none; white-space: nowrap; }
[data-theme="dark"] .adm-link { color: var(--gold-2); }
.adm-link:hover { text-decoration: underline; }

.adm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.2vw, 26px); box-shadow: var(--shadow-sm); }
.adm-card + .adm-card { margin-top: 20px; }
.adm-card--narrow { max-width: 720px; }
.adm-card--flush { padding: 0; overflow: hidden; }
.adm-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.adm-card__head--pad { padding: 20px 22px 0; margin-bottom: 14px; }
.adm-card__title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; font: 800 1rem var(--ff-sans); color: var(--heading); }
.adm-card__sub { margin: 22px 0 12px; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Botones ---------- */
.adm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
    font: 700 .88rem var(--ff-sans); text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: transform .2s var(--ease), background .2s, box-shadow .2s, color .2s, border-color .2s;
}
.adm-btn:active { transform: translateY(1px); }
.adm-btn:disabled { opacity: .6; cursor: progress; }
.adm-btn--gold { background: var(--gold); color: #0d2347; box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .25); }
.adm-btn--gold:hover { background: var(--gold-2); box-shadow: 0 8px 20px -10px rgba(168, 132, 76, .9); }
.adm-btn--dark { background: var(--navy); color: #fff; }
.adm-btn--dark:hover { background: var(--navy-2); }
[data-theme="dark"] .adm-btn--dark { background: var(--surface-3); border-color: var(--line-2); }
.adm-btn--ghost { background: var(--surface); border-color: var(--line); color: var(--text-2); box-shadow: var(--shadow-sm); }
.adm-btn--ghost:hover { border-color: var(--line-2); color: var(--heading); background: var(--surface-2); }
.adm-btn--danger { background: var(--surface); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
.adm-btn--danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.adm-btn--sm { height: 34px; padding: 0 12px; font-size: .8rem; border-radius: 9px; }
.adm-btn--block { width: 100%; }
.adm-btn--block + .adm-btn--block { margin-top: 10px; }

/* ---------- Avisos ---------- */
.adm-alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 22px; padding: 13px 16px; border-radius: 12px; border: 1px solid; font-weight: 600; font-size: .9rem; transition: opacity .6s, transform .6s; }
.adm-alert .ico { margin-top: 2px; }
.adm-alert ul { margin: 6px 0 0; padding-left: 18px; font-weight: 500; }
.adm-alert--ok { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.adm-alert--error { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.adm-alert--warn { background: color-mix(in srgb, var(--warn) 9%, var(--surface)); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.adm-alert--warn a { font-weight: 800; }
.adm-alert.is-hiding { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.adm-note { margin-top: 18px; padding: 14px 16px; background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); border-radius: 12px; font-size: .84rem; }

/* ---------- Formularios ---------- */
.adm-form { display: block; }
.adm-field { display: grid; gap: 6px; margin-bottom: 16px; font-size: .84rem; font-weight: 700; color: var(--text-2); }
.adm-field small { font-weight: 500; color: var(--muted); }
.adm-field input[type=text], .adm-field input[type=number], .adm-field input[type=password], .adm-field input[type=email], .adm-field input[type=tel], .adm-field input[type=date], .adm-field select, .adm-field textarea {
    width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--input);
    font: 500 .94rem var(--ff-sans); color: var(--text); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s;
}
[data-theme="light"] .adm-field input, [data-theme="light"] .adm-field select, [data-theme="light"] .adm-field textarea { border-color: var(--line); }
.adm-field input:disabled { background: var(--surface-3); color: var(--muted); }
.adm-field textarea { resize: vertical; line-height: 1.6; }
.adm-field input:focus, .adm-field select:focus, .adm-field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.adm-field ::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.adm-prefix { position: relative; }
.adm-prefix b { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); }
.adm-prefix input { padding-left: 28px !important; }
.adm-grid2, .adm-grid3, .adm-grid4 { display: grid; gap: 0 16px; }
.adm-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.adm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-tags span { padding: 4px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-dark); font-size: .74rem; font-weight: 700; }
[data-theme="dark"] .adm-tags span { color: var(--gold-2); }

.adm-switch { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; cursor: pointer; }
.adm-switch input { position: absolute; opacity: 0; }
.adm-switch > span { position: relative; flex: none; width: 44px; height: 24px; border-radius: 100px; background: var(--line-2); transition: background .25s; }
.adm-switch > span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.adm-switch input:checked + span { background: var(--venta); }
.adm-switch input:checked + span::after { transform: translateX(20px); }
.adm-switch input:focus-visible + span { box-shadow: 0 0 0 4px var(--gold-soft); }
.adm-switch div { display: grid; line-height: 1.3; color: var(--heading); }
.adm-switch small { color: var(--muted); }

/* ---------- Editor de propiedad ---------- */
.adm-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.adm-editor__main { min-width: 0; }
.adm-sticky { position: sticky; top: calc(var(--top-h) + 20px); }

.adm-locate { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 14px; }
.adm-locate .adm-muted { font-size: .84rem; flex: 1; min-width: 220px; }
.adm-results { list-style: none; margin: 0 0 14px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.adm-results button { width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 500 .86rem var(--ff-sans); cursor: pointer; }
.adm-results button:hover { background: var(--surface-3); }
.adm-map { height: 360px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); z-index: 0; }
.adm-coords { margin-top: 14px; }
.adm-coords .adm-field { margin-bottom: 0; }
.adm-coords input { font-family: var(--ff-mono) !important; font-size: .85rem !important; }

.adm-pin span {
    position: absolute; left: 50%; top: 0; width: 30px; height: 30px; margin-left: -15px;
    border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    background: var(--gold); border: 3px solid var(--navy); box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .5);
}
.adm-pin span::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--navy); }

/* Fotos */
.adm-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.adm-photos--new:empty { display: none; }
.adm-photos--new { margin: 16px 0 0; }
.adm-photo { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-3); border: 2px solid transparent; }
.adm-photo img { width: 100%; height: 100%; object-fit: cover; }
.adm-photo.is-cover { border-color: var(--gold); }
.adm-photo__tag { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 100px; background: var(--gold); color: #0d2347; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.adm-photo figcaption { position: absolute; inset: auto 0 0; display: flex; gap: 6px; justify-content: flex-end; padding: 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); opacity: 0; transition: opacity .25s; }
.adm-photo:hover figcaption, .adm-photo:focus-within figcaption { opacity: 1; }
.adm-photo em { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 100px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .68rem; font-style: normal; }
.adm-photo.is-loading { display: grid; place-items: center; }
.adm-photo__spin { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold); animation: admGiro 1s linear infinite; }
.adm-photo.is-error { border-color: var(--danger); }
.adm-photo.is-error p { padding: 10px; margin: 0; font-size: .75rem; color: var(--danger); }
.adm-photo.is-done::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(7, 148, 85, .55); color: #fff; font-size: 2rem; font-weight: 800; }
@keyframes admGiro { to { transform: rotate(360deg); } }
.adm-mini { padding: 5px 10px; border: 0; border-radius: 100px; background: #fff; color: #0d2347; font: 700 .72rem var(--ff-sans); cursor: pointer; }
.adm-mini--danger { background: var(--danger); color: #fff; }

.adm-drop {
    position: relative; display: grid; justify-items: center; gap: 8px; padding: 34px 20px; text-align: center;
    border: 2px dashed var(--line-2); border-radius: 14px; background: var(--surface-2); color: var(--muted); cursor: pointer;
    transition: border-color .25s, background .25s;
}
.adm-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.adm-drop b { color: var(--heading); }
.adm-drop small { max-width: 420px; }
.adm-drop:hover, .adm-drop.is-over { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-dark); }

.adm-progress { margin-bottom: 14px; }
.adm-progress__bar { height: 8px; border-radius: 100px; background: var(--surface-3); overflow: hidden; }
.adm-progress__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-dark), var(--gold-2)); transition: width .3s; }
.adm-progress small { display: block; margin-top: 6px; color: var(--muted); font-weight: 600; }

/* Pestañas de idioma (Español / English) */
.adm-langs { margin-bottom: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.adm-langs__tabs { display: inline-flex; gap: 4px; margin-bottom: 10px; padding: 4px; border-radius: 10px; background: var(--surface-3); flex-wrap: wrap; }
.adm-langs__tabs button { position: relative; padding: 7px 14px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: .8rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.adm-langs__tabs button small { font-weight: 500; }
.adm-langs__tabs button.is-active { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-sm); }
.adm-langs__tabs button.is-filled::after { content: ''; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--venta); }
.adm-langs .adm-hint { margin: 0 0 14px; font-size: .78rem; color: var(--muted); }

/* ==========================================================================
   Tablero (Inicio)
   ========================================================================== */
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.adm-kpis--dash { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.adm-kpis--dash .adm-kpi small { display: block; padding-right: 46px; }
.adm-kpi {
    position: relative; display: grid; gap: 2px; padding: 20px 20px 18px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    text-decoration: none; color: inherit; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
a.adm-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.adm-kpi small { color: var(--muted); font-weight: 700; font-size: .82rem; }
.adm-kpi strong { font: 800 2rem/1.15 var(--ff-sans); letter-spacing: -.02em; color: var(--heading); }
.adm-kpi__ico { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; }
.adm-kpi__ico--navy { background: color-mix(in srgb, var(--navy) 10%, transparent); color: var(--navy); }
[data-theme="dark"] .adm-kpi__ico--navy { background: rgba(122, 156, 220, .14); color: #9db8ec; }
.adm-kpi__ico--venta { background: color-mix(in srgb, var(--venta) 13%, transparent); color: var(--venta); }
.adm-kpi__ico--renta { background: color-mix(in srgb, var(--renta) 13%, transparent); color: var(--renta); }
.adm-kpi__ico--vendida { background: color-mix(in srgb, var(--vendida) 12%, transparent); color: var(--vendida); }
.adm-kpi__ico--gold { background: var(--gold-soft); color: var(--gold-dark); }
[data-theme="dark"] .adm-kpi__ico--gold { color: var(--gold-2); }
.adm-kpi__foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .8rem; color: var(--muted); }
.adm-kpi__foot b { color: var(--text-2); }
.adm-trend { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-weight: 800; background: var(--surface-3); color: var(--text-2); }
.adm-trend.is-up { background: color-mix(in srgb, var(--venta) 13%, transparent); color: var(--ok); }
.adm-trend.is-down { background: color-mix(in srgb, var(--vendida) 12%, transparent); color: var(--danger); }

.adm-dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.adm-dash > .adm-card { margin: 0; }
.adm-dash__estatus { grid-column: span 4; }
.adm-dash__meses { grid-column: span 8; display: flex; flex-direction: column; }
.adm-dash__mapa { grid-column: span 8; display: flex; flex-direction: column; }
.adm-dash__tipos { grid-column: span 4; }
.adm-dash__recientes { grid-column: span 8; }
.adm-dash__atencion { grid-column: span 4; }
.adm-dash__recientes--solo { grid-column: span 12; }
.adm-dash__equipo { grid-column: span 7; }
.adm-dash__catalogo { grid-column: span 5; }
.adm-dash__catalogo:last-child, .adm-dash__equipo:only-of-type { grid-column: span 12; }
.adm-dash__map { flex: 1; min-height: 340px; background: var(--surface-3); z-index: 0; }

.adm-donut { position: relative; width: 180px; margin: 4px auto 18px; }
.adm-donut svg { display: block; width: 100%; transform: none; }
.adm-donut circle { fill: none; stroke-width: 5.2; }
.adm-donut__track { stroke: var(--surface-3); }
.adm-donut__seg { transition: stroke-width .2s; }
.adm-donut__seg--venta { stroke: var(--venta); }
.adm-donut__seg--renta { stroke: var(--renta); }
.adm-donut__seg--pendiente { stroke: var(--pendiente); }
.adm-donut__seg--vendida { stroke: var(--vendida); }
.adm-donut__mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.adm-donut__mid strong { font: 800 2rem var(--ff-sans); color: var(--heading); }
.adm-donut__mid small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.adm-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.adm-legend a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--text-2); }
.adm-legend a:hover { background: var(--surface-2); }
.adm-legend b { margin-left: auto; color: var(--heading); }
.adm-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.adm-dot--venta { background: var(--venta); }
.adm-dot--renta { background: var(--renta); }
.adm-dot--pendiente { background: var(--pendiente); }
.adm-dot--vendida { background: var(--vendida); }

.adm-bars { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: end; min-height: 190px; padding: 8px 4px 0; border-bottom: 1px solid var(--line); }
.adm-bars__col { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 6px; height: 100%; }
.adm-bars__val { font-size: .78rem; font-weight: 800; color: var(--text-2); }
.adm-bars__bar { align-self: end; width: min(46px, 100%); height: var(--h); min-height: 4px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, color-mix(in srgb, var(--navy) 55%, transparent), color-mix(in srgb, var(--navy) 85%, transparent)); transition: height .6s var(--ease); }
[data-theme="dark"] .adm-bars__bar { background: linear-gradient(180deg, #3b5998, #22386b); }
.adm-bars__bar.is-now { background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.adm-bars__col small { padding-bottom: 8px; font-size: .76rem; font-weight: 700; color: var(--muted); }
.adm-mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.adm-mini-stats div { display: grid; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.adm-mini-stats small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.adm-mini-stats b { font-size: 1.15rem; color: var(--heading); }

.adm-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.adm-hbars li { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: .86rem; font-weight: 600; color: var(--text-2); }
.adm-hbars b { color: var(--heading); }
.adm-hbars i { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--surface-3); position: relative; overflow: hidden; }
.adm-hbars i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--gold-dark), var(--gold-2)); }

.adm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--text-2); }
.adm-chip b { color: var(--heading); }

.adm-rows { list-style: none; margin: 0; padding: 0 8px 8px; }
.adm-rows__link { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 110px; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 12px; text-decoration: none; transition: background .2s; }
.adm-rows__link:hover { background: var(--surface-2); }
.adm-rows li + li .adm-rows__link { border-top: 1px solid var(--line); border-radius: 0; }
.adm-rows li + li .adm-rows__link:hover { border-radius: 12px; border-color: transparent; }
.adm-rows__main { display: grid; min-width: 0; }
.adm-rows__main b { color: var(--heading); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-rows__main small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-rows__price { text-align: right; font-weight: 800; color: var(--heading); }
.adm-rows__price small { color: var(--muted); font-weight: 600; }
.adm-thumb { display: grid; place-items: center; width: 52px; height: 42px; border-radius: 9px; overflow: hidden; background: var(--surface-3); color: var(--muted); }
.adm-thumb img { width: 100%; height: 100%; object-fit: cover; }

.adm-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.adm-todo li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.adm-todo li:last-child { border-bottom: 0; }
.adm-todo li > span:nth-child(2) { display: grid; min-width: 0; }
.adm-todo b { font-size: .88rem; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-todo small { font-size: .78rem; color: var(--muted); }
.adm-todo__ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--pendiente) 13%, transparent); color: var(--pendiente); }
.adm-allgood { display: grid; justify-items: center; gap: 4px; padding: 28px 10px; text-align: center; color: var(--ok); }
.adm-allgood b { color: var(--heading); }
.adm-allgood small { color: var(--muted); max-width: 260px; }

.adm-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.adm-people li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.adm-people li > span:nth-child(2) { display: grid; line-height: 1.25; min-width: 0; }
.adm-people b { font-size: .88rem; color: var(--heading); }
.adm-people small { font-size: .74rem; color: var(--muted); }
.adm-people time { font-size: .76rem; }

.adm-welcome { display: grid; gap: 14px; }
.adm-welcome .adm-kpi__ico { position: static; }
.adm-welcome__links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.adm-perms { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.adm-perms li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 600; }
.adm-perms .ico { color: var(--ok); }

/* Marcadores del mapa del tablero */
.adm-mpin { width: 0 !important; height: 0 !important; }
.adm-mpin span {
    position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); margin-top: -6px;
    padding: 4px 9px; border-radius: 999px; white-space: nowrap; font: 800 .74rem var(--ff-sans);
    background: var(--venta); color: #fff; box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .4); border: 2px solid #fff;
}
.adm-mpin span::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -5px; border: 5px solid transparent; border-top-color: #fff; }
.adm-mpin--renta span { background: var(--renta); }
.adm-mpin--pendiente span { background: var(--pendiente); }
.adm-mpin--vendida span { background: var(--vendida); }
.adm-mpop { display: grid; gap: 2px; text-decoration: none; color: #101828 !important; font-family: var(--ff-sans); }
.adm-mpop small { color: #667085; }
.adm-mpop span { margin-top: 4px; color: var(--gold-dark); font-weight: 800; font-size: .8rem; }

/* ==========================================================================
   Inventario (Propiedades)
   ========================================================================== */
.adm-toolbar { display: grid; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.adm-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: -2px; padding: 2px; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab {
    display: inline-flex; align-items: center; gap: 7px; flex: none; height: 36px; padding: 0 12px; border: 1px solid transparent; border-radius: 9px;
    background: transparent; color: var(--muted); font: 700 .85rem var(--ff-sans); cursor: pointer; transition: background .2s, color .2s;
}
.adm-tab span { padding: 1px 7px; border-radius: 999px; background: var(--surface-3); font-size: .74rem; color: var(--text-2); }
.adm-tab:hover { color: var(--heading); background: var(--surface-2); }
.adm-tab.is-active { background: var(--surface-2); border-color: var(--line); color: var(--heading); box-shadow: var(--shadow-sm); }
.adm-tab.is-active span { background: var(--navy); color: #fff; }
[data-theme="dark"] .adm-tab.is-active span { background: var(--gold); color: #0d2347; }
.adm-toolbar__row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.adm-searchbox { position: relative; flex: 1 1 260px; display: flex; align-items: center; color: var(--muted); }
.adm-searchbox .ico { position: absolute; left: 12px; pointer-events: none; }
.adm-searchbox input, .adm-select {
    height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); color: var(--text);
    font: 600 .86rem var(--ff-sans); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s;
}
.adm-searchbox input { width: 100%; padding: 0 12px 0 38px; }
.adm-select { padding: 0 34px 0 12px; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; }
.adm-searchbox input:focus, .adm-select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.adm-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line); }
.adm-seg button { display: grid; place-items: center; width: 36px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.adm-seg button.is-active { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-sm); }

.adm-props__head, .adm-prop { display: grid; grid-template-columns: minmax(240px, 2.4fr) 118px minmax(170px, 1fr) 112px 104px var(--acciones-w); gap: 16px; align-items: center; }
.adm-props { --acciones-w: calc(var(--acciones, 5) * 40px - 6px); }
.adm-props__head { padding: 10px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.adm-prop { position: relative; padding: 12px 18px; border-bottom: 1px solid var(--line); transition: background .2s; }
.adm-prop:hover { background: var(--surface-2); }
.adm-props[data-view="tabla"] .adm-prop { grid-template-areas: "main status specs price date actions"; }
.adm-props[data-view="tabla"] .adm-prop__img { position: absolute; left: 18px; top: 50%; translate: 0 -50%; width: 72px; height: 54px; }
.adm-props[data-view="tabla"] .adm-prop__main { padding-left: 86px; }
.adm-props[data-view="tabla"] .adm-prop__img em { display: none; }
.adm-prop__img { position: relative; display: grid; place-items: center; border-radius: 10px; overflow: hidden; background: var(--surface-3); color: var(--muted); text-decoration: none; }
.adm-prop__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.adm-prop:hover .adm-prop__img img { transform: scale(1.05); }
.adm-prop__img em { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(13, 17, 28, .65); color: #fff; font-style: normal; font-size: .72rem; font-weight: 700; backdrop-filter: blur(6px); }
.adm-prop__main { display: grid; gap: 3px; min-width: 0; }
.adm-prop__title { font-weight: 800; color: var(--heading); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-prop__title:hover { color: var(--gold-dark); }
.adm-prop__addr { display: flex; align-items: center; gap: 4px; font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-prop__meta { display: flex; align-items: center; gap: 8px; }
.adm-prop__tipo { font-size: .76rem; font-weight: 700; color: var(--text-2); }
.adm-prop__status { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-prop__specs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .84rem; font-weight: 600; color: var(--text-2); }
.adm-prop__specs span { display: inline-flex; align-items: center; gap: 5px; }
.adm-prop__specs .ico { color: var(--muted); }
.adm-prop__price { font-weight: 800; font-size: 1rem; color: var(--heading); }
.adm-prop__price small { font-weight: 600; color: var(--muted); }
.adm-prop__date { font-size: .82rem; color: var(--muted); }
.adm-prop__actions { display: flex; gap: 6px; justify-content: flex-end; }
.adm-prop__actions form { margin: 0; }

/* Vista de tarjetas */
.adm-props[data-view="tarjetas"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; padding: 18px; }
.adm-props[data-view="tarjetas"] .adm-props__head { display: none; }
.adm-props[data-view="tarjetas"] .adm-prop {
    grid-template-columns: 1fr auto; grid-template-areas: "img img" "main main" "specs specs" "price actions";
    gap: 10px 12px; padding: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s;
}
.adm-props[data-view="tarjetas"] .adm-prop:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.adm-props[data-view="tarjetas"] .adm-prop__img { grid-area: img; aspect-ratio: 16 / 10; border-radius: 0; }
.adm-props[data-view="tarjetas"] .adm-prop__main { grid-area: main; padding: 0 14px; }
.adm-props[data-view="tarjetas"] .adm-prop__status { position: absolute; top: 10px; left: 10px; }
.adm-props[data-view="tarjetas"] .adm-prop__status .adm-badge { background: var(--surface); box-shadow: var(--shadow); }
.adm-props[data-view="tarjetas"] .adm-prop__specs { grid-area: specs; padding: 8px 14px 0; border-top: 1px solid var(--line); margin: 0 0; }
.adm-props[data-view="tarjetas"] .adm-prop__price { grid-area: price; padding-left: 14px; font-size: 1.15rem; align-self: center; }
.adm-props[data-view="tarjetas"] .adm-prop__date { display: none; }
.adm-props[data-view="tarjetas"] .adm-prop__actions { grid-area: actions; padding-right: 14px; }

.adm-noresults { display: grid; justify-items: center; gap: 10px; padding: 50px 20px; text-align: center; color: var(--heading); }
.adm-inv__foot { padding: 12px 18px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface-2); margin-top: -1px; }

.adm-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; background: color-mix(in srgb, var(--venta) 12%, transparent); color: var(--ok); }
.adm-badge--venta { background: color-mix(in srgb, var(--venta) 12%, transparent); color: var(--ok); }
.adm-badge--renta { background: color-mix(in srgb, var(--renta) 12%, transparent); color: #1570ef; }
.adm-badge--pendiente { background: color-mix(in srgb, var(--pendiente) 14%, transparent); color: var(--warn); }
.adm-badge--vendida { background: color-mix(in srgb, var(--vendida) 12%, transparent); color: var(--danger); }
.adm-badge--oculta { background: var(--surface-3); color: var(--muted); }
[data-theme="dark"] .adm-badge--renta { color: #84caff; }
.adm-code { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); font: 700 .72rem var(--ff-mono); letter-spacing: .03em; color: var(--text-2); }

.adm-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 60px 20px; }
.adm-empty h2 { margin: 6px 0 0; font: 800 1.2rem var(--ff-sans); color: var(--heading); }
.adm-empty p { margin: 0 0 8px; }
.adm-empty--sm { padding: 30px 20px; }
.adm-empty__ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--gold-soft); color: var(--gold-dark); }

/* ==========================================================================
   Usuarios y roles
   ========================================================================== */
.adm-table-wrap { padding: 0; overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.adm-table th { padding: 12px 18px; text-align: left; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
.adm-table tbody tr { transition: background .2s; }
.adm-table tbody tr:hover { background: var(--surface-2); }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table tr.is-off td { opacity: .55; }
.adm-table tr.is-off td:last-child { opacity: 1; }
.adm-table__actions { display: flex; gap: 8px; justify-content: flex-end; white-space: nowrap; }
.adm-table__actions form { margin: 0; }
.adm-user { display: flex; align-items: center; gap: 12px; }
.adm-user span:last-child { display: grid; line-height: 1.3; }
.adm-user strong { color: var(--heading); }
.adm-role { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.adm-role--admin { background: var(--navy); color: var(--gold-2); }
[data-theme="dark"] .adm-role--admin { background: var(--gold-soft); color: var(--gold-2); }
.adm-role--realtor { background: color-mix(in srgb, var(--renta) 13%, transparent); color: #1570ef; }
.adm-role--publicista { background: color-mix(in srgb, #c11574 12%, transparent); color: #c11574; }
.adm-role--contratista { background: color-mix(in srgb, var(--pendiente) 14%, transparent); color: var(--warn); }
[data-theme="dark"] .adm-role--realtor { color: #84caff; }
[data-theme="dark"] .adm-role--publicista { color: #faa7e0; }
.adm-roles { border: 0; padding: 0; margin: 4px 0 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.adm-roles legend { font-size: .84rem; font-weight: 700; margin-bottom: 8px; color: var(--text-2); }
.adm-roles__opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); transition: border-color .2s, background .2s, box-shadow .2s; }
.adm-roles__opt:hover { border-color: var(--line-2); }
.adm-roles__opt input { accent-color: var(--gold-dark); width: 18px; height: 18px; flex: none; }
.adm-roles__opt span { display: grid; gap: 2px; }
.adm-roles__opt b { color: var(--heading); }
.adm-roles__opt small { color: var(--muted); font-size: .78rem; }
.adm-roles__opt:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 3px var(--gold-soft); }
a.adm-stat { color: inherit; text-decoration: none; }

/* ==========================================================================
   Login
   ========================================================================== */
.adm-login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; background: var(--bg); }
.adm-login__art {
    position: relative; display: flex; align-items: flex-end; padding: 56px; margin: 14px; border-radius: 24px; overflow: hidden;
    background: linear-gradient(180deg, rgba(13, 35, 71, .15), rgba(9, 22, 46, .9)), url("https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?auto=format&fit=crop&w=1600&q=80") center / cover, var(--navy);
    color: #fff;
}
.adm-login__quote h2 { margin: 0; max-width: 480px; font: 500 clamp(1.8rem, 3vw, 2.6rem)/1.2 var(--ff-serif); }
.adm-login__quote .adm-eyebrow { color: var(--gold-2); }
.adm-login__box { align-self: center; justify-self: center; width: min(420px, 100%); padding: 40px 24px; }
.adm-login__logo { display: inline-block; margin-bottom: 36px; text-decoration: none; }
.adm-login__logo .logo__img { width: 270px; }
.adm-login__box h1 { margin: 0; font: 800 1.9rem var(--ff-sans); letter-spacing: -.02em; color: var(--heading); }
.adm-login__box > p { margin: 4px 0 26px; }
.adm-login__box .adm-alert { margin-top: -6px; }
.adm-login .adm-back { margin-top: 22px; }
.adm-login__tools { position: fixed; top: 16px; right: 16px; z-index: 5; display: flex; align-items: center; gap: 8px; }

/* Selector de idioma del panel (EN / ES) */
.adm-lang { display: inline-flex; flex: none; height: 40px; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.adm-lang a {
    display: grid; place-items: center; min-width: 34px; padding: 0 8px; border-radius: 7px;
    font: 800 .74rem var(--ff-sans); letter-spacing: .06em; color: var(--muted); text-decoration: none; transition: background .2s, color .2s;
}
.adm-lang a:hover { color: var(--heading); background: var(--surface-2); }
.adm-lang a.is-active { background: var(--heading); color: var(--surface); }
[data-theme="light"] .logo-dual .logo--claro, [data-theme="dark"] .logo-dual .logo--color { display: none; }

/* Logo del sitio dentro del panel */
.logo { display: inline-flex; align-items: center; line-height: 0; }
.logo__img { display: block; height: auto; width: 100%; max-width: 100%; }
.adm-side__brand .logo { display: block; }

/* ---------- Leaflet ---------- */
.leaflet-container { font-family: var(--ff-sans); }
[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(195deg) brightness(.95) contrast(.88) saturate(.6); }
[data-theme="dark"] .leaflet-control-zoom a, [data-theme="dark"] .leaflet-control-attribution { background: var(--surface) !important; color: var(--text-2) !important; border-color: var(--line) !important; }
[data-theme="dark"] .leaflet-control-attribution a { color: var(--gold-2); }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1360px) {
    .adm-props__head, .adm-prop { grid-template-columns: minmax(260px, 2.2fr) 120px minmax(150px, 1fr) 120px var(--acciones-w); }
    .adm-props__head span:nth-child(5), .adm-props[data-view="tabla"] .adm-prop__date { display: none; }
    .adm-props[data-view="tabla"] .adm-prop { grid-template-areas: "main status specs price actions"; }
}
@media (max-width: 1200px) {
    .adm-dash__estatus, .adm-dash__tipos, .adm-dash__atencion { grid-column: span 6; }
    .adm-dash__meses, .adm-dash__mapa, .adm-dash__recientes { grid-column: span 12; }
    .adm-dash__atencion { order: 1; }
    .adm-editor { grid-template-columns: 1fr; }
    .adm-sticky { position: static; }
    .adm-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .adm-side { transform: translateX(-100%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lg); }
    .is-side-open .adm-side { transform: none; }
    .adm-iconbtn.adm-side__close { display: grid; }
    .adm-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(5, 10, 20, .5); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .3s; }
    .is-side-open .adm-backdrop { opacity: 1; pointer-events: auto; }
    .adm-shell { margin-left: 0; }
    .adm-iconbtn.adm-top__menu { display: grid; }
    .adm-props__head { display: none !important; }
    .adm-props[data-view="tabla"] .adm-prop {
        grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "img main main" "img status price" "img specs actions";
        gap: 6px 14px; padding: 14px 16px;
    }
    .adm-props[data-view="tabla"] .adm-prop__img { position: relative; left: auto; top: auto; translate: none; grid-area: img; width: 96px; height: 100%; min-height: 84px; align-self: stretch; }
    .adm-props[data-view="tabla"] .adm-prop__main { grid-area: main; padding: 0; }
    .adm-props[data-view="tabla"] .adm-prop__status { grid-area: status; }
    .adm-props[data-view="tabla"] .adm-prop__specs { grid-area: specs; }
    .adm-props[data-view="tabla"] .adm-prop__price { grid-area: price; text-align: right; }
    .adm-props[data-view="tabla"] .adm-prop__actions { grid-area: actions; }
}
@media (max-width: 760px) {
    .adm-top { gap: 10px; }
    .adm-top__crumb { display: none; }
    .adm-top__search kbd, .adm-menu__name { display: none; }
    .adm-top__search { margin-left: 0; }
    .adm-dash { grid-template-columns: 1fr; gap: 16px; }
    .adm-dash > .adm-card { grid-column: auto !important; }
    .adm-kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
    .adm-kpi { padding: 16px; }
    .adm-kpi strong { font-size: 1.6rem; }
    .adm-kpi__ico { width: 34px; height: 34px; top: 14px; right: 14px; }
    .adm-rows__link { grid-template-columns: 48px minmax(0, 1fr) auto; }
    .adm-rows__link .adm-badge { display: none; }
    .adm-rows__price { min-width: 0; }
    .adm-login { grid-template-columns: 1fr; }
    .adm-login__art { display: none; }
    .adm-head__actions { width: 100%; }
    .adm-head__actions .adm-btn { flex: 1; }
}
@media (max-width: 560px) {
    .adm-main { padding-top: 22px; }
    .adm-grid2, .adm-grid3 { grid-template-columns: 1fr; }
    .adm-map { height: 300px; }
    .adm-toolbar { padding: 14px; }
    .adm-toolbar__row .adm-select { flex: 1 1 140px; }
    .adm-props[data-view="tarjetas"] { padding: 14px; grid-template-columns: 1fr; }
    .adm-props[data-view="tabla"] .adm-prop { grid-template-columns: 76px minmax(0, 1fr) auto; padding: 12px 14px; }
    .adm-props[data-view="tabla"] .adm-prop__img { width: 76px; }
    .adm-props[data-view="tabla"] .adm-prop__specs span:nth-child(3) { display: none; }
    .adm-prop__meta .adm-prop__tipo { display: none; }
    .adm-mini-stats { grid-template-columns: 1fr; }
    .adm-menu__btn { padding-right: 6px; }
    .adm-menu__btn > .ico { display: none; }
    .adm-top__search { display: none; }
    .adm-top__actions { margin-left: auto; }
}
@media (max-width: 380px) {
    .adm-kpis { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.ico--back { transform: scaleX(-1); }
.adm-main--solo > .adm-card { margin: 48px auto; }

/* ==========================================================================
   Modelos y contratistas
   ========================================================================== */
.adm-props--modelos[data-view="tarjetas"] { padding: 0; }
.adm-props--modelos .adm-prop__price small { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.adm-badge--destacado { background: var(--gold-soft); color: var(--gold-dark); }
[data-theme="dark"] .adm-badge--destacado { color: var(--gold-2); }
.adm-prop__nofoto { display: grid; place-items: center; width: 100%; height: 100%; min-height: 60px; }

.adm-hint { margin: -8px 0 16px; font-size: .84rem; }
.adm-visor input[type=color] { width: 100%; height: 44px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); cursor: pointer; }
.adm-checks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 2px 0 18px; }
.adm-checks label, .adm-glb__quitar { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.adm-checks input, .adm-glb__quitar input { width: 17px; height: 17px; accent-color: var(--gold-dark); }
.adm-glb { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface-2); }
.adm-glb__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-dark); }
.adm-glb__txt { display: grid; gap: 3px; min-width: 0; }
.adm-glb__txt b { color: var(--heading); }
.adm-glb__txt small { color: var(--muted); }
.adm-glb__input { max-width: 240px; font: 600 .82rem var(--ff-sans); color: var(--text-2); }
.adm-glb__input::file-selector-button { margin-right: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--heading); font: 700 .8rem var(--ff-sans); cursor: pointer; }

.adm-avatar--ctr { background: color-mix(in srgb, var(--navy) 12%, transparent); color: var(--navy); }
[data-theme="dark"] .adm-avatar--ctr { background: rgba(122, 156, 220, .14); color: #9db8ec; }
.adm-user { text-decoration: none; }
.adm-user small { display: block; font-size: .78rem; }
.adm-chip--sm { padding: 3px 10px; font-size: .76rem; }
.adm-ctr__contacto { font-size: .84rem; }
.adm-ctr__contacto b, .adm-ctr__contacto a { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.adm-ctr__contacto a { color: var(--muted); text-decoration: none; }
.adm-ctr__contacto a:hover { color: var(--gold-dark); }
.adm-warn-txt { color: var(--warn); font-weight: 700; }
.adm-danger-txt { color: var(--danger) !important; font-weight: 700 !important; }
.adm-code--lg { font-size: .85rem; padding: 3px 10px; }
.adm-idcard { display: grid; gap: 2px; margin-bottom: 18px; padding: 14px 16px; border-radius: 12px; background: var(--navy); color: #fff; }
.adm-idcard small { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); }
.adm-idcard strong { font: 800 1.3rem var(--ff-mono); letter-spacing: .02em; }
[data-theme="dark"] .adm-idcard { background: var(--surface-3); }
.adm-quick { display: flex; gap: 8px; margin-top: 14px; }
.adm-quick .adm-btn { flex: 1; }
.adm-table--ctr td { padding-top: 12px; padding-bottom: 12px; }
@media (max-width: 760px) {
    .adm-glb { grid-template-columns: auto minmax(0, 1fr); }
    .adm-glb__input { grid-column: 1 / -1; max-width: none; }
    .adm-table--ctr thead { display: none; }
    .adm-table--ctr, .adm-table--ctr tbody { display: block; }
    .adm-table--ctr tr { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
    .adm-table--ctr tr[hidden] { display: none; }
    .adm-table--ctr td { display: block; padding: 0; border: 0; }
    .adm-table--ctr td:nth-child(1) { grid-column: 1; }
    .adm-table--ctr td:nth-child(2) { grid-column: 2; grid-row: 1; justify-self: end; }
    .adm-table--ctr td:nth-child(3), .adm-table--ctr td:nth-child(4), .adm-table--ctr td:nth-child(5) { grid-column: 1 / -1; }
    .adm-table--ctr td:nth-child(5):has(.adm-muted:only-child) { display: none; }
    .adm-table--ctr td:nth-child(6) { grid-column: 1; }
    .adm-table--ctr td:nth-child(7) { display: none; }
    .adm-table--ctr td:nth-child(8) { grid-column: 2; align-self: center; }
}

.adm-mini-stats--links { margin-top: 0; }
.adm-mini-stats--links a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s; }
.adm-mini-stats--links a:hover { border-color: var(--gold); }
.adm-mini-stats--links small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: .78rem; }
.adm-mini-stats--links b { font-size: 1.5rem; color: var(--heading); line-height: 1.2; }
.adm-mini-stats--links span { font-size: .78rem; }
.adm-todo__ico--danger { background: color-mix(in srgb, var(--vendida) 12%, transparent); color: var(--danger); }
.adm-tiny .ico { vertical-align: -3px; color: var(--ok); }
@media (max-width: 1200px) { .adm-dash__equipo, .adm-dash__catalogo { grid-column: span 12; } }

.adm-code { white-space: nowrap; }

/* ---------- Propiedad basada en un modelo ---------- */
.adm-modelpick { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px 6px; margin: 0 0 20px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--gold) 8%, var(--surface)); }
.adm-modelpick__ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--gold-dark); }
.adm-modelpick__body { flex: 1; min-width: 0; }
.adm-modelpick__body .adm-field { margin-bottom: 8px; }
.adm-modelpick__hint { margin: 0 0 12px; font-size: .82rem; color: var(--muted); }
.adm-modelpick__thumbs { display: flex; gap: 8px; margin: 0 0 10px; overflow-x: auto; }
.adm-modelpick__thumbs img { flex: none; width: 92px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.adm-modelpick__fotos .adm-checks { margin-bottom: 12px; }
@media (max-width: 560px) { .adm-modelpick { padding: 14px 14px 4px; } .adm-modelpick__ico { display: none; } }

/* ==========================================================================
   Avisos flotantes (toasts) y ventanas de confirmación
   ========================================================================== */
.adm-btn--danger-solid { background: #d92d20; border-color: #d92d20; color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .18); }
.adm-btn--danger-solid:hover { background: #b42318; border-color: #b42318; box-shadow: 0 8px 20px -10px rgba(217, 45, 32, .8); }

.qp-toasts { position: fixed; top: 18px; right: 18px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.qp-toast { --c: var(--gold-dark); position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 16px; border-radius: 14px; overflow: hidden; pointer-events: auto;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border: 1px solid var(--line); border-left: 4px solid var(--c); box-shadow: var(--shadow-lg); color: var(--text);
    opacity: 0; transform: translateX(24px) scale(.98); transition: opacity .32s var(--ease), transform .32s var(--ease); }
.qp-toast.is-in { opacity: 1; transform: none; }
.qp-toast.is-out { opacity: 0; transform: translateX(24px) scale(.98); }
.qp-toast--ok { --c: var(--ok); }
.qp-toast--error { --c: var(--danger); }
.qp-toast--warn { --c: var(--warn); }
.qp-toast--info { --c: var(--renta); }
.qp-toast__ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.qp-toast__body { flex: 1; min-width: 0; padding-top: 2px; font-size: .88rem; font-weight: 600; line-height: 1.45; color: var(--heading); overflow-wrap: anywhere; }
.qp-toast__title { display: block; margin-bottom: 2px; font-weight: 800; }
.qp-toast__body ul { margin: 6px 0 0; padding-left: 18px; font-weight: 500; color: var(--text-2); }
.qp-toast__body li + li { margin-top: 3px; }
.qp-toast__close { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: -2px -2px 0 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.qp-toast__close:hover { background: var(--surface-3); color: var(--heading); }
.qp-toast__time { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--c); opacity: .35; transform-origin: left; animation: qp-toast-time linear forwards; }
.qp-toast.is-paused .qp-toast__time { animation-play-state: paused; }
@keyframes qp-toast-time { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.qp-modal { position: fixed; inset: 0; z-index: 3100; display: grid; place-items: center; padding: 20px; background: rgba(8, 15, 30, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s var(--ease); }
.qp-modal.is-in { opacity: 1; }
.qp-modal__box { width: min(440px, 100%); padding: 28px 26px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 80px -20px rgba(8, 15, 30, .45); text-align: center; transform: translateY(14px) scale(.96); transition: transform .3s var(--ease); }
.qp-modal.is-in .qp-modal__box { transform: none; }
.qp-modal__ico { display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: 14px; border-radius: 50%; color: var(--gold-dark); background: var(--gold-soft); box-shadow: 0 0 0 8px color-mix(in srgb, var(--gold) 7%, transparent); }
.qp-modal__box--danger .qp-modal__ico { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--danger) 6%, transparent); }
.qp-modal__title { margin: 0 0 8px; font-family: var(--ff-sans); font-size: 1.18rem; font-weight: 800; color: var(--heading); letter-spacing: -.01em; overflow-wrap: anywhere; }
.qp-modal__text { margin: 0 0 22px; font-size: .92rem; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.qp-modal__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qp-modal__actions .adm-btn { width: 100%; justify-content: center; }
body.qp-modal-open { overflow: hidden; }
@media (max-width: 560px) {
    .qp-toasts { top: auto; bottom: 14px; right: 16px; left: 16px; width: auto; }
    .qp-toast, .qp-toast.is-out { transform: translateY(16px); }
    .qp-toast.is-in { transform: none; }
    .qp-modal { align-items: end; padding: 12px; }
    .qp-modal__actions { grid-template-columns: 1fr; }
    .qp-modal__actions [data-si] { order: -1; }
}
@media (prefers-reduced-motion: reduce) { .qp-toast, .qp-modal, .qp-modal__box { transition: none; } }

/* ==========================================================================
   Contabilidad de la obra
   ========================================================================== */
.adm-num { text-align: right !important; white-space: nowrap; }
.adm-nowrap { white-space: nowrap; }
.adm-kpi__ico--pendiente { background: color-mix(in srgb, var(--pendiente) 14%, transparent); color: var(--warn); }
.adm-cont__kpis { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.adm-cont__kpis .adm-kpi strong { font-size: 1.7rem; }
.adm-cont__neg { color: var(--danger) !important; }
.adm-cont__pos { color: var(--ok) !important; }
.adm-cont__meter { display: block; height: 8px; margin: 8px 0 0; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.adm-cont__meter i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--venta), #47cd89); }
.adm-cont__meter.is-warn i { background: linear-gradient(90deg, var(--pendiente), #fdb022); }
.adm-cont__meter.is-over i { background: linear-gradient(90deg, var(--vendida), #f97066); }
.adm-cont__presu-btn { justify-self: start; margin-top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--text-2); font: 700 .74rem var(--ff-sans); cursor: pointer; }
.adm-cont__presu-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.adm-cont__presu-form { display: flex; gap: 8px; margin-top: 10px; }
.adm-cont__presu-form .adm-prefix { flex: 1; }
.adm-cont__presu-form input { width: 100%; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--input); color: var(--text); font: 600 .9rem var(--ff-sans); }
.adm-cont__presu-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }

.adm-cont__acciones { margin-bottom: 20px; }
.adm-cont__botones { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.adm-cont__accion { --c: var(--navy); display: grid; justify-items: start; gap: 2px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--text); text-align: left; font-family: var(--ff-sans); cursor: pointer; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s, background .2s; }
.adm-cont__accion span { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 11px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.adm-cont__accion b { font-size: .92rem; color: var(--heading); }
.adm-cont__accion small { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.adm-cont__accion:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); background: var(--surface); box-shadow: var(--shadow); }
.adm-cont__accion--pago, .adm-cont__tipo--pago, .adm-dlg--pago { --c: #2e90fa; }
.adm-cont__accion--material, .adm-cont__tipo--material, .adm-dlg--material { --c: #a8844c; }
.adm-cont__accion--gasto, .adm-cont__tipo--gasto, .adm-dlg--gasto { --c: #7a5af8; }
.adm-cont__accion--ingreso, .adm-cont__tipo--ingreso, .adm-dlg--ingreso { --c: #12b76a; }
.adm-cont__accion--insp { --c: #0d2347; }
[data-theme="dark"] .adm-cont__accion--insp { --c: #9db8ec; }
.adm-cont__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); }
.adm-cont__dot--pago { --c: #2e90fa; } .adm-cont__dot--material { --c: #a8844c; } .adm-cont__dot--gasto { --c: #7a5af8; } .adm-cont__dot--ingreso { --c: #12b76a; }

/* Etapas */
.adm-etapas { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; counter-reset: etapa; }
.adm-etapa { --c: var(--line-2); width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: left; font-family: var(--ff-sans); cursor: pointer; transition: border-color .2s, background .2s; }
.adm-etapa:hover { border-color: var(--gold); background: var(--surface); }
.adm-etapa__dot { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .74rem; font-weight: 800; color: var(--muted); background: var(--surface-3); border: 2px solid var(--c); }
.adm-etapa__txt { min-width: 0; display: grid; }
.adm-etapa__txt b { font-size: .8rem; color: var(--heading); line-height: 1.25; }
.adm-etapa__txt small { font-size: .7rem; color: var(--muted); }
.adm-etapa--aprobada { --c: var(--venta); } .adm-etapa--aprobada .adm-etapa__dot { background: var(--venta); color: #fff; }
.adm-etapa--pendiente { --c: var(--renta); } .adm-etapa--pendiente .adm-etapa__dot { color: var(--renta); }
.adm-etapa--correcciones { --c: var(--pendiente); } .adm-etapa--correcciones .adm-etapa__dot { background: var(--pendiente); color: #fff; }
.adm-etapa--rechazada { --c: var(--vendida); } .adm-etapa--rechazada .adm-etapa__dot { background: var(--vendida); color: #fff; }
.adm-res { display: inline-flex; padding: 3px 10px; border-radius: 99px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.adm-res--aprobada { background: color-mix(in srgb, var(--venta) 13%, transparent); color: var(--ok); }
.adm-res--pendiente { background: color-mix(in srgb, var(--renta) 13%, transparent); color: #1570ef; }
.adm-res--correcciones { background: color-mix(in srgb, var(--pendiente) 15%, transparent); color: var(--warn); }
.adm-res--rechazada { background: color-mix(in srgb, var(--vendida) 13%, transparent); color: var(--danger); }
[data-theme="dark"] .adm-res--pendiente { color: #84adff; }
.adm-cont__tabla { margin: 18px calc(-1 * clamp(18px, 2.2vw, 26px)) calc(-1 * clamp(18px, 2.2vw, 26px)); border-top: 1px solid var(--line); }
.adm-cont__notas { max-width: 320px; font-size: .82rem; color: var(--text-2); }

/* Desglose */
.adm-cont__desglose { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 20px 0; }
.adm-cont__desglose .adm-card + .adm-card { margin-top: 0; }
.adm-hbars--navy i::after { background: linear-gradient(90deg, var(--navy), #2e5aa8); }
[data-theme="dark"] .adm-hbars--navy i::after { background: linear-gradient(90deg, #5b7fc4, #9db8ec); }
.adm-cont__ctrs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.adm-cont__ctrs li { display: flex; align-items: center; gap: 10px; }
.adm-cont__ctrs li > span:nth-child(2) { flex: 1; min-width: 0; display: grid; font-size: .86rem; }
.adm-cont__ctrs b { color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-cont__ctrs small { color: var(--muted); font-size: .74rem; }
.adm-cont__ctrs strong { font-size: .9rem; color: var(--heading); white-space: nowrap; }
.adm-cont__tipos { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 8px; font-size: .82rem; color: var(--text-2); }
.adm-cont__tipos li { display: flex; align-items: center; gap: 8px; }
.adm-cont__tipos b { margin-left: auto; color: var(--heading); }

/* Tabla de movimientos */
.adm-cont__concepto { min-width: 220px; }
.adm-cont__concepto b { display: block; color: var(--heading); }
.adm-cont__concepto small { display: block; font-size: .76rem; color: var(--muted); }
.adm-cont__detalle { white-space: pre-line; max-width: 320px; }
.adm-cont__tipo { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 4px; padding: 2px 8px; border-radius: 99px; font-size: .68rem; font-weight: 800; letter-spacing: .02em; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.adm-cont__pago small { display: block; font-size: .74rem; color: var(--muted); }
.adm-table--mov tfoot td { padding: 10px 18px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border-top: 1px solid var(--line); }
.adm-table--mov tfoot tr + tr td { border-top: 0; padding-top: 0; }
.adm-empty--in { padding: 40px 20px 50px; }

/* Ventanas con formulario (dialog) */
.adm-dlg { --c: var(--gold-dark); width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 40px 80px -20px rgba(8, 15, 30, .5); overflow: hidden; animation: adm-dlg-in .28s var(--ease); }
.adm-dlg[open] { display: flex; flex-direction: column; }
.adm-dlg.is-closing { animation: adm-dlg-out .16s ease forwards; }
.adm-dlg::backdrop { background: rgba(8, 15, 30, .45); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
@keyframes adm-dlg-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes adm-dlg-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }
.adm-dlg__form { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 34px); }
.adm-dlg__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.adm-dlg__head h2 { margin: 0; font: 800 1.08rem var(--ff-sans); color: var(--heading); }
.adm-dlg__head small { color: var(--muted); font-size: .78rem; }
.adm-dlg__head > div { flex: 1; min-width: 0; }
.adm-dlg__ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.adm-dlg__ico--insp { color: var(--navy); background: color-mix(in srgb, var(--navy) 10%, transparent); }
[data-theme="dark"] .adm-dlg__ico--insp { color: #9db8ec; background: rgba(122, 156, 220, .14); }
.adm-dlg__x { flex: none; }
.adm-dlg__body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 4px; overscroll-behavior: contain; }
.adm-dlg__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.adm-dlg__foot--split { justify-content: space-between; }
.adm-dlg__search { padding: 14px 20px 0; }
.adm-dlg [hidden] { display: none !important; }

.adm-ctrpick { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 12px; border: 1.5px dashed var(--line-2); border-radius: 12px; background: var(--input); color: var(--muted); font: 600 .88rem var(--ff-sans); text-align: left; cursor: pointer; }
.adm-ctrpick:hover, .adm-ctrpick:focus-visible { border-color: var(--gold); outline: none; box-shadow: 0 0 0 4px var(--gold-soft); }
.adm-ctrpick.has-sel { border-style: solid; border-color: color-mix(in srgb, var(--renta) 45%, var(--line)); background: color-mix(in srgb, var(--renta) 6%, var(--input)); }
.adm-ctrpick__vacio { display: flex; align-items: center; gap: 8px; flex: 1; }
.adm-ctrpick__sel { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.adm-ctrpick__sel > span:last-child { display: grid; min-width: 0; }
.adm-ctrpick__sel b { color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-ctrpick__sel small { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: .76rem; }
.adm-ctrpick__cambiar { display: none; font-size: .78rem; font-weight: 800; color: var(--gold-dark); }
.adm-ctrpick.has-sel .adm-ctrpick__cambiar { display: inline; }

.adm-dlg--ctr { width: min(560px, calc(100vw - 24px)); }
.adm-dlg--ctr .adm-dlg__form { height: min(620px, calc(100dvh - 34px)); }
.adm-ctrlist { display: grid; align-content: start; gap: 6px; padding-top: 12px; }
.adm-ctrlist__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left; font-family: var(--ff-sans); cursor: pointer; }
.adm-ctrlist__item:hover, .adm-ctrlist__item:focus-visible { outline: none; border-color: var(--gold); background: var(--surface-2); box-shadow: 0 0 0 3px var(--gold-soft); }
.adm-ctrlist__item.is-sel { border-color: var(--renta); }
.adm-ctrlist__item.is-off { opacity: .7; }
.adm-ctrlist__item .adm-avatar { font-weight: 800; }
.adm-ctrlist__txt { flex: 1; min-width: 0; display: grid; }
.adm-ctrlist__txt b { color: var(--heading); font-size: .9rem; }
.adm-ctrlist__txt small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-ctrlist__txt em { justify-self: start; margin-top: 3px; padding: 1px 8px; border-radius: 99px; font-style: normal; font-size: .68rem; font-weight: 800; background: var(--surface-3); color: var(--muted); }
.adm-ctrlist__txt em.adm-ctrlist__warn { background: color-mix(in srgb, var(--pendiente) 15%, transparent); color: var(--warn); }
.adm-ctrlist__vacio { margin: 30px 0; text-align: center; color: var(--muted); }

.adm-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 12px; background: var(--surface-3); }
.adm-seg__op { --c: var(--navy); position: relative; cursor: pointer; }
.adm-seg__op input { position: absolute; opacity: 0; inset: 0; }
.adm-seg__op span { display: block; padding: 9px 6px; border-radius: 9px; text-align: center; font-size: .8rem; font-weight: 700; color: var(--text-2); transition: background .15s, color .15s, box-shadow .15s; }
.adm-seg__op input:checked + span { background: var(--surface); color: var(--c); box-shadow: var(--shadow-sm), inset 0 0 0 1.5px var(--c); }
.adm-seg__op input:focus-visible + span { box-shadow: 0 0 0 3px var(--gold-soft); }
.adm-seg__op--aprobada { --c: var(--ok); } .adm-seg__op--pendiente { --c: #1570ef; } .adm-seg__op--correcciones { --c: var(--warn); } .adm-seg__op--rechazada { --c: var(--danger); }

.adm-file { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--input); cursor: pointer; }
.adm-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.adm-file__btn { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 7px 12px; border-radius: 9px; background: var(--surface-3); color: var(--heading); font-size: .8rem; font-weight: 700; }
.adm-file__nombre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 500; color: var(--muted); }
.adm-file:hover { border-color: var(--gold); }
.adm-file__quitar { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .8rem; font-weight: 600; color: var(--danger); cursor: pointer; }

@media (max-width: 1200px) {
    .adm-cont__botones { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .adm-cont__desglose { grid-template-columns: 1fr 1fr; }
    .adm-cont__desglose .adm-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .adm-cont__botones { grid-template-columns: 1fr 1fr; }
    .adm-cont__desglose { grid-template-columns: 1fr; }
    .adm-cont__accion small { display: none; }
    .adm-seg { grid-template-columns: 1fr 1fr; }
    .adm-dlg { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
    .adm-dlg__form { max-height: 92dvh; }
    .adm-dlg .adm-grid2 { grid-template-columns: 1fr; }
    .adm-dlg__foot--split .adm-btn { flex: 1; }
    .adm-table--mov thead { display: none; }
    .adm-table--mov, .adm-table--mov tbody, .adm-table--mov tfoot { display: block; }
    .adm-table--mov tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
    .adm-table--mov td { padding: 0 !important; border: 0 !important; }
    .adm-table--mov td:nth-child(1) { grid-column: 1; font-size: .76rem; color: var(--muted); }
    .adm-table--mov td:nth-child(6) { grid-column: 2; grid-row: 1; }
    .adm-table--mov td:nth-child(2), .adm-table--mov td:nth-child(3), .adm-table--mov td:nth-child(4), .adm-table--mov td:nth-child(5) { grid-column: 1 / -1; }
    .adm-table--mov td:nth-child(7) { grid-column: 1 / -1; }
    .adm-table--mov td:nth-child(7) .adm-table__actions { justify-content: flex-start; }
    .adm-table--mov tfoot tr { display: flex; justify-content: space-between; }
    .adm-table--mov tfoot td[colspan] { display: block; }
    .adm-table--mov tfoot td:empty { display: none; }
}

/* ---------- Horas trabajadas en la obra ---------- */
#asistencia .adm-card__head--pad { flex-wrap: wrap; align-items: flex-start; }
#asistencia .adm-card__head--pad > div { display: grid; gap: 2px; }
.adm-asis__kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 22px 16px; }
.adm-asis__kpis div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.adm-asis__kpis small { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); }
.adm-asis__kpis strong { font-size: 1.25rem; color: var(--heading); }
.adm-asis__kpis div.is-on { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 9%, var(--surface)); }
.adm-asis__kpis div.is-on strong { color: var(--ok); }
.adm-asis__ctrs { list-style: none; margin: 0; padding: 0 22px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.adm-asis__ctrs li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.adm-asis__ctr { flex: 1; min-width: 0; display: grid; font-size: .86rem; }
.adm-asis__ctr b { color: var(--heading); }
.adm-asis__ctr small { color: var(--muted); font-size: .74rem; }
.adm-asis__ctrs strong { color: var(--heading); white-space: nowrap; }
.adm-asis__live { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 99px; font-style: normal; font-size: .7rem; font-weight: 800; color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); white-space: nowrap; }
.adm-asis__live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: admPulso 1.6s ease-in-out infinite; }
@keyframes admPulso { 50% { opacity: .3; } }
.adm-asis__edit { display: block; margin-top: 4px; font-size: .72rem; color: var(--muted); font-style: italic; }
.adm-asis__calc { margin: -4px 0 14px; font-size: .85rem; font-weight: 700; color: var(--text-2); }
.adm-asis__calc.is-error { color: var(--danger, #d92d20); }
.adm-asis__calc:empty { display: none; }
.adm-dlg__ico--asis { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
@media (max-width: 720px) {
    .adm-asis__kpis { grid-template-columns: 1fr 1fr; padding: 0 16px 14px; }
    .adm-asis__ctrs { padding: 0 16px 14px; grid-template-columns: 1fr; }
    .adm-table--asis thead { display: none; }
    .adm-table--asis, .adm-table--asis tbody { display: block; }
    .adm-table--asis tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
    .adm-table--asis td { padding: 0 !important; border: 0 !important; }
    .adm-table--asis td:nth-child(1), .adm-table--asis td:nth-child(5), .adm-table--asis td:nth-child(6) { grid-column: 1 / -1; }
    .adm-table--asis td:nth-child(6) .adm-table__actions { justify-content: flex-start; }
}

/* ---------- Contabilidad: ancho completo, movimientos 60% + horas 40% ---------- */
.adm-main--ancho { max-width: none; }
.adm-cont__dos { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.adm-cont__dos > .adm-card { margin: 0; min-width: 0; container-type: inline-size; }
@container (max-width: 820px) {
    .adm-asis__kpis { grid-template-columns: 1fr 1fr; }
    .adm-asis__ctrs { grid-template-columns: 1fr; }
    .adm-table--asis thead { display: none; }
    .adm-table--asis, .adm-table--asis tbody { display: block; }
    .adm-table--asis tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
    .adm-table--asis td { padding: 0 !important; border: 0 !important; }
    .adm-table--asis td:nth-child(1) { grid-column: 1 / 3; }
    .adm-table--asis td:nth-child(6) { grid-column: 3; grid-row: 1; }
    .adm-table--asis td:nth-child(5) { grid-column: 1 / -1; }
}
@container (max-width: 900px) {
    .adm-table--mov thead { display: none; }
    .adm-table--mov, .adm-table--mov tbody, .adm-table--mov tfoot { display: block; }
    .adm-table--mov tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
    .adm-table--mov td { padding: 0 !important; border: 0 !important; }
    .adm-table--mov td:nth-child(1) { grid-column: 1; font-size: .76rem; color: var(--muted); }
    .adm-table--mov td:nth-child(6) { grid-column: 2; grid-row: 1; }
    .adm-table--mov td:nth-child(2), .adm-table--mov td:nth-child(3), .adm-table--mov td:nth-child(4), .adm-table--mov td:nth-child(5) { grid-column: 1 / -1; }
    .adm-table--mov td:nth-child(7) { grid-column: 1 / -1; }
    .adm-table--mov td:nth-child(7) .adm-table__actions { justify-content: flex-start; }
    .adm-table--mov tfoot tr { display: flex; justify-content: space-between; }
    .adm-table--mov tfoot td[colspan] { display: block; }
    .adm-table--mov tfoot td:empty { display: none; }
}
@media (max-width: 1100px) {
    .adm-cont__dos { grid-template-columns: 1fr; }
}

/* ---------- Reportes ---------- */
.adm-sub svg { vertical-align: -2px; }
.adm-rep__print-only { display: none; }
.adm-rep__periodo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 18px; margin-bottom: 18px; }
.adm-rep__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-rep__chip { display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: .84rem; font-weight: 700; text-decoration: none; transition: background .15s, border-color .15s; }
.adm-rep__chip:hover { border-color: var(--gold); }
.adm-rep__chip.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
[data-theme="dark"] .adm-rep__chip.is-on { background: var(--gold); border-color: var(--gold); color: #0b1b38; }
.adm-rep__rango { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.adm-rep__rango label { display: grid; gap: 3px; font-size: .72rem; font-weight: 700; color: var(--muted); }
.adm-rep__rango input { height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 .85rem var(--ff-sans); }
.adm-rep__rango .adm-btn { height: 34px; }
.adm-rep__tabs { margin: 0 0 18px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.adm-rep__tabs .adm-tab { text-decoration: none; }
.adm-rep__tabs .adm-tab.is-active { background: var(--surface); border-color: var(--line); color: var(--heading); box-shadow: var(--shadow-sm); }

.adm-rep__hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.adm-rep__card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.adm-rep__card:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: var(--shadow-md, 0 12px 30px -16px rgba(13, 35, 71, .35)); }
.adm-rep__ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-dark); margin-bottom: 6px; }
.adm-rep__card > b { font-size: 1.05rem; color: var(--heading); }
.adm-rep__card > small { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.adm-rep__card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); flex: 1; }
.adm-rep__card dt { font-size: .72rem; font-weight: 700; color: var(--muted); }
.adm-rep__card dd { margin: 2px 0 0; font-weight: 800; font-size: 1.05rem; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-rep__card dd.is-neg { color: var(--danger); } .adm-rep__card dd.is-pos { color: var(--ok); } .adm-rep__card dd.is-warn { color: var(--warn); }
.adm-rep__ver { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .84rem; font-weight: 800; color: var(--gold-dark); }
.adm-rep__ver svg { transform: scaleX(-1) !important; transition: translate .15s; }
.adm-rep__card:hover .adm-rep__ver svg { translate: 3px 0; }
.adm-rep__hub > .adm-card { margin: 0; }

.adm-rep__kpis .adm-kpi strong { font-size: 1.65rem; overflow-wrap: anywhere; }
.adm-rep__neg { color: var(--danger) !important; } .adm-rep__pos { color: var(--ok) !important; } .adm-rep__warn { color: var(--warn) !important; }
.adm-rep__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.adm-rep__grid > .adm-card { margin: 0; min-width: 0; }
.adm-rep__bloque--full { grid-column: 1 / -1; }
.adm-rep__vacio { margin: 0; padding: 18px 0; text-align: center; }
.adm-rep__vacio--pad { padding: 10px 22px 26px; }
.adm-rep__nota { margin: 10px 22px 16px; font-size: .8rem; color: var(--muted); }
.adm-rep__tabla td { vertical-align: top; }
.adm-rep__tabla .adm-rep__primera { font-weight: 700; color: var(--heading); min-width: 220px; }
.adm-rep__tabla th, .adm-rep__tabla td.adm-num { white-space: nowrap; }
.adm-rep__tabla .adm-rep__largo { min-width: 240px; max-width: 420px; font-size: .84rem; color: var(--text-2); }
.adm-rep__tabla tr.is-alerta td { background: color-mix(in srgb, var(--danger) 7%, transparent); }
.adm-rep__tabla tr.is-alerta td:nth-child(5) { color: var(--danger); font-weight: 800; }
.adm-rep__tabla tfoot td { padding: 11px 18px; font-weight: 800; color: var(--heading); background: var(--surface-2); border-top: 1px solid var(--line); }

/* Gráfica de columnas */
.adm-cols { position: relative; padding-top: 22px; }
.adm-cols__max { position: absolute; top: 0; left: 0; font-size: .72rem; font-weight: 700; color: var(--muted); }
.adm-cols__plot { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(2px, .5vw, 8px); align-items: end; height: 200px; padding-top: 6px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--line) calc(25% - 1px), var(--line) 25%); }
.adm-cols__g { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; cursor: default; border-radius: 4px 4px 0 0; }
.adm-cols__g:hover { background: color-mix(in srgb, var(--gold) 10%, transparent); }
.adm-cols__b { flex: 1; max-width: 26px; height: var(--h); min-height: 0; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--gold-2), var(--gold-dark)); transition: height .4s; }
.adm-cols__b--gasto { background: linear-gradient(180deg, #f97066, #d92d20); }
.adm-cols__b--ingreso { background: linear-gradient(180deg, #47cd89, #079455); }
.adm-cols__b--horas { background: linear-gradient(180deg, #6f8fd0, var(--navy)); }
[data-theme="dark"] .adm-cols__b--horas { background: linear-gradient(180deg, #9db8ec, #5b7fc4); }
.adm-cols__x { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(2px, .5vw, 8px); margin-top: 6px; }
.adm-cols__x span { font-size: .68rem; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; overflow: visible; }
.adm-cols__leyenda { display: flex; gap: 16px; margin: -6px 0 6px; font-size: .78rem; font-weight: 700; color: var(--text-2); justify-content: flex-end; }
.adm-cols__leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.adm-cols__leyenda i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

@media (max-width: 1100px) {
    .adm-rep__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .adm-rep__periodo { padding: 12px; }
    .adm-rep__chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; width: calc(100% + 24px); }
    .adm-rep__chips::-webkit-scrollbar { display: none; }
    .adm-rep__chip { flex: none; }
    .adm-rep__rango { width: 100%; }
    .adm-rep__rango label { flex: 1; }
    .adm-rep__rango input { width: 100%; }
    .adm-rep__rango .adm-btn { width: 100%; }
    .adm-rep__kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
    .adm-rep__kpis .adm-kpi strong { font-size: 1.25rem; }
    .adm-cols__plot { height: 150px; }
    .adm-cols__x span { font-size: .6rem; }
    .adm-rep__tabla thead { display: none; }
    .adm-rep__tabla, .adm-rep__tabla tbody, .adm-rep__tabla tfoot { display: block; }
    .adm-rep__tabla tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
    .adm-rep__tabla td { padding: 0 !important; border: 0 !important; text-align: left !important; font-size: .84rem; min-width: 0 !important; max-width: none !important; }
    .adm-rep__tabla td::before { content: attr(data-th); display: block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
    .adm-rep__tabla td.adm-rep__primera, .adm-rep__tabla td.adm-rep__largo { grid-column: 1 / -1; }
    .adm-rep__tabla td.adm-rep__primera::before, .adm-rep__tabla tfoot td:first-child::before { display: none; }
    .adm-rep__tabla tfoot td:first-child { grid-column: 1 / -1; }
    .adm-rep__tabla tfoot td:empty { display: none; }
}

@media print {
    @page { size: letter; margin: 12mm; }
    body.adm { background: #fff !important; }
    .adm-side, .adm-top, .adm-backdrop, [data-noprint], .qp-toast, .adm-main > .adm-alert, #debug-icon, #debug-bar { display: none !important; }
    .adm-rep__grid { grid-template-columns: 1fr 1fr !important; }
    .adm-rep__tabla { width: 100%; }
    .adm-rep__tabla th, .adm-rep__tabla td.adm-num { white-space: normal; }
    .adm-rep__tabla .adm-rep__primera { min-width: 0; }
    .adm-rep__tabla .adm-rep__largo { min-width: 0; max-width: none; }
    .adm-rep__grid > .adm-card, .adm-card { overflow: visible !important; }
    .adm-shell { margin: 0 !important; }
    .adm-main { padding: 0 !important; max-width: none !important; }
    .adm-rep__print-only { display: inline; }
    .adm-card, .adm-kpi { box-shadow: none !important; break-inside: avoid; }
    .adm-rep__bloque--full { break-inside: auto; }
    .adm-rep__grid { gap: 10px; }
    .adm-rep__kpis { grid-template-columns: repeat(4, 1fr) !important; gap: 8px; margin-bottom: 10px; }
    .adm-rep__kpis .adm-kpi { padding: 10px 12px; }
    .adm-rep__kpis .adm-kpi strong { font-size: 1.15rem; }
    .adm-table-wrap { overflow: visible !important; }
    .adm-rep__tabla th, .adm-rep__tabla td { padding: 4px 6px !important; font-size: 7.5pt; }
    .adm-cols__b, .adm-hbars i::after, .adm-rep__tabla tfoot td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .adm-head { margin-bottom: 12px; }
}

/* Compañía que se está viendo (solo Admin, cuando hay varias) */
.adm-cia { flex-shrink: 0; }
.adm-cia__btn { padding: 0 10px 0 12px; max-width: 240px; }
.adm-cia__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-menu__pop a.is-on { background: var(--gold-soft); color: var(--heading); }
@media (max-width: 760px) {
    .adm-cia__name, .adm-cia__btn > .ico:last-child { display: none; }
    .adm-cia__btn { width: 40px; padding: 0; justify-content: center; }
    .adm-cia__btn > .ico:first-child { display: block; }
    .adm-cia .adm-menu__pop { right: auto; left: 0; max-width: calc(100vw - 32px); }
}

/* Compañías */
.adm-cias { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.adm-cia-card { display: grid; gap: 14px; padding: 20px; text-decoration: none; color: inherit; }
.adm-cia-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.adm-cia-card__logo { display: grid; place-items: center; height: 92px; border-radius: 12px; background: var(--surface-2); padding: 14px; }
.adm-cia-card__logo img { max-height: 64px; max-width: 100%; width: auto; object-fit: contain; }
.adm-cia-card__logo--oscuro { background: #0f1b33; }
.adm-cia-card h3 { margin: 0; font-size: 1.05rem; color: var(--heading); }
.adm-cia-card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); }
.adm-cia-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.adm-archivos { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.adm-archivo { display: grid; gap: 10px; min-width: 0; padding: 14px; border: 1px dashed var(--line-2); border-radius: 14px; }
.adm-archivo__prev { display: grid; place-items: center; min-width: 0; overflow: hidden; height: 96px; border-radius: 10px; background: var(--surface-2); padding: 10px; }
.adm-archivo__prev--oscuro { background: #0f1b33; }
.adm-archivo__prev img { max-height: 72px; max-width: 100%; object-fit: contain; }
.adm-archivo__prev--fav img { width: 48px; height: 48px; }
.adm-archivo b { color: var(--heading); font-size: .9rem; }
.adm-archivo small { color: var(--muted); font-size: .78rem; }
.adm-archivo input[type=file] { font-size: .82rem; max-width: 100%; }
.adm-archivo label.adm-check { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--text-2); }
.adm-prop__cia { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; color: var(--muted); }

/* Imágenes del sitio */
.adm-img-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 12px 14px; margin-bottom: 18px; }
.adm-img-cia { display: flex; align-items: center; gap: 10px; }
.adm-img-cia label { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.adm-img-cia .adm-select { min-width: 200px; }
.adm-img-bar .adm-tabs { flex: 1 1 auto; }
.adm-img-bar .adm-tab { text-decoration: none; }
.adm-img-lista { display: grid; gap: 18px; }
.adm-img { display: grid; gap: 16px; padding: 20px; scroll-margin-top: 90px; }
.adm-img__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.adm-img__head .adm-h2 { margin: 0 0 4px; }
.adm-img__head .adm-hint { margin: 0; }
.adm-img__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.adm-img__item { display: grid; gap: 8px; margin: 0; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.adm-img__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.adm-img__item input { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--text); font: 500 .82rem var(--ff-sans); min-width: 0; }
.adm-img__item input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.adm-img__item figcaption { display: flex; align-items: center; gap: 6px; }
.adm-img__item figcaption form { margin: 0; }
.adm-img__item figcaption form:last-child { margin-left: auto; }
.adm-img__num { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); font-size: .74rem; font-weight: 800; color: var(--text-2); margin-right: auto; }
.adm-img__item .adm-iconbtn:disabled { opacity: .35; cursor: default; }
.adm-img__grid--muestra .adm-img__item { opacity: .75; border-style: dashed; }
.adm-img__una { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.adm-img__una img { width: min(100%, 420px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-3); }
.adm-img__textos { display: flex; justify-content: flex-end; }
.adm-img__subir { max-width: 460px; }
.adm-img__subir.is-subiendo { opacity: .6; pointer-events: none; }
.adm-iconbtn--peligro:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
@media (max-width: 760px) {
    .adm-img { padding: 16px; }
    .adm-img-cia { width: 100%; }
    .adm-img-cia .adm-select { flex: 1; min-width: 0; }
    .adm-img__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.adm-img__medida { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; padding: 4px 10px; border-radius: 8px; background: var(--gold-soft); color: var(--text-2); font-size: .8rem; }
.adm-img__medida b { color: var(--heading); }
.adm-img__medida span { color: var(--muted); }
.adm-img-sec { display: flex; align-items: center; gap: 8px; margin: 4px 0 -4px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.adm-txt { display: grid; gap: 18px; padding: 20px; margin-top: 18px; scroll-margin-top: 90px; }
.adm-txt .adm-h2 { display: flex; align-items: center; gap: 8px; }
.adm-txt__grupo { display: grid; gap: 14px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.adm-txt__grupo legend { padding: 0 8px; font-weight: 800; font-size: .86rem; color: var(--heading); }
.adm-txt__campo { display: grid; gap: 6px; min-width: 0; }
.adm-txt__etq { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 700; color: var(--text-2); }
.adm-txt__etq .adm-badge { font-style: normal; }
.adm-txt__idiomas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.adm-txt__idiomas label { display: grid; gap: 4px; min-width: 0; }
.adm-txt__idiomas small { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.adm-txt textarea, .adm-txt input[type=number] { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); color: var(--text); font: 500 .88rem/1.45 var(--ff-sans); resize: vertical; box-shadow: var(--shadow-sm); }
.adm-txt textarea:focus, .adm-txt input[type=number]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.adm-txt__campo--num { grid-template-columns: minmax(0, 1fr) 140px; align-items: center; }
.adm-txt__acciones { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; padding: 12px 0 2px; background: linear-gradient(transparent, var(--surface) 30%); }
@media (max-width: 760px) {
    .adm-txt { padding: 16px; }
    .adm-txt__grupo { padding: 12px; }
    .adm-txt__idiomas { grid-template-columns: 1fr; }
    .adm-txt__acciones .adm-btn { flex: 1; }
}

/* ---------- Contabilidad: barra de registrar compacta y pestañas ---------- */
.adm-cont__acciones { padding: 16px 18px; }
.adm-cont__acciones-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin-bottom: 12px; }
.adm-cont__acciones-head .adm-card__title { display: inline-flex; align-items: center; gap: 8px; }
.adm-cont__botones { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.adm-cont__accion { grid-template-columns: 38px minmax(0, 1fr); align-items: center; column-gap: 12px; row-gap: 0; padding: 12px 14px; text-align: left; }
.adm-cont__accion span { grid-row: span 2; width: 38px; height: 38px; margin: 0; }
.adm-cont__accion b, .adm-cont__accion small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-cont__nav { display: flex; gap: 6px; margin: 4px 0 16px; padding: 5px; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.adm-cont__nav::-webkit-scrollbar { display: none; }
.adm-cont__pest { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 10px; color: var(--muted); font: 700 .9rem var(--ff-sans); text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.adm-cont__pest em { font-style: normal; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); font-size: .76rem; color: var(--text-2); }
.adm-cont__pest:hover { color: var(--heading); background: var(--surface-2); }
.adm-cont__pest.is-active { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.adm-cont__pest.is-active em { background: rgba(255, 255, 255, .16); color: #fff; }
[data-theme="dark"] .adm-cont__pest.is-active { background: var(--gold); color: #0d2347; }
[data-theme="dark"] .adm-cont__pest.is-active em { background: rgba(13, 35, 71, .15); color: #0d2347; }
.adm-cont__paneles > .adm-cont__panel { margin: 0; scroll-margin-top: 90px; }
.js-pestanas .adm-cont__paneles > .adm-cont__panel:not(.is-on) { display: none; }
.adm-cont__paneles > .adm-cont__panel + .adm-cont__panel { margin-top: 20px; }
.js-pestanas .adm-cont__paneles > .adm-cont__panel + .adm-cont__panel { margin-top: 0; }
#gastos .adm-cont__desglose { margin: 0; }
#gastos > .adm-empty { margin: 0; }
.adm-cont__avance { display: flex; align-items: center; gap: 14px; margin: -4px 0 16px; font-size: .84rem; color: var(--muted); }
.adm-cont__avance .adm-cont__meter { flex: 1; max-width: 420px; margin: 0; }
.adm-cont__avance b { color: var(--heading); }
.adm-etapas { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.adm-etapas li { display: flex; }
.adm-etapa { min-height: 64px; height: 100%; }
.adm-etapa__txt b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adm-cont__accion { justify-items: stretch; min-width: 0; }
.adm-cont__accion > * { min-width: 0; max-width: 100%; }
.adm-cont__accion b { white-space: normal; line-height: 1.25; }
@media (max-width: 1600px) { .adm-cont__accion small { display: none; } .adm-cont__accion span { grid-row: auto; } }
@media (max-width: 1100px) { .adm-cont__botones { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
    .adm-cont__botones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .adm-cont__accion { min-width: 0; padding: 10px 12px; column-gap: 10px; }
    .adm-cont__accion small { display: none; }
    .adm-cont__accion span { grid-row: auto; width: 34px; height: 34px; }
    .adm-cont__accion b { white-space: normal; line-height: 1.25; font-size: .86rem; }
    .adm-cont__pest { flex: 0 0 auto; height: 40px; padding: 0 12px; font-size: .84rem; }
    .adm-etapas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .adm-cont__avance { flex-wrap: wrap; }
}
