:root {
    /* Dark Theme Colors */
    --background: #0a0e17;
    --surface: #111827;
    --surface-muted: #1a2332;
    --primary: #00d4aa;
    --primary-dark: #00b894;
    --secondary: #00d4aa;
    --accent: #00d4aa;
    --sand: #1a2332;
    --text: #f8fafc;
    --muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.1);
    --success: #10b981;
    font-size: 16px;

    /* Extended Dark Theme Tokens */
    --bg-deep: #0a0e17;
    --bg-surface: #111827;
    --bg-elevated: #1a2332;
    --bg-card: linear-gradient(145deg, #151d2b 0%, #111827 100%);
    --accent-primary: #00d4aa;
    --accent-primary-glow: rgba(0, 212, 170, 0.2);
    --accent-secondary: #6366f1;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-accent: rgba(0, 212, 170, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(0, 212, 170, 0.1);

    /* Compact Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 16px;

    /* Animation Tokens */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Additional Shadows */
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.35);

    /* Table-specific */
    --table-row-hover: rgba(0, 212, 170, 0.05);
    --table-stripe: rgba(255, 255, 255, 0.02);
}

* {
    box-sizing: border-box;
}

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

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(0, 212, 170, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 110%, rgba(99, 102, 241, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

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

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

a:hover,
a:focus {
    text-decoration: underline;
}

.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;
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--secondary);
}

.logo__powered {
    font-size: 0.5em;
    font-style: italic;
    text-transform: none;
    letter-spacing: normal;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: var(--muted);
    font-weight: 600;
}

.nav-cta {
    color: #fff;
    background: var(--secondary);
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    font-weight: 700;
    transition: background 0.2s ease;
}

.nav-cta--outline {
    color: var(--secondary);
    background: transparent;
    border: 2px solid var(--secondary);
    padding: 0.45rem 1.15rem;
}

.nav-cta:hover,
.nav-cta:focus {
    background: #142037;
    text-decoration: none;
}

.nav-cta--outline:hover,
.nav-cta--outline:focus {
    color: #fff;
    background: var(--secondary);
}

main {
    padding-bottom: 5rem;
}

.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(10, 14, 23, 0.95), rgba(0, 212, 170, 0.15)),
               url('/images/vballmgr_bg.png') center/cover;
    color: var(--text-primary);
    padding: 3rem 0 4rem;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero::before {
    background: radial-gradient(circle at 10% 20%, rgba(247, 184, 1, 0.35), transparent 55%),
        radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.2), transparent 60%);
    mix-blend-mode: screen;
}

.hero::after {
    background-image: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.08) 1px,
            transparent 1px
        ),
        linear-gradient(
            rgba(255, 255, 255, 0.08) 1px,
            transparent 1px
        );
    background-size: 140px 140px;
    opacity: 0.35;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-copy h1 {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
}

.hero-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.hero-points li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.9);
}

.hero-points li::before {
    content: '✔';
    font-weight: 700;
    color: var(--success);
    margin-top: 0.1rem;
}

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

.hero-actions .btn {
    border-radius: 999px;
}

.hero-actions .btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.hero-actions .btn.secondary:hover,
.hero-actions .btn.secondary:focus {
    background: rgba(255, 255, 255, 0.25);
}

.hero-actions .btn.tertiary {
    background: transparent;
    color: #fff;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.hero-actions .btn.tertiary:hover,
.hero-actions .btn.tertiary:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.hero-badges {
    display: grid;
    gap: 1rem;
    margin-top: 2.5rem;
}

.hero-badge {
    display: grid;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.12);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-badge__label {
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

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

.hero-aside {
    display: grid;
    gap: 1.75rem;
    align-content: start;
}

.demo-card {
    background: linear-gradient(135deg, rgba(15, 36, 64, 0.9), rgba(17, 56, 92, 0.85));
    border-radius: 24px;
    padding: 2rem;
    display: grid;
    gap: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 22px 55px rgba(12, 18, 34, 0.35);
    backdrop-filter: blur(12px);
    color: #fff;
}

.demo-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(247, 184, 1, 0.25);
    color: #fff;
}

.badge--demo {
    background: rgba(27, 154, 170, 0.25);
}

.demo-card__meta {
    font-weight: 600;
}

.demo-card__list {
    margin: 0;
    padding-left: 1.15rem;
    display: grid;
    gap: 0.65rem;
    color: rgba(255, 255, 255, 0.85);
}

.demo-card__list li::marker {
    color: var(--primary);
}

.demo-card__cta {
    justify-self: flex-start;
    box-shadow: 0 18px 40px rgba(247, 184, 1, 0.35);
}

.portal-card {
    background: var(--surface);
    color: var(--text);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 30px 60px rgba(18, 24, 40, 0.25);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-login-body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #091725 0%, #132840 55%, #1d3654 100%);
    color: #fff;
}

.dashboard-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.dashboard-login__card {
    max-width: 520px;
    width: 100%;
}

.dashboard-login__intro h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 0.5rem;
}

.dashboard-login__intro p {
    margin: 0;
    color: var(--muted);
}

