@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --brand: #625BFF;
    --brand-dark: #5146F0;
    --brand-soft: #EEF2FF;
    --accent: #F28C38;
    --accent-dark: #D97706;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --bg: #F6F7FB;
    --surface: #FFFFFF;
    --surface-muted: #F1F4FF;
    --text: #1F2937;
    --muted: #6B7280;
    --border: #E5E7EB;
    --shadow-soft: 0 18px 38px rgba(79, 70, 229, 0.12);
    --shadow-card: 0 16px 38px rgba(15, 23, 42, 0.08);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(180deg, rgba(236, 240, 255, 0.6) 0%, rgba(247, 244, 255, 0.98) 35%, var(--bg) 100%);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

a:hover {
    text-decoration: none;
}

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

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    margin-top: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand-dark);
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 90%);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.25);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 14px;
    font-weight: 500;
    color: var(--muted);
    transition: all 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    inset: auto 18% -6px 18%;
    height: 4px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0));
    border-radius: 999px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: var(--brand-dark);
    background: rgba(99, 102, 241, 0.08);
}

.nav-link.is-active {
    color: var(--brand-dark);
    background: rgba(99, 102, 241, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nav-link.is-active::after {
    opacity: 1;
    transform: translateY(0);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0.75rem 1.4rem;
    font-size: 0.95rem;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.4);
    color: var(--brand-dark);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.12);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-sm {
    padding: 0.55rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: white;
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 18px 40px rgba(99, 102, 241, 0.38);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.08);
    color: var(--brand-dark);
    box-shadow: none;
    border: 1px solid rgba(99, 102, 241, 0.16);
}

.btn-secondary:hover {
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 10px 22px rgba(148, 163, 184, 0.18);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(148, 163, 184, 0.1);
    box-shadow: none;
}

.user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    color: var(--brand-dark);
    font-weight: 600;
    transition: box-shadow 0.2s ease;
}

.user-pill:hover {
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.18);
}

.pill-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-soft);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}

.pill-caret {
    font-size: 0.8rem;
    color: var(--muted);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-card);
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.user-menu.is-open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown__header {
    padding: 0.5rem 1rem 0.75rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.user-name {
    font-weight: 600;
    color: var(--text);
}

.user-role {
    font-size: 0.8rem;
    color: var(--muted);
}

.user-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    color: var(--text);
    font-weight: 500;
    transition: background 0.2s ease;
}

.user-dropdown__item:hover {
    background: rgba(99, 102, 241, 0.06);
}

.user-dropdown__item--danger {
    color: var(--danger);
}

.flash-stack {
    width: min(900px, calc(100% - 32px));
    margin: 1.5rem auto 0 auto;
    display: grid;
    gap: 0.65rem;
}

.flash {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 26px rgba(148, 163, 184, 0.18);
}

.flash-success { border-left: 6px solid var(--success); }
.flash-error { border-left: 6px solid var(--danger); }
.flash-warning { border-left: 6px solid var(--warning); }
.flash-info { border-left: 6px solid var(--brand); }

.flash-icon { font-size: 1.2rem; }

.flash-close {
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.1rem;
}

.site-main {
    flex: 1;
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 3.5rem 0 4rem 0;
}

