:root {
    --brand-1: var(--dm-accent);
    --brand-2: var(--dm-accent);
    --brand-3: var(--dm-accent);
    --brand-4: var(--dm-accent);
    --brand-5: var(--dm-accent);
    --sand: #efe3d1;
    --stone: #d8c6ad;
    --mist: #f7f4ef;
    --bg-main: #f5f1ea;
    --bg-card: #ffffff;
    --text-main: var(--dm-accent);
    --text-soft: #6c6f68;
    --line: rgba(17, 94, 89, 0.16);
    --success: #13795b;
    --danger: #c0392b;
    --warning: #cb7b22;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --shadow-sm: 0 10px 24px rgba(17, 33, 30, 0.08);
    --shadow-md: 0 22px 48px rgba(17, 33, 30, 0.14);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top left, #fbf8f1 0%, var(--bg-main) 52%, #f1ebe2 100%);
    color: var(--text-main);
    line-height: 1.45;
}

h1, h2, h3, h4 {
    font-family: 'Fraunces', serif;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

img, video {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(1320px, 94%);
    margin: 0 auto;
}

.section-title {
    font-size: clamp(1.55rem, 4vw, 2.4rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 999px;
    padding: 0.88rem 1.45rem;
    cursor: pointer;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-3), #d6975b 48%, #e4b474);
    color: #fff;
    transition: 0.22s ease;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-main);
    box-shadow: none;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.35rem 0.76rem;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(17, 94, 89, 0.08);
    color: var(--brand-2);
}

.grid {
    display: grid;
    gap: 1rem;
}

.hidden {
    display: none !important;
}

.notice {
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    background: #fff;
}

.notice.error {
    border-color: rgba(192, 57, 43, 0.22);
    color: var(--danger);
    background: rgba(192, 57, 43, 0.06);
}

.notice.success {
    border-color: rgba(19, 121, 91, 0.24);
    color: var(--success);
    background: rgba(19, 121, 91, 0.08);
}

.form-grid {
    display: grid;
    gap: 0.85rem;
}

.form-group {
    display: grid;
    gap: 0.35rem;
}

.form-group label {
    font-weight: 700;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.form-control {
    width: 100%;
    border: 1px solid rgba(17, 94, 89, 0.18);
    background: #fff;
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    color: var(--text-main);
}

.form-control:focus {
    outline: 2px solid rgba(17, 94, 89, 0.18);
    border-color: var(--brand-2);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

th, td {
    text-align: left;
    padding: 0.82rem 0.7rem;
    border-bottom: 1px solid rgba(216, 198, 173, 0.42);
    vertical-align: top;
}

th {
    color: var(--text-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

tr:hover td {
    background: #faf7f1;
}

.badge {
    border-radius: 999px;
    padding: 0.25rem 0.62rem;
    font-size: 0.74rem;
    font-weight: 800;
}

.badge.ok { background: rgba(19, 121, 91, 0.12); color: var(--success); }
.badge.warn { background: rgba(203, 123, 34, 0.12); color: var(--warning); }
.badge.danger { background: rgba(192, 57, 43, 0.12); color: var(--danger); }

.mini-card {
    border: 1px solid rgba(17, 94, 89, 0.14);
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(244,238,230,0.96));
    border-radius: 16px;
    padding: 0.9rem;
}

.mini-card-title {
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.mini-card-meta {
    font-size: 0.84rem;
    color: var(--text-soft);
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.selection-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.75rem;
    border: 1px solid rgba(17, 94, 89, 0.14);
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(244,238,230,0.92));
    border-radius: 16px;
    padding: 0.9rem;
    cursor: pointer;
}

.selection-card input {
    margin-top: 0.2rem;
}

.selection-card strong {
    display: block;
    font-size: 0.96rem;
    margin-bottom: 0.2rem;
}

.selection-card small {
    display: block;
    color: var(--text-soft);
    font-size: 0.82rem;
}

.admin-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.7rem;
}

.footer {
    margin-top: 3rem;
    padding: 2.8rem 0;
    background: linear-gradient(140deg, var(--dm-accent), var(--dm-accent));
    color: #f5f0e8;
}

.footer a {
    color: #f3d2ad;
}

/* ═══════════════════════════════════════════════════════════
   AUTH SPLIT LAYOUT  (login · registro · activar)
══════════════════════════════════════════════════════════════ */
.auth-split {
    display: grid;
    grid-template-columns: 420px 1fr;
    min-height: 100vh;
}

.auth-split--register {
    grid-template-columns: 400px 1fr;
}

/* ── Brand panel ─────────────────────────────────────────── */
.auth-brand {
    background: linear-gradient(160deg, var(--dm-accent) 0%, var(--dm-accent) 42%, var(--dm-accent) 100%);
    display: flex;
    flex-direction: column;
    padding: 2.2rem 2.4rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='400' height='400' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='300' cy='80' r='160' fill='rgba(255,255,255,0.03)'/%3E%3Ccircle cx='60' cy='340' r='120' fill='rgba(199,125,74,0.08)'/%3E%3C/svg%3E") no-repeat center/cover;
    pointer-events: none;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 1;
}

.auth-brand-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.auth-brand-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.auth-brand-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(199,125,74,0.2);
    color: #e8b88a;
    border: 1px solid rgba(199,125,74,0.3);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.85rem;
    margin-bottom: 1.2rem;
    width: fit-content;
}

.auth-brand-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    line-height: 1.0;
    color: #fff;
    margin: 0 0 1rem;
    font-weight: 700;
}