.dashboard-login__badge {
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.4rem;
}

.portal-tabs {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.tab {
    font-weight: 700;
    color: var(--muted);
}

.tab.active {
    color: var(--secondary);
    position: relative;
}

.tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.8rem;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: var(--primary);
}

.login-form {
    display: grid;
    gap: 1rem;
}

.form-message {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.form-message + .form-message {
    margin-top: 0.75rem;
}

.form-message--success {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.form-message--error {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
}

input,
textarea,
select {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font: inherit;
    background: var(--bg-elevated);
    color: var(--text-primary);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.form-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.form-label {
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--muted);
}

.form-help {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--muted);
}

.remember input {
    width: auto;
}

.link {
    color: var(--primary-dark);
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn.danger {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.35);
}

.btn.danger:hover,
.btn.danger:focus {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(185, 28, 28, 0.45);
    text-decoration: none;
}

.btn.primary {
    background: var(--accent-primary);
    color: var(--bg-deep);
    box-shadow: 0 8px 24px rgba(0, 212, 170, 0.3);
}

.btn.primary:hover,
.btn.primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 212, 170, 0.45);
    text-decoration: none;
}

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

.btn.secondary:hover,
.btn.secondary:focus {
    transform: translateY(-2px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}

.btn.tertiary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn.tertiary:hover,
.btn.tertiary:focus {
    transform: translateY(-1px);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Button active states */
.btn:active {
    transform: translateY(0) !important;
    transition: transform 0.05s ease;
}

.btn.primary:active {
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.25);
}

.btn.secondary:active {
    box-shadow: var(--shadow-sm);
}

.btn.danger:active {
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.25);
}

.alert {
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    font-weight: 700;
    border: 1px solid transparent;
}

.alert--success {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.alert--error {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.portal-footer {
    font-size: 0.95rem;
    color: var(--muted);
}

.section {
    padding: 3rem 0;
}

.section h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: var(--space-lg);
    text-align: center;
    color: var(--text-primary);
}

.section-intro {
    text-align: center;
    color: var(--text-secondary);
    margin: 0 auto var(--space-xl);
    max-width: 640px;
}

.onboarding {
    background: var(--surface);
}

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

.step {
    background: var(--surface-muted);
    border-radius: 20px;
    padding: 2rem;
    display: grid;
    gap: 1rem;
    border: 1px solid rgba(27, 42, 75, 0.08);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--secondary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.1rem;
}

.onboarding-cta {
    margin-top: 3rem;
    background: linear-gradient(135deg, rgba(27, 42, 75, 0.95), rgba(27, 42, 75, 0.85));
    color: #fff;
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.onboarding-cta h3 {
    margin: 0 0 0.5rem;
    font-size: 1.6rem;
}

.highlights {
    background: var(--background);
}

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

.feature-grid article {
    background: var(--surface);
    border-radius: 18px;
    padding: 1.75rem;
    display: grid;
    gap: 0.75rem;
    border: 1px solid rgba(27, 42, 75, 0.08);
    box-shadow: 0 10px 30px rgba(27, 42, 75, 0.06);
}

.icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 123, 84, 0.15);
    font-size: 1.5rem;
}

.contact {
    background: var(--surface);
}

.stats {
    background: var(--surface);
}

.stats-intro {
    text-align: center;
}

.stats-intro h2 {
    margin-bottom: 0.75rem;
}

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

.stats-grid article {
    background: var(--surface-muted);
    border-radius: 18px;
    padding: 1.75rem;
    display: grid;
    gap: 0.75rem;
    border: 1px solid rgba(15, 36, 64, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.stat-number {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--secondary);
}

.stat-label {
    color: var(--muted);
    font-weight: 600;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    align-items: start;
}

.contact-points {
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.contact-points li {
    position: relative;
    padding-left: 1.75rem;
    color: var(--muted);
}

.contact-points li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.5rem;
    color: var(--primary);
    line-height: 1;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.footer {
    background: #0f172a;
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    align-items: start;
}

.footer-copy {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: grid;
    gap: 0.5rem;
    font-weight: 600;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
}

.footer-links a:hover,
.footer-links a:focus {
    color: #fff;
}

.footer-note {
    margin: 0.25rem 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

body.dashboard-body {
    background: var(--background);
}

.dashboard-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-sm) 0;
    position: sticky;
    top: 0;
    z-index: 20;
}

.dashboard-nav {
    margin-top: var(--space-sm);
}

.dashboard-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-nav__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: 999px;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    transition: all 0.2s ease;
}

.dashboard-nav__link:hover {
    color: var(--text-primary);
    background: rgba(0, 212, 170, 0.1);
}

.dashboard-nav__link--active {
    background: var(--accent-primary);
    color: var(--bg-deep);
    box-shadow: 0 8px 24px rgba(0, 212, 170, 0.25);
}

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

