/* ─── Le-Conflict CDM Assessment ─── */
/* MOBILE-FIRST: base styles are for 320px+, media queries scale UP */

:root {
    --color-vechten: #FF8C00;
    --color-verwerpen: #808080;
    --color-vermijden: #6B8E23;
    --color-verbinden: #800080;
    --color-vechten-light: #FFF3E0;
    --color-verwerpen-light: #F5F5F5;
    --color-vermijden-light: #F1F8E9;
    --color-verbinden-light: #F3E5F5;
    --color-vechten-dark: #E65100;
    --color-verwerpen-dark: #616161;
    --color-vermijden-dark: #558B2F;
    --color-verbinden-dark: #6A1B9A;
    --primary: #800080;
    --primary-light: #F3E5F5;
    --primary-dark: #6A1B9A;
    --bg: #FAFAFA;
    --bg-card: #FFFFFF;
    --text: #2C3E50;
    --text-light: #7F8C8D;
    --text-muted: #BDC3C7;
    --border: #ECF0F1;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease;
}

/* ─── Reset & Base (320px+) ─── */

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

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Prevent iOS zoom on input focus */
input, select, textarea { font-size: 16px !important; }

/* ─── Utilities ─── */

.hidden { display: none !important; }

.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }

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

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 12px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 16px;
}

/* ─── Buttons (44px min touch target) ─── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 3px 10px rgba(128,0,128,0.3);
}
.btn-primary:active { transform: scale(0.97); }

.btn-secondary { background: var(--border); color: var(--text); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-link {
    background: none; border: none; color: var(--primary);
    cursor: pointer; font-size: 0.85rem; padding: 8px 0;
    font-family: inherit; min-height: 44px;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.btn-group .btn { flex: 1; }

/* ─── Navbar ─── */

.navbar {
    background: white;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1rem;
}
.nav-brand .logo { font-size: 1.2rem; }
.nav-brand .brand-text {
    background: linear-gradient(135deg, var(--color-vechten), var(--color-verbinden));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2px;
    order: 3;
    width: 100%;
    justify-content: center;
}