.auth-brand-sub {
    color: rgba(255,255,255,0.62);
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0 0 1.8rem;
    max-width: 300px;
}

.auth-brand-perks {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.auth-brand-perks li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.82);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-brand-perk-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(199,125,74,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.65rem;
    color: #e8b88a;
    font-weight: 800;
}

.auth-brand-stats {
    display: flex;
    gap: 1.5rem;
}

.auth-brand-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.auth-brand-stat strong {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    font-family: 'Fraunces', serif;
}

.auth-brand-stat span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.auth-brand-footer {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.04em;
    position: relative;
    z-index: 1;
}

/* ── Form panel ──────────────────────────────────────────── */
.auth-form-panel {
    background: #faf8f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    min-height: 100vh;
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 480px;
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(15,118,110,0.08);
    color: var(--brand-1);
    border: 1px solid rgba(15,118,110,0.15);
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.28rem 0.8rem;
    margin-bottom: 0.9rem;
}

.auth-form-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    color: var(--brand-5);
    line-height: 1.0;
    margin: 0 0 0.6rem;
}

.auth-form-sub {
    color: var(--text-soft);
    font-size: 0.93rem;
    margin: 0;
    line-height: 1.55;
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-field label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-soft);
}

.auth-field-hint {
    font-size: 0.75rem;
    color: var(--brand-1);
    margin-top: 0.1rem;
}

.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.auth-section-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--brand-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(199,125,74,0.18);
    margin-top: 0.4rem;
}

.req {
    color: #e05252;
    font-size: 0.85em;
}

/* Password toggle */
.auth-pw-wrap {
    position: relative;
}

.auth-pw-wrap .form-control {
    padding-right: 2.8rem;
}

.auth-pw-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    padding: 0.2rem;
    transition: color 0.2s;
}

.auth-pw-toggle:hover { color: var(--brand-1); }

/* Submit btn */
.auth-submit {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    margin-top: 0.4rem;
    border-radius: 14px;
}

/* Links row */
.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    margin-top: 1.2rem;
    font-size: 0.85rem;
}

.auth-links a {
    color: var(--brand-1);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-links a:hover { color: var(--brand-3); }

/* ── Success screen ──────────────────────────────────────── */
.auth-success-screen {
    text-align: center;
    padding: 1rem 0;
}

.auth-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dm-accent), var(--dm-accent));
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.4rem;
    box-shadow: 0 8px 28px rgba(15,118,110,0.3);
}

.auth-success-screen h2 {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    color: var(--brand-5);
    margin: 0 0 0.75rem;
}

.auth-success-screen p {
    color: var(--text-soft);
    line-height: 1.7;
    max-width: 380px;
    margin: 0 auto 1.5rem;
}

.auth-success-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}

.auth-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid rgba(15,118,110,0.15);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-5);
}

.auth-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dm-accent), #d6975b);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-step-arrow {
    color: var(--text-soft);
    font-size: 0.9rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
    .auth-split,
    .auth-split--register {
        grid-template-columns: 1fr;
    }
    .auth-brand {
        position: relative;
        height: auto;
        min-height: 0;
        padding: 2rem 1.6rem 2.2rem;
    }
    .auth-brand-body {
        padding: 1.5rem 0 0;
    }
    .auth-brand-title { font-size: 2rem; }
    .auth-brand-sub { display: none; }
    .auth-brand-footer { display: none; }
    .auth-brand-stats { gap: 1rem; }
    .auth-form-panel {
        padding: 2rem 1.2rem;
        min-height: auto;
    }
    .auth-field-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-brand { padding: 1.5rem 1.2rem; }
    .auth-brand-title { font-size: 1.7rem; }
    .auth-brand-stats { display: none; }
    .auth-brand-perks { display: none; }
    .auth-success-steps { flex-direction: column; align-items: flex-start; }
    .auth-step-arrow { transform: rotate(90deg); align-self: center; }
}

@media (max-width: 820px) {
    .container {
        width: 93%;
    }

    table {
        min-width: 620px;
    }
}