.dashboard-branding {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.dashboard-logo {
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.dashboard-active {
    font-weight: 700;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

@media (max-width: 960px) {
    .dashboard-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .dashboard-org-controls {
        flex-wrap: wrap;
    }
}

.dashboard-label {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.dashboard-title {
    margin: 0.25rem 0 0;
    font-size: clamp(1.6rem, 2.5vw, 2.4rem);
}

.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.dashboard-org-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.dashboard-org-switch {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dashboard-org-switch select {
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    padding: 0.4rem 0.65rem;
    font: inherit;
    background: #fff;
}

.dashboard-org-switch button {
    padding: 0.4rem 0.9rem;
}

.dashboard-org-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.dashboard-org-links .btn {
    padding: 0.4rem 0.85rem;
    border-radius: 12px;
}

.dashboard-org-single {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dashboard-org-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 700;
}

.dashboard-org-name {
    font-weight: 700;
}

.dashboard-user {
    font-weight: 600;
    color: var(--muted);
}

.dashboard-user-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.btn-compact {
    padding: 0.45rem 0.95rem;
}

.dashboard-main {
    padding: var(--space-lg) 0 var(--space-2xl);
    position: relative;
    z-index: 1;
}

.module-main {
    padding-top: var(--space-md);
}

.workspace-main {
    padding-top: var(--space-sm);
}

.workspace-level {
    padding: 1.25rem 0 1rem;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.workspace-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.workspace-meta--compact {
    margin-bottom: 0;
}

.workspace-kicker {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--secondary);
}

.workspace-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.workspace-heading h1 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--primary-dark);
}

.workspace-description {
    margin: 0.3rem 0 0;
    color: var(--muted);
}

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

.workspace-actions .btn {
    border-radius: 999px;
}

.dashboard-intro {
    margin-bottom: 1.5rem;
}

.dashboard-module-buttons {
    margin-bottom: 1.5rem;
}

.module-button-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.module-button-group + .module-button-group {
    margin-top: 0.35rem;
}

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

.module-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--secondary);
    font-weight: 700;
    box-shadow: 0 18px 40px -34px rgba(15, 36, 64, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-button:hover,
.module-button:focus {
    transform: translateY(-1px);
    box-shadow: 0 24px 50px -30px rgba(15, 36, 64, 0.55);
    text-decoration: none;
}

.module-button__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(247, 184, 1, 0.18);
    display: grid;
    place-items: center;
    font-size: 0.95rem;
}

.module-button__label {
    white-space: nowrap;
}

@media (max-width: 720px) {
    .module-button-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        margin-inline: -0.5rem;
        padding-inline: 0.5rem;
        scroll-snap-type: x proximity;
    }

    .module-button {
        scroll-snap-align: start;
    }
}

.dashboard-intro h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.dashboard-intro p {
    margin: 0;
    color: var(--muted);
    max-width: 520px;
}

.dashboard-grid {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard-modules {
    margin-top: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.dashboard-modules__header h2 {
    margin: 0 0 0.35rem;
}

.dashboard-modules__header p {
    margin: 0;
    color: var(--muted);
}

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

.module-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    transition: all 0.2s ease;
}

.module-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.module-card__icon {
    font-size: 1.75rem;
}

.module-card__list {
    margin: 0;
    padding-left: var(--space-lg);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.module-card__actions {
    margin-top: auto;
}

.module-card__actions .btn {
    border-radius: 14px;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    transition: all 0.2s ease;
}

.dashboard-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.dashboard-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.dashboard-card header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.dashboard-settings .settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.settings-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.settings-form .form-field--logo {
    gap: 0.75rem;
}

.logo-preview {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-preview__image {
    max-height: 72px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 0.35rem;
    box-shadow: 0 10px 30px -24px rgba(15, 36, 64, 0.6);
}

.logo-preview__remove {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.settings-form input[type='color'] {
    width: 120px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

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

.module-picker__option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 18px 40px -36px rgba(15, 36, 64, 0.4);
    cursor: pointer;
}

.module-picker__option input {
    margin-top: 0.4rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.35rem 1rem;
    margin-top: 0.35rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--secondary);
}

.member-settings-card textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: inherit;
}

.member-settings__existing-file {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.95rem;
    color: var(--secondary);
    margin-top: 0.5rem;
}

.member-settings__existing-file a {
    color: var(--primary-dark);
    font-weight: 700;
}

.member-settings__remove {
    margin-top: 0.35rem;
}

.form-group fieldset {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
}

.form-group legend {
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.85rem;
}

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

.payment-provider {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-muted);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 100%;
}

.payment-provider__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.payment-provider__summary {
    margin: 0;
    color: var(--secondary);
    font-weight: 600;
}

.payment-provider__perks {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.payment-provider__perks li {
    margin: 0.2rem 0;
}

.payment-method-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.payment-method-summary strong {
    color: var(--secondary);
    font-size: 1rem;
}

.payment-test-log {
    margin-top: 1rem;
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    background: var(--surface-muted);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.payment-test-log p {
    margin: 0;
}

.module-picker__content {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.module-picker__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(247, 184, 1, 0.18);
    font-size: 1.2rem;
}

.module-picker__content strong {
    display: block;
    margin-bottom: 0.2rem;
}

.module-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 36, 64, 0.9), rgba(27, 154, 170, 0.85));
    color: #fff;
    box-shadow: 0 30px 60px -45px rgba(15, 36, 64, 0.8);
}

.module-hero .dashboard-label {
    color: rgba(255, 255, 255, 0.8);
}

.module-detail-main {
    padding-top: 2rem;
}

.module-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1.25rem;
}

