/* Prodemu Pagos - app.css */

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
    background: #f0f2f5;
    line-height: 1.5;
}

a { color: #1d4ed8; }

/* ============================================================
   PUBLIC SIDE — Stripe-aligned client payment pages
   ============================================================ */

body:not(.admin) {
    --pub-bg:         #f6f9fc;
    --pub-surface:    #ffffff;
    --pub-border:     #e3e8ee;
    --pub-border-sub: #eef1f6;
    --pub-text:       #0a2540;
    --pub-text-2:     #425466;
    --pub-text-3:     #697386;
    --pub-text-4:     #8792a2;
    --pub-primary:    #635bff;
    --pub-primary-h:  #5a52e0;
    --pub-primary-d:  #4b45c6;
    --pub-primary-s:  #f0efff;
    --pub-ring:       rgba(99, 91, 255, 0.2);
    --pub-success:    #0e6245;
    --pub-success-bg: #d7f7e8;
    --pub-danger:     #a41c4e;
    --pub-danger-bg:  #ffe4ee;
    --pub-radius:     10px;
    --pub-radius-sm:  6px;

    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-feature-settings: "cv11", "ss01";
    color: var(--pub-text);
    background: var(--pub-bg);
    background-image:
        radial-gradient(900px 500px at 85% -10%, rgba(99,91,255,0.08), transparent 60%),
        radial-gradient(700px 400px at -10% 110%, rgba(10,37,64,0.04), transparent 60%);
    background-attachment: fixed;
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body:not(.admin) a { color: var(--pub-primary); text-decoration: none; }
body:not(.admin) a:hover { text-decoration: underline; }

body:not(.admin) h2 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--pub-text);
    margin: 0 0 0.4rem;
    line-height: 1.2;
}
body:not(.admin) h3 { margin: 0; }

body:not(.admin) code,
body:not(.admin) .mono {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 0.92em;
}

/* -------- Header -------- */
.site-header {
    background: var(--pub-surface);
    border-bottom: 1px solid var(--pub-border);
    padding: 0.9rem 1.5rem;
}
.site-header-inner {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-logo {
    display: inline-flex;
    align-items: center;
    color: var(--pub-text);
}
.site-logo:hover { text-decoration: none; }
.site-logo img { display: block; height: 22px; width: auto; max-width: 160px; }

.site-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--pub-text-3);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--pub-bg);
    border: 1px solid var(--pub-border);
}
.site-tag svg { color: var(--pub-text-4); }

/* -------- Footer -------- */
.site-footer {
    padding: 1.5rem 1rem 2.5rem;
    color: var(--pub-text-3);
    font-size: 0.82rem;
    margin-top: auto;
}
.site-footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.site-footer .dot { color: var(--pub-text-4); }
.site-footer .powered-by {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.site-footer .powered-by svg { color: var(--pub-text-4); }

/* -------- Wrap -------- */
.wrap {
    max-width: 560px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1rem;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    flex: 1 0 auto;
}
body:not(.admin) .wrap { margin-top: 2rem; }

.public-card {
    background: var(--pub-surface);
    border-radius: 12px;
    padding: 2rem 2.25rem;
    box-shadow:
        0 0 0 1px rgba(10,37,64,0.05),
        0 10px 40px rgba(10,37,64,0.06);
}
.public-head { margin-bottom: 1.5rem; }
.public-lede {
    margin: 0 0 0;
    color: var(--pub-text-3);
    font-size: 0.95rem;
    line-height: 1.55;
}
.public-lede strong { color: var(--pub-text); font-weight: 600; }

/* -------- Back link -------- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--pub-text-3);
    text-decoration: none;
    padding: 0.3rem 0.1rem;
}
.back-link:hover { color: var(--pub-text); text-decoration: none; }
.back-link svg { color: var(--pub-text-4); transition: transform 160ms ease; }
.back-link:hover svg { transform: translateX(-2px); color: var(--pub-text-2); }

/* -------- Landing options -------- */
.landing .options {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}
.option-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    box-shadow: 0 1px 2px rgba(10,37,64,0.03);
}
.option-card:hover {
    border-color: var(--pub-primary);
    box-shadow: 0 0 0 3px var(--pub-ring), 0 12px 24px -10px rgba(99,91,255,0.3);
    transform: translateY(-1px);
    text-decoration: none;
}
.opt-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--pub-primary-s);
    color: var(--pub-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.opt-icon-alt {
    background: #e0f5ee;
    color: #0e7a54;
}
.opt-text { line-height: 1.4; min-width: 0; }
.opt-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pub-text);
}
.opt-sub {
    display: block;
    font-size: 0.88rem;
    color: var(--pub-text-3);
    margin-top: 2px;
}
.opt-arrow {
    color: var(--pub-text-4);
    transition: transform 180ms ease, color 180ms ease;
    display: inline-flex;
}
.option-card:hover .opt-arrow {
    color: var(--pub-primary);
    transform: translateX(3px);
}

.trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--pub-border-sub);
    font-size: 0.82rem;
    color: var(--pub-text-3);
    text-align: center;
}
.trust svg { color: var(--pub-text-4); flex-shrink: 0; }

/* -------- Form -------- */
.prodemu-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem 1.1rem 1.1rem;
    background: #fafbfc;
    border: 1px solid var(--pub-border-sub);
    border-radius: var(--pub-radius);
}
.form-group-title {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pub-text-3);
    margin: 0 0 0.25rem;
}

.prodemu-form .field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
}
.prodemu-form .field label,
.prodemu-form label {
    display: block;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--pub-text-2);
}
.prodemu-form input[type="text"],
.prodemu-form input[type="email"],
.prodemu-form input[type="password"],
.prodemu-form input[type="tel"],
.prodemu-form input[type="number"],
.prodemu-form input[type="search"],
.prodemu-form input[type="date"],
.prodemu-form select,
.prodemu-form textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-sm);
    background: var(--pub-surface);
    color: var(--pub-text);
    font-family: inherit;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(10,37,64,0.04);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.prodemu-form input::placeholder { color: var(--pub-text-4); }
.prodemu-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M3 4.5L6 7.5L9 4.5' stroke='%23697386' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2rem;
}
.prodemu-form input:focus,
.prodemu-form select:focus,
.prodemu-form textarea:focus {
    outline: none;
    border-color: var(--pub-primary);
    box-shadow: 0 0 0 3px var(--pub-ring);
}
.prodemu-form input:user-invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--pub-danger);
    box-shadow: 0 0 0 3px rgba(164,28,78,0.12);
}

/* -------- Month chips -------- */
.field-meses {
    border: none;
    padding: 0;
    margin: 0;
}
.field-meses legend {
    display: block;
    padding: 0;
    margin: 0 0 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--pub-text-2);
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--pub-border);
    background: var(--pub-surface);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--pub-text-2);
    cursor: pointer;
    user-select: none;
    transition: all 140ms ease;
    box-shadow: 0 1px 2px rgba(10,37,64,0.04);
    margin: 0;
}
.chip:hover {
    border-color: var(--pub-text-4);
    color: var(--pub-text);
}
.chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}
.chip-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid var(--pub-text-4);
    color: transparent;
    flex-shrink: 0;
    transition: all 140ms ease;
}
.chip:has(input:checked) {
    background: var(--pub-primary-s);
    border-color: var(--pub-primary);
    color: var(--pub-primary-d);
    box-shadow: 0 0 0 2px var(--pub-ring);
}
.chip:has(input:checked) .chip-check {
    background: var(--pub-primary);
    border-color: var(--pub-primary);
    color: #fff;
}
.chip input:focus-visible + .chip-check {
    box-shadow: 0 0 0 3px var(--pub-ring);
}

/* -------- Check row (terms, etc.) -------- */
.prodemu-form .check {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--pub-text-2);
    cursor: pointer;
    line-height: 1.45;
}
.prodemu-form .check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--pub-primary);
    margin: 2px 0 0;
    cursor: pointer;
    flex-shrink: 0;
}
.check-terms {
    padding: 0.25rem 0.1rem;
}

/* -------- Info box -------- */
.info {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.8rem 1rem;
    margin: 0 0 1.25rem;
    background: var(--pub-primary-s);
    border: 1px solid rgba(99,91,255,0.18);
    border-radius: var(--pub-radius-sm);
    color: var(--pub-primary-d);
    font-size: 0.9rem;
    line-height: 1.5;
}
.info strong { font-weight: 600; }
.info svg { flex-shrink: 0; margin-top: 1px; }