.nav-link {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.8rem;
    transition: var(--transition);
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── Public Navbar ─── */
.navbar-public {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.navbar-public .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-public .btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.navbar-public .btn-outline:hover {
    background: var(--primary);
    color: white;
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.25rem 0.5rem;
}

.nav-mobile-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    background: white;
    border-top: 1px solid var(--border);
    padding: 0.5rem 0;
}

.nav-mobile-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.nav-mobile-menu a:hover {
    background: #f1f5f9;
}

@media (max-width: 600px) {
    .navbar-public .nav-actions {
        display: none;
    }
    .navbar-public .nav-links {
        display: none;
    }
    .nav-hamburger {
        display: block;
    }
    .nav-mobile-menu:not(.hidden) {
        display: flex;
    }
}

.credits-badge {
    background: var(--color-verbinden-light);
    color: var(--color-verbinden);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

#user-name { font-weight: 500; font-size: 0.85rem; }

/* ─── Hero Section ─── */

.hero-wrapper {
    position: relative;
    background: linear-gradient(135deg, rgba(74, 20, 74, 0.85) 0%, rgba(128, 0, 128, 0.7) 100%), 
                url('/static/img/hero.jpg') center/cover no-repeat;
}

.hero-wrapper .hero {
    min-height: 50vh;
}

.hero-wrapper .hero-content {
    color: white;
}

.hero-wrapper .hero h1 {
    color: white;
}

.hero-wrapper .hero-subtitle {
    color: rgba(255,255,255,0.85);
}

.hero-wrapper .hero-badge {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: white;
}

.hero-wrapper .hero-note {
    color: rgba(255,255,255,0.9);
}

.hero {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px 16px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.hero h1 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.hero-note { color: var(--text-muted); font-size: 0.8rem; }

/* Conflict Compass */
.conflict-compass {
    width: 240px;
    height: 240px;
    position: relative;
    margin: 0 auto;
}

.compass-quadrant {
    position: absolute;
    width: 105px;
    height: 105px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
}
.compass-quadrant span { font-size: 0.65rem; opacity: 0.9; font-weight: 400; margin-top: 2px; }
.compass-quadrant.vechten    { top: 0; left: 0; background: var(--color-vechten); }
.compass-quadrant.verbinden  { top: 0; right: 0; background: var(--color-verbinden); }
.compass-quadrant.verwerpen  { bottom: 0; left: 0; background: var(--color-verwerpen); }
.compass-quadrant.vermijden  { bottom: 0; right: 0; background: var(--color-vermijden); }

.compass-axis-label {
    position: absolute;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.compass-axis-label.top    { top: -18px; left: 50%; transform: translateX(-50%); }
.compass-axis-label.bottom { bottom: -18px; left: 50%; transform: translateX(-50%); }
.compass-axis-label.left   { left: -6px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.compass-axis-label.right  { right: -6px; top: 50%; transform: translateY(-50%) rotate(90deg); }

/* ─── Features ─── */

.features { padding: 32px 16px; background: white; }
.features h2, .how-it-works h2 { text-align: center; font-size: 1.3rem; margin-bottom: 24px; }

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.feature-card { text-align: center; padding: 12px 8px; }
.feature-icon { font-size: 2rem; margin-bottom: 8px; }
.feature-card h3 { font-size: 0.9rem; margin-bottom: 4px; }
.feature-card p { color: var(--text-light); font-size: 0.8rem; }

/* How it works */
.how-it-works { padding: 32px 16px; }

.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.step { text-align: center; }
.step-number {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; margin: 0 auto 8px; font-size: 0.9rem;
}
.step h3 { font-size: 0.9rem; margin-bottom: 2px; }
.step p { font-size: 0.8rem; color: var(--text-light); }
.step-arrow { display: none; }

/* ─── Auth ─── */

.auth-section { padding: 32px 12px; background: white; }

.auth-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.auth-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
    background: white;
    border-radius: var(--radius-sm);
    padding: 3px;
}

.tab-btn {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-light);
    font-size: 0.8rem;
    min-height: 44px;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.tab-btn.active { background: var(--primary); color: white; }

.auth-form h2 { margin-bottom: 6px; font-size: 1.2rem; }
.form-subtitle { color: var(--text-light); margin-bottom: 16px; font-size: 0.85rem; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 0.85rem; }
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-family: inherit;
    min-height: 44px;
}
.form-group input:focus { outline: none; border-color: var(--primary); }

.auth-error { color: #E74C3C; font-size: 0.8rem; margin-top: 6px; min-height: 18px; }

.divider { text-align: center; margin: 16px 0; position: relative; }
.divider::before {
    content: ''; position: absolute; top: 50%; left: 0; right: 0;
    height: 1px; background: var(--border);
}
.divider span {
    background: var(--bg); padding: 0 10px; position: relative;
    color: var(--text-muted); font-size: 0.8rem;
}

/* ─── Dashboard ─── */

.welcome-banner {
    padding: 20px 16px;
    background: linear-gradient(135deg, var(--color-vechten), var(--color-verbinden));
    border-radius: var(--radius);
    color: white;
    margin-bottom: 16px;
}
.welcome-banner h1 { font-size: 1.2rem; margin-bottom: 2px; }
.welcome-banner p { opacity: 0.9; font-size: 0.85rem; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.stats-card { text-align: center; padding: 14px 8px; }
.stats-card h3 {
    color: var(--text-light); font-size: 0.65rem;
    margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px;
}
.stat-number { font-size: 1.6rem; font-weight: 700; color: var(--primary); }

.section { margin-bottom: 20px; }
.section h2 { font-size: 1.1rem; margin-bottom: 12px; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.test-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.test-card { text-align: center; padding: 16px; }
.test-icon { font-size: 2rem; margin-bottom: 8px; }
.test-card h3 { font-size: 1rem; margin-bottom: 6px; }
.test-card p { color: var(--text-light); font-size: 0.85rem; margin-bottom: 12px; }
.test-meta {
    display: flex; justify-content: center; gap: 12px;
    margin-bottom: 12px; font-size: 0.8rem; color: var(--text-muted);
}

/* Results list */
.results-list { display: flex; flex-direction: column; gap: 8px; }

.result-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    cursor: pointer;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.result-info { display: flex; align-items: center; gap: 10px; }
.result-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.result-meta { display: flex; flex-direction: column; }
.result-type { font-weight: 600; font-size: 0.85rem; }
.result-date { color: var(--text-muted); font-size: 0.75rem; }
.result-style {
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 500; flex-shrink: 0;
}

.empty-state { text-align: center; color: var(--text-muted); padding: 24px 12px; font-size: 0.85rem; }

/* ═══════════════════════════════════════════════════════════════
   ASSESSMENT WIZARD — The core mobile experience
   1 block = 1 screen. No scrolling needed per block.
   ═══════════════════════════════════════════════════════════════ */

.assessment-container {
    max-width: 600px;
    margin: 0 auto;
}

.assessment-header {
    text-align: center;
    margin-bottom: 12px;
}
.assessment-header h2 { font-size: 1.1rem; margin-bottom: 2px; }
.assessment-header p { color: var(--text-light); font-size: 0.8rem; }

/* Progress */
.progress-container { margin-bottom: 12px; }
.progress-bar {
    height: 4px; background: var(--border);
    border-radius: 2px; overflow: hidden; margin-bottom: 4px;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-vechten), var(--color-vermijden), var(--color-verbinden));
    border-radius: 2px; transition: width 0.4s ease;
}
.progress-text {
    display: flex; justify-content: space-between;
    font-size: 0.7rem; color: var(--text-light);
}

/* Block card — compact for mobile */
.block-header { text-align: center; margin-bottom: 8px; }
.block-header h2 { font-size: 1rem; margin-bottom: 2px; }
.block-header p { color: var(--text-light); font-size: 0.75rem; }

.instruction-box {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    padding: 8px 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--primary-dark);
    line-height: 1.4;
}

/* Word sliders — mobile-optimized vertical layout */
.word-sliders {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.word-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.word-label {
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* +/- buttons: large touch targets */
.quick-adjust { display: flex; }

.quick-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: white;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    flex-shrink: 0;
}
.quick-btn:active {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: scale(0.92);
}

/* Range slider — bigger thumb for touch */
.slider-container input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    outline: none;
    margin: 0;
}
.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(128,0,128,0.3);
}
.slider-container input[type="range"]::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

.value-display {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    line-height: 44px;
}

/* Sum indicator */
.sum-indicator {
    text-align: center;
    margin-top: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
}
.sum-indicator.valid { background: var(--color-vermijden-light); color: var(--color-vermijden-dark); }
.sum-indicator.invalid { background: var(--color-vechten-light); color: var(--color-vechten); }

/* ─── Results ─── */

.results-header { text-align: center; margin-bottom: 20px; }
.results-header h2 { font-size: 1.3rem; margin-bottom: 4px; }

.profile-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; border-radius: 30px;
    font-size: 1.1rem; font-weight: 700; margin: 10px 0;
}

.scores-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
}

