:root {
    /* ============================================
       Strategic Intellect Design System
       Primary: Strategic Gold  | Secondary: Neural Blue (Cyan)
    ============================================ */

    /* Surface Colors */
    --background:                  #121315;
    --on-background:               #e3e2e5;

    /* Pure Vanilla Edition variables */
    --bg-base:                     #121315;
    --surface-container:           #1f2022;
    --surface-high:                #292a2c;
    --surface-lowest:              #0d0e10;
    --border-tactile:              #38393b;

    --accent-gold:                 #f2ca50;
    --accent-gold-dim:             #d4af37;
    --accent-cyan:                 #00eefc;

    --text-main:                   #e3e2e5;
    --text-variant:                #d0c5af;

    --radius-base:                 4px;
    --radius-lg:                   8px;
    --radius-sm:                   2px;

    --surface:                     #121315;
    --surface-dim:                 #121315;
    --surface-bright:              #38393b;
    --surface-container-lowest:    #0d0e10;
    --surface-container-low:       #1b1c1e;
    --surface-container:           #1f2022;
    --surface-container-high:      #292a2c;
    --surface-container-highest:   #343537;

    --on-surface:                  #e3e2e5;
    --on-surface-variant:          #d0c5af;
    --inverse-surface:             #e3e2e5;
    --inverse-on-surface:          #303033;

    --outline:                     #99907c;
    --outline-variant:             #4d4635;
    --surface-tint:                #e9c349;
    --surface-variant:             #343537;

    /* Primary: Strategic Gold */
    --primary:                     #f2ca50;
    --primary-rgb:                 242, 202, 80;
    --on-primary:                  #3c2f00;
    --primary-container:           #d4af37;
    --on-primary-container:        #554300;
    --inverse-primary:             #735c00;
    --primary-fixed:               #ffe088;
    --primary-fixed-dim:           #e9c349;
    --on-primary-fixed:            #241a00;
    --on-primary-fixed-variant:    #574500;

    /* Secondary: Neural Blue (Cyan) */
    --secondary:                   #d3fbff;
    --secondary-rgb:               0, 238, 252;
    --on-secondary:                #00363a;
    --secondary-container:         #00eefc;
    --on-secondary-container:      #00686f;
    --secondary-fixed:             #7df4ff;
    --secondary-fixed-dim:         #00dbe9;
    --on-secondary-fixed:          #002022;
    --on-secondary-fixed-variant:  #004f54;

    /* Tertiary */
    --tertiary:                    #cfcdd1;
    --on-tertiary:                 #2f3033;
    --tertiary-container:          #b3b2b6;
    --on-tertiary-container:       #444548;
    --tertiary-fixed:              #e3e2e6;
    --tertiary-fixed-dim:          #c7c6ca;
    --on-tertiary-fixed:           #1a1b1e;
    --on-tertiary-fixed-variant:   #46474a;

    /* Semantic */
    --error:                       #ffb4ab;
    --error-rgb:                   255, 180, 171;
    --on-error:                    #690005;
    --error-container:             #93000a;
    --on-error-container:          #ffdad6;
    --success:                     #10b981;
    --success-rgb:                 16, 185, 129;
    --warning:                     #f59e0b;
    --warning-rgb:                 245, 158, 11;

    /* Rounded Borders — Sharper / Architectural */
    --rounded-sm:      0.125rem;   /* 2px  */
    --rounded-default: 0.25rem;    /* 4px  */
    --rounded-md:      0.375rem;   /* 6px  */
    --rounded-lg:      0.5rem;     /* 8px  */
    --rounded-xl:      0.75rem;    /* 12px */
    --rounded-full:    9999px;

    /* Spacing */
    --spacing-unit:           4px;
    --spacing-gutter:         24px;
    --spacing-margin-desktop: 64px;
    --spacing-margin-mobile:  16px;
    --spacing-container-max:  1280px;

    /* Fonts */
    --font-display: 'Hanken Grotesk', 'Inter', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    /* ──── Component-level tokens ──── */
    /* Buttons */
    --btn-primary-bg:       #d4af37;
    --btn-primary-color:    #1a1500;
    --btn-primary-hover:    #e9c349;
    --btn-secondary-border: #00eefc;
    --btn-secondary-color:  #00dbe9;
    --btn-secondary-glow:   0 0 12px rgba(0, 238, 252, 0.2);

    /* Cards */
    --card-bg:     #1b1c1e;
    --card-border: rgba(255, 255, 255, 0.06);

    /* Inputs */
    --input-bg:           #0d0e10;
    --input-border:       #4d4635;
    --input-focus-border: #00eefc;
    --input-focus-glow:   0 0 0 2px rgba(0, 238, 252, 0.15);

    /* AI / Intelligence glow */
    --ai-glow:   0 0 16px rgba(0, 238, 252, 0.18);
    --ai-accent: #00eefc;
    --ai-accent-rgb: 0, 238, 252;

    /* Legacy/compatibility aliases (don't remove – used inline in templates) */
    --accent:           var(--primary);
    --accent-rgb:       var(--primary-rgb);
    --accent-hover:     rgba(var(--primary-rgb), 0.85);
    --accent-gradient:  linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    --accent-glow:      0 0 12px rgba(var(--primary-rgb), 0.2);

    --ia-accent:         #00eefc;
    --ia-accent-rgb:     0, 238, 252;
    --ia-accent-dark:    var(--secondary-container);
    --ia-accent-dark-rgb: 0, 238, 252;
    --ia-gradient:       linear-gradient(135deg, #00eefc 0%, #f2ca50 100%);

    --bg-color:       var(--background);
    --sidebar-bg:     var(--surface-container-low);
    --surface-color:  #1b1c1e;
    --surface-hover:  rgba(var(--primary-rgb), 0.04);
    --surface-dark:   #0d0e10;
    --border-color:   #292a2c;
    --text-primary:   var(--on-background);
    --text-secondary: var(--on-surface-variant);
    --text-muted:     #706858;
    --border-radius:     var(--rounded-default);
    --border-radius-lg:  var(--rounded-lg);
    --border-radius-sm:  var(--rounded-sm);
}

/* ============================================
   BASE
============================================ */
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    background-color: var(--background);
    color: var(--on-background);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

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

.app-container {
    display: flex;
    min-height: 100vh;
    flex-direction: row;
}

/* ============================================
   TYPOGRAPHY — Strategic Intellect Scale
============================================ */
h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--on-surface);
    margin-top: 0;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--on-surface-variant);
    margin-top: 0;
    font-weight: 500;
}