/* -------- Alert (public) -------- */
body:not(.admin) .alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.8rem 0.95rem;
    margin: 0 0 1.25rem;
    border-radius: var(--pub-radius-sm);
    border: 1px solid var(--pub-danger-bg);
    background: var(--pub-danger-bg);
    color: var(--pub-danger);
    font-size: 0.9rem;
    line-height: 1.5;
}
body:not(.admin) .alert svg { flex-shrink: 0; margin-top: 1px; }
body:not(.admin) .alert-success {
    background: var(--pub-success-bg);
    border-color: var(--pub-success-bg);
    color: var(--pub-success);
}

/* -------- Empty state (public) -------- */
body:not(.admin) .empty {
    padding: 1.25rem 1.1rem;
    background: #fafbfc;
    border: 1px solid var(--pub-border-sub);
    border-radius: var(--pub-radius);
    text-align: center;
    color: var(--pub-text-3);
    font-size: 0.9rem;
}
body:not(.admin) .empty p { margin: 0; }

/* -------- Total -------- */
.total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    margin: 0;
    background: var(--pub-bg);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    font-size: 0.92rem;
    color: var(--pub-text-2);
}
.total-label { font-weight: 500; }
.total-label small {
    display: block;
    font-size: 0.78rem;
    color: var(--pub-text-3);
    font-weight: 400;
    margin-top: 1px;
}
.total-value {
    font-size: 1.5rem;
    color: var(--pub-text);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* -------- Buttons (public) -------- */
body:not(.admin) .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem;
    border-radius: var(--pub-radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
body:not(.admin) .btn:hover { text-decoration: none; }
body:not(.admin) .btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--pub-ring);
}
body:not(.admin) .btn-primary {
    background: var(--pub-primary);
    color: #fff;
    border-color: var(--pub-primary);
    box-shadow: 0 1px 1px rgba(10,37,64,0.08), inset 0 -1px 0 rgba(10,37,64,0.1);
}
body:not(.admin) .btn-primary:hover {
    background: var(--pub-primary-h);
    border-color: var(--pub-primary-h);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -6px rgba(99,91,255,0.45);
}
body:not(.admin) .btn-primary:active {
    transform: translateY(0);
    background: var(--pub-primary-d);
    border-color: var(--pub-primary-d);
}
body:not(.admin) .btn-secondary {
    background: var(--pub-surface);
    color: var(--pub-text);
    border-color: var(--pub-border);
    box-shadow: 0 1px 1px rgba(10,37,64,0.05);
}
body:not(.admin) .btn-secondary:hover {
    background: var(--pub-bg);
    border-color: var(--pub-text-4);
}
body:not(.admin) .btn-block { width: 100%; }
body:not(.admin) .btn-small { padding: 0.4rem 0.75rem; font-size: 0.85rem; }

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0;
}

/* -------- Note -------- */
.note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    padding-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--pub-text-3);
    text-align: center;
}
.note svg { color: var(--pub-text-4); }

/* -------- Gracias -------- */
.gracias {
    text-align: center;
}
.gracias h2 { margin-bottom: 0.5rem; }
.gracias-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--pub-success-bg);
    color: var(--pub-success);
    margin: 0 auto 1rem;
}
.gracias .public-lede { color: var(--pub-text-2); }

.receipt {
    margin: 1.25rem 0 1rem;
    border: 1px solid var(--pub-border-sub);
    border-radius: var(--pub-radius);
    background: #fafbfc;
    overflow: hidden;
    text-align: left;
}
.receipt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--pub-border-sub);
}
.receipt-row:last-child { border-bottom: none; }
.receipt-label {
    font-size: 0.85rem;
    color: var(--pub-text-3);
}
.receipt-value {
    font-size: 0.92rem;
    color: var(--pub-text);
    font-weight: 500;
    text-align: right;
}

.gracias .actions {
    justify-content: center;
    margin-top: 1.25rem;
}

/* -------- Public responsive -------- */
@media (max-width: 640px) {
    .site-header { padding: 0.75rem 1rem; }
    .site-tag { display: none; }
    .public-card { padding: 1.5rem 1.25rem; border-radius: 10px; }
    body:not(.admin) h2 { font-size: 1.4rem; }
    body:not(.admin) .wrap { margin: 1.25rem auto; padding: 0 0.75rem; }
    .form-group { padding: 0.85rem 0.9rem 0.95rem; }
    .total { flex-direction: column; align-items: flex-start; gap: 0.4rem; padding: 0.85rem 1rem; }
    .total-value { font-size: 1.35rem; }
    .option-card { padding: 0.95rem 1rem; gap: 0.8rem; }
    .opt-icon { width: 38px; height: 38px; }
}