.score-bar-card { padding: 10px; border-radius: var(--radius-sm); background: var(--bg); }
.score-bar-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.score-bar-label { font-weight: 600; font-size: 0.8rem; }
.score-bar-value { font-weight: 700; font-size: 0.95rem; }
.score-bar { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 5px; transition: width 0.8s ease; }

/* Quadrant Chart — auto-sized */
.quadrant-container { display: flex; justify-content: center; margin: 20px 0; }

.quadrant-chart {
    width: min(280px, 85vw);
    height: min(280px, 85vw);
    position: relative;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.quadrant-section {
    position: absolute; width: 50%; height: 50%;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    font-size: 0.75rem; font-weight: 600;
}
.quadrant-section.tl { top: 0; left: 0; background: rgba(255,140,0,0.15); }
.quadrant-section.tr { top: 0; right: 0; background: rgba(128,0,128,0.15); }
.quadrant-section.bl { bottom: 0; left: 0; background: rgba(128,128,128,0.15); }
.quadrant-section.br { bottom: 0; right: 0; background: rgba(107,142,35,0.15); }

.quadrant-label { font-size: 0.6rem; color: var(--text-muted); margin-top: 2px; }
.quadrant-score { font-size: 1.2rem; font-weight: 700; }

.quadrant-axis-label {
    position: absolute; font-size: 0.55rem; font-weight: 600;
    color: var(--text-light); text-transform: uppercase; letter-spacing: 0.3px;
}
.quadrant-axis-label.top    { top: 2px; left: 50%; transform: translateX(-50%); }
.quadrant-axis-label.bottom { bottom: 2px; left: 50%; transform: translateX(-50%); }
.quadrant-axis-label.left   { left: 2px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.quadrant-axis-label.right  { right: 2px; top: 50%; transform: translateY(-50%) rotate(90deg); }

/* Interpretation */
.interpretation-card { margin-top: 16px; }
.interp-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.interp-item:last-child { border-bottom: none; }
.interp-label {
    font-weight: 600; font-size: 0.75rem; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 2px;
}
.interp-text { font-size: 0.85rem; }

/* Comparison */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 16px 0;
}
.comparison-col { text-align: center; }
.comparison-col h3 { margin-bottom: 8px; font-size: 1rem; }

.comparison-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.comparison-bar-label { flex: 0 0 80px; text-align: right; font-size: 0.8rem; font-weight: 500; }
.comparison-bar-track {
    flex: 1; height: 18px; background: var(--border);
    border-radius: 9px; overflow: hidden;
}
.comparison-bar-fill {
    height: 100%; border-radius: 9px;
    transition: width 0.8s ease;
    display: flex; align-items: center; justify-content: flex-end;
    padding-right: 6px; color: white; font-size: 0.7rem; font-weight: 700;
}

/* ─── Teams ─── */

.teams-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

.team-card { padding: 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.team-card h3 { font-size: 1rem; margin-bottom: 4px; }
.team-card .team-meta {
    display: flex; gap: 12px; color: var(--text-light); font-size: 0.8rem;
}

.join-card { max-width: 400px; margin: 0 auto; text-align: center; }

.inline-form { display: flex; gap: 6px; margin-top: 12px; }
.inline-form input {
    flex: 1; padding: 10px; border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-family: inherit; min-height: 44px;
}
.inline-form input:focus { outline: none; border-color: var(--primary); }

/* ─── Admin ─── */

.admin-tabs {
    display: flex; gap: 2px; margin-bottom: 16px;
    background: white; border-radius: var(--radius-sm); padding: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.admin-tab-content.active { display: block; }

.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.data-table th {
    background: var(--bg); padding: 8px 6px; text-align: left;
    font-weight: 600; font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: 0.3px; color: var(--text-light);
    border-bottom: 2px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); }

/* ─── Admin Chart Styles ─── */

.mini-scores {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
}

.mini-score-row {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 14px;
}

.mini-lbl {
    font-weight: 700;
    font-size: 0.65rem;
    width: 20px;
    text-align: center;
}

.mini-track {
    flex: 1;
    height: 8px;
    background: #F1F5F9;
    border-radius: 4px;
    overflow: hidden;
    min-width: 40px;
}

.mini-fill {
    height: 100%;
    border-radius: 4px;
    min-width: 2px;
}

.mini-val {
    font-size: 0.65rem;
    color: #64748B;
    width: 22px;
    text-align: right;
    font-weight: 600;
}

.score-bars-enhanced {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-bar-row .score-bar-label {
    font-weight: 600;
    font-size: 0.85rem;
    width: 100px;
    flex-shrink: 0;
}

.score-bar-row .score-bar-track {
    flex: 1;
    height: 20px;
    background: #F1F5F9;
    border-radius: 10px;
    overflow: hidden;
}

.score-bar-row .score-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
}

.score-bar-row .score-bar-value {
    font-weight: 700;
    font-size: 0.9rem;
    width: 30px;
    text-align: right;
}

.chart-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius);
    text-align: center;
}