.display-lg {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    line-height: 56px;
    letter-spacing: -0.02em;
}

.headline-lg {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    line-height: 40px;
}

@media (max-width: 768px) {
    .headline-lg {
        font-size: 28px;
        line-height: 36px;
    }
}

.title-md {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
}

.body-lg {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
}

.body-md, .body-sm {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

/* label-sm: uppercase mono — "military-grade" tactical feel */
.label-md, .label-sm {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ============================================
   SIDEBAR — Glassmorphic floating panel
============================================ */
.sidebar {
    width: 260px;
    background: rgba(27, 28, 30, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(242, 202, 80, 0.08);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 100;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    flex: 1;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 1.5rem;
    color: var(--on-surface-variant);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.875rem;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    box-sizing: border-box;
    letter-spacing: 0.01em;
}

.sidebar-item:hover {
    color: var(--primary);
    background: rgba(242, 202, 80, 0.04);
    border-left-color: rgba(242, 202, 80, 0.25);
}

.sidebar-item.active {
    color: var(--primary);
    background: rgba(242, 202, 80, 0.07);
    border-left-color: var(--primary);
    font-weight: 500;
}

.sidebar-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: stroke 0.18s ease;
    flex-shrink: 0;
}

.sidebar-item.active .sidebar-icon,
.sidebar-item:hover .sidebar-icon {
    stroke: var(--primary);
}

/* Admin Dropdown */
details.sidebar-dropdown summary::-webkit-details-marker { display: none; }
details.sidebar-dropdown summary { list-style: none; outline: none; }
details.sidebar-dropdown[open] summary .chevron-icon { transform: rotate(180deg); }
details.sidebar-dropdown .dropdown-content {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(242, 202, 80, 0.04);
    border-bottom: 1px solid rgba(242, 202, 80, 0.04);
}
details.sidebar-dropdown .dropdown-content .sidebar-item {
    padding-left: 3rem;
    font-size: 0.85rem;
}

/* ============================================
   MAIN CONTENT WRAPPER
============================================ */
.main-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    background: var(--background);
}

/* ============================================
   TOP HEADER — Glassmorphic sticky bar
============================================ */
.top-header {
    background: rgba(18, 19, 21, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(242, 202, 80, 0.08);
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-sizing: border-box;
}

.top-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--on-surface-variant);
    letter-spacing: -0.01em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* ============================================
   CONTENT AREA
============================================ */
.content-area {
    flex: 1;
    padding: 2.5rem 2rem;
    box-sizing: border-box;
    width: 100%;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   MOBILE RESPONSIVE
============================================ */
#menu-toggle { display: none; }
.menu-toggle-label {
    display: none;
    cursor: pointer;
    color: var(--on-surface-variant);
}

@media (max-width: 900px) {
    .app-container { flex-direction: column; }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(242, 202, 80, 0.08);
    }
    .sidebar-menu { display: none; }
    #menu-toggle:checked ~ .sidebar .sidebar-menu { display: flex; }
    .menu-toggle-label { display: block; }
    .top-header { padding: 0 1rem; height: 56px; }
    .content-area { padding: 1.5rem 1rem; }
}

/* ============================================
   CARDS — Tactile border, no shadow
============================================ */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.75rem;
    border-radius: var(--rounded-lg);
    transition: border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: rgba(242, 202, 80, 0.14);
}

/* Accent top-border variants */
.card.card-primary-accent {
    border-top: 3px solid var(--primary);
}
.card.card-secondary-accent {
    border-top: 3px solid var(--secondary-container);
}
/* Cyan top-border for active study sessions */
.card.card-active-session {
    border-top: 3px solid var(--secondary-container);
    box-shadow: 0 0 20px rgba(0, 238, 252, 0.05);
}

/* ============================================
   BUTTONS
============================================ */

/* Primary — Strategic Gold, black text */
.btn-primary {
    display: inline-block;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-color);
    padding: 0.65rem 1.4rem;
    text-decoration: none;
    border-radius: var(--rounded-default);
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background 0.18s ease, box-shadow 0.18s ease;
    text-align: center;
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.3);
}

.btn-primary:active {
    opacity: 0.85;
}

/* Secondary — Ghost with Cyan border + glow */
.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--btn-secondary-color);
    padding: 0.65rem 1.4rem;
    text-decoration: none;
    border-radius: var(--rounded-default);
    font-weight: 500;
    font-family: var(--font-body);
    font-size: 0.9rem;
    border: 1px solid var(--btn-secondary-border);
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.btn-secondary:hover {
    background: rgba(0, 238, 252, 0.05);
    box-shadow: var(--btn-secondary-glow);
    color: #d3fbff;
}

/* ============================================
   FORM INPUTS
   Dark fill + 1px bottom border, Cyan focus glow
============================================ */
select, input[type="text"], input[type="email"],
input[type="password"], input[type="number"],
input[type="date"], textarea {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-bottom: 2px solid var(--input-border);
    color: var(--on-surface);
    padding: 0.7rem 1rem;
    border-radius: var(--rounded-default);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

select:focus, input[type="text"]:focus, input[type="email"]:focus,
input[type="password"]:focus, input[type="number"]:focus,
input[type="date"]:focus, textarea:focus {
    border-color: var(--input-focus-border);
    box-shadow: var(--input-focus-glow);
}

input[type="checkbox"], input[type="radio"] {
    accent-color: var(--primary);
    cursor: pointer;
}

/* ============================================
   QUESTION CONTAINERS
============================================ */
.question-container {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    padding: 2.5rem 0;
    margin-bottom: 0;
    animation: fadeIn 0.35s ease-out;
    transition: border-color 0.2s ease;
}

.question-container:hover {
    border-color: rgba(242, 202, 80, 0.15);
}

.question-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.25rem;
    gap: 0.5rem;
}