/* ============================================================
   ADMIN — Stripe-like dashboard
   ============================================================ */

body.admin {
    --bg:             #f6f9fc;
    --surface:        #ffffff;
    --surface-hover:  #f7fafc;
    --surface-muted:  #f6f9fc;
    --border:         #e3e8ee;
    --border-strong:  #d6dde6;
    --border-subtle:  #eef1f6;

    --text:           #0a2540;
    --text-2:         #425466;
    --text-3:         #697386;
    --text-4:         #8792a2;

    --primary:        #635bff;
    --primary-hover:  #5a52e0;
    --primary-dark:   #4b45c6;
    --primary-soft:   #f0efff;
    --primary-ring:   rgba(99, 91, 255, 0.18);

    --success:        #0e6245;
    --success-bg:     #d7f7e8;
    --success-dot:    #22b07d;

    --warning:        #983705;
    --warning-bg:     #ffebd4;
    --warning-dot:    #ec8a3b;

    --danger:         #a41c4e;
    --danger-bg:      #ffe4ee;
    --danger-dot:     #d14d72;

    --neutral:        #3c4257;
    --neutral-bg:     #ebeef3;
    --neutral-dot:    #8792a2;

    --info:           #0b4a6f;
    --info-bg:        #dff2fd;

    --radius:         8px;
    --radius-sm:      6px;
    --shadow-card:    0 1px 1px rgba(10,37,64,0.02), 0 0 0 1px rgba(10,37,64,0.06);
    --shadow-btn:     0 1px 1px rgba(10,37,64,0.08), inset 0 -1px 0 rgba(10,37,64,0.1);
    --shadow-pop:     0 4px 6px -2px rgba(10,37,64,0.04), 0 10px 24px -4px rgba(10,37,64,0.08);

    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-feature-settings: "cv11", "ss01";
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

body.admin a {
    color: var(--primary);
    text-decoration: none;
}
body.admin a:hover { text-decoration: underline; }

body.admin code,
body.admin .mono {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 0.92em;
}
body.admin .break { word-break: break-all; }

body.admin .muted { color: var(--text-3); font-size: 0.88rem; margin: 0.35rem 0 0; }
body.admin .muted-inline { color: var(--text-4); font-size: 0.85em; }

/* -------- Sidebar toggle (CSS drawer) -------- */
.sidebar-toggle-state { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 37, 64, 0.5);
    backdrop-filter: blur(2px);
    z-index: 49;
    opacity: 0;
    transition: opacity 180ms ease;
}

/* -------- App shell -------- */
.app-shell {
    display: grid;
    grid-template-columns: 232px 1fr;
    min-height: 100vh;
}

/* -------- Sidebar -------- */
.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 50;
}

.sidebar-head {
    padding: 1.25rem 1rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text);
    text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--primary) 0%, #7a6bff 100%);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(99, 91, 255, 0.35), inset 0 -1px 0 rgba(0,0,0,0.08);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.brand-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}
.brand-sub {
    font-size: 0.72rem;
    color: var(--text-3);
    font-weight: 500;
    margin-top: 1px;
}

.sidebar-close {
    display: none;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    border-radius: 6px;
    cursor: pointer;
}
.sidebar-close:hover { background: var(--neutral-bg); color: var(--text); }

.sidebar-nav {
    padding: 0.5rem 0.6rem;
    flex: 1;
    overflow-y: auto;
}

.sidebar-section {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-4);
    padding: 0.75rem 0.5rem 0.4rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.55rem;
    border-radius: 6px;
    color: var(--text-2);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 120ms ease, color 120ms ease;
    margin-bottom: 2px;
}
.nav-item svg { color: var(--text-4); flex-shrink: 0; transition: color 120ms ease; }
.nav-item:hover {
    background: var(--surface-muted);
    color: var(--text);
    text-decoration: none;
}
.nav-item:hover svg { color: var(--text-2); }
.nav-item.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}
.nav-item.is-active svg { color: var(--primary); }

