/* ============================================
   EQ-I Assessment - Styles
   The Auer Group
   Goleman's Emotional Intelligence Model
   ============================================ */

:root {
    /* Primary Gradient Colors (Teal/Emerald for EQ-I) */
    --primary: #0f766e;
    --primary-dark: #0d5e58;
    --primary-light: #14b8a6;
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --gradient-primary: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    --gradient-primary-hover: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);

    /* EQ-I Domain Colors */
    --sa-color: #8b5cf6;        /* Self-Awareness - Purple */
    --sa-color-dark: #7c3aed;
    --sa-gradient: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --sa-bg: rgba(139, 92, 246, 0.1);

    --sr-color: #3b82f6;        /* Self-Regulation - Blue */
    --sr-color-dark: #2563eb;
    --sr-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --sr-bg: rgba(59, 130, 246, 0.1);

    --mot-color: #f59e0b;       /* Motivation - Amber */
    --mot-color-dark: #d97706;
    --mot-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --mot-bg: rgba(245, 158, 11, 0.1);

    --emp-color: #10b981;       /* Empathy - Green */
    --emp-color-dark: #059669;
    --emp-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --emp-bg: rgba(16, 185, 129, 0.1);

    --ss-color: #f43f5e;        /* Social Skills - Rose */
    --ss-color-dark: #e11d48;
    --ss-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --ss-bg: rgba(244, 63, 94, 0.1);

    /* Modern Neutrals */
    --bg: #f8fafc;
    --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: #ffffff;
    --card-bg-glass: rgba(255, 255, 255, 0.8);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --border: #cbd5e1;
    --border-light: #e2e8f0;

    /* Radius */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Shadows */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 40px rgba(13, 148, 136, 0.3);

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ---- Typography ---- */

h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

/* ---- Layout ---- */

#app {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 20px;
    min-height: 100vh;
}

.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover::before { opacity: 1; }

/* ---- Brand Header ---- */

.brand-header {
    text-align: center;
    margin-bottom: 16px;
}

.brand-name {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    display: inline-block;
}

/* ---- Intro Screen ---- */

.intro-card {
    text-align: center;
    padding-top: 48px;
    padding-bottom: 48px;
}

.intro-card::before { opacity: 1; }

.intro-card h1 {
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro-text {
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 1rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

.intro-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Domain Preview Chips */

.domain-preview {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 36px 0;
}

.domain-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 40px;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: default;
    transition: all var(--transition);
    animation: chipFloat 3s ease-in-out infinite;
}

.domain-chip:nth-child(1) { animation-delay: 0s; }
.domain-chip:nth-child(2) { animation-delay: 0.1s; }
.domain-chip:nth-child(3) { animation-delay: 0.2s; }
.domain-chip:nth-child(4) { animation-delay: 0.3s; }
.domain-chip:nth-child(5) { animation-delay: 0.4s; }

@keyframes chipFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.domain-chip:hover { transform: scale(1.08) translateY(-3px) !important; }

.sa-chip { background: var(--sa-gradient); box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4); }
.sr-chip { background: var(--sr-gradient); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); }
.mot-chip { background: var(--mot-gradient); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4); }
.emp-chip { background: var(--emp-gradient); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4); }
.ss-chip { background: var(--ss-gradient); box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4); }

/* ---- Forms ---- */

form {
    max-width: 460px;
    margin: 0 auto;
    text-align: left;
    margin-top: 8px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group { flex: 1; }

.form-group { margin-bottom: 20px; }

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.required { color: #ef4444; }
.optional { color: var(--text-light); font-weight: 400; font-size: 0.85rem; }

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg);
    transition: all var(--transition);
}

input[type="text"]:hover,
input[type="email"]:hover {
    border-color: var(--border);
    background: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder { color: var(--text-light); }

/* ---- Buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.4);
}

.btn-primary:hover:not(:disabled) {
    background: var(--gradient-primary-hover);
    box-shadow: 0 6px 25px rgba(13, 148, 136, 0.5);
    transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(13, 148, 136, 0.4);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border);
    box-shadow: var(--shadow);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg);
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
    width: 100%;
    margin-top: 12px;
    border-radius: var(--radius-lg);
}

.btn-submit {
    background: var(--emp-gradient);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-submit:hover:not(:disabled) {
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

/* ---- Assessment Screen ---- */

.assessment-card {
    padding: 36px 40px;
}

.assessment-header {
    margin-bottom: 32px;
}

.assessment-header h2 {
    margin-bottom: 20px;
    font-size: 1.6rem;
}

#progress-container { margin-bottom: 6px; }

#progress-bar {
    height: 12px;
    background: var(--border-light);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

#progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 20px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 10px rgba(13, 148, 136, 0.4);
}

#progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ---- Likert Question Card ---- */

.question-container {
    margin-bottom: 20px;
}

.question-card {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    background: var(--card-bg);
    transition: all var(--transition);
}

.question-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.domain-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
}

.domain-tag.sa  { background: var(--sa-gradient); }
.domain-tag.sr  { background: var(--sr-gradient); }
.domain-tag.mot { background: var(--mot-gradient); }
.domain-tag.emp { background: var(--emp-gradient); }
.domain-tag.ss  { background: var(--ss-gradient); }

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 28px;
    line-height: 1.6;
}

/* Likert Scale */

.likert-scale {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.likert-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 4px;
}

.likert-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    width: 20%;
}

.likert-options {
    display: flex;
    gap: 10px;
}

.likert-option {
    flex: 1;
    position: relative;
}

.likert-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.likert-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 14px 8px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg);
    transition: all var(--transition);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
    user-select: none;
}

.likert-option label:hover {
    border-color: var(--primary-light);
    background: rgba(20, 184, 166, 0.05);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: var(--primary);
}

.likert-option input[type="radio"]:checked + label {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.12) 0%, rgba(13, 148, 136, 0.12) 100%);
    color: var(--primary-dark);
    font-weight: 800;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.2);
}

.likert-option label .likert-num {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.likert-option label .likert-desc {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.2;
}

.likert-option input[type="radio"]:checked + label .likert-desc {
    color: var(--primary);
}

/* Answered state */

.question-card.answered {
    border-color: var(--primary-light);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.03) 0%, rgba(13, 148, 136, 0.03) 100%);
}

/* ---- Navigation ---- */

.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--border-light);
}

.nav-buttons .btn { min-width: 140px; }

.validation-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #dc2626;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 16px;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-5px); }
    80%       { transform: translateX(5px); }
}

.hidden { display: none !important; }

/* ---- Results Screen ---- */

.results-card {
    text-align: center;
    padding: 48px 40px;
}

.results-card::before { opacity: 1; }

.results-card h1 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.results-card h3 {
    text-align: left;
    margin-top: 2.5rem;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--border-light);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-card h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

/* EQ Score Badge */

#eq-badge-container {
    margin: 0 auto 32px;
}

.eq-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 48px;
    border-radius: var(--radius-xl);
    color: #fff;
    background: var(--gradient-primary);
    box-shadow: 0 10px 40px rgba(13, 148, 136, 0.4);
    position: relative;
    overflow: hidden;
    animation: badgePulse 2.5s ease-in-out infinite;
}

.eq-badge::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    animation: badgeShine 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.02); }
}

@keyframes badgeShine {
    0%   { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

.eq-badge .badge-score {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.eq-badge .badge-label {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

.eq-badge .badge-band {
    font-size: 1.2rem;
    font-weight: 700;
    background: rgba(255,255,255,0.25);
    padding: 6px 20px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
}

/* Band-specific badge colors */
.eq-badge.band-exemplary  { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); box-shadow: 0 10px 40px rgba(20,184,166,0.45); }
.eq-badge.band-proficient { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); box-shadow: 0 10px 40px rgba(59,130,246,0.4); }
.eq-badge.band-developing { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 10px 40px rgba(245,158,11,0.4); }
.eq-badge.band-development { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%); box-shadow: 0 10px 40px rgba(244,63,94,0.4); }

/* Radar Chart */

#chart-section {
    max-width: 440px;
    margin: 0 auto 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(20,184,166,0.03) 0%, rgba(13,148,136,0.03) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

/* Domain Score Bars */

#score-bars-section {
    text-align: left;
    padding: 24px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    margin-top: 24px;
}

#score-bars-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.score-bar-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 8px 0;
}

.score-bar-label {
    width: 150px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: right;
    flex-shrink: 0;
    color: var(--text-primary);
}