.question-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--on-surface);
    line-height: 1.6;
}

/* ============================================
   ANSWER OPTIONS
============================================ */
.option {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--rounded-md);
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.option:hover {
    border-color: rgba(242, 202, 80, 0.25);
    background: rgba(242, 202, 80, 0.03);
}

.option.selected {
    border-color: var(--primary);
    background: rgba(242, 202, 80, 0.07);
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--on-surface-variant);
    border: 1px solid var(--outline-variant);
    border-radius: var(--rounded-sm);
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.18s ease;
    flex-shrink: 0;
    text-transform: uppercase;
}

.option:hover .option-letter {
    color: var(--primary);
    border-color: var(--primary);
}

.option.selected .option-letter {
    color: var(--on-primary);
    background: var(--primary);
    border-color: var(--primary);
}

.option-text {
    color: var(--on-surface-variant);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: color 0.18s ease;
}

.option:hover .option-text,
.option.selected .option-text {
    color: var(--on-surface);
}

/* Correction states */
.option.option-correct, .option-review.option-correct {
    border: 1px solid var(--success) !important;
    background: rgba(16, 185, 129, 0.07) !important;
    border-radius: var(--rounded-md) !important;
}

.option.option-wrong, .option-review.option-wrong {
    border: 1px solid var(--error) !important;
    background: rgba(255, 180, 171, 0.07) !important;
    border-radius: var(--rounded-md) !important;
}

.option-correct .option-letter, .letter-correct {
    color: #0d0e10 !important;
    background: var(--success) !important;
    border-color: var(--success) !important;
}

.option-wrong .option-letter, .letter-wrong {
    color: #0d0e10 !important;
    background: var(--error) !important;
    border-color: var(--error) !important;
}

.option-correct .option-text { color: var(--on-surface) !important; }
.option-wrong .option-text { color: var(--error) !important; }
.option-correct .icon-check { display: inline-block !important; }
.option-wrong .icon-cross { display: inline-block !important; }

/* ============================================
   CORRECTION UTILITY BUTTONS
============================================ */
.btn-corregir {
    background: transparent;
    color: var(--on-surface-variant);
    border: 1px solid var(--outline-variant);
    padding: 0.4rem 0.6rem;
    border-radius: var(--rounded-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    box-sizing: border-box;
    gap: 0.35rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
}

.btn-corregir:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--outline);
    color: var(--on-surface);
}

.btn-corregir.marcada {
    background: rgba(var(--warning-rgb), 0.08) !important;
    border-color: rgba(var(--warning-rgb), 0.4) !important;
    color: var(--warning) !important;
}

.btn-ver-resultado {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--on-surface-variant) !important;
    background: transparent !important;
    border-color: var(--outline-variant) !important;
}

.btn-ver-resultado.active {
    background: rgba(0, 238, 252, 0.07) !important;
    border-color: rgba(0, 238, 252, 0.35) !important;
    color: var(--secondary-container) !important;
}

/* ============================================
   CHIPS & BADGES — Rectangular, low-opacity bg
============================================ */
.badge-chip {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.45rem;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   AI / INTELLIGENCE COMPONENTS
   Cyan glow + backdrop blur
============================================ */
.ai-component {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 238, 252, 0.2);
    box-shadow: var(--ai-glow);
    border-radius: var(--rounded-lg);
}

/* Progress Indicators: Cyan → Gold gradient */
.progress-strategic {
    background: linear-gradient(90deg, #00eefc 0%, #f2ca50 100%);
}

/* ============================================
   WATERMARK (Spartan/Brand bg element)
============================================ */
.watermark-container { position: relative; }

.watermark-bg {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 200px;
    height: auto;
    opacity: 0.04;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.3s ease;
}
.card:hover .watermark-bg { opacity: 0.07; }

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes goldPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(242, 202, 80, 0); }
    50%       { box-shadow: 0 0 12px 2px rgba(242, 202, 80, 0.2); }
}

@keyframes cyanGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 238, 252, 0); }
    50%       { box-shadow: 0 0 14px 2px rgba(0, 238, 252, 0.18); }
}

/* ============================================
   PERSONAL AREA & DIALOGS CENTRALIZED STYLES
   ============================================ */

.glass-panel {
    background: rgba(26, 27, 30, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.danger-zone {
    border: 1px solid rgba(255, 180, 171, 0.2);
    background: linear-gradient(to bottom right, rgba(255, 180, 171, 0.05), transparent);
    border-radius: var(--rounded-lg);
    padding: 1.75rem;
    box-sizing: border-box;
}

/* Grids and Layout utilities */
.personal-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.personal-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
}

.section-header h4 {
    margin: 0;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
}

.section-header .material-symbols-outlined {
    color: var(--primary);
    font-size: 22px;
}

.section-header.secondary-accent h4,
.section-header.secondary-accent .material-symbols-outlined {
    color: var(--secondary-container);
}

.section-header.error-accent h4,
.section-header.error-accent .material-symbols-outlined {
    color: var(--error);
}

.section-header.error-accent {
    border-bottom-color: rgba(255, 180, 171, 0.2);
}

/* Form structure */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.col-span-2 {
    grid-column: span 2;
}

.col-span-3 {
    grid-column: span 3;
}

@media (max-width: 768px) {
    .col-span-2, .col-span-3 {
        grid-column: span 1;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--on-surface-variant);
    margin-bottom: 0.25rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
}

/* Modals & Dialogs */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 11, 13, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
    box-sizing: border-box;
}

.modal-content {
    max-width: 450px;
    width: 100%;
    border-radius: var(--rounded-lg);
    padding: 2.25rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: modalZoomIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: var(--rounded-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.modal-icon-wrapper.error-bg {
    background: rgba(255, 180, 171, 0.15);
    color: var(--error);
}

.modal-icon-wrapper .material-symbols-outlined {
    font-size: 36px;
}

.modal-body {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-body h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--on-surface);
}

.modal-body p {
    margin: 0;
    color: var(--on-surface-variant);
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-confirm-input-wrapper {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface-container-highest);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--rounded-default);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-confirm-input-wrapper label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--on-surface-variant);
    text-align: left;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-actions-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-actions .btn-primary, 