.sidebar-foot {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem;
    border-radius: 8px;
    transition: background 120ms ease;
}
.user-card:hover { background: var(--surface-muted); }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a2540, #1a1f36);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    line-height: 1.25;
}
.user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-email {
    font-size: 0.72rem;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-logout { margin: 0; display: inline-flex; }

.icon-btn {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-3);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.icon-btn:hover {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

/* -------- Main area -------- */
.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 40;
}

.topbar-menu {
    display: none;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    border-radius: 6px;
    cursor: pointer;
}
.topbar-menu:hover { background: var(--neutral-bg); color: var(--text); }

.topbar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.topbar-spacer { flex: 1; }

.topbar-env {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.75rem;
    color: var(--text-2);
    font-weight: 500;
}
.env-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success-dot);
    box-shadow: 0 0 0 2px rgba(34, 176, 125, 0.18);
}

/* -------- Content -------- */
.content {
    padding: 2rem 1.5rem 3rem;
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

/* -------- Page head -------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.page-head-main { min-width: 0; flex: 1; }
.page-head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
    line-height: 1.2;
}
.page-title-cur {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0;
    margin-left: 0.25em;
}
.page-sub {
    margin: 0;
    color: var(--text-3);
    font-size: 0.9rem;
}
.page-sub .sep { margin: 0 0.4rem; color: var(--text-4); }

.detail-title-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.crumbs {
    margin: 0 0 1rem;
    font-size: 0.82rem;
}
.crumbs a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-3);
    text-decoration: none;
}
.crumbs a:hover { color: var(--text); text-decoration: none; }
.crumbs svg { color: var(--text-4); }

/* -------- Stats row -------- */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.stat-meta {
    font-size: 0.78rem;
    color: var(--text-3);
}

/* -------- Card -------- */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.card + .card { margin-top: 1rem; }

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}
.card-head-main { min-width: 0; }
.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
    letter-spacing: -0.01em;
}
.card-sub {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--text-3);
}

/* -------- Alerts (admin scope) -------- */
body.admin .alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 0.95rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--danger-bg);
    background: var(--danger-bg);
    color: var(--danger);
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
    line-height: 1.5;
}
body.admin .alert svg { flex-shrink: 0; margin-top: 1px; }
body.admin .alert strong { font-weight: 600; }
body.admin .alert-success {
    background: var(--success-bg);
    border-color: var(--success-bg);
    color: var(--success);
}
body.admin .alert-info {
    background: var(--info-bg);
    border-color: var(--info-bg);
    color: var(--info);
}

/* -------- Buttons (admin scope) -------- */
body.admin .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid transparent;
    background: var(--surface);
    color: var(--text);
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
    text-decoration: none;
    white-space: nowrap;
}
body.admin .btn:hover { text-decoration: none; }
body.admin .btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

body.admin .btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-btn);
}
body.admin .btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}
body.admin .btn-primary:active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

body.admin .btn-ghost {
    background: var(--surface);
    color: var(--text-2);
    border-color: var(--border);
    box-shadow: var(--shadow-btn);
}
body.admin .btn-ghost:hover {
    background: var(--surface-muted);
    color: var(--text);
    border-color: var(--border-strong);
}

body.admin .btn-small {
    padding: 0.32rem 0.65rem;
    font-size: 0.78rem;
}

body.admin .btn-block { width: 100%; }

body.admin .btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

/* -------- Filters -------- */
.filters {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--surface);
}
.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem;
    align-items: end;
}
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}
.filter-label {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-2);
}
.filter-field input,
.filter-field select {
    padding: 0.5rem 0.7rem;
    font-size: 0.88rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(10,37,64,0.04);
    transition: border-color 120ms ease, box-shadow 120ms ease;
    appearance: none;
}
.filter-field select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M3 4.5L6 7.5L9 4.5' stroke='%23697386' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    padding-right: 2rem;
}
.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}
.filter-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-self: end;
}

/* -------- Data table -------- */
.table-wrap { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 900px;
}
.data-table thead th {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-3);
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}
.data-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
    color: var(--text);
}
.data-table tbody tr:hover { background: var(--surface-muted); }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .col-id { color: var(--text-3); width: 70px; }
.data-table .col-date { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table .col-amount { text-align: right; font-weight: 600; white-space: nowrap; }
.data-table thead .col-amount { text-align: right; }
.data-table .col-email { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.data-table .col-actions { width: 1px; white-space: nowrap; text-align: right; }

.data-table .empty {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--surface);
}
.empty-inner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-3);
}
.empty-inner svg { color: var(--text-4); margin-bottom: 0.25rem; }
.empty-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}
.empty-sub { font-size: 0.85rem; }