.chart-section h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.assessment-detail p {
    margin: 0.5rem 0;
}

.scores-visual h4 {
    margin-bottom: 0.75rem;
}

/* ─── Modal ─── */

.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 16px;
}
.modal {
    background: white; border-radius: var(--radius); padding: 20px;
    width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto;
}

/* ─── Footer ─── */
.footer { text-align: center; padding: 24px 12px; color: var(--text-muted); font-size: 0.8rem; }
.footer a { color: var(--primary); text-decoration: none; }
.footer-sub { font-size: 0.7rem; margin-top: 4px; opacity: 0.7; }
.logged-in-footer { margin-top: auto; background: var(--bg-card); border-top: 1px solid var(--border); }

/* Test type badges */
.test-badge { display:inline-block; font-size:0.6rem; padding:1px 6px; border-radius:10px; font-weight:600; color:white; margin-left:2px; }
.test-conflict_basis { background: #8E44AD; }
.test-conflict_respons { background: #2980B9; }

/* ─── Auth Pages ─── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 2rem 1rem;
}
.auth-page-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    width: 100%;
    max-width: 440px;
}
.auth-page-brand {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text);
}
.auth-page-card h2 { text-align: center; margin-bottom: 0.5rem; font-size: 1.4rem; }
.auth-page-card .form-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.85rem; }
.auth-page-card .form-group { margin-bottom: 1rem; }
.auth-page-card label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 0.85rem; }
.auth-page-card input[type="email"],
.auth-page-card input[type="password"],
.auth-page-card input[type="text"] {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 1rem; transition: border-color 0.2s;
}
.auth-page-card input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(128,0,128,0.1); }
.auth-switch { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-muted); }
.auth-switch a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }
.divider { text-align: center; margin: 1.25rem 0; position: relative; }
.divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px solid var(--border); }
.divider span { position: relative; background: white; padding: 0 0.75rem; font-size: 0.8rem; color: var(--text-muted); }


/* ═══════════════════════════════════════════════════════════════
   TABLET (600px+)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
    body { font-size: 15px; }
    .container { padding: 16px; }
    .card { padding: 24px; margin-bottom: 20px; }

    .navbar { padding: 10px 20px; flex-wrap: nowrap; }
    .nav-links { order: 0; width: auto; }
    .nav-link { font-size: 0.85rem; padding: 8px 14px; }

    .hero { padding: 48px 24px; }
    .hero h1 { font-size: 2rem; }
    .hero-buttons { flex-direction: row; justify-content: center; }

    .features-grid { grid-template-columns: repeat(4, 1fr); }

    .steps { display: flex; align-items: center; justify-content: center; gap: 12px; }
    .step-arrow { display: block; font-size: 1.2rem; color: var(--text-muted); }

    .test-cards { grid-template-columns: 1fr 1fr; }

    .dashboard-grid { gap: 12px; }
    .stat-number { font-size: 2rem; }
    .stats-card h3 { font-size: 0.75rem; }

    .teams-grid { grid-template-columns: 1fr 1fr; }

    /* Assessment: word rows go horizontal */
    .word-row {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 12px;
    }
    .word-label {
        flex: 0 0 160px;
        text-align: left;
    }

    .comparison-grid { grid-template-columns: 1fr 1fr; }

    .quadrant-chart { width: 340px; height: 340px; }
    .quadrant-section { font-size: 0.8rem; }
    .quadrant-score { font-size: 1.3rem; }
}


/* ═══════════════════════════════════════════════════════════════
   DESKTOP (900px+)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
    body { font-size: 16px; }
    .container { padding: 20px; }
    .card { padding: 32px; margin-bottom: 24px; }

    .hero {
        display: grid;
        grid-template-columns: 1fr 1fr;
        text-align: left;
        padding: 60px 24px;
        max-width: 1100px;
        margin: 0 auto;
        align-items: center;
    }
    .hero h1 { font-size: 2.5rem; }
    .hero-buttons { justify-content: flex-start; }
    .hero-subtitle { font-size: 1.05rem; }

    .conflict-compass { width: 300px; height: 300px; }
    .compass-quadrant { width: 132px; height: 132px; font-size: 0.9rem; }
    .compass-quadrant span { font-size: 0.75rem; }

    .nav-link { font-size: 0.9rem; }

    .features h2, .how-it-works h2 { font-size: 1.6rem; }

    .word-label { flex: 0 0 180px; font-size: 0.95rem; }
    .quick-btn { width: 36px; height: 36px; font-size: 1.1rem; }
    .value-display { width: 48px; height: 42px; line-height: 42px; font-size: 1.3rem; }

    .quadrant-chart { width: 380px; height: 380px; }
    .quadrant-section { font-size: 0.85rem; }
    .quadrant-score { font-size: 1.5rem; }

    .btn { padding: 12px 28px; }
    .btn-lg { padding: 16px 36px; font-size: 1.1rem; }

    .btn-group .btn { flex: 0 auto; }
}


/* ─── Print ─── */
@media print {
    .navbar, .btn-group, .progress-container, .footer { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}

/* Impersonation Banner */
.impersonate-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 1001;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.impersonate-banner.hidden { display: none; }
.impersonate-banner button {
    background: white;
    color: #D97706;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.impersonate-banner button:hover { background: #FEF3C7; }

/* Session ID footer */
.footer-session {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}
.footer-session code {
    font-family: monospace;
    background: rgba(0,0,0,0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

/* When impersonating, push body content down */
body.impersonating { padding-top: 50px; }