.modal-actions .btn-secondary,
.modal-actions-vertical .btn-primary, 
.modal-actions-vertical .btn-secondary {
    flex: 1;
    width: 100%;
}

.hidden {
    display: none !important;
}

@keyframes modalZoomIn {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Subscription status customized banner */
.subscription-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.subscription-banner-bg {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 50%;
    background: linear-gradient(to left, rgba(242, 202, 80, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

.subscription-banner-info {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.subscription-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--rounded-full);
    background: rgba(242, 202, 80, 0.12);
    border: 1px solid rgba(242, 202, 80, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.subscription-icon-wrapper .material-symbols-outlined {
    font-size: 32px;
}

.subscription-plan-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.subscription-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--on-surface);
    margin: 0;
}

.subscription-badge {
    background: var(--primary);
    color: var(--on-primary);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--rounded-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: fit-content;
    margin-top: 0.25rem;
}

/* Alerts and Notifications */
.alert-canvas {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.alert-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--primary);
    animation: alertSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.alert-panel.alert-error {
    border-left-color: var(--error);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-icon {
    font-size: 24px;
    color: var(--primary);
}

.alert-panel.alert-error .alert-icon {
    color: var(--error);
}

.alert-text {
    display: flex;
    flex-direction: column;
}

.alert-title {
    font-weight: 600;
    color: var(--on-surface);
    font-size: 0.95rem;
    margin: 0;
}

.alert-desc {
    color: var(--on-surface-variant);
    font-size: 0.85rem;
    margin: 0;
}

.alert-close-btn {
    background: transparent;
    border: 0;
    color: var(--on-surface-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    transition: color 0.15s ease;
}

.alert-close-btn:hover {
    color: var(--on-surface);
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   ADMIN FUENTES SCREEN CENTRALIZED STYLES
   ============================================ */

.etched-border {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tactile-row:hover {
    background: rgba(52, 53, 55, 0.3) !important;
}

.glow-cyan {
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.scroll-hide::-webkit-scrollbar { 
    display: none; 
}
.scroll-hide { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

/* Admin Table Layout */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table thead tr {
    background: rgba(52, 53, 55, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table th {
    padding: 1rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-surface-variant);
}

.admin-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.admin-table td {
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
    color: var(--on-surface);
}

.admin-table td .source-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--outline);
}

/* Badge Variants */
.badge-chip.badge-ia {
    background: rgba(0, 238, 252, 0.1);
    color: var(--secondary-container);
    border: 1px solid rgba(0, 238, 252, 0.2);
}

.badge-chip.badge-json {
    background: rgba(242, 202, 80, 0.1);
    color: var(--primary);
    border: 1px solid rgba(242, 202, 80, 0.2);
}

.badge-chip.badge-official {
    background: rgba(255, 255, 255, 0.05);
    color: var(--tertiary-fixed-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Search and Filter Inputs */
.search-container {
    background: var(--surface-container-high);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--rounded-lg);
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.search-container input {
    background: transparent;
    border: none !important;
    box-shadow: none !important;
    color: var(--on-surface);
    padding: 0.6rem 0.5rem;
    font-size: 0.9rem;
    width: 240px;
}

.btn-filter {
    background: var(--surface-container-high);
    color: var(--on-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--rounded-lg);
    padding: 0.6rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-filter:hover {
    background: var(--surface-variant);
    border-color: rgba(242, 202, 80, 0.25);
}

/* Redesigned Stat Cards */
.stat-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: relative;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-icon {
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: var(--rounded-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.stat-icon.primary {
    background: rgba(242, 202, 80, 0.1);
    color: var(--primary);
}

.stat-icon.secondary {
    background: rgba(0, 238, 252, 0.1);
    color: var(--secondary-container);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--on-surface);
    margin: 0;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--on-surface-variant);
    margin-bottom: 0.25rem;
}

/* Layout Utilities */
.flex-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.flex-row-between-end {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flex-gap-2 {
    gap: 0.5rem;
}

.flex-gap-3 {
    gap: 0.75rem;
}

.w-full {
    width: 100%;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

/* ============================================
   Pure Vanilla Edition UI Macro Styles
============================================ */
.btn-tactical {
    background: var(--accent-gold);
    color: var(--surface-lowest);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-base);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.btn-tactical:hover {
    background: var(--accent-gold-dim);
}
.btn-tactical.secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-tactile);
}
.btn-tactical.secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}
.btn-tactical:active {
    transform: translateY(1px);
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    width: 100%;
}
.input-container label {
    font-family: var(--font-mono);
    color: var(--text-variant);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.input-container input {
    padding: 0.75rem;
    font-size: 0.875rem;
    background: var(--surface-lowest);
    color: var(--text-main);
    font-family: var(--font-body);
    border: none;
    border-bottom: 1px solid var(--border-tactile);
    border-radius: var(--radius-base) var(--radius-base) 0 0;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-container input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(0, 238, 252, 0.2);
}

.badge-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.badge-chip.badge-primary {
    background: rgba(242, 202, 80, 0.1);
    color: var(--accent-gold);
    border-color: rgba(242, 202, 80, 0.2);
}
.badge-chip.badge-secondary {
    background: rgba(0, 238, 252, 0.1);
    color: var(--accent-cyan);
    border-color: rgba(0, 238, 252, 0.2);
}
.badge-chip.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}
.badge-chip.badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-tactical {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: var(--radius-base);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--surface-container);
    color: var(--text-main);
    margin-bottom: 1.5rem;
}
.alert-tactical.alert-success {
    border-left: 4px solid var(--success);
    background: rgba(16, 185, 129, 0.04);
}
.alert-tactical.alert-error {
    border-left: 4px solid var(--error);
    background: rgba(239, 68, 68, 0.04);
}
.alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.alert-icon {
    font-size: 1.25rem;
}
.alert-message {
    font-family: var(--font-body);
    font-size: 0.95rem;
}
.alert-close-btn {
    background: none;
    border: none;
    color: var(--text-variant);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.5rem;
    transition: color 0.15s ease;
}
.alert-close-btn:hover {
    color: var(--text-main);
}

/* ============================================
   REVISION TEST PAGE & RESULTS TEST PAGE
============================================ */

/* Estilos de scroll táctico */
.scroll-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.scroll-container::-webkit-scrollbar-track {
    background: var(--surface-lowest);
    border-radius: 4px;
}
.scroll-container::-webkit-scrollbar-thumb {
    background: var(--border-tactile);
    border-radius: 4px;
}
.scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* Estilos de botones de filtro tipo píldora */
.filter-btn {
    background: var(--surface-container-low);
    border: 1px solid var(--border-tactile);
    color: var(--text-variant);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    background: var(--surface-container-high);
}

/* Colores específicos por filtro */
#filter-all {
    border-color: var(--border-tactile);
    color: var(--text-variant);
}
#filter-all.active {
    border-color: var(--accent-gold) !important;
    color: var(--accent-gold) !important;
    background: rgba(242, 202, 80, 0.08) !important;
}

#filter-incorrect {
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}
#filter-incorrect.active {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

#filter-correct {
    border-color: rgba(16, 185, 129, 0.25);
    color: #10b981;
}
#filter-correct.active {
    border-color: #10b981 !important;
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.08) !important;
}

#filter-blank {
    border-color: var(--border-tactile);
    color: #94a3b8;
}
#filter-blank.active {
    border-color: #94a3b8 !important;
    color: #94a3b8 !important;
    background: rgba(148, 163, 184, 0.08) !important;
}

/* Estilo de botón para explicación */
.btn-explicacion {
    background: none;
    border: none;
    color: var(--text-variant);
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
}
.btn-explicacion:hover {
    color: var(--text-main);
}

/* Loader de IA */
.loader {
    border: 3px solid rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--accent-gold);
    animation: spin 1s linear infinite;
    display: inline-block;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Animación de entrada */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-card {
    background: var(--surface-container);
    border: 1px solid var(--border-tactile);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeIn 0.3s ease-out;
}

.block-card {
    background: var(--surface-container-low);
    border: 1px solid var(--border-tactile);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}
.block-card:hover {
    border-color: rgba(242, 202, 80, 0.2);
}

/* ============================================
   RESULTS DASHBOARD SPECIFIC STYLES
   ============================================ */
.results-container {
    max-width: 1100px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-out;
    font-family: var(--font-body);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin: 0;
    letter-spacing: -0.01em;
}

.kpis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.kpi-card {
    background: var(--surface-container);
    border: 1px solid var(--border-tactile);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.kpi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.kpi-card-title {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-variant);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.kpi-value {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.kpi-subtitle {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.kpi-footer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Block section styles */
.results-container .section-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-container .section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    border-left: 4px solid var(--accent-gold);
    padding-left: 0.75rem;
    line-height: 1.15;
}

.results-container .block-card {
    background: var(--surface-container);
    border: 1px solid var(--border-tactile);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.results-container .block-header {
    padding: 1.5rem;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.results-container .block-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.results-container .block-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    padding-right: 2rem;
    flex: 1;
}

.results-container .block-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent-gold);
    font-size: 1.15rem;
    line-height: 1.4;
}

.results-container .block-stats {
    display: flex;
    gap: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-variant);
    font-weight: 600;
    align-items: center;
    flex-wrap: wrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.results-container .stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.results-container .stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.results-container .right-stats-group {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-shrink: 0;
    width: 45%;
    justify-content: flex-end;
}

.results-container .domain-container {
    flex: 1;
    max-width: 220px;
    text-align: left;
}

.results-container .domain-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-variant);
    font-weight: 600;
    margin-bottom: 0.35rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.results-container .progress-bar-bg {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
}

.results-container .progress-bar-fill {
    height: 100%;
    border-radius: 999px;
}

.results-container .score-container {
    text-align: right;
    min-width: 95px;
}

.results-container .score-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.results-container .score-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-mono);
}