.score-bar-track {
    flex: 1;
    height: 24px;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.score-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-bar-item.sa  .score-bar-fill { background: var(--sa-gradient); }
.score-bar-item.sr  .score-bar-fill { background: var(--sr-gradient); }
.score-bar-item.mot .score-bar-fill { background: var(--mot-gradient); }
.score-bar-item.emp .score-bar-fill { background: var(--emp-gradient); }
.score-bar-item.ss  .score-bar-fill { background: var(--ss-gradient); }

.score-bar-value {
    width: 48px;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
    color: var(--text-primary);
}

.score-band-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.band-exemplary  { background: rgba(20,184,166,0.15);  color: #0f766e; }
.band-proficient { background: rgba(59,130,246,0.15);  color: #1d4ed8; }
.band-developing { background: rgba(245,158,11,0.15);  color: #b45309; }
.band-development{ background: rgba(244,63,94,0.15);   color: #be123c; }

/* Profile List (strengths, growth, etc.) */

.profile-list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.profile-list li {
    padding: 12px 16px 12px 48px;
    margin-bottom: 10px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.profile-list li:hover {
    border-color: var(--border);
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.profile-list li::before {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.strengths-list li::before {
    content: '✓';
    background: var(--emp-gradient);
}

.growth-list li::before {
    content: '→';
    background: var(--mot-gradient);
}

/* Domain Narratives */

.domain-narrative {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    border: 2px solid var(--border-light);
    text-align: left;
    transition: all var(--transition);
}

.domain-narrative:hover {
    border-color: var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.domain-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    color: #fff;
}

.domain-icon.sa  { background: var(--sa-gradient); }
.domain-icon.sr  { background: var(--sr-gradient); }
.domain-icon.mot { background: var(--mot-gradient); }
.domain-icon.emp { background: var(--emp-gradient); }
.domain-icon.ss  { background: var(--ss-gradient); }

.domain-narrative-content { flex: 1; }

.domain-narrative-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.domain-narrative-score {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.domain-narrative-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Results Actions */

.results-actions {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- Loading Overlay ---- */

#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

#loading-overlay p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ---- Notifications ---- */

.notification {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    animation: fadeSlideIn 0.4s ease;
}

.notification-success {
    background: linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(5,150,105,0.1) 100%);
    color: #059669;
    border: 1px solid rgba(16,185,129,0.3);
}

.notification-warning {
    background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(217,119,6,0.1) 100%);
    color: #b45309;
    border: 1px solid rgba(245,158,11,0.3);
}

/* ---- Admin / Modal Styles ---- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
}

.modal h2 { text-align: center; margin-bottom: 8px; }
.modal p  { text-align: center; margin-bottom: 24px; }

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover { background: var(--bg); color: var(--text-primary); }

/* ---- Admin Dashboard ---- */

#admin-app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.admin-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.summary-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    text-align: center;
}

.summary-card .summary-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 6px;
}

.summary-card .summary-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.admin-section h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.search-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-filter-bar input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
}

.search-filter-bar select {
    padding: 10px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg);
    cursor: pointer;
    transition: all var(--transition);
}

.search-filter-bar select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
}

.results-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.results-table th {
    background: var(--bg);
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-light);
    white-space: nowrap;
}

.results-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

.results-table tr:last-child td { border-bottom: none; }

.results-table tr:hover td {
    background: rgba(20, 184, 166, 0.03);
}

.score-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.domain-bar-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.domain-bar-mini-label {
    width: 28px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: right;
}

.domain-bar-mini-track {
    flex: 1;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.domain-bar-mini-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.domain-bar-mini-value {
    width: 32px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Admin Charts */

.admin-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.chart-card h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
    margin-top: 0;
}

.chart-card h3::before { display: none; }

/* ---- Responsive ---- */

@media (max-width: 640px) {
    #app { padding: 16px 12px; }

    .card { padding: 28px 20px; }

    .intro-card h1 { font-size: 1.9rem; }

    .assessment-card { padding: 24px 20px; }

    h1 { font-size: 1.8rem; }

    .domain-preview { gap: 8px; }
    .domain-chip { padding: 8px 12px; font-size: 0.8rem; }

    .likert-options { gap: 6px; }
    .likert-option label { padding: 10px 4px; }
    .likert-option label .likert-num { font-size: 1.1rem; }
    .likert-option label .likert-desc { display: none; }

    .results-card { padding: 32px 20px; }

    .score-bar-label { width: 110px; font-size: 0.82rem; }

    .domain-narrative { flex-direction: column; gap: 12px; }

    .admin-charts { grid-template-columns: 1fr; }

    .nav-buttons { flex-direction: column; }
    .nav-buttons .btn { width: 100%; }
}