.module-back-link:hover,
.module-back-link:focus {
    color: var(--primary-dark);
    text-decoration: none;
}

.module-detail__intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.module-detail__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--surface-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.module-detail__list {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
    color: var(--muted);
}

.module-detail__actions {
    margin-top: 1rem;
}

.module-detail__actions .btn {
    border-radius: 16px;
}

.module-detail__info .btn {
    border-radius: 14px;
}

.module-hero h2 {
    margin: 0 0 0.35rem;
    color: #fff;
}

.module-hero p {
    margin: 0;
}

.module-hero__icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    font-size: 2rem;
}

.module-hero__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

.module-stats {
    margin-bottom: 2rem;
}

.module-stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.module-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.module-stat__label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.module-events__hint,
.module-stats__hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.module-event-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.module-event-table {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 18px 40px -36px rgba(15, 36, 64, 0.35);
    overflow: hidden;
}

.module-event-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr 1.1fr 1.1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem 1.25rem;
}

.module-event-grid:not(.module-event-grid--header):nth-of-type(even) {
    background: rgba(15, 36, 64, 0.03);
}

.module-event-grid--header {
    background: rgba(15, 36, 64, 0.06);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: var(--muted);
}

.module-event-grid__cell {
    min-width: 0;
}

.module-event-grid__title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.module-event-grid__meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.module-event-grid__note {
    color: var(--secondary);
}

.module-event-grid__cell--actions {
    justify-self: end;
}

.module-event-grid__cell--actions .btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .module-event-grid,
    .module-event-grid--header {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .module-event-grid {
        border-top: 1px solid var(--border);
    }

    .module-event-grid:first-of-type {
        border-top: none;
    }

    .module-event-grid__cell--actions {
        justify-self: start;
    }
}

.module-event {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.25rem;
    background: var(--surface);
    box-shadow: 0 18px 40px -36px rgba(15, 36, 64, 0.35);
}

.module-event__details {
    flex: 1 1 300px;
}

.module-event__status {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-builder-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-builder-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.event-builder-step {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
}

.event-builder-step--active {
    border-style: solid;
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(15, 36, 64, 0.08);
}

.event-builder-step--complete {
    border-style: solid;
    border-color: #16a34a;
    color: #166534;
    background: rgba(134, 239, 172, 0.25);
}

.event-overview {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    background: var(--surface);
}

.event-overview__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 0;
}

.event-overview__meta dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.event-overview__meta dd {
    margin: 0.15rem 0 0;
    font-size: 1rem;
    font-weight: 700;
}

.event-overview__status {
    margin-top: 0.35rem;
}

.event-builder-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-builder-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.event-builder-form input,
.event-builder-form select,
.event-builder-form textarea {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
}

.event-builder-form textarea {
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.form-choice-group {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    background: var(--surface);
    margin: 1rem 0;
}

.form-choice-group legend {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-choice-option {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-top: 0.75rem;
}

.form-choice-option:first-of-type {
    margin-top: 0;
}

.form-choice-option input[type='radio'] {
    margin-top: 0.4rem;
}

.form-choice-option strong {
    display: block;
    font-size: 1rem;
}

.form-choice-option span {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
}

.form-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.form-group {
    min-width: 0;
}

.event-builder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.event-builder-summary {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-builder-summary ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--secondary);
}

.event-builder-summary li {
    margin: 0.25rem 0;
}

.event-builder-note {
    font-size: 0.9rem;
    color: var(--muted);
}

.module-event__meta {
    margin: 0.35rem 0;
    color: var(--muted);
    font-weight: 600;
}

.module-event__status-pill {
    margin: 0.35rem 0;
}

.module-event__notes {
    margin: 0.25rem 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.module-event__registration {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 700;
}

.module-event__actions {
    margin-top: 0.5rem;
}

.module-event__actions .btn {
    font-size: 0.85rem;
    padding: 0.35rem 0.85rem;
}

.module-events__controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.5rem 0 1rem;
}

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

.module-events__filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.module-events__filters select {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.35rem 0.65rem;
    background: #fff;
}

.module-events__filters label {
    font-weight: 700;
}

.tournament-detail__header {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: space-between;
    align-items: flex-start;
}

.tournament-detail__tabs {
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.tournament-detail__meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
    min-width: 260px;
}

.tournament-detail__meta-grid {
    margin: 0;
}

.tournament-detail__section {
    margin-top: 1.5rem;
}

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

.tournament-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tournament-detail__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tournament-detail__card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    background: var(--surface);
}

.tournament-detail__list {
    margin: 0.35rem 0 0;
    padding-left: 1.15rem;
    color: var(--secondary);
}

.tournament-detail__section-body {
    margin: 0;
    color: var(--muted);
}