.results-container .chevron-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: transform 0.25s;
    transform: rotate(0deg);
}

/* Themes Dropdown */
.results-container .themes-container {
    display: none;
    padding: 0 1.5rem 1.5rem 1.5rem;
    background: rgba(0, 0, 0, 0.12);
    border-top: 1px solid var(--border-tactile);
}

.results-container .theme-row {
    padding: 1.25rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-container .theme-row:last-child {
    border-bottom: none;
}

.results-container .theme-info {
    flex: 1;
    min-width: 250px;
}

.results-container .theme-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.results-container .theme-stats-line {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-variant);
    font-weight: 500;
    font-family: var(--font-mono);
}

.results-container .theme-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 40%;
    justify-content: flex-end;
    min-width: 180px;
}

.results-container .theme-domain-container {
    flex: 1;
    max-width: 160px;
    text-align: left;
}

/* Locked state */
.results-container .locked-block-row {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
}

.results-container .locked-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px dashed var(--border-tactile);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-variant);
    flex-shrink: 0;
}

/* Responsive Breakpoints */
@media (max-width: 850px) {
    .results-container .right-stats-group {
        width: auto;
        flex: 0 0 auto;
        gap: 1.25rem;
    }
    .results-container .domain-container {
        display: none;
    }
    .results-container .theme-right {
        width: auto;
        flex: 0 0 auto;
    }
}

@media (max-width: 700px) {
    .results-container .theme-domain-container {
        display: none;
    }
}

@media (max-width: 650px) {
    .results-container .locked-block-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    .results-container .locked-block-row a {
        align-self: stretch;
        text-align: center;
        justify-content: center;
    }
}

/* ============================================
   DICTIONARY SPECIFIC STYLES
   ============================================ */
.dictionary-container {
    max-width: 1100px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-out;
    font-family: var(--font-body);
}

.dict-hero-section {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 2.5rem;
}

.dict-stats-wrapper {
    grid-column: span 8;
    display: flex;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .dict-hero-section {
        grid-template-columns: 1fr;
    }
    .dict-stats-wrapper {
        grid-column: span 12;
        flex-direction: column;
        gap: 1rem;
    }
}

