/* CHECKCLUB V2 — tokens del sistema de diseño (docs/DESIGN.md). Usar estos, no hex sueltos. */
:root {
    --cc-primary: #3F51B5;
    --cc-primary-strong: #303F9F;
    --cc-primary-soft: #E8EAF6;
    --cc-ink: #1F2430;
    --cc-ink-muted: #5B6472;
    --cc-line: #E4E7EC;
    --cc-surface: #FFFFFF;
    --cc-canvas: #F4F5F7;
    --cc-sidebar: #1E2430;
    --cc-success: #1E7A46;
    --cc-danger: #C62828;
    --cc-warning-ink: #8A5A00;
    --cc-warning-bg: #FFF4D6;
    --cc-info: #1D4ED8;
    --cc-radius-control: 8px;
    --cc-radius-card: 12px;
    --cc-radius-result: 20px;
    --cc-shadow-1: 0 1px 2px rgba(16, 24, 40, .06);
    --cc-shadow-2: 0 4px 12px rgba(16, 24, 40, .10);
    --cc-shadow-3: 0 12px 32px rgba(16, 24, 40, .16);
    --cc-motion: 160ms cubic-bezier(.2, .8, .2, 1);
}

.cc-tabular { font-variant-numeric: tabular-nums; }
.cc-muted { color: var(--cc-ink-muted); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ============================================================
   ClubAccess Platform — Global Styles
   MudBlazor 7 + Custom overrides. Bootstrap removed.
   ============================================================ */

/* ============================================================
   Tenant Branding — CSS custom properties
   Defaults match ClubAccess green theme. JS overrides at runtime.
   ============================================================ */

:root {
    --tenant-primary:        #3F51B5;
    --tenant-secondary:      #5C6BC0;
    --tenant-accent:         #3F51B5;
    --tenant-logo-bg:        linear-gradient(135deg, #3F51B5 0%, #5C6BC0 100%);
    --tenant-bg:             #F8FAFC;
    --tenant-sidebar:        #1E293B;
    --tenant-text-primary:   #111827;
    --tenant-text-secondary: #6B7280;
}

h1:focus {
    outline: none;
}

/* ============================================================
   Blazor WASM — Loading progress (initial load animation)
   ============================================================ */

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #E2E8F0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #006B44;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* ============================================================
   Blazor Error UI
   ============================================================ */

#blazor-error-ui {
    background: #FFF7ED;
    border-top: 1px solid #FED7AA;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #92400E;
    font-size: 0.875rem;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #FEE2E2;
    padding: 1rem 1rem 1rem 3.7rem;
    color: #7F1D1D;
    border-radius: 8px;
}

    .blazor-error-boundary::after {
        content: "Ha ocurrido un error."
    }

/* ============================================================
   ClubAccess — AppBar overrides
   White topbar with bottom border, no MudBlazor default shadow
   ============================================================ */

.mud-appbar {
    box-shadow: 0 1px 0 0 #E2E8F0 !important;
}

.evo-appbar-logo {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: var(--tenant-logo-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -0.02em;
    user-select: none;
    flex-shrink: 0;
    overflow: hidden;
}

.evo-tenant-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.evo-tenant-logo-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -0.02em;
    color: #FFFFFF;
}

.evo-appbar-title {
    font-weight: 700 !important;
    font-size: 1rem !important;
    letter-spacing: -0.01em !important;
    color: #0F172A !important;
}

.evo-user-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    background: var(--tenant-logo-bg) !important;
    color: #FFFFFF !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    border-radius: 50% !important;
    flex-shrink: 0;
}

/* ============================================================
   ClubAccess — Drawer / Sidebar (Stitch-style)
   Dark sidebar, left-border active indicator, compact groups
   ============================================================ */

.mud-drawer {
    box-shadow: 1px 0 0 0 rgba(255,255,255,0.06) !important;
    border-right: none !important;
    background-color: var(--tenant-sidebar) !important;
}

/* ── NavMenu container ─────────────────────────────────────── */

.evo-nav-menu {
    padding: 6px 0 12px 0;
    display: flex;
    flex-direction: column;
}

/* ── Nav links: flat left, rounded right, border-left indicator */

.evo-nav-menu .mud-nav-link {
    border-radius: 0 8px 8px 0 !important;
    margin: 1px 8px 1px 0 !important;
    padding: 7px 10px 7px 14px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #D7E4DE !important;
    transition: background-color 0.12s ease, border-left-color 0.12s ease, color 0.12s ease;
    border-left: 3px solid transparent;
    min-height: 34px !important;
    line-height: 1.3 !important;
}

.evo-nav-menu .mud-nav-link .mud-icon-root {
    color: #9FB7AC !important;
    font-size: 17px !important;
}

/* ── Active: tenant-secondary left border + subtle background ── */

.evo-nav-menu .mud-nav-link.active {
    border-left-color: var(--tenant-secondary) !important;
    background-color: rgba(20, 184, 166, 0.11) !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
}

.evo-nav-menu .mud-nav-link.active .mud-icon-root {
    color: var(--tenant-secondary) !important;
}