.module-guide {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.module-guide__intro p {
    margin: 0.5rem 0 0;
}

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

.module-guide__card h4 {
    margin-top: 0;
    margin-bottom: 0.35rem;
}

.module-guide__card ul {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
    color: var(--muted);
}

.module-guide__card li {
    margin: 0.35rem 0;
}

.module-guide__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.module-guide__cta h4 {
    margin: 0 0 0.25rem;
}

.module-guide__cta p {
    margin: 0;
}

.module-guide__cta .btn {
    border-radius: 999px;
    padding-inline: 1.5rem;
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.settings-actions .btn {
    border-radius: 14px;
}

.dashboard-calendar-preview-card {
    gap: 0.5rem;
}

.dashboard-calendar-preview {
    border: 1px dashed var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    background: var(--surface-muted);
}

.dashboard-calendar-preview__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dashboard-calendar-preview__filter {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: #fff;
    font-weight: 700;
    border: 1px solid var(--border);
}

.dashboard-calendar-preview__filter-icon {
    font-size: 1.1rem;
}

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

.dashboard-calendar-preview__event {
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 0.85rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    box-shadow: 0 18px 35px -30px rgba(15, 36, 64, 0.35);
}

.dashboard-calendar-preview__date {
    font-weight: 800;
    color: var(--secondary);
    min-width: 80px;
}

.dashboard-card--metrics .metric-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.metric__label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.metric__value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
}

.event-list,
.match-list,
.registration-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 1.25rem;
}

.event-item,
.match-item,
.registration-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-link {
    padding: 0.75rem 0;
    border-radius: 0.75rem;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.event-link:hover,
.event-link:focus-visible {
    background: var(--surface-muted);
    box-shadow: 0 0 0 2px var(--surface-muted);
}

.event-meta,
.match-meta,
.registration-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.event-capacity {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.capacity-count {
    font-weight: 600;
}

.capacity-bar {
    width: 100%;
    height: 8px;
    background: var(--surface-muted);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    cursor: help;
}

.capacity-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: inherit;
    transition: width var(--transition-normal);
}

/* Progress bar tooltip on hover */
.capacity-bar::after {
    content: attr(data-percent);
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: var(--bg-deep);
    color: var(--text-primary);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.capacity-bar:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--surface-muted);
    color: var(--secondary);
}

.status-pill--waitlisted {
    background: rgba(252, 165, 165, 0.35);
    color: #7f1d1d;
}

.status-pill--success {
    background: rgba(134, 239, 172, 0.45);
    color: #14532d;
}

.status-pill--draft {
    background: #e5e7eb;
    color: #374151;
}

.status-pill--configured {
    background: rgba(191, 219, 254, 0.7);
    color: #1d4ed8;
}

.status-pill--published {
    background: rgba(134, 239, 172, 0.45);
    color: #14532d;
}

.status-pill--completed {
    background: rgba(216, 180, 254, 0.5);
    color: #5b21b6;
}

.status-pill--warning {
    background: rgba(253, 224, 71, 0.5);
    color: #854d0e;
}

.status-pill--muted {
    background: #e5e7eb;
    color: #6b7280;
}

.status-pill--danger {
    background: rgba(252, 165, 165, 0.5);
    color: #991b1b;
}

.member-directory-hero {
    grid-template-columns: auto 1fr auto;
}

.member-hero__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    text-align: center;
}

.member-hero__stats span {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.75);
}

.member-hero__stats strong {
    display: block;
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.member-list-card {
    margin-top: 2rem;
}

.member-table-wrapper {
    overflow-x: auto;
}

.member-table {
    width: 100%;
    border-collapse: collapse;
}

.member-table th,
.member-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.member-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.member-table td[data-title] {
    white-space: normal;
}

.member-name-link {
    font-weight: 700;
    color: var(--secondary);
}

.member-name-link:hover,
.member-name-link:focus {
    color: var(--primary-dark);
    text-decoration: none;
}

.member-detail-card h2 {
    margin-bottom: 0.5rem;
}

.member-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.member-detail__since {
    font-weight: 600;
    color: var(--muted);
}

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

.member-detail__label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.member-detail__address {
    grid-column: span 2;
}

.member-detail-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
    .member-table thead {
        display: none;
    }

    .member-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        padding: 0.75rem 0;
    }

    .member-table td {
        border: 0;
        padding: 0.25rem 0;
    }

    .member-table td[data-title]::before {
        content: attr(data-title);
        display: block;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--muted);
    }

    .member-detail__address {
        grid-column: span 1;
    }
}

.match-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.match-vs {
    font-weight: 700;
    color: var(--primary-dark);
}

.registration-email {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
}

.empty-state {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 680px) {
    .form-meta {
        justify-content: flex-start;
    }

    .hero {
        padding: 3.5rem 0 4.5rem;
    }

    .portal-card {
        padding: 1.5rem;
    }

    .demo-card {
        order: -1;
    }

    .onboarding-cta {
        text-align: center;
    }

    .footer-grid {
        text-align: center;
    }
}