.dict-stat-card {
    flex: 1;
    text-decoration: none;
    display: block;
}

.dict-stat-card .card {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: start;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    box-sizing: border-box;
}

.dict-stat-card .card:hover {
    transform: translateY(-2px);
}

.dict-stat-value {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 0.25rem;
}

.dict-stat-label {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-variant);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dict-actions-wrapper {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (max-width: 900px) {
    .dict-actions-wrapper {
        grid-column: span 12;
    }
}

.btn-dict-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: var(--rounded-lg);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-dict-action.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    color: var(--btn-primary-color);
    box-shadow: 0 4px 12px rgba(242, 202, 80, 0.15);
}

.btn-dict-action.primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 16px rgba(242, 202, 80, 0.25);
}

.btn-dict-action.secondary {
    border: 1px solid rgba(0, 238, 252, 0.3) !important;
    color: var(--secondary-fixed-dim) !important;
    background: transparent !important;
}

.btn-dict-action.secondary:hover {
    background: rgba(0, 238, 252, 0.05) !important;
    border-color: var(--secondary-container) !important;
}

/* Search and Action Bar */
.dict-search-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.dict-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.dict-search-wrapper .material-symbols-outlined {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 1.25rem;
}

.dict-search-input {
    width: 100%;
    padding-left: 2.75rem !important;
}

.dict-bar-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-dict-ai-generate {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Grid of Terms */
.dict-terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.dict-term-card {
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 220px;
    box-sizing: border-box;
}

.dict-term-card:hover {
    transform: translateY(-3px);
    border-color: rgba(242, 202, 80, 0.25) !important;
    background: rgba(255, 255, 255, 0.01);
}

.dict-badge-container {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.dict-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: var(--rounded-sm);
    border: 1px solid transparent;
}

.dict-badge.critical {
    background: rgba(255, 180, 171, 0.15);
    color: #ffb4ab;
    border-color: rgba(255, 180, 171, 0.2);
}

.dict-badge.medium {
    background: rgba(0, 238, 252, 0.08);
    color: var(--secondary-container);
    border-color: rgba(0, 238, 252, 0.15);
}

.dict-badge.easy {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.08);
}

.dict-badge.new {
    background: rgba(242, 202, 80, 0.15);
    color: var(--primary);
    border-color: rgba(242, 202, 80, 0.2);
}

.dict-term-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 4.5rem;
}

.dict-term-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-gold);
    flex-shrink: 0;
}

.dict-term-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dict-term-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.dict-term-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.dict-meta-seen {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dict-card-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-dict-card-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.btn-dict-card-icon:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

.btn-dict-card-icon.delete:hover {
    color: var(--error);
    background: rgba(255, 180, 171, 0.08);
}

/* Add New card button */
.btn-dict-add-card {
    border: 1px dashed var(--border-tactile);
    background: transparent;
    border-radius: var(--rounded-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    height: 220px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    box-sizing: border-box;
    width: 100%;
}

.btn-dict-add-card:hover {
    border-color: rgba(242, 202, 80, 0.4);
    background: rgba(242, 202, 80, 0.03);
}

.btn-dict-add-card .material-symbols-outlined {
    font-size: 2.2rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.btn-dict-add-card:hover .material-symbols-outlined {
    color: var(--primary);
}

.btn-dict-add-card span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    transition: color 0.2s;
}

.btn-dict-add-card:hover span {
    color: var(--primary);
}

/* Glassmorphism panel and custom glow styles from mockup */
.glass-panel {
    background: rgba(27, 28, 30, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.gold-glow {
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15) !important;
}

.cyan-glow-focus:focus-within {
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.1) !important;
    border-color: var(--secondary-container) !important;
}

.dict-term-card.glass-panel {
    border-radius: var(--rounded-lg);
    background: rgba(27, 28, 30, 0.6) !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    height: auto;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.dict-term-card.glass-panel:hover {
    transform: translateY(-3px);
    background: rgba(41, 42, 44, 0.6) !important;
    border-color: rgba(242, 202, 80, 0.25) !important;
}

/* Global button active scaling and transitions */
button, .btn-primary, .btn-secondary, .btn-dict-action, .btn-tactical, .btn-dict-card-icon {
    transition: transform 0.1s ease, filter 0.15s ease, background-color 0.15s ease;
}

button:active, .btn-primary:active, .btn-secondary:active, .btn-dict-action:active, .btn-tactical:active, .btn-dict-card-icon:active {
    transform: scale(0.97) !important;
}

/* Tactile Card style from mockup */
.tactile-card {
    background: #1b1c1e !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease !important;
}

.tactile-card:hover {
    border-color: rgba(242, 202, 80, 0.35) !important;
    background: #242528 !important;
}

/* Oposicion Detail: Accordion */
.opo-accordion summary {
    list-style: none;
}

.opo-accordion summary::-webkit-details-marker {
    display: none;
}

.opo-accordion[open] > summary .opo-accordion-icon {
    transform: rotate(180deg);
}

/* Oposicion Detail: KPI card hover */
.opo-detail-kpi:hover {
    border-color: rgba(242, 202, 80, 0.3) !important;
    transform: translateY(-2px);
}

/* Tactile Input (mockup style) */
.tactile-input {
    background: #121316 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: var(--on-surface) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.tactile-input:focus {
    border-color: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid var(--accent-cyan) !important;
    box-shadow: 0 4px 12px -4px rgba(0, 238, 252, 0.3) !important;
    outline: none !important;
}

/* Contact page support card hover */
.contact-support-card {
    transition: background-color 0.25s ease, border-color 0.25s ease !important;
}
.contact-support-card:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
.contact-support-card:hover .support-card-icon {
    transform: scale(1.1);
}
.support-card-icon {
    transition: transform 0.25s ease !important;
}

/* Dashboard contribution calendar squares */
.contribution-square {
    aspect-ratio: 1;
    width: 100%;
    border-radius: 2px;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease !important;
}
.contribution-square:hover {
    transform: scale(1.15) !important;
    z-index: 10;
}

/* Dashboard floating logo */
@keyframes floatLogo {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}
.floating-logo {
    animation: floatLogo 6s ease-in-out infinite;
}

/* ============================================
   CONFIGURAR SIMULACRO — Redesign
   Premium mode-selector + 12-col grid layout
============================================ */

/* Page header */
.config-header {
    margin-bottom: 2.5rem;
}
.config-header h1 {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    line-height: 56px;
    letter-spacing: -0.02em;
    color: var(--primary);
    margin: 0 0 0.5rem 0;
}
.config-header p {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 28px;
    color: var(--on-surface-variant);
    max-width: 640px;
    margin: 0;
}

@media (max-width: 768px) {
    .config-header h1 {
        font-size: 28px;
        line-height: 36px;
    }
    .config-header p {
        font-size: 16px;
        line-height: 24px;
    }
}

/* Mode selector section */
.config-mode-section {
    margin-bottom: 2rem;
}
.config-mode-section > .label-sm {
    display: block;
    margin-bottom: 1rem;
    letter-spacing: 0.12em;
}

.mode-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .mode-selector-grid {
        grid-template-columns: 1fr;
    }
}

/* Mode card */
.mode-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border-radius: var(--rounded-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--surface-container-low);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-family: inherit;
    color: inherit;
}
.mode-card:hover {
    border-color: rgba(var(--primary-rgb), 0.4);
}
.mode-card.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.mode-card .mode-icon {
    font-size: 28px;
    margin-bottom: 0.75rem;
    color: var(--on-surface-variant);
    transition: color 0.2s ease;
}
.mode-card:hover .mode-icon,
.mode-card.selected .mode-icon {
    color: var(--primary);
}

.mode-card .mode-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: var(--on-surface);
    transition: color 0.2s ease;
}
.mode-card.selected .mode-title {
    color: var(--primary);
}