/* -------- Badge (status pill) -------- */
body.admin .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.18rem 0.55rem 0.18rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.01em;
    text-transform: capitalize;
    background: var(--neutral-bg);
    color: var(--neutral);
    white-space: nowrap;
}
body.admin .badge-lg {
    padding: 0.3rem 0.65rem;
    font-size: 0.82rem;
}
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.85;
    flex-shrink: 0;
}
body.admin .badge-pagado     { background: var(--success-bg); color: var(--success); }
body.admin .badge-pendiente  { background: var(--warning-bg); color: var(--warning); }
body.admin .badge-fallido    { background: var(--danger-bg);  color: var(--danger); }
body.admin .badge-error      { background: var(--danger-bg);  color: var(--danger); }
body.admin .badge-enviado    { background: var(--primary-soft); color: var(--primary-dark); }
body.admin .badge-sin_enviar { background: var(--neutral-bg); color: var(--neutral); }

/* -------- Chip (tipo) -------- */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 500;
    text-transform: capitalize;
    background: var(--neutral-bg);
    color: var(--neutral);
    border: 1px solid transparent;
}
.chip-mensualidad { background: #e8e7ff; color: #3d35b8; }
.chip-alta        { background: #ffe9cc; color: #8a4a00; }

/* -------- Tag (key/value) -------- */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.5rem;
    border-radius: 5px;
    font-size: 0.76rem;
    font-weight: 500;
    background: var(--neutral-bg);
    color: var(--neutral);
}
.tag-on      { background: var(--success-bg); color: var(--success); }
.tag-off     { background: var(--neutral-bg); color: var(--text-3); }
.tag-primary { background: var(--primary-soft); color: var(--primary-dark); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.05em; }

/* -------- Detail + settings grids -------- */
.detail-grid,
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    align-items: start;
}

/* -------- Prop list -------- */
.prop-list {
    margin: 0;
    padding: 0.25rem 0;
}
.prop {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    padding: 0.7rem 1.25rem;
    align-items: baseline;
    border-bottom: 1px solid var(--border-subtle);
}
.prop:last-child { border-bottom: none; }
.prop dt {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-3);
    font-weight: 500;
}
.prop dd {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text);
    word-break: break-word;
}
.prop-block { grid-template-columns: 1fr; }
.prop-block dt { margin-bottom: 0.3rem; }

/* -------- Code block -------- */
.code-block {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    background: var(--surface-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    margin: 0;
    max-height: 180px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-2);
}

/* ============================================================
   LOGIN
   ============================================================ */
body.admin.login-page {
    background: var(--bg);
    background-image:
        radial-gradient(900px 500px at 90% -10%, rgba(99,91,255,0.08), transparent 60%),
        radial-gradient(700px 400px at 0% 110%, rgba(10,37,64,0.05), transparent 60%);
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.auth-shell {
    width: min(100%, 420px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    box-shadow:
        0 0 0 1px rgba(10,37,64,0.06),
        0 8px 24px rgba(10,37,64,0.08);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    align-self: flex-start;
}
.auth-brand .brand-mark { width: 36px; height: 36px; }
.auth-brand .brand-name { font-size: 1.05rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.brand-logo { display: block; height: auto; max-width: 160px; }
.brand .brand-logo { max-width: 140px; }
.brand .brand-sub { margin-left: 0.5rem; color: var(--text-3); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; }
.brand { gap: 0; align-items: baseline; }

.auth-head h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin: 0 0 0.3rem;
}
.auth-head p {
    margin: 0;
    color: var(--text-3);
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.field-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-2);
}
.field input {
    padding: 0.6rem 0.8rem;
    font-size: 0.92rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(10,37,64,0.04);
    transition: border-color 120ms ease, box-shadow 120ms ease;
    outline: none;
}
.field input::placeholder { color: var(--text-4); }
.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}
.field input[disabled] { background: var(--surface-muted); color: var(--text-3); }

.field-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.1rem;
}
.field-hint {
    color: var(--text-3);
    font-size: 0.8rem;
    margin-top: 0.1rem;
}