/* ── Hover ──────────────────────────────────────────────────── */

.evo-nav-menu .mud-nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #F0F7F4 !important;
    border-left-color: var(--tenant-secondary) !important;
}

.evo-nav-menu .mud-nav-link:hover:not(.active) .mud-icon-root {
    color: #D7E4DE !important;
}

/* ── Top-level standalone links (Dashboard, Logout) ─────────── */

.evo-nav-menu .evo-nav-toplevel {
    margin-right: 8px !important;
}

/* ── Group header: section label style ──────────────────────── */

.evo-nav-menu .mud-nav-group-header {
    padding: 10px 10px 2px 8px !important;
    border-radius: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}

.evo-nav-menu .mud-nav-group-header .mud-typography {
    font-size: 0.675rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.09em !important;
    text-transform: uppercase !important;
    color: #9FB7AC !important;
    line-height: 1 !important;
}

.evo-nav-menu .mud-nav-group-header:hover .mud-typography {
    color: #D7E4DE !important;
}

.evo-nav-menu .mud-nav-group-header .mud-nav-link-icon-default {
    color: #6B8A7F !important;
    font-size: 15px !important;
    margin-right: 5px !important;
}

.evo-nav-menu .mud-nav-group-header .mud-nav-group-expand-icon {
    font-size: 14px !important;
    color: #6B8A7F !important;
    transition: transform 0.2s ease;
}

/* ── Group items container ───────────────────────────────────── */

.evo-nav-menu .mud-nav-group-items {
    padding-bottom: 4px !important;
}

/* ── Indent child nav links inside groups ───────────────────── */

.evo-nav-menu .mud-nav-group .mud-nav-link {
    padding-left: 20px !important;
}

/* ── Double-indent for nested group (Fidelizacion in Marketing) */

.evo-nav-menu .mud-nav-group .mud-nav-group .mud-nav-link {
    padding-left: 28px !important;
}

/* ── Subgroup header (Fidelizacion): tighter top padding ─────── */

.evo-nav-menu .evo-nav-subgroup > .mud-nav-group-header {
    padding-top: 6px !important;
}

.evo-nav-menu .evo-nav-subgroup > .mud-nav-group-header .mud-typography {
    font-size: 0.7rem !important;
    color: #7DA494 !important;
}

/* ── Group spacing ───────────────────────────────────────────── */

.evo-nav-menu .mud-nav-group {
    margin-top: 2px;
}

/* ============================================================
   ClubAccess — Login page (2-column layout)
   ============================================================ */

.evo-login-outer {
    display: flex;
    min-height: 100vh;
}

.evo-login-brand {
    width: 42%;
    min-width: 300px;
    background: linear-gradient(150deg, #0B1F1A 0%, #006B44 100%);
    padding: 48px 40px;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.evo-login-brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.evo-login-brand-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
}

.evo-login-brand-sub {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin-bottom: 40px;
}

.evo-login-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.evo-login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.875rem;
}

.evo-login-feature-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.evo-login-brand-footer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 32px;
}

.evo-login-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: #F7FAF8;
}

.evo-login-form-card {
    width: 100%;
    max-width: 420px;
    padding: 36px 40px !important;
    border-radius: 16px !important;
}

.evo-login-form-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    margin-bottom: 6px !important;
}

.evo-login-form-sub {
    font-size: 0.875rem !important;
    color: #5B6472 !important;
    margin-bottom: 28px !important;
}

.evo-login-security-note {
    margin-top: 20px;
    padding: 10px 14px;
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #92400E;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .evo-login-outer {
        flex-direction: column;
    }

    .evo-login-brand {
        width: 100%;
        min-width: unset;
        padding: 32px 24px;
    }

    .evo-login-features {
        display: none;
    }

    .evo-login-form {
        padding: 24px 16px;
        align-items: flex-start;
        background: #FFFFFF;
    }

    .evo-login-form-card {
        padding: 28px 24px !important;
        border-radius: 12px !important;
        max-width: 100% !important;
    }
}

/* ============================================================
   Public Booking — Styles (unchanged)
   ============================================================ */

.public-booking-shell {
    min-height: 100vh;
    background: #f7f9fc;
}

.public-booking-wizard {
    max-width: 1100px;
    margin: 0 auto;
}

.public-booking-steps {
    flex-wrap: wrap;
}

.public-booking-card {
    height: 100%;
    border: 1px solid var(--mud-palette-lines-default, #e3e8ef);
    border-radius: var(--mud-default-borderradius, 8px);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

.public-booking-card:hover,
.public-booking-card:focus-visible {
    border-color: var(--tenant-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tenant-primary) 16%, transparent);
    transform: translateY(-1px);
    outline: none;
}

.public-booking-card.selected {
    border-color: var(--tenant-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tenant-primary) 22%, transparent);
}

.public-booking-date-row {
    flex-wrap: wrap;
}

/* BOOKING.UX.2 — unified agenda (calendar + slots) */
.public-agenda-grid {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 720px) {
    .public-agenda-grid {
        grid-template-columns: 1fr;
    }
}