.mode-card .mode-desc {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.05em;
    color: var(--on-surface-variant);
    margin-top: 0.25rem;
}

/* Main config grid: 12-col */
.config-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-gutter);
}

@media (max-width: 900px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
}

.config-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.config-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Dynamic content blocks */
[data-mode-content] {
    display: none;
}
[data-mode-content].active {
    display: block;
    animation: fadeIn 0.35s ease-out;
}

/* ── General Hero ── */
.config-general-hero {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.config-hero-icon-wrap {
    width: 96px;
    height: 96px;
    border-radius: var(--rounded-full);
    background: rgba(var(--primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.config-hero-icon-wrap .material-symbols-outlined {
    font-size: 48px;
    color: var(--primary);
}

.config-general-hero h2 {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    line-height: 56px;
    letter-spacing: -0.02em;
    color: var(--primary);
    margin: 0 0 1rem 0;
}

@media (max-width: 768px) {
    .config-general-hero h2 {
        font-size: 28px;
        line-height: 36px;
    }
}

.config-general-hero > p {
    font-size: 18px;
    line-height: 28px;
    color: var(--on-surface-variant);
    max-width: 560px;
    margin: 0 0 2rem 0;
}

.config-general-stats {
    display: flex;
    gap: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem 0;
    width: 100%;
    max-width: 420px;
    justify-content: center;
}
.config-general-stats .stat-item {
    text-align: center;
}
.config-general-stats .stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    margin-bottom: 0.25rem;
}
.config-general-stats .stat-value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    line-height: 40px;
    color: var(--on-surface);
}
.config-general-stats .stat-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
    align-self: stretch;
}

/* ── Fuente Hero ── */
.config-fuente-hero {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.config-fuente-hero .material-symbols-outlined.fuente-big-icon {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.config-fuente-hero h2 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    line-height: 40px;
    color: var(--on-surface);
    margin: 0 0 0.5rem 0;
}

.config-fuente-hero > p {
    color: var(--on-surface-variant);
    margin: 0 0 2rem 0;
    max-width: 440px;
}

.config-fuente-select {
    width: 100%;
    max-width: 500px;
}
.config-fuente-select select {
    width: 100%;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    padding: 1rem 1.5rem;
    border-radius: var(--rounded-lg);
    background: var(--surface-container-highest);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--on-surface);
}

.config-fuente-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
    margin-top: 1rem;
}
.config-fuente-stats .stat-card {
    padding: 1rem;
    background: var(--surface-container-low);
    border-radius: var(--rounded-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.config-fuente-stats .stat-card .stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    margin-bottom: 0.25rem;
}
.config-fuente-stats .stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: var(--primary);
}

/* ── Saved Configs Bar ── */
.config-saved-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
}
.config-saved-bar .saved-label {
    flex: 1;
}
.config-saved-bar select {
    min-width: 220px;
    background: var(--surface-container-highest);
    border: none;
    border-radius: var(--rounded-default);
    padding: 0.5rem 1rem;
    color: var(--on-surface);
    font-size: 16px;
}

/* ── Accordion (Bloques/Temas) ── */
.config-accordion {
    overflow: hidden;
}
.config-accordion-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.config-accordion-header h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: var(--on-surface);
    margin: 0;
}
.config-accordion-header .header-actions {
    display: flex;
    gap: 1rem;
}
.config-accordion-header .header-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0;
}
.config-accordion-header .header-actions .btn-select-all {
    color: var(--primary);
}
.config-accordion-header .header-actions .btn-clear {
    color: var(--on-surface-variant);
}
.config-accordion-header .header-actions button:hover {
    text-decoration: underline;
}

.config-accordion .bloque-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.config-accordion .bloque-item:last-child {
    border-bottom: none;
}

.config-accordion .bloque-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
    transition: background-color 0.15s ease;
    user-select: none;
}
.config-accordion .bloque-item summary::-webkit-details-marker {
    display: none;
}
.config-accordion .bloque-item summary:hover {
    background: rgba(255, 255, 255, 0.03);
}

.config-accordion .bloque-item summary .bloque-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.config-accordion .bloque-item summary .bloque-left input[type="checkbox"] {
    width: 20px;
    height: 20px;
}
.config-accordion .bloque-item summary .bloque-left span {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: var(--on-surface);
}