/* Admin form — grid de 2 columnas + acciones */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem 1.5rem;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}
.form-grid .field-wide {
    grid-column: 1 / -1;
}
.form-actions {
    display: flex;
    gap: 0.6rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Radios como tarjetas seleccionables */
.radio-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem;
}
.radio-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--surface);
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.radio-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 3px var(--primary-ring);
}
.radio-card:has(input:disabled) {
    opacity: 0.55;
    cursor: not-allowed;
}
.radio-card input { margin: 0 0 0.15rem; accent-color: var(--primary); }
.radio-title { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.radio-sub   { font-size: 0.82rem; color: var(--text-3); line-height: 1.4; }

/* Checkboxes en línea */
.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
}
.checkbox-row input { accent-color: var(--primary); }

/* Card body y variantes */
.card-body {
    padding: 1.25rem 1.5rem 1.5rem;
}
.card-warning {
    border-color: rgba(236, 138, 59, 0.35);
    background: var(--warning-bg);
}
.card-warning .card-title,
.card-warning .card-sub { color: var(--warning); }

.password-reveal {
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.1rem;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    user-select: all;
    word-break: break-all;
}

/* Danger zone: acciones destructivas */
.danger-zone {
    display: flex;
    flex-direction: column;
}
.action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-subtle);
}
.action-row:last-child { border-bottom: 0; }
.action-row .action-text strong { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.action-row .action-text .muted { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--text-3); }
.action-row.danger .action-text strong { color: var(--danger); }

.col-actions { text-align: right; white-space: nowrap; }

/* Botón peligro */
body.admin .btn-danger {
    background: var(--danger);
    color: #fff;
    border: 1px solid var(--danger);
    box-shadow: var(--shadow-btn);
}
body.admin .btn-danger:hover { filter: brightness(0.96); }
body.admin .btn-danger:disabled { opacity: 0.55; cursor: not-allowed; }

.auth-foot {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    color: var(--text-3);
    font-size: 0.78rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 220ms cubic-bezier(.2,.8,.2,1);
        box-shadow: 4px 0 20px rgba(10,37,64,0);
    }
    .sidebar-toggle-state:checked ~ .app-shell .sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(10,37,64,0.15);
    }
    .sidebar-toggle-state:checked ~ .sidebar-backdrop {
        display: block;
        opacity: 1;
    }
    .sidebar-backdrop {
        display: block;
        opacity: 0;
        pointer-events: none;
    }
    .sidebar-toggle-state:checked ~ .sidebar-backdrop { pointer-events: auto; }

    .sidebar-close { display: inline-flex; }
    .topbar-menu { display: inline-flex; }

    .content { padding: 1.25rem 1rem 2rem; }
    .topbar { padding: 0.65rem 1rem; }
}

@media (max-width: 720px) {
    .page-title { font-size: 1.35rem; }

    .table-wrap { overflow: visible; }
    .data-table { min-width: 0; }
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr { display: block; }
    .data-table tr {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        margin-bottom: 0.75rem;
        padding: 0.5rem 0.75rem;
        box-shadow: var(--shadow-card);
    }
    .data-table tbody tr:hover { background: var(--surface); }
    .data-table td {
        display: grid;
        grid-template-columns: 110px 1fr;
        gap: 0.75rem;
        padding: 0.45rem 0;
        border-bottom: 1px dashed var(--border-subtle);
        text-align: left !important;
        white-space: normal !important;
        max-width: none !important;
        width: auto !important;
    }
    .data-table td:last-child { border-bottom: none; }
    .data-table td::before {
        content: attr(data-label);
        font-size: 0.74rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--text-3);
        align-self: center;
    }
    .data-table .col-actions { text-align: left !important; }
    .data-table .col-email { overflow: visible; text-overflow: unset; word-break: break-all; }

    .data-table tr:has(> td.empty) {
        padding: 0;
        background: var(--surface);
    }
    .data-table td.empty {
        display: block;
        padding: 2rem 1rem;
        text-align: center !important;
        border-bottom: none;
    }
    .data-table td.empty::before { content: none; }

    .prop {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 0.75rem 1.1rem;
    }
    .prop dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
}

@media (max-width: 500px) {
    .auth-card { padding: 1.5rem; }
    .page-head { flex-direction: column; align-items: stretch; }
    .page-head-actions { width: 100%; }
    .page-head-actions .btn { flex: 1; }
    .topbar-env { display: none; }
}