.site-footer {
    margin-top: auto;
    padding: 1.5rem 1.75rem 2.5rem;
    width: min(1200px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-link {
    color: inherit;
    text-decoration: underline;
}

.footer-link:hover {
    color: var(--brand-dark);
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0;
}

.hero {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0.05) 65%, rgba(255, 255, 255, 0.95) 100%);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.hero--compact {
    padding: 2.5rem;
}

.hero-intro {
    max-width: 620px;
}

.page-head {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.page-head h1 {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    color: var(--text);
}

.page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.page-head__image {
    margin: 1.5rem auto 0;
    max-width: 460px;
    width: 100%;
}

.page-head__image img {
    width: 100%;
    display: block;
    border-radius: 20px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.info-block {
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.info-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.6;
}

.info-list li {
    margin-bottom: 0.5rem;
}

.card-list {
    display: grid;
    gap: 1rem;
}

.card-list .card {
    margin: 0;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--brand-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.hero-title {
    font-size: clamp(2.4rem, 4vw, 3rem);
    margin: 1rem 0 0.8rem;
    color: var(--text);
    line-height: 1.2;
}

.hero-subtitle {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 600px;
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.chip-row {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.status-strip {
    display: grid;
    gap: 0.75rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.status-strip__item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--brand-dark);
    font-weight: 600;
}

.calm-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.6;
}

.calm-list--spacious li {
    margin-bottom: 0.65rem;
}

.calm-list--checks {
    list-style: none;
    padding-left: 0;
}

.calm-list--checks li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.calm-list--checks li::before {
    content: '✔';
    color: var(--success);
    font-weight: 600;
}

.flow-steps-simple {
    display: grid;
    gap: 1.25rem;
    padding: 0;
    margin: 1.25rem 0 0;
    list-style: none;
}

.flow-steps-simple li {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: grid;
    gap: 0.35rem;
}

.flow-steps-simple__label {
    font-weight: 600;
    color: var(--brand-dark);
}

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

.calm-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 1.75rem;
    display: grid;
    gap: 0.75rem;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.large-cta {
    display: grid;
    gap: 1rem;
    align-items: center;
    justify-items: start;
}

.level-summary {
    display: grid;
    gap: 1rem;
}

.auth-container {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 2rem;
    align-items: stretch;
}

.auth-panel {
    border-radius: var(--radius-md);
    padding: 2.4rem;
    background: var(--surface);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-card);
}

.auth-panel--intro {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(99, 102, 241, 0.75) 70%, rgba(99, 102, 241, 0.6) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-panel--intro::after {
    content: '';
    position: absolute;
    inset: auto -40% -35% -40%;
    height: 55%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.auth-panel--intro h1 {
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    margin-bottom: 0.75rem;
}

.auth-panel--intro p {
    color: rgba(255, 255, 255, 0.85);
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.auth-list {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.auth-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.auth-panel--form {
    background: var(--surface);
}

.auth-panel__header h2 {
    margin: 0;
    color: var(--text);
}

.auth-panel__header p {
    color: var(--muted);
    margin-top: 0.35rem;
}

.auth-meta {
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.auth-submit {
    width: 100%;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.btn[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.level-grid {
    margin-top: 1.5rem;
}

.level-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    min-height: 320px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.level-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(79, 70, 229, 0.18);
}

.level-card--done {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.level-card__header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.level-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(99, 102, 241, 0.14);
    color: var(--brand-dark);
}

.level-card--done .level-chip {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.level-status {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--success);
}

.level-status--pending {
    color: var(--brand-dark);
}

.level-card img {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.18));
}

.level-card .btn {
    width: 100%;
}

.game-progress {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.results-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.result-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.result-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.result-meta {
    color: var(--muted);
    font-size: 0.85rem;
}

.result-subtext {
    margin: 0;
    color: var(--muted);
}

.result-video {
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: #000;
}

.result-file {
    font-size: 0.8rem;
    color: var(--muted);
    word-break: break-word;
}

.result-missing {
    color: var(--danger);
    font-style: italic;
}

.questionnaire-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.participant-id {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.9rem 1.1rem;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 14px;
    border: 1px dashed rgba(99, 102, 241, 0.35);
}

.intro-checklist {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.18);
    background: rgba(99, 102, 241, 0.08);
    font-weight: 600;
    color: var(--brand-dark);
}

.check-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand);
}

.start-questionnaire.btn-ghost {
    background: rgba(148, 163, 184, 0.14);
    border: 1px dashed rgba(148, 163, 184, 0.6);
}

.admin-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-action-grid .btn {
    min-width: 160px;
}

.admin-danger {
    color: var(--danger) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}

.admin-danger:hover {
    background: rgba(239, 68, 68, 0.12) !important;
}

.admin-current-user {
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.table-wrapper {
    padding: 0;
    border-radius: var(--radius-md);
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    text-align: left;
    font-size: 0.9rem;
}

.data-table thead th {
    background: rgba(148, 163, 184, 0.16);
    font-weight: 700;
    color: var(--text);
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.06);
}

.data-table pre {
    margin: 0;
    font-family: 'Fira Code', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--muted);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.inline-form {
    display: inline;
}

.system-overview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.12);
    background: rgba(99, 102, 241, 0.06);
}

.info-label {
    font-weight: 600;
    color: var(--text);
}

.info-value {
    font-weight: 600;
    color: var(--brand-dark);
}

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

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.5rem;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow-card);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.stat-label {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.participant-list {
    display: grid;
    gap: 1rem;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.participant-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 1rem;
}

.participant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.participant-header h4 {
    margin: 0;
    color: var(--text);
}

.participant-meta {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.18);
    color: var(--muted);
}

.tag-success {
    background: rgba(16, 185, 129, 0.18);
    color: var(--success);
}

.tag-warn {
    background: rgba(245, 158, 11, 0.18);
    color: #d97706;
}

.tag-info {
    background: rgba(99, 102, 241, 0.18);
    color: var(--brand-dark);
}

.participant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.record-stats {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.record-list {
    display: grid;
    gap: 1rem;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.record-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    padding: 1.25rem;
    display: grid;
    gap: 0.85rem;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.record-header h4 {
    margin: 0;
    color: var(--text);
}

.record-meta {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.record-body details {
    margin-top: 0.35rem;
}

.record-body summary {
    cursor: pointer;
    color: var(--brand-dark);
    font-weight: 600;
}

.record-body pre {
    margin-top: 0.5rem;
    background: rgba(148, 163, 184, 0.12);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    max-height: 200px;
    overflow: auto;
}

.metadata-grid {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--muted);
}

.completion-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.session-summary {
    display: grid;
    gap: 1rem;
}

.next-steps-grid .card {
    display: grid;
    gap: 0.75rem;
    text-align: left;
}

.next-steps-grid .btn {
    justify-self: flex-start;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.16);
    color: var(--muted);
    font-weight: 500;
}

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

.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-card);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.card p {
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.surface-muted {
    background: var(--surface-muted);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.section-title {
    font-size: 1.6rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--muted);
    margin-bottom: 1.75rem;
    max-width: 680px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.form-group input.error {
    border-color: rgba(239, 68, 68, 0.7);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

.help-text {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.4rem;
}

.error-text {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.video-container {
    position: relative;
    display: inline-block;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: #000;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-overlay.show {
    opacity: 1;
}

.status-message {
    padding: 1rem 1.15rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.32);
}

.status-success { border-left: 5px solid var(--success); color: var(--success); }
.status-error { border-left: 5px solid var(--danger); color: var(--danger); }
.status-info { border-left: 5px solid var(--brand-dark); color: var(--brand-dark); }

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(148, 163, 184, 0.4);
    border-top: 3px solid var(--brand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
    width: 0%;
    transition: width 0.3s ease;
}

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

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

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

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

.hidden { display: none; }
.visible { display: block; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1024px) {
    .site-header {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .site-nav {
        justify-content: center;
    }

    .site-main {
        padding-top: 3rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        margin-top: 8px;
        padding: 0.85rem 1rem;
        border-radius: 16px;
    }

    .site-main {
        padding: 2.5rem 0 3rem;
    }

    .hero {
        padding: 2.2rem 1.75rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .chip-row {
        justify-content: center;
    }

    .site-footer {
        flex-direction: column;
        text-align: center;
        padding-bottom: 2rem;
    }

    .user-dropdown {
        right: auto;
        left: 0;
    }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        padding: 1.85rem;
    }

    .level-card {
        min-height: auto;
    }

    .level-card__header {
        flex-direction: column;
        gap: 0.35rem;
    }

    .admin-action-grid {
        flex-direction: column;
    }

    .admin-action-grid .btn {
        width: 100%;
    }

    .participant-header,
    .record-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .participant-actions {
        flex-direction: column;
    }

    .record-stats {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .site-header {
        width: calc(100% - 20px);
    }

    .site-main {
        width: calc(100% - 24px);
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 2.6rem);
    }

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

@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid var(--brand-dark);
    }

    .card {
        border: 2px solid var(--text);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