.config-accordion .bloque-item summary .expand-icon {
    transition: transform 0.25s ease;
    color: var(--on-surface-variant);
    font-size: 24px;
}
.config-accordion .bloque-item[open] > summary .expand-icon {
    transform: rotate(180deg);
}

.config-accordion .temas-list {
    padding: 0 1.5rem 1.5rem;
}
.config-accordion .temas-list label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--rounded-lg);
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.config-accordion .temas-list label:last-child {
    border-bottom: none;
}
.config-accordion .temas-list label:hover {
    background: rgba(255, 255, 255, 0.03);
}
.config-accordion .temas-list label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--secondary-container);
}
.config-accordion .temas-list label span {
    font-size: 16px;
    line-height: 24px;
    color: var(--on-surface);
}
.config-accordion .temas-list label:has(input:not(:checked)) span {
    color: var(--on-surface-variant);
}

/* ── Weight Distribution ── */
.config-weights {
    padding: 1.5rem;
}
.config-weights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.config-weight-total {
    padding: 0.25rem 0.75rem;
    border-radius: var(--rounded-default);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.config-weight-total.is-error {
    background: var(--error-container);
    color: var(--on-error-container);
}
.config-weight-total.is-valid {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.config-weights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.config-weight-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.config-weight-item > label {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.config-weight-item .weight-input-wrap {
    position: relative;
}
.config-weight-item .weight-input-wrap input {
    width: 100%;
    background: var(--surface-container-low);
    border: none;
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.3);
    text-align: center;
    font-weight: 700;
    color: var(--on-surface);
    padding: 0.5rem 1.5rem 0.5rem 0.5rem;
    border-radius: 0;
    box-sizing: border-box;
}
.config-weight-item .weight-input-wrap input:focus {
    border-bottom-color: var(--primary);
    box-shadow: none;
}
.config-weight-item .weight-input-wrap .percent-suffix {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--on-surface-variant);
    pointer-events: none;
}

.config-weights-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    margin-top: 1.5rem;
    background: rgba(var(--error-rgb), 0.08);
    border: 1px solid rgba(var(--error-rgb), 0.2);
    border-radius: var(--rounded-default);
}
.config-weights-alert .material-symbols-outlined {
    color: var(--error);
    font-size: 20px;
    flex-shrink: 0;
}
.config-weights-alert p {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
    color: var(--on-error-container);
    margin: 0;
}

/* Clone source select within weights */
.config-weights .clone-source {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.config-weights .clone-source label {
    font-size: 0.85rem;
    color: var(--on-surface-variant);
    display: block;
    margin-bottom: 0.35rem;
}
.config-weights .clone-source select {
    width: 100%;
}

/* ── Filter Chips ── */
.config-filters {
    padding: 1.5rem;
}

.filter-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--rounded-default);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--surface-container-highest);
    color: var(--on-surface-variant);
    transition: all 0.2s ease;
}
.filter-chip:hover {
    border-color: rgba(var(--primary-rgb), 0.4);
}
.filter-chip.active {
    border-color: var(--secondary-container);
    background: rgba(var(--secondary-rgb), 0.08);
    color: var(--secondary-container);
}
.filter-chip .material-symbols-outlined {
    font-size: 18px;
}

.filter-chip input[type="checkbox"] {
    display: none;
}

.filter-note {
    font-size: 0.8rem;
    color: var(--on-surface-variant);
    margin: 0.75rem 0 0 0;
    opacity: 0.7;
}

/* ── Session Params ── */
.config-params {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.param-label {
    font-size: 16px;
    line-height: 24px;
    color: var(--on-surface);
    margin-bottom: 0.5rem;
    display: block;
}

.param-toggle-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
    background: var(--surface-container-lowest);
    border-radius: var(--rounded-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.param-toggle-btn {
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-radius: calc(var(--rounded-lg) - 2px);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.param-toggle-btn:hover {
    color: var(--on-surface);
}
.param-toggle-btn.active {
    background: var(--surface-container-highest);
    color: var(--on-surface);
}

.param-count-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}
.param-count-btn {
    padding: 0.75rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--rounded-default);
    font-weight: 700;
    color: var(--on-surface-variant);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 0.95rem;
}
.param-count-btn:hover {
    border-color: rgba(var(--primary-rgb), 0.4);
    color: var(--on-surface);
}
.param-count-btn.active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
}

/* ── AI Suggestion ── */
.config-ai-suggestion {
    padding: 1.5rem;
    border-left: 4px solid var(--secondary-container);
}
.config-ai-suggestion .ai-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.config-ai-suggestion .ai-header .material-symbols-outlined {
    color: var(--secondary-container);
}
.config-ai-suggestion .ai-header span {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: var(--secondary-container);
}
.config-ai-suggestion p {
    font-size: 16px;
    line-height: 24px;
    color: var(--on-surface-variant);
    margin: 0;
}

/* ── CTA ── */
.config-cta-wrap {
    padding-top: 1rem;
}

.config-cta {
    width: 100%;
    height: 64px;
    background: var(--primary);
    color: var(--on-primary);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    border: none;
    border-radius: var(--rounded-xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.config-cta:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 28px rgba(var(--primary-rgb), 0.3);
}
.config-cta:active {
    transform: scale(0.97);
}

.config-cta-motto {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    opacity: 0.5;
    margin-top: 1rem;
}

/* ── Error/Warning banners inside config ── */
.config-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: var(--rounded-lg);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-out;
}
.config-alert.is-error {
    background: rgba(var(--error-rgb), 0.1);
    border: 1px solid rgba(var(--error-rgb), 0.3);
    color: var(--error);
}
.config-alert.is-warning {
    background: rgba(var(--warning-rgb), 0.1);
    border: 1px solid rgba(var(--warning-rgb), 0.3);
    color: var(--warning);
}
.config-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: currentColor;
}

/* ── Resto-mode notice inside weights ── */
.config-weights .resto-notice {
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary);
    font-size: 0.85rem;
    color: var(--on-surface-variant);
}
.config-weights .resto-notice p {
    margin: 0;
    font-size: 0.85rem;
}