@media (max-width: 860px) {
    .dashboard-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-actions {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-nav ul {
        justify-content: flex-start;
    }

    .module-hero {
        grid-template-columns: 1fr;
    }

    .module-hero__actions {
        align-items: flex-start;
        width: 100%;
    }

    .module-event {
        flex-direction: column;
    }

    .module-event__status {
        flex: 1 1 auto;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .dashboard-card {
        padding: 1.5rem;
    }
}
/* Signup flow */
.signup-body {
    background: linear-gradient(180deg, rgba(15, 36, 64, 0.06), transparent 35%) var(--background);
}

.signup-main {
    padding: 4rem 0 5rem;
}

.signup-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.signup-heading .pill {
    margin-bottom: 1.5rem;
}

.signup-heading h1 {
    margin-bottom: 0.75rem;
}

.signup-progress {
    display: flex;
    gap: 1rem;
    padding: 0;
    margin: 2rem 0 2.5rem;
    list-style: none;
}

.progress-step {
    flex: 1;
    display: grid;
    gap: 0.35rem;
    background: rgba(17, 34, 56, 0.06);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--muted);
}

.progress-step .step-count {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 0 auto;
    border-radius: 12px;
    background: rgba(27, 154, 170, 0.15);
    color: var(--secondary);
    font-weight: 800;
}

.progress-step.active {
    background: rgba(27, 154, 170, 0.12);
    color: var(--secondary);
}

.progress-step.active .step-count {
    background: var(--accent);
    color: #fff;
}

.progress-step.complete {
    background: rgba(71, 181, 133, 0.16);
    color: var(--secondary);
}

.progress-step.complete .step-count {
    background: var(--success);
    color: #fff;
}

.signup-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 45px rgba(17, 34, 56, 0.08);
    display: grid;
    gap: 1.5rem;
}

.card-header h2 {
    margin: 0 0 0.5rem;
}

.card-header p {
    margin: 0;
    color: var(--muted);
}

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

.field-grid label {
    display: grid;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--secondary);
}

.field-grid input {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    font: inherit;
    background: #f8f9ff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.field-grid input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(27, 154, 170, 0.15);
}

.card-footer {
    display: grid;
    gap: 0.75rem;
}