.public-slot-btn {
    border-radius: var(--mud-default-borderradius, 8px);
}

.public-confirmation {
    text-align: center;
}

.public-confirmation-panel {
    width: min(100%, 520px);
    text-align: left;
}

/* ============================================================
   ClubAccess — PageHeader component
   ============================================================ */

.evo-page-header--flex {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.evo-page-header--flex > div:last-child {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   ClubAccess — SearchToolbar component
   ============================================================ */

.evo-search-toolbar {
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    background: #FFFFFF !important;
    padding: 14px 16px !important;
    margin-bottom: 20px;
}

/* ============================================================
   ClubAccess — Generic data table (list pages)
   ============================================================ */

.evo-data-table {
    border-radius: 12px !important;
    overflow: hidden;
    border: 1px solid #E2E8F0 !important;
}

/* ============================================================
   ClubAccess — StatCard component
   ============================================================ */

.evo-stat-card {
    border-radius: 12px !important;
    border: 1px solid #E2E8F0 !important;
    padding: 20px !important;
    height: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.15s ease;
}

.evo-stat-card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08) !important;
}

.evo-stat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.evo-stat-label {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    color: #5B6472 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 4px !important;
}

.evo-stat-value {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    display: block;
    margin-bottom: 4px !important;
}

.evo-stat-subtitle {
    font-size: 0.75rem !important;
    color: #5B6472 !important;
    display: block;
}

.evo-stat-trend {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 8px;
}

/* ============================================================
   ClubAccess — StatusChip component
   ============================================================ */