.form-error {
    margin: 0;
    color: #d7263d;
    font-weight: 600;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.form-actions .btn {
    flex: 0 0 auto;
}

.form-helper {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.verification-actions {
    display: grid;
    gap: 0.75rem;
}

.verification-status {
    margin: 0;
    font-weight: 600;
    color: var(--secondary);
}

.verification-status.error {
    color: #d7263d;
}

.verification-hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.verification-form {
    display: grid;
    gap: 1rem;
}

.verification-form label {
    display: grid;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--secondary);
}

.verification-form input {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    font: inherit;
    letter-spacing: 0.35em;
    text-align: center;
    text-transform: uppercase;
}

.account-summary {
    background: rgba(15, 36, 64, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
}

.account-summary h3 {
    margin: 0;
}

.account-summary dl {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.account-summary div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    color: var(--secondary);
}

.account-summary dt {
    margin: 0;
}

.account-summary dd {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}

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

.plan-card {
    background: #fffdf7;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: inset 0 0 0 1px rgba(17, 34, 56, 0.08);
    display: grid;
    gap: 1.25rem;
}

.plan-card header {
    display: grid;
    gap: 0.5rem;
}

.plan-price {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.plan-price span {
    font-size: 2.25rem;
}

.plan-card ul {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.5rem;
    color: var(--secondary);
}

.plan-card ul li::marker {
    color: var(--accent);
    font-weight: 700;
}

.plan-card.selected {
    box-shadow: inset 0 0 0 2px var(--secondary), 0 18px 38px rgba(17, 34, 56, 0.18);
}

.plan-tag {
    margin: 0;
    font-weight: 700;
    color: var(--accent);
}

.plan-actions {
    display: grid;
    gap: 1rem;
}

.plan-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.plan-buttons .btn {
    flex: 0 0 auto;
}

.form-success {
    margin: 0;
    color: var(--success);
    font-weight: 600;
}

.plan-featured {
    background: #fff4d9;
    box-shadow: inset 0 0 0 2px rgba(241, 135, 1, 0.45), 0 18px 38px rgba(241, 135, 1, 0.25);
}

.signup-aside {
    display: grid;
    gap: 1.5rem;
}

.benefits-list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.75rem;
}

.benefits-list li strong {
    color: var(--accent-primary);
}

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

    .signup-progress {
        flex-direction: column;
    }

    .progress-step {
        text-align: left;
        padding: 0.85rem 1rem;
    }

    .progress-step .step-count {
        margin: 0;
        justify-self: flex-start;
    }
}

@media (max-width: 640px) {
    .signup-main {
        padding: 2.5rem 0 4rem;
    }

    .signup-card {
        padding: 1.5rem;
    }

    .form-actions,
    .plan-buttons {
        flex-direction: column;
        align-items: stretch;
    }

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


/* Member portal */
.member-body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.member-header {
    background: var(--member-accent, #0f2440);
    color: #fff;
    padding: 2rem 0;
}

.member-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.member-container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

.member-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.member-logo {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
}

.member-logo--fallback {
    border: 2px solid rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

.member-tagline {
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.8;
}

.member-header h1 {
    margin: 0.15rem 0 0;
    font-size: 1.75rem;
}

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

.member-welcome {
    font-weight: 600;
}

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

.member-nav__link {
    color: #fff;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.member-nav__link.is-active,
.member-nav__link:hover,
.member-nav__link:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.member-main {
    flex: 1;
    padding: 2rem 0 3rem;
}

.member-footer {
    background: #0f2440;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
}

.member-footer a {
    color: #fff;
    text-decoration: underline;
}

.member-alert {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.member-alert--success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.member-alert--error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.member-alert--info {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-secondary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

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

.member-grid--auth .member-card {
    min-height: 100%;
}

.member-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
}

.member-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.member-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.member-form label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.member-form input[type="text"],
.member-form input[type="email"],
.member-form input[type="password"],
.member-form input[type="tel"],
.member-form input[type="number"],
.member-form input[type="date"],
.member-form input[type="url"],
.member-form select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 1rem;
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.member-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.member-form--inline {
    gap: 0.5rem;
}

.member-link {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: underline;
}

.member-waiver {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.member-card--status {
    border-top: 4px solid var(--member-accent, #0f2440);
}

.member-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.member-checklist li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    padding: 1rem;
    background: #fff;
}

.member-checklist li.is-complete {
    border-color: rgba(71, 181, 133, 0.6);
    background: rgba(71, 181, 133, 0.08);
}

.member-task__status {
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
}

.member-task__action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workflow-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    align-items: start;
}

.workflow-trail {
    display: grid;
    gap: 0.5rem;
}

.workflow-trail__step {
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px dashed var(--border);
    background: #fff;
    font-weight: 700;
    color: var(--secondary);
}

.workflow-trail__step.is-active {
    border-color: rgba(26, 95, 216, 0.55);
    background: rgba(26, 95, 216, 0.08);
}

.workflow-trail__step.is-complete {
    border-color: rgba(71, 181, 133, 0.6);
}

.workflow-trail__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.workflow-checklists {
    display: grid;
    gap: 1rem;
}

.workflow-checklist {
    border: 1px solid var(--ds-border);
    border-radius: 1rem;
    padding: 1rem;
    background: var(--ds-bg-surface);
    color: var(--ds-text);
    list-style: none;
    margin: 0;
}

.workflow-checklist li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--ds-border);
    color: var(--ds-text);
}

.workflow-checklist li:last-child {
    border-bottom: none;
}

.workflow-checklist li.done {
    color: var(--ds-text-muted);
    text-decoration: line-through;
}

.workflow-checklist__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.member-card--waiver {
    border-left: 4px solid #f18701;
}

.member-card--dues {
    border-left: 4px solid #1b9aaa;
}

.member-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.member-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eef2fb;
}

.member-empty {
    margin: 0;
    color: #6b7280;
}

.member-events {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.member-event {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid #eef2fb;
    padding-top: 1.25rem;
}

.member-event:first-child {
    border-top: none;
    padding-top: 0;
}

.member-event__meta {
    margin: 0.25rem 0;
    color: #4b5563;
}

.member-main .btn.primary {
    background: var(--accent-primary);
    color: var(--bg-deep);
}

.member-main .btn.secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.news-form textarea,
.news-admin-edit textarea {
    min-height: 140px;
}

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

.news-admin-card {
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 18px 40px -30px rgba(15, 36, 64, 0.2);
}

.news-admin-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.news-admin-card__delete {
    margin: 0;
}

.news-admin-body {
    line-height: 1.6;
    margin: 0.5rem 0 1rem;
}

.news-admin-body a {
    color: var(--primary);
    text-decoration: underline;
}

.news-admin-edit summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
    .member-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .member-event {
        flex-direction: column;
    }
}

.schedule-preview {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.schedule-preview__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.95rem;
    color: #334155;
}

.schedule-preview__swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.schedule-preview__swatch--available {
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.4);
}

.schedule-preview__swatch--reserved {
    background: rgba(234, 88, 12, 0.6);
    border: 1px solid rgba(194, 65, 12, 0.8);
}

.schedule-week {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 20px 40px -32px rgba(15, 36, 64, 0.2);
}

.schedule-week__header {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f172a;
}

.schedule-week__grid {
    display: grid;
    grid-template-columns: 72px repeat(7, 1fr);
    grid-template-rows: auto var(--timeline-height);
    gap: 0.75rem 0.5rem;
    align-items: start;
}

.schedule-week__corner {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.schedule-week__day-label {
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
}

.schedule-week__times {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    position: relative;
    height: var(--timeline-height);
    padding-right: 0.5rem;
}

.schedule-week__time {
    position: absolute;
    left: 0;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #64748b;
}

.schedule-week__day {
    grid-row: 2 / 3;
}

.schedule-week__timeline {
    position: relative;
    height: var(--timeline-height);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.schedule-week__timeline::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to bottom, rgba(148, 163, 184, 0.25) 1px, transparent 1px);
    background-size: 100% 30px;
    pointer-events: none;
}

.schedule-week__block {
    position: absolute;
    left: 6px;
    right: 6px;
    border-radius: 8px;
    z-index: 1;
}

.schedule-week__block--available {
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.35);
}

.schedule-week__block--reserved {
    background: rgba(234, 88, 12, 0.7);
    border: 1px solid rgba(194, 65, 12, 0.9);
}

.schedule-preview__actions {
    display: flex;
    justify-content: flex-end;
}

.schedule-preview__output textarea {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    font-family: "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    min-height: 140px;
}

.schedule-designer__timeline {
    cursor: crosshair;
}

.schedule-designer__block {
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff7ed;
    text-align: center;
}

.schedule-designer__block:active {
    cursor: grabbing;
}

.schedule-designer__label {
    z-index: 2;
    padding: 0 8px;
}

.schedule-designer__handle {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 4px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    cursor: ns-resize;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.schedule-designer__block--resize .schedule-designer__handle {
    opacity: 1;
    pointer-events: auto;
}

.schedule-designer__menu {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    gap: 0.35rem;
    padding: 0.5rem;
    background: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 32px -20px rgba(15, 36, 64, 0.4);
    z-index: 4;
}

.schedule-designer__menu button {
    background: transparent;
    border: 0;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    padding: 0.25rem 0.35rem;
}

.schedule-designer__menu button:hover {
    background: #f1f5f9;
    border-radius: 0.35rem;
}

@media (max-width: 900px) {
    .schedule-week__grid {
        grid-template-columns: 56px repeat(7, minmax(90px, 1fr));
        gap: 0.5rem 0.25rem;
    }

    .schedule-week__day-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    .schedule-week {
        padding: 1rem;
    }

    .schedule-week__grid {
        grid-template-columns: 48px repeat(7, minmax(80px, 1fr));
        overflow-x: auto;
    }
}

/* ============================================
   EMPTY STATE COMPONENT
   Reusable component for empty data states
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    background: var(--bg-elevated);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    min-height: 180px;
}

.empty-state__icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
    opacity: 0.4;
    color: var(--text-muted);
}

.empty-state__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm);
}

.empty-state__description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 var(--space-lg);
    max-width: 320px;
    line-height: 1.5;
}

.empty-state__action {
    margin-top: var(--space-md);
}

/* Compact variant for inline empty states */
.empty-state--compact {
    padding: var(--space-lg);
    min-height: auto;
}

.empty-state--compact .empty-state__icon {
    font-size: 1.75rem;
    margin-bottom: var(--space-md);
}

.empty-state--compact .empty-state__title {
    font-size: 0.95rem;
}

.empty-state--compact .empty-state__description {
    font-size: 0.85rem;
}

/* ============================================
   GLOBAL TABLE ENHANCEMENTS
   Zebra striping and improved styling
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    color: var(--text-muted);
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: var(--space-md) var(--space-lg);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--table-row-hover);
}

/* Zebra striping */
.data-table--striped tbody tr:nth-child(even) {
    background: var(--table-stripe);
}

.data-table--striped tbody tr:nth-child(even):hover {
    background: var(--table-row-hover);
}

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

/* ==========================================================================
   Accessibility Styles
   ========================================================================== */

/* Skip Link - Hidden until focused */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary, #00d4aa);
    color: var(--bg-deep, #0a0e17);
    padding: var(--space-sm, 0.5rem) var(--space-lg, 1rem);
    border-radius: var(--radius-md, 10px);
    font-weight: 600;
    z-index: 10000;
    text-decoration: none;
    transition: top var(--transition-fast, 0.15s ease);
}

.skip-link:focus {
    top: var(--space-sm, 0.5rem);
    outline: 3px solid var(--accent-primary, #00d4aa);
    outline-offset: 2px;
    text-decoration: none;
}

/* Focus Indicators - Enhanced visibility */
:focus-visible {
    outline: 3px solid var(--accent-primary, #00d4aa);
    outline-offset: 2px;
}

/* Remove default outline, use focus-visible instead */
:focus:not(:focus-visible) {
    outline: none;
}

/* Button focus states */
.btn:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-primary, #00d4aa);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.25);
}

/* Form input focus states */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent-primary, #00d4aa);
    outline-offset: 0;
    border-color: var(--accent-primary, #00d4aa);
}

/* Link focus states */
a:focus-visible {
    outline: 3px solid var(--accent-primary, #00d4aa);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Table header accessibility */
.data-table th[scope] {
    text-align: left;
}

/* Status indicators - non-color dependent */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs, 0.25rem);
}

.status-indicator::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator--available::before {
    background: var(--success, #10b981);
}

.status-indicator--full::before {
    background: var(--accent-danger, #ef4444);
}

.status-indicator--warning::before {
    background: var(--accent-warning, #f59e0b);
}

/* Screen reader only content */
.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;
}

/* Visually hidden but focusable */
.sr-only-focusable:focus,
.sr-only-focusable:active {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: rgba(255, 255, 255, 0.5);
    }

    .btn,
    button {
        border: 2px solid currentColor;
    }
}

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

/* Main content landmark */
#main-content:target {
    scroll-margin-top: var(--space-xl, 1.5rem);
}