.evo-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.evo-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.evo-status-chip.sc-scheduled  { background: #DBEAFE; color: #1D4ED8; }
.evo-status-chip.sc-scheduled  .evo-status-dot { background: #1D4ED8; }
.evo-status-chip.sc-confirmed  { background: #E6F4EE; color: #006B44; }
.evo-status-chip.sc-confirmed  .evo-status-dot { background: #006B44; }
.evo-status-chip.sc-arrived    { background: #CFFAFE; color: #0E7490; }
.evo-status-chip.sc-arrived    .evo-status-dot { background: #0E7490; }
.evo-status-chip.sc-inprogress { background: #CCFBF1; color: #0F766E; }
.evo-status-chip.sc-inprogress .evo-status-dot { background: #0F766E; }
.evo-status-chip.sc-completed  { background: #D1FAE5; color: #1E7A46; }
.evo-status-chip.sc-completed  .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-cancelled  { background: #FEF3C7; color: #8A5A00; }
.evo-status-chip.sc-cancelled  .evo-status-dot { background: #8A5A00; }
.evo-status-chip.sc-noshow     { background: #FEE2E2; color: #C62828; }
.evo-status-chip.sc-noshow     .evo-status-dot { background: #C62828; }
.evo-status-chip.sc-draft      { background: #F1F5F9; color: #5B6472; }
.evo-status-chip.sc-draft      .evo-status-dot { background: #5B6472; }
.evo-status-chip.sc-published  { background: #E6F4EE; color: #006B44; }
.evo-status-chip.sc-published  .evo-status-dot { background: #006B44; }
.evo-status-chip.sc-planned    { background: #F1F5F9; color: #5B6472; }
.evo-status-chip.sc-planned    .evo-status-dot { background: #5B6472; }
.evo-status-chip.sc-accepted   { background: #D1FAE5; color: #1E7A46; }
.evo-status-chip.sc-accepted   .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-pending    { background: #FEF3C7; color: #8A5A00; }
.evo-status-chip.sc-pending    .evo-status-dot { background: #8A5A00; }
.evo-status-chip.sc-paid       { background: #D1FAE5; color: #1E7A46; }
.evo-status-chip.sc-paid       .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-overdue    { background: #FEE2E2; color: #C62828; }
.evo-status-chip.sc-overdue    .evo-status-dot { background: #C62828; }
.evo-status-chip.sc-active     { background: #D1FAE5; color: #1E7A46; }
.evo-status-chip.sc-active     .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-inactive   { background: #F1F5F9; color: #5B6472; }
.evo-status-chip.sc-inactive   .evo-status-dot { background: #5B6472; }
.evo-status-chip.sc-success    { background: #D1FAE5; color: #1E7A46; }
.evo-status-chip.sc-success    .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-warning    { background: #FEF3C7; color: #8A5A00; }
.evo-status-chip.sc-warning    .evo-status-dot { background: #8A5A00; }
.evo-status-chip.sc-error      { background: #FEE2E2; color: #C62828; }
.evo-status-chip.sc-error      .evo-status-dot { background: #C62828; }
.evo-status-chip.sc-info       { background: #E0F2FE; color: #1D4ED8; }
.evo-status-chip.sc-info       .evo-status-dot { background: #1D4ED8; }
.evo-status-chip.sc-lowstock   { background: #FEF3C7; color: #8A5A00; }
.evo-status-chip.sc-lowstock   .evo-status-dot { background: #8A5A00; }
.evo-status-chip.sc-instock    { background: #D1FAE5; color: #1E7A46; }
.evo-status-chip.sc-instock    .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-entry      { background: #D1FAE5; color: #1E7A46; }
.evo-status-chip.sc-entry      .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-exit       { background: #FEE2E2; color: #C62828; }
.evo-status-chip.sc-exit       .evo-status-dot { background: #C62828; }
.evo-status-chip.sc-adjustment { background: #FEF3C7; color: #8A5A00; }
.evo-status-chip.sc-adjustment .evo-status-dot { background: #8A5A00; }
.evo-status-chip.sc-earned     { background: #D1FAE5; color: #1E7A46; }
.evo-status-chip.sc-earned     .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-redeemed   { background: #FEF3C7; color: #8A5A00; }
.evo-status-chip.sc-redeemed   .evo-status-dot { background: #8A5A00; }
.evo-status-chip.sc-expired    { background: #FEE2E2; color: #C62828; }
.evo-status-chip.sc-expired    .evo-status-dot { background: #C62828; }
.evo-status-chip.sc-sending    { background: #FEF3C7; color: #8A5A00; }
.evo-status-chip.sc-sending    .evo-status-dot { background: #8A5A00; }
.evo-status-chip.sc-failed     { background: #FEE2E2; color: #C62828; }
.evo-status-chip.sc-failed     .evo-status-dot { background: #C62828; }
.evo-status-chip.sc-sent       { background: #D1FAE5; color: #1E7A46; }
.evo-status-chip.sc-sent       .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-skipped    { background: #FEF3C7; color: #8A5A00; }
.evo-status-chip.sc-skipped    .evo-status-dot { background: #8A5A00; }
.evo-status-chip.sc-default    { background: #F1F5F9; color: #5B6472; }
.evo-status-chip.sc-default    .evo-status-dot { background: #5B6472; }
/* FASE 3.8 additions */
.evo-status-chip.sc-declined   { background: #FEE2E2; color: #C62828; }
.evo-status-chip.sc-declined   .evo-status-dot { background: #C62828; }
.evo-status-chip.sc-maybe      { background: #FEF3C7; color: #8A5A00; }
.evo-status-chip.sc-maybe      .evo-status-dot { background: #8A5A00; }
.evo-status-chip.sc-opened     { background: #DBEAFE; color: #1D4ED8; }
.evo-status-chip.sc-opened     .evo-status-dot { background: #1D4ED8; }
.evo-status-chip.sc-available  { background: #D1FAE5; color: #1E7A46; }
.evo-status-chip.sc-available  .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-assigned   { background: #FEF3C7; color: #8A5A00; }
.evo-status-chip.sc-assigned   .evo-status-dot { background: #8A5A00; }
.evo-status-chip.sc-full       { background: #FEE2E2; color: #C62828; }
.evo-status-chip.sc-full       .evo-status-dot { background: #C62828; }

/* ============================================================
   ClubAccess — EmptyState component
   ============================================================ */

.evo-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 56px 24px;
    gap: 0;
}

.evo-empty-icon {
    font-size: 52px !important;
    color: #CBD5E1 !important;
    margin-bottom: 16px;
}

.evo-empty-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: 6px !important;
}

.evo-empty-message {
    font-size: 0.875rem !important;
    color: #5B6472 !important;
    max-width: 320px;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
}

/* ============================================================
   ClubAccess — LoadingState component
   ============================================================ */

.evo-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 24px;
    gap: 14px;
}

/* ============================================================
   ClubAccess — Dashboard page layout
   ============================================================ */

.evo-page-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F1F5F9;
}

.evo-page-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.evo-page-subtitle {
    font-size: 0.875rem !important;
    color: #5B6472 !important;
    margin: 3px 0 0 0 !important;
    display: block;
}

.evo-section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5B6472;
    margin-bottom: 14px;
    padding-left: 2px;
    display: block;
}

.evo-filter-bar {
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    background: #FFFFFF !important;
}

.evo-appointments-table {
    border-radius: 12px !important;
    overflow: hidden;
    border: 1px solid #E2E8F0;
}

/* ============================================================
   FASE 6.1 — Dental StatusChip condition keys
   ============================================================ */
.evo-status-chip.sc-healthy           { background: #F0FDF4; color: #1E7A46; }
.evo-status-chip.sc-healthy           .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-caries            { background: #FEF2F2; color: #C62828; }
.evo-status-chip.sc-caries            .evo-status-dot { background: #C62828; }
.evo-status-chip.sc-filling           { background: #EFF6FF; color: #2563EB; }
.evo-status-chip.sc-filling           .evo-status-dot { background: #2563EB; }
.evo-status-chip.sc-crown             { background: #FEFCE8; color: #8A5A00; }
.evo-status-chip.sc-crown             .evo-status-dot { background: #8A5A00; }
.evo-status-chip.sc-missing           { background: #F1F5F9; color: #5B6472; }
.evo-status-chip.sc-missing           .evo-status-dot { background: #5B6472; }
.evo-status-chip.sc-extractionindicated { background: #FFF1F2; color: #BE123C; }
.evo-status-chip.sc-extractionindicated .evo-status-dot { background: #BE123C; }
.evo-status-chip.sc-rootcanal         { background: #ECFDF5; color: #0F766E; }
.evo-status-chip.sc-rootcanal         .evo-status-dot { background: #0F766E; }
.evo-status-chip.sc-implant           { background: #ECFDF5; color: #1E7A46; }
.evo-status-chip.sc-implant           .evo-status-dot { background: #1E7A46; }
.evo-status-chip.sc-fracture          { background: #FFF7ED; color: #9A3412; }
.evo-status-chip.sc-fracture          .evo-status-dot { background: #9A3412; }

/* ============================================================
   FASE 6.1 — SVG Odontogram component
   ============================================================ */
.evo-odontogram-wrapper {
    width: 100%;
    overflow-x: auto;
}

.evo-odontogram-svg {
    width: 100%;
    max-width: 700px;
    display: block;
    margin: 0 auto;
}

.evo-tooth,
.evo-tooth-shell,
.evo-tooth-surface {
    cursor: pointer;
    transition: filter 0.12s ease, stroke 0.12s ease;
}

.evo-tooth:hover,
.evo-tooth-shell:hover,
.evo-tooth-surface:hover {
    filter: brightness(0.92);
}

.evo-tooth--selected,
.evo-tooth-surface--selected {
    filter: drop-shadow(0 0 4px rgba(0,107,68,0.45));
}

.evo-tooth-center {
    filter: saturate(1.04);
}

.evo-tooth-label {
    font-size: 9px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    fill: #64748B;
    user-select: none;
    pointer-events: none;
}

.evo-tooth-label--selected {
    fill: #006B44;
    font-weight: 700;
}

.evo-tooth-arch-label {
    font-size: 8px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    fill: #CBD5E1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    user-select: none;
    pointer-events: none;
}

.evo-tooth-side-label {
    font-size: 10px;
    font-weight: 700;
    font-family: ui-sans-serif, system-ui, sans-serif;
    fill: #5B6472;
    user-select: none;
    pointer-events: none;
}

.evo-odontogram-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 8px 0 0 0;
    padding: 8px 12px;
    background: #F8FAFC;
    border-radius: 8px;
    border: 1px solid #F1F5F9;
}

.evo-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #64748B;
}

.evo-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    border-width: 1.5px;
    border-style: solid;
    flex-shrink: 0;
}

/* ── Condition Palette ─────────────────────────────────────────────────── */
.evo-condition-palette {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.evo-palette-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, box-shadow 0.15s;
    font-size: 12px;
}

.evo-palette-item:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.evo-palette-item--selected {
    box-shadow: 0 0 0 2px currentColor;
}

.evo-palette-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.evo-palette-label {
    line-height: 1.2;
}

/* ============================================================
   ClubAccess — EvoColorField component
   Swatch clickeable con input type="color" nativo overlay
   ============================================================ */

.evo-color-swatch-container {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    border: 2px solid #CBD5E1;
    cursor: pointer;
    flex-shrink: 0;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: repeating-conic-gradient(#e2e8f0 0% 25%, #f8fafc 0% 50%) 0 0 / 10px 10px;
}

.evo-color-swatch-container:hover {
    border-color: #5B6472;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.evo-color-swatch-container:focus-within {
    border-color: var(--mud-palette-primary, #006B44);
    box-shadow: 0 0 0 2px rgba(0,107,68,0.15);
}

.evo-color-swatch-container.evo-color-swatch--error {
    border-color: #EF4444;
}

.evo-color-swatch-container.evo-color-swatch--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.evo-color-swatch-fill {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    transition: background 0.1s ease;
}

.evo-color-input-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    padding: 0;
    z-index: 2;
}

.evo-color-swatch-icon {
    position: absolute;
    bottom: 2px;
    right: 2px;
    color: rgba(255,255,255,0.9);
    font-size: 12px !important;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.6));
}

/* ============================================================
   ClubAccess — MudBlazor Outlined Input label fix
   Fondo blanco para que el label flotante corte el borde limpiamente
   ============================================================ */

.mud-input-label-outlined.mud-input-label-animated {
    background-color: #ffffff;
    padding: 0 4px;
    margin-left: -4px;
}

/* ============================================================
   ClubAccess — Public Portal (Home / Landing page)
   Pantalla de bienvenida pública antes del login
   ============================================================ */

.evo-portal-page {
    min-height: 100vh;
    background: linear-gradient(160deg, #071410 0%, #004D30 45%, #006B44 70%, #0F9169 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
    padding: 48px 20px 40px;
}

.evo-portal-shell {
    width: 100%;
    max-width: 880px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.evo-portal-hero {
    text-align: center;
    margin-bottom: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.evo-portal-logo {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    margin: 0 auto 22px auto;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.evo-portal-brand-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 10px 0;
}

.evo-portal-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 14px 0;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.evo-portal-subtitle {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
    line-height: 1.55;
    max-width: 520px;
}

.evo-portal-desc {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    line-height: 1.55;
    max-width: 520px;
}

.evo-portal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    margin-bottom: 40px;
}

.evo-portal-card {
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 20px 14px 16px 14px;
    text-align: center;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    cursor: default;
    user-select: none;
}

.evo-portal-card:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.evo-portal-card-icon {
    font-size: 28px !important;
    color: rgba(255, 255, 255, 0.88) !important;
    display: block;
    margin-bottom: 10px;
}

.evo-portal-card-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.3;
    margin-bottom: 6px;
}

.evo-portal-card-desc {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
}

.evo-portal-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 44px;
}

.evo-portal-btn-primary {
    background: #ffffff !important;
    color: #006B44 !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    padding: 0 38px !important;
    min-height: 50px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    transition: box-shadow 0.15s, transform 0.15s !important;
}

.evo-portal-btn-primary:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.28) !important;
    transform: translateY(-1px);
}

.evo-portal-btn-secondary {
    border-color: rgba(255, 255, 255, 0.45) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    padding: 0 28px !important;
    min-height: 50px !important;
    border-radius: 10px !important;
}

.evo-portal-btn-secondary:hover {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.7) !important;
}

.evo-portal-divider {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.12);
    margin-bottom: 22px;
}

.evo-portal-footer {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.7;
}

.evo-portal-footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.12s;
}

.evo-portal-footer a:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

@media (max-width: 860px) {
    .evo-portal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .evo-portal-title {
        font-size: 1.65rem;
    }

    .evo-portal-subtitle {
        font-size: 0.9375rem;
    }

    .evo-portal-page {
        padding: 36px 16px 24px 16px;
    }

    .evo-portal-grid {
        grid-template-columns: 1fr;
    }

    .evo-portal-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
}

/* ============================================================
   ClubAccess — Login mejorado
   Mejoras adicionales sobre el layout existente
   ============================================================ */

.evo-login-last-tenant {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.8125rem;
    color: #065F46;
    line-height: 1.5;
}

.evo-login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.12s;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.evo-login-back-link:hover {
    color: rgba(255,255,255,0.9);
}

.evo-login-form-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #F1F5F9;
    text-align: center;
    font-size: 0.75rem;
    color: #5B6472;
}

.evo-login-form-footer a {
    color: #006B44;
    text-decoration: none;
}

.evo-login-form-footer a:hover {
    text-decoration: underline;
}

/* ── Login form inner wrapper (link + card en columna) ──────── */

.evo-login-form {
    flex-direction: column;
}

.evo-login-form-inner {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
}

/* ── Autofill: neutraliza el fondo azul de Chrome ───────────── */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
    -webkit-text-fill-color: #0F172A !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ============================================================
   CLUBACCESS.PRODUCT — Global Polish (Phase 5 + Phase 10)
   Additive layer: focus rings, table interactions, cards,
   dialogs, tooltips, scrollbars, motion, print.
   ============================================================ */

/* ── Keyboard accessibility: consistent focus-visible ring ─── */
.mud-button-root:focus-visible,
.mud-icon-button:focus-visible,
.mud-nav-link:focus-visible,
.mud-table-row:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--tenant-secondary, #14B8A6);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Mouse users don't get the ring (only keyboard) */
.mud-button-root:focus:not(:focus-visible),
.mud-icon-button:focus:not(:focus-visible) {
    outline: none;
}

/* ── Card: shared clickable/content card polish ─────────────── */
.evo-card {
    border-radius: 12px !important;
    border: 1px solid #E2E8F0 !important;
    transition: box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.evo-card:hover {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08) !important;
    border-color: #CBD5E1 !important;
}

/* A card that acts as a button lifts on hover */
.evo-card[style*="cursor:pointer"]:hover,
.evo-card[style*="cursor: pointer"]:hover {
    transform: translateY(-2px);
    border-color: var(--tenant-secondary, #14B8A6) !important;
}

/* ── Data tables: refined header + row interactions ─────────── */
.evo-data-table .mud-table-head th,
.evo-appointments-table .mud-table-head th {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748B !important;
    background: #F8FAFC !important;
    border-bottom: 1px solid #E2E8F0 !important;
}

.evo-data-table .mud-table-body .mud-table-row,
.evo-appointments-table .mud-table-body .mud-table-row {
    transition: background-color 0.12s ease;
}

.evo-data-table .mud-table-body .mud-table-row:hover,
.evo-appointments-table .mud-table-body .mud-table-row:hover {
    background-color: color-mix(in srgb, var(--tenant-primary, #006B44) 5%, #ffffff) !important;
}

/* Sticky header helper for scrollable tables */
.evo-table-sticky .mud-table-head th {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Numeric columns line up cleanly */
.evo-data-table td[data-numeric="true"],
.report-table td.num {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* ── Dialogs: softer corners, stronger title ────────────────── */
.mud-dialog {
    border-radius: 14px !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18) !important;
}

.mud-dialog-title {
    font-weight: 700 !important;
    letter-spacing: -0.01em;
}

/* ── Tooltips: compact, legible, rounded ────────────────────── */
.mud-tooltip {
    font-size: 0.75rem !important;
    padding: 6px 10px !important;
    border-radius: 7px !important;
    line-height: 1.4 !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22) !important;
}

/* ── Buttons: subtle press feedback ─────────────────────────── */
.mud-button-root {
    transition: box-shadow 0.14s ease, transform 0.08s ease, background-color 0.14s ease;
}

.mud-button-root:active {
    transform: translateY(0.5px);
}

/* ── Snackbar: rounded, premium shadow ──────────────────────── */
.mud-snackbar {
    border-radius: 10px !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.2) !important;
}

/* ── Premium scrollbars (WebKit) ────────────────────────────── */
* {
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: #5B6472;
    background-clip: content-box;
}

/* ── Subtle entrance animation utility ──────────────────────── */
@keyframes evoFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.evo-fade-in {
    animation: evoFadeUp 0.28s ease both;
}

/* Page content fades in on navigation */
.mud-main-content > .mud-container,
.mud-main-content > div {
    animation: evoFadeUp 0.24s ease both;
}

/* ── Respect reduced-motion preference ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── Table density selector (global, one implementation) ─────── */
body.evo-density-compact .mud-table-cell {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    font-size: 0.82rem !important;
}

body.evo-density-compact .mud-table-dense .mud-table-cell {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

body.evo-density-compact .report-table th,
body.evo-density-compact .report-table td {
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}

body.evo-density-compact .evo-data-table .mud-table-head th {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* ── Print: clean documents (hide chrome) ───────────────────── */
@media print {
    .mud-appbar,
    .mud-drawer,
    .evo-page-header .mud-button-root,
    .mud-fab,
    #blazor-error-ui {
        display: none !important;
    }

    .mud-main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .evo-card,
    .evo-data-table,
    .evo-stat-card {
        box-shadow: none !important;
        border: 1px solid #E2E8F0 !important;
        break-inside: avoid;
    }

    body {
        background: #FFFFFF !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   CHECKTRIP login (VASCONEZCORP) — aquatic background, single card
   ═══════════════════════════════════════════════════════════════════════ */
.ct-login-bg {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 6vw;
    /* Golf-course sunset background. Drop the photo at wwwroot/img/login-bg.jpg.
       A soft light overlay keeps the card readable; the warm gradient is the fallback. */
    background:
        linear-gradient(90deg, rgba(255,255,255,0.10), rgba(20,15,5,0.06) 60%, rgba(20,15,5,0.10)),
        url('/img/login-bg.jpg') center/cover no-repeat,
        linear-gradient(120deg, #f0d69a 0%, #d9ab5f 45%, #b07f3e 80%, #7d5a2e 100%);
    overflow: hidden;
}
.ct-login-card {
    width: 100%;
    max-width: 430px;
    background: #fdfdff;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(15, 40, 70, 0.28);
    padding: 44px 44px 40px;
}
.ct-logo {
    font-family: "Segoe UI", Inter, system-ui, sans-serif;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.02em;
    color: #1b1e2b;
    line-height: 1;
    margin-bottom: 34px;
}
.ct-logo span { color: #3F51B5; }
.ct-hello {
    font-weight: 800;
    font-size: 2.6rem;
    color: #23262f;
    line-height: 1;
    margin-bottom: 10px;
}
.ct-welcome {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 30px;
}
.ct-hint {
    font-size: 0.82rem;
    color: var(--cc-ink-muted, #5B6472);
    margin-bottom: 18px;
}
.ct-form .ct-field { margin-top: 0; }
.ct-submit {
    min-height: 50px;
    margin-top: 6px;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-radius: 8px;
    background: #4a5aa8 !important;
    box-shadow: 0 8px 20px rgba(63, 81, 181, 0.32) !important;
}
.ct-submit:hover { background: #3F51B5 !important; }
.ct-login-footer {
    position: absolute;
    left: 6vw;
    bottom: 26px;
    color: rgba(255,255,255,0.92);
    font-size: 0.82rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
@media (max-width: 640px) {
    .ct-login-bg { justify-content: center; padding: 20px; }
    .ct-login-card { max-width: 100%; padding: 32px 26px; }
    .ct-login-footer { left: 0; right: 0; text-align: center; }
}

/* CHECKTRIP wordmarks — dark sidebar header + indigo appbar */
.ct-drawer-brand {
    padding: 22px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 6px;
}
.ct-drawer-logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    color: #FFFFFF;
    line-height: 1;
}
.ct-drawer-logo span { color: #7C8CE8; }
.ct-drawer-sub {
    margin-top: 6px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: #9AA0A6;
}
.ct-appbar-logo {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: #FFFFFF;
    line-height: 1;
}
.ct-appbar-logo span { color: #C5CAE9; }

/* CHECKCLUB V2 (B7) — estado de error estándar */
.cc-error-state { display:flex; flex-direction:column; align-items:center; text-align:center; gap:8px; padding:40px 16px; }
.cc-error-icon { font-size:48px !important; color: var(--cc-danger) !important; }
.cc-error-title { font-weight:600 !important; color: var(--cc-ink) !important; }
.cc-error-message { color: var(--cc-ink-muted) !important; max-width: 360px; }
.cc-error-code { color: var(--cc-ink-muted) !important; margin-top: 4px; }

/* ── CHECKCLUB.V2 — garita: barra de modo/punto y tarjeta de resultado (DESIGN.md §8) ───────────── */
.cc-gate-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-mode-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
    border: 1px solid var(--cc-line); border-radius: 999px; background: var(--cc-surface);
    color: var(--cc-ink); font: 600 14px/1 Inter, "Segoe UI", system-ui, sans-serif; cursor: pointer;
    transition: background-color 150ms cubic-bezier(.2,.8,.2,1), border-color 150ms cubic-bezier(.2,.8,.2,1);
}
.cc-mode-chip:hover { border-color: var(--cc-ink-muted); }
.cc-mode-chip:focus-visible { outline: 2px solid var(--cc-info); outline-offset: 2px; }
.cc-mode-chip.is-selected { background: var(--cc-primary-soft); border-color: var(--cc-primary); color: var(--cc-primary-strong); }
.cc-gate-single-mode { display: inline-flex; align-items: center; color: var(--cc-ink-muted); }

.cc-result {
    border-radius: 20px; padding: 24px; min-height: 260px; color: #fff; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    box-shadow: var(--cc-shadow-3); animation: cc-fade 150ms cubic-bezier(.2,.8,.2,1);
}
.cc-result--allowed { background: var(--cc-success); }
.cc-result--denied { background: var(--cc-danger); }
.cc-result--pending { background: var(--cc-warning-bg); color: #5C3D00; border: 2px solid var(--cc-warning-ink); }
.cc-result-icon { width: 64px !important; height: 64px !important; }
.cc-result-title { font: 800 48px/56px Inter, "Segoe UI", system-ui, sans-serif; letter-spacing: .5px; } /* DESIGN.md Display 40/48 (G4) */
.cc-result-name { font: 600 20px/28px Inter, "Segoe UI", system-ui, sans-serif; }
.cc-result-meta, .cc-result-reason { font-size: 15px; line-height: 22px; opacity: .95; }
.cc-result-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.cc-result-chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
    background: rgba(0,0,0,.22); font-size: 13px; font-weight: 600;
}
.cc-result--pending .cc-result-chip { background: rgba(138, 90, 0, .12); }
.cc-result-warning { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.cc-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 16px; }
.cc-result-actions .mud-button-root { min-height: 48px; }
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) { .cc-result-title { font-size: 40px; line-height: 46px; overflow-wrap: anywhere; } }

/* CHECKCLUB.V2 — árbol Etapa → Punto → Equipo (Configuración de Accesos) */
.cc-topo-point { margin: 12px 0 0 28px; padding: 10px 12px; border-left: 3px solid var(--cc-primary-soft); border-radius: 0 var(--cc-radius-control) var(--cc-radius-control) 0; background: var(--cc-canvas); }
.cc-topo-devices { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.cc-topo-devices li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.cc-mode-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--cc-primary-soft); color: var(--cc-primary-strong); font-size: 12px; font-weight: 600; }

/* CHECKCLUB.V2 — garita móvil (una mano, ≥ 48 px, sin menú) */
.cc-gate-shell { min-height: 100dvh; background: var(--cc-canvas); padding-top: 0 !important; }
.cc-gate-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: var(--cc-sidebar); color: #fff; }
.cc-gate-top .mud-icon-button { color: #fff; }
.cc-gate-brand { font: 700 16px/24px Inter, "Segoe UI", system-ui, sans-serif; }
.cc-gate-body { padding: 16px; max-width: 560px; margin: 0 auto; }
.cc-mobile-gate { display: flex; flex-direction: column; gap: 16px; }
.cc-gate-camera { position: relative; aspect-ratio: 3 / 4; max-height: 56dvh; border-radius: var(--cc-radius-card); overflow: hidden; background: #0B0F17; }
.cc-gate-camera video { width: 100%; height: 100%; object-fit: cover; }
.cc-gate-camera-idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; color: #E4E7EC; text-align: center; font-size: 16px; }
.cc-gate-cta { min-height: 56px; font-size: 17px !important; }
.cc-gate-manual summary { min-height: 48px; display: flex; align-items: center; color: var(--cc-ink-muted); cursor: pointer; }

/* CHECKCLUB.V2.5 (G4) — región para lectores de pantalla (invisible) y resultado a pantalla completa en la garita móvil. */
.cc-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cc-mobile-gate .cc-result { min-height: calc(100dvh - 260px); justify-content: center; }
/* Fase 5 — en la garita del celular todo control táctil mide al menos 48 px (norma interna; antes 36–44 px). */
.cc-mobile-gate .mud-button-root, .cc-mobile-gate .mud-icon-button, .cc-mobile-gate .mud-input-control .mud-input { min-height: 48px; }
.cc-mobile-gate .mud-icon-button { min-width: 48px; }
.cc-qr-video { width: 100%; border-radius: 8px; background: #000; }
