/* ============================================================================
   REGISTRATION SCREEN
   ============================================================================ */

/* Two-column grid for registration form on desktop */
.register-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 600px) {
    .register-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0 var(--space-4);
    }

    #registerScreen .login-container {
        max-width: 44rem;
    }
}

.register-invite-info {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.invite-badge {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-3xl);
    font-size: 0.85rem;
    font-weight: 600;
}

.invite-school {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-3xl);
    font-size: 0.85rem;
    background: var(--raise-3);
    color: var(--card-text);
}

.register-divider {
    display: flex;
    align-items: center;
    margin: var(--space-5) 0;
    gap: var(--space-4);
}

.register-divider::before,
.register-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.register-divider span {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Secondary sign-in / sign-up actions (coach login) */
.login-alt-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-3-5);
}

.login-alt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2-5) var(--space-4);
    /* Joins the Google/QR pill family on the always-white login card: white
       pill + fixed hairline (theme tokens flip and vanish on this card). */
    background: var(--surface-always-white); /* tokens-allow: always-white login card */
    color: var(--charcoal);
    border: 1px solid rgba(0, 0, 0, 0.15); /* tokens-allow: fixed hairline on always-white card */
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--motion-fast), background var(--motion-fast), color var(--motion-fast);
}

.login-alt-btn svg {
    flex-shrink: 0;
    color: var(--brand-ink);
}

.login-alt-btn:hover,
.login-alt-btn.active {
    border-color: var(--primary-color);
    background: rgba(var(--gsx-brand-rgb), 0.08);
    color: var(--brand-ink);
}

[data-theme="dark"] .login-alt-btn {
    /* Card is white in dark mode too — keep the same white pill; the theme's
       --raise-1/--border-color would render a dark blob / invisible border. */
    background: var(--surface-always-white); /* tokens-allow: always-white login card */
    color: var(--charcoal);
    border-color: rgba(0, 0, 0, 0.15); /* tokens-allow: fixed hairline on always-white card */
}

/* Google Sign-In Button */
.google-signin-wrapper {
    text-align: center;
}

.google-btn-container {
    display: flex;
    justify-content: center;
    min-height: 44px;
    align-items: center;
    width: 100%;
}

/* Center Google's rendered iframe button without forcing its width (forcing
   100% distorted the layout and pushed the "G" to the edge). */
.google-btn-container>div {
    display: flex !important;
    justify-content: center !important;
    max-width: 100%;
    margin: 0 auto;
}

.google-btn-container iframe {
    border-radius: 20px !important;
    color-scheme: auto;
}

.register-login-link {
    text-align: center;
    margin-top: var(--space-4);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.register-login-link a {
    color: var(--brand-ink);
    text-decoration: none;
    font-weight: 500;
}

.register-login-link a:hover {
    text-decoration: underline;
}

/* ============================================================================
   DATA TABLE RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .invite-form .form-row {
        grid-template-columns: 1fr;
    }

    .invite-tabs {
        flex-direction: column;
    }

    .invite-tab:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .data-table {
        font-size: 0.8rem;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: var(--space-2);
    }
}

/* ============================================================================
   SCHOOL PAGE
   ============================================================================ */

/* School Hero Card */
.school-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    padding: var(--space-7) var(--space-8);
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    margin-bottom: var(--space-6);
    position: relative;
    overflow: hidden;
}

.school-hero-left {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    flex: 0 1 auto;
    min-width: 0;
}

/* School color accent stripe on hero */
.school-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--school-primary, var(--primary-color)), var(--school-secondary, var(--primary-dark)));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.school-hero-logo {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.school-hero-logo img {
    max-width: 90px;
    max-height: 90px;
    border-radius: var(--radius-md);
    background: var(--raise-2);
    padding: var(--space-1);
}

.school-hero-fallback {
    font-size: 3rem;
    opacity: 0.5;
}

.school-hero-info {
    flex: 1;
    min-width: 200px;
}

.school-hero-info h1 {
    margin: 0 0 var(--space-1-5) 0;
    font-size: 1.6rem;
    color: var(--card-text);
    font-weight: 700;
}

.school-hero-details {
    display: flex;
    gap: var(--space-5);
    flex-wrap: wrap;
}

.school-hero-detail {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-1-5);
}

.hero-mascot-logo {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-xs);
    vertical-align: middle;
    flex-shrink: 0;
}

.school-hero-detail:empty {
    display: none;
}

/* Hero Stats */
.school-hero-stats {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1 1 auto;
}

/* School year selector */
.school-year-selector {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    margin-bottom: var(--space-2);
    justify-content: center;
}

.school-year-selector label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.school-year-selector select {
    background: var(--scrim-soft);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2-5);
    font-size: 0.85rem;
    cursor: pointer;
}

[data-theme="light"] .school-year-selector select {
    background: var(--gsx-input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.stat-card {
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    text-align: center;
    min-width: 70px;
    border-top: 2px solid var(--school-primary, var(--primary-color));
}

.stat-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--school-primary, var(--primary-color));
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: var(--space-0-5);
}

/* School Tabs */
.school-tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--space-6);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.school-tab {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--motion-base) var(--ease-standard);
    white-space: nowrap;
}

.school-tab:not(:last-child) {
    border-right: 1px solid var(--border-subtle);
}

.school-tab:hover {
    background: var(--raise-3);
    color: var(--card-text);
}

.school-tab.active {
    background: var(--school-primary-bg, rgba(var(--gsx-brand-rgb), 0.12));
    color: var(--school-primary, var(--primary-color));
    font-weight: 600;
}

/* School Tab Content */
.school-tab-content {
    display: none;
}

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

/* Dark-themed form inputs for all non-login screens with settings cards/sections */
.settings-card .settings-section-body input,
.settings-card .settings-section-body select,
.settings-card .settings-section-body textarea,
.settings-section .settings-section-body input,
.settings-section .settings-section-body select,
.settings-section .settings-section-body textarea {
    width: 100%;
    padding: var(--space-2-5) var(--space-3);
    background: var(--gsx-input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--card-text);
    font-size: 0.9rem;
    color-scheme: dark;
    transition: border-color var(--motion-base), background-color var(--motion-base);
    box-sizing: border-box;
}

.settings-card .settings-section-body input:hover,
.settings-card .settings-section-body select:hover,
.settings-card .settings-section-body textarea:hover,
.settings-section .settings-section-body input:hover,
.settings-section .settings-section-body select:hover,
.settings-section .settings-section-body textarea:hover {
    border-color: var(--border-medium);
    background-color: var(--gsx-input-bg);
}

.settings-card .settings-section-body input:focus,
.settings-card .settings-section-body select:focus,
.settings-card .settings-section-body textarea:focus,
.settings-section .settings-section-body input:focus,
.settings-section .settings-section-body select:focus,
.settings-section .settings-section-body textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--gsx-brand-rgb), 0.12);
}

.settings-card .settings-section-body select,
.settings-section .settings-section-body select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: var(--space-8);
}

.settings-card .settings-section-body select option,
.settings-section .settings-section-body select option {
    background: var(--charcoal-light);
    color: var(--card-text);
    padding: var(--space-1-5);
}

.settings-card .settings-section-body textarea,
.settings-section .settings-section-body textarea {
    resize: vertical;
    font-family: inherit;
    min-height: 80px;
}

.settings-card .settings-section-body label,
.settings-section .settings-section-body label {
    display: block;
    font-size: 0.85rem;
    color: var(--card-text);
    margin-bottom: var(--space-1-5);
    font-weight: 500;
}

.settings-card .settings-section-body label .required,
.settings-section .settings-section-body label .required {
    color: var(--double-ink);
}

.settings-card .settings-section-body .form-group,
.settings-section .settings-section-body .form-group {
    margin-bottom: var(--space-3);
}

.settings-card .settings-section-body .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-2);
}

.settings-card .settings-section-body .form-row.form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: var(--space-1);
    font-weight: 400;
}

/* ── Platform Settings ── */
.smtp-status-banner {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2-5) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: var(--space-4);
}

.smtp-configured {
    background: rgba(var(--gsx-success-rgb), 0.12);
    border: 1px solid rgba(var(--gsx-success-rgb), 0.3);
    color: var(--birdie-ink);
}

.smtp-not-configured {
    background: rgba(var(--gsx-danger-rgb), 0.12);
    border: 1px solid rgba(var(--gsx-danger-rgb), 0.3);
    color: var(--double-ink);
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: var(--space-10) !important;
}

.password-input-wrapper input[type="text"],
.password-input-wrapper input[type="password"] {
    color: var(--card-text) !important;
    -webkit-text-security: none;
}

.password-toggle-btn {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: var(--space-1);
    display: flex;
    align-items: center;
}

.password-toggle-btn:hover {
    color: var(--text-primary);
}

.platform-settings-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
}

.platform-settings-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-weight: 400 !important;
}

.toggle-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.spinner-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-strong);
    border-top-color: var(--gsx-on-brand);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Staff Cards */
.staff-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-3);
}

.staff-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: border-color var(--motion-base), box-shadow var(--motion-base);
}

.staff-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

img.staff-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--primary-color);
}

div.staff-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(var(--gsx-brand-rgb), 0.15);
    color: var(--brand-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 2px solid rgba(var(--gsx-brand-rgb), 0.3);
}

.staff-card-info {
    flex: 1;
    min-width: 0;
}

.staff-card-name {
    font-weight: 700;
    color: var(--card-text);
    font-size: 0.95rem;
    line-height: 1.3;
}

.staff-card .role-badge {
    display: inline-block;
    margin-top: var(--space-0-5);
    font-size: 0.68rem;
}

.staff-card-contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-0-5);
    margin-top: var(--space-1);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.staff-card-contact span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-card-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
    opacity: 0.7;
}

.staff-card-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding-left: var(--space-2);
}

.staff-card-actions .btn-sm {
    font-size: 0.78rem;
    padding: 0 var(--space-2-5);
    white-space: nowrap;
}

.google-badge {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    background: rgba(66, 133, 244, 0.2); /* tokens-allow: Google brand blue wash */
    color: #4285F4; /* tokens-allow: Google brand blue */
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
    margin-left: var(--space-1);
}

/* ── Page Back Header & Title Block ── */
.page-back-header {
    margin-bottom: var(--space-3);
}

.btn-back {
    min-height: 0;
    background: none;
    border: none;
    color: var(--brand-ink);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: var(--space-1-5) 0;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.btn-back:hover {
    text-decoration: underline;
}

.page-title-block {
    margin-bottom: var(--space-6);
}

.page-title-block h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 var(--space-1-5);
}

h2.page-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-subtle);
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.empty-state-card {
    text-align: center;
    padding: var(--space-10) var(--space-6);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    color: var(--text-muted);
}

/* ── Data Table System (Activation Codes) ── */
.dt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

.dt-toolbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.dt-toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-1-5);
    flex-wrap: wrap;
}

.dt-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.dt-search-wrap svg {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    pointer-events: none;
}

.dt-search {
    padding: var(--space-2) var(--space-3) var(--space-2) var(--space-8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.82rem;
    width: 220px;
    outline: none;
    transition: border-color var(--motion-base);
}

.dt-search:focus {
    border-color: var(--primary-color);
}

.dt-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.dt-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    white-space: nowrap;
}

.dt-btn svg {
    flex-shrink: 0;
}

/* Filter pills */
.dt-filters {
    gap: var(--space-1) !important;
}

.dt-filter-btn {
    padding: var(--space-1) var(--space-2-5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--motion-base);
    white-space: nowrap;
}

.dt-filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.dt-filter-btn.dt-filter-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--gsx-on-brand);
    font-weight: 600;
}

/* Table */
.dt-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
}

.dt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.dt-table thead th {
    padding: var(--space-2-5) var(--space-3-5);
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    user-select: none;
}

.dt-sortable {
    cursor: pointer;
    transition: color var(--motion-base);
}

.dt-sortable:hover {
    color: var(--brand-ink);
}

.dt-sortable svg {
    display: inline-block;
    vertical-align: middle;
    margin-left: var(--space-1);
}

.dt-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--motion-fast);
}

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

.dt-table tbody tr:hover {
    background: rgba(var(--gsx-brand-rgb), 0.04);
}

.dt-table td {
    padding: var(--space-2-5) var(--space-3-5);
    vertical-align: middle;
}

.dt-name {
    font-weight: 600;
    white-space: nowrap;
}

.dt-empty {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-8) !important;
    font-style: italic;
}

.dt-actions {
    white-space: nowrap;
}

/* Inline action buttons (icon-only in table rows) */
.dt-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--motion-base);
    margin-right: var(--space-1);
}

.dt-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--brand-ink);
    background: rgba(var(--gsx-brand-rgb), 0.08);
}

.dt-action-btn.dt-action-danger:hover {
    border-color: var(--danger);
    color: var(--danger-ink);
    background: rgba(var(--gsx-danger-rgb), 0.08);
}

.dt-action-btn.dt-action-warn {
    color: var(--bogey-ink);
}

.dt-action-btn.dt-action-warn:hover {
    border-color: var(--bogey);
    color: var(--bogey-ink);
    background: rgba(var(--gsx-warning-rgb), 0.12);
}

.dt-action-btn.dt-action-success {
    color: var(--birdie-ink);
}

.dt-action-btn.dt-action-success:hover {
    border-color: var(--birdie);
    color: var(--birdie-ink);
    background: rgba(var(--gsx-success-rgb), 0.12);
}

/* Code value (shared) */
.code-value {
    background: var(--surface-sunken);
    padding: var(--space-0-5) var(--space-2);
    border-radius: var(--radius-xs);
    letter-spacing: 1.8px;
    font-weight: 700;
    font-size: 0.82rem;
    user-select: all;
    color: var(--brand-ink);
}

/* Inline code + action buttons */
.code-inline {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.code-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--motion-base);
    padding: 0;
    flex-shrink: 0;
}

.code-action-btn svg {
    width: 12px;
    height: 12px;
}

.code-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--brand-ink);
    background: rgba(var(--gsx-brand-rgb), 0.08);
}

.code-action-btn.code-action-reset:hover {
    border-color: var(--warning);
    color: var(--warning-ink);
    background: rgba(var(--gsx-warning-rgb), 0.08);
}

.code-action-btn.code-action-deactivate {
    color: var(--bogey-ink);
}

.code-action-btn.code-action-deactivate:hover {
    border-color: var(--bogey);
    color: var(--bogey-ink);
    background: rgba(var(--gsx-warning-rgb), 0.12);
}

.code-action-btn.code-action-activate {
    color: var(--birdie-ink);
}

.code-action-btn.code-action-activate:hover {
    border-color: var(--birdie);
    color: var(--birdie-ink);
    background: rgba(var(--gsx-success-rgb), 0.12);
}

/* Gender tags */
.gender-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-xs);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.gender-B {
    color: var(--info-ink);
    background: var(--info-wash);
}

.gender-G {
    color: #e040fb; /* tokens-allow: gender-G custom purple-pink — no platform token; would need --gender-g */
    background: rgba(224, 64, 251, 0.12); /* tokens-allow: gender-G wash — no platform token */
}

/* Narrow & center columns */
.dt-col-narrow {
    width: 42px;
}

.dt-center {
    text-align: center;
}

/* Filter dropdown multi-checkbox */
.dt-filter-dropdown {
    position: relative;
    display: inline-flex;
}

.dt-filter-drop-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: var(--z-sticky-bar);
    min-width: 130px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2) var(--space-1-5);
    margin-top: var(--space-1);
}

.dt-filter-drop-panel.open {
    display: block;
}

.dt-filter-check {
    display: flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-primary);
    transition: background var(--motion-fast);
}

.dt-filter-check:hover {
    background: var(--bg-hover);
}

.dt-filter-check input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.dt-filter-clear {
    display: block;
    width: 100%;
    background: none;
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-1);
    padding: var(--space-1) var(--space-2) var(--space-0-5);
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
}

.dt-filter-clear:hover {
    color: var(--brand-ink);
}

/* =====================================================
   Activation Codes — Card List (mobile) + Detail View
   ===================================================== */

/* Hide card list on desktop, hide tables on mobile */
.ac-card-list {
    display: none;
}

.ac-desktop-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.ac-desktop-only {
    display: inline-flex;
}

@media (max-width: 768px) {
    .ac-card-list {
        display: block;
    }

    .ac-desktop-tables {
        display: none !important;
    }

    .ac-desktop-only {
        display: none !important;
    }

    .ac-toolbar-actions {
        flex-wrap: wrap;
    }

    .ac-toolbar-actions .dt-btn {
        font-size: 0.72rem;
        padding: var(--space-1) var(--space-2);
    }

    .dt-toolbar {
        flex-direction: column;
        gap: var(--space-2);
    }

    .dt-toolbar-left {
        width: 100%;
    }

    .dt-toolbar-right {
        width: 100%;
        justify-content: flex-start;
    }

    .dt-search {
        width: 100%;
    }

    .dt-count {
        font-size: 0.72rem;
    }
}

/* When only one group, span full width */
.ac-desktop-tables .ac-group:only-child {
    grid-column: 1 / -1;
}

/* Group label */
.ac-group-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: var(--space-1-5);
    padding-left: var(--space-1);
}

.ac-group-count {
    font-weight: 400;
    font-size: 0.75rem;
}

/* Simplified table codes */
.ac-simple-table td {
    cursor: pointer;
}

.ac-table-code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    color: var(--text-primary);
    user-select: all;
}

/* Masked activation codes — click to reveal */
.ac-masked {
    cursor: pointer;
    color: var(--text-muted, #888);
    letter-spacing: 2px;
    user-select: none;
    transition: color var(--motion-fast);
}

.ac-masked:hover {
    color: var(--brand-ink);
}

/* Batch action bar */
.ac-batch-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2-5) var(--space-4);
    margin-bottom: var(--space-3);
    background: rgba(var(--gsx-brand-rgb), 0.1);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
}

.ac-batch-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-ink);
    margin-right: auto;
}

/* Card list */
.ac-select-all {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
}

.ac-check-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
}

.ac-check-label input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.ac-empty {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-muted);
    font-style: italic;
}

.ac-card {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    transition: background var(--motion-fast);
}

.ac-card:first-of-type {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-top: 1px solid var(--border-subtle);
}

.ac-card:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.ac-card:only-of-type {
    border-radius: var(--radius-lg);
}

.ac-card-selected {
    background: rgba(var(--gsx-brand-rgb), 0.08);
}

.ac-card:active {
    background: rgba(var(--gsx-brand-rgb), 0.12);
}

.ac-card-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.ac-card-check input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ac-card-body {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.ac-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

.ac-card-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-card-tags {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-shrink: 0;
}

.ac-card-grade {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.ac-card-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-1);
}

.ac-card-code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-muted);
    background: var(--surface-sunken);
    padding: 0 var(--space-1-5);
    border-radius: var(--radius-xs);
}

.ac-card-arrow {
    flex-shrink: 0;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 var(--space-1);
    line-height: 1;
}

/* Status chips (used in cards and detail) */
/* .ac-chip / .ac-status-* removed — activation-status chips now use the
   canonical .gsx-pill (success/danger/warning) primitive (W4 unification). */

/* Selected row highlight (desktop table) */
.ac-row-selected {
    background: rgba(var(--gsx-brand-rgb), 0.06) !important;
}

/* =====================================================
   Player Detail View (sub-page)
   ===================================================== */
.pd-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.88rem;
    color: var(--brand-ink);
    cursor: pointer;
    padding: var(--space-2) 0;
    margin-bottom: var(--space-2);
    font-weight: 500;
    transition: opacity var(--motion-base);
}

.pd-back:hover {
    opacity: 0.7;
}

.pd-loading {
    text-align: center;
    padding: var(--space-12) var(--space-4);
    color: var(--text-muted);
}

.pd-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.pd-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--gsx-on-brand);
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 1px;
}

.pd-header-info {
    min-width: 0;
}

.pd-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.pd-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-1);
    flex-wrap: wrap;
}

.pd-meta-item {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.pd-jv {
    background: rgba(var(--gsx-warning-rgb), 0.15);
    color: var(--warning-ink);
    padding: 0 var(--space-1-5);
    border-radius: var(--radius-xs);
    font-weight: 600;
    font-size: 0.72rem;
}

.pd-section {
    margin-bottom: var(--space-6);
}

.pd-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-1-5);
    border-bottom: 1px solid var(--border-subtle);
}

.pd-info-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-1-5);
}

.pd-info-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    font-size: 0.88rem;
}

.pd-info-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    min-width: 90px;
    flex-shrink: 0;
}

.pd-info-value {
    color: var(--text-primary);
    word-break: break-all;
}

.pd-notes {
    margin-top: var(--space-2);
}

.pd-notes p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

/* Account cards */
.pd-account-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
}

.pd-acct-active {
    border-left: 3px solid var(--success);
}

.pd-acct-inactive {
    border-left: 3px solid var(--double);
}

.pd-acct-pending {
    border-left: 3px solid var(--warning);
}

.pd-acct-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2-5);
}

.pd-acct-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: var(--space-0-5) var(--space-1-5);
    border-radius: var(--radius-xs);
    background: rgba(var(--gsx-brand-rgb), 0.12);
    color: var(--brand-ink);
    text-transform: capitalize;
}

.pd-acct-info {
    margin-bottom: var(--space-2-5);
}

.pd-acct-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* Code display in detail view */
.pd-code-display {
    text-align: center;
    padding: var(--space-3) 0;
}

.pd-code-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-1);
}

.pd-code-value {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text-primary);
    background: var(--raise-3);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    user-select: all;
}

.pd-quick-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* Button color variants used in detail */
/* .btn-warning lives in 11-features.css (subtle/tinted). The blanket
   !important here used to mask it — removed. */

/* .btn-success / .btn-danger now canonical in 01-foundation.css (token-derived). */

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* Status badges & codes */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.78rem;
    font-weight: 600;
    padding: var(--space-0-5) var(--space-2);
    border-radius: var(--radius-sm);
    width: fit-content;
}

.status-badge svg {
    flex-shrink: 0;
}

.status-active {
    color: var(--success-ink);
    background: rgba(var(--gsx-success-rgb), 0.12);
}

.status-pending {
    color: var(--warning-ink);
    background: rgba(var(--gsx-warning-rgb), 0.12);
}

.status-detail {
    display: block;
    font-size: 0.73rem;
    color: var(--text-muted);
    word-break: break-all;
    margin-top: var(--space-0-5);
}

.status-code {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 1.2px;
    user-select: all;
    background: var(--surface-sunken);
    padding: var(--space-0-5) var(--space-1-5);
    border-radius: var(--radius-xs);
    font-weight: 600;
    width: fit-content;
    margin-top: var(--space-0-5);
}

/* Summary cards (Activation Codes) */
.status-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.status-summary-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5);
    text-align: center;
}

.status-summary-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-ink);
    line-height: 1;
}

.status-summary-total {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.status-summary-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
    font-weight: 500;
}

.status-summary-bar {
    margin-top: var(--space-2);
    height: 4px;
    background: var(--raise-3);
    border-radius: var(--radius-xs);
    overflow: hidden;
}

.status-summary-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: var(--radius-xs);
    transition: width var(--motion-slower) var(--ease-standard);
}

/* Program Stats */
.program-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-4);
}

.program-stat {
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    text-align: center;
}

.program-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-ink);
}

.program-stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Recent Tournaments List */
.recent-tournaments-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.recent-tournament-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--surface-sunken);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--motion-base) var(--ease-standard);
}

.recent-tournament-item:hover {
    background: var(--scrim-soft);
    border-color: rgba(var(--gsx-brand-rgb), 0.25);
}

.recent-tournament-name {
    font-weight: 500;
    color: var(--card-text);
    font-size: 0.95rem;
}

.recent-tournament-meta {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.recent-tournament-meta .tournament-gender-badge {
    position: static;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
}

/* School Logo Upload Zone */
.logo-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    transition: border-color var(--motion-base), background var(--motion-base);
}

.logo-upload-zone.drag-over {
    border-color: var(--info);
    background: rgba(var(--gsx-info-rgb), 0.06);
}

.logo-upload-preview {
    margin-bottom: var(--space-4);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-upload-preview img {
    background: var(--raise-2);
    padding: var(--space-2);
}

.logo-upload-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.logo-upload-btn {
    min-width: 120px;
    text-align: center;
    box-sizing: border-box;
}

.logo-upload-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: var(--space-3);
    margin-bottom: 0;
}

/* Invite Staff Form */
.invite-staff-form .form-row {
    align-items: flex-end;
}

/* Light Mode */
[data-theme="light"] .logo-upload-zone {
    border-color: var(--border-color);
}

[data-theme="light"] .logo-upload-zone.drag-over {
    border-color: var(--info);
    background: rgba(var(--gsx-info-rgb), 0.06);
}

[data-theme="light"] .logo-upload-preview img {
    background: var(--raise-2);
}

[data-theme="light"] .logo-upload-hint {
    color: var(--text-muted);
}

[data-theme="light"] .invite-staff-section {
    border-top-color: var(--border-subtle) !important;
}

/* Color Picker Styles */
.color-picker-row {
    display: flex;
    gap: var(--space-5);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.color-picker-group {
    flex: 1;
    min-width: 140px;
}

.color-picker-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--card-text);
    margin-bottom: var(--space-1-5);
    font-weight: 500;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.color-input-wrapper input[type="color"] {
    width: 44px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: var(--space-0-5);
    background: transparent;
    flex-shrink: 0;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: var(--space-0-5);
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
    border-radius: var(--radius-xs);
    border: none;
}

.color-hex-input {
    width: 90px !important;
    font-family: var(--font-mono);
    font-size: 0.85rem !important;
    text-transform: uppercase;
}

.color-preview-bar {
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-2);
    background: linear-gradient(135deg, var(--primary-color), #1a1a2e); /* tokens-allow: #1a1a2e decorative dark-navy in school color-preview gradient — data-viz accent */
    transition: background var(--motion-slow);
    min-height: 50px;
}

.color-preview-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    flex-shrink: 0;
    transition: background var(--motion-base);
}

.color-preview-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gsx-on-brand);
    text-shadow: 0 1px 3px var(--scrim-soft);
}

/* Light mode color picker overrides */
[data-theme="light"] .color-input-wrapper input[type="color"] {
    border-color: var(--border-color);
}

[data-theme="light"] .color-picker-group label {
    color: #1a1a2e; /* tokens-allow: #1a1a2e decorative dark-navy matching school color-preview — data-viz accent */
}

/* School page responsive */
@media (max-width: 768px) {
    .school-hero {
        flex-direction: column;
        text-align: center;
    }

    .school-hero-left {
        flex-direction: column;
    }

    .school-hero-details {
        justify-content: center;
    }

    .school-hero-stats {
        justify-content: center;
        width: 100%;
    }

    .school-tabs {
        flex-direction: column;
    }

    .school-tab:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    #schoolScreen .settings-card .settings-section-body .form-row,
    #schoolScreen .settings-card .settings-section-body .form-row.form-row-3,
    .settings-card .settings-section-body .form-row,
    .settings-card .settings-section-body .form-row.form-row-3 {
        grid-template-columns: 1fr;
    }

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

/* Global autofill override for dark-themed screens */
html:not([data-theme="light"]) #userManagementScreen input:-webkit-autofill,
html:not([data-theme="light"]) #userManagementScreen input:-webkit-autofill:hover,
html:not([data-theme="light"]) #userManagementScreen input:-webkit-autofill:focus,
html:not([data-theme="light"]) #schoolScreen input:-webkit-autofill,
html:not([data-theme="light"]) #schoolScreen input:-webkit-autofill:hover,
html:not([data-theme="light"]) #schoolScreen input:-webkit-autofill:focus,
html:not([data-theme="light"]) #registerScreen input:-webkit-autofill,
html:not([data-theme="light"]) #registerScreen input:-webkit-autofill:hover,
html:not([data-theme="light"]) #registerScreen input:-webkit-autofill:focus,
html:not([data-theme="light"]) #auditLogScreen input:-webkit-autofill,
html:not([data-theme="light"]) #auditLogScreen input:-webkit-autofill:hover,
html:not([data-theme="light"]) #auditLogScreen input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-secondary) inset !important;
    -webkit-text-fill-color: var(--card-text) !important;
    border: 1px solid var(--border-color) !important;
    transition: background-color 5000s ease-in-out var(--motion-instant);
}

/* ============================================================================
   PENDING WELCOME SCREEN — branded shell (login bg) + step-by-step card
   The login-box is a white card in both themes, so all text here is dark.
   ============================================================================ */
#pendingAccountScreen .login-box.pending-box {
    max-width: 26rem;
    padding: var(--space-8) var(--space-7) var(--space-6);
    text-align: center;
}
.pending-theme {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    color: var(--text-muted);
}
.pending-box .login-logo { width: 96px; margin-bottom: var(--space-2-5); }
.pending-box .login-title { height: 34px; }
.pending-tagline {
    color: var(--brand-ink);
    font-size: 1.15rem;
    font-weight: 800;
    margin: var(--space-3) 0 var(--space-0-5);
}
.pending-subname { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 var(--space-5); }

/* steps left-align their content inside the centered box */
.pending-step { text-align: left; }
.pending-block { text-align: left; }

/* the casual hero block — subtle brand tint so the primary path pops */
.pending-hero {
    background: color-mix(in srgb, var(--brand-ink) 8%, #fff); /* tokens-allow: #fff base in color-mix for always-light pending-box card — --surface-solid flips to #3a3a3a in dark */
    border: 1px solid color-mix(in srgb, var(--primary-color) 22%, transparent);
    border-radius: var(--radius-2xl);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
}
.pending-h { color: var(--charcoal); font-size: 1.05rem; font-weight: 800; margin: 0 0 var(--space-1-5); }
.pending-p { color: var(--text-secondary); font-size: 0.86rem; line-height: 1.45; margin: 0 0 var(--space-3-5); }
.pending-cta { width: 100%; font-weight: 700; }

/* "Joining a school or team?" divider */
.pending-or {
    display: flex; align-items: center; gap: var(--space-3);
    color: var(--text-muted); font-size: 0.78rem; font-weight: 600;
    margin: var(--space-4) 0 var(--space-3); text-align: center;
}
.pending-or::before, .pending-or::after {
    content: ''; flex: 1; height: 1px; background: var(--border-subtle);
}

/* choice buttons (icon + label, left-aligned, full width) */
.pending-choice {
    width: 100%; display: flex; align-items: center; gap: var(--space-2-5);
    justify-content: flex-start; text-align: left;
    padding: var(--space-3) var(--space-4); margin-bottom: var(--space-2);
    border-radius: var(--radius-xl); font-weight: 600; font-size: 0.92rem;
    background: #fff; /* tokens-allow: always-white button inside .pending-box (always-light card) — --surface-solid = #3a3a3a in dark */ color: var(--charcoal);
    border: 1px solid var(--border-subtle); cursor: pointer;
    transition: border-color var(--motion-fast), background var(--motion-fast), transform var(--motion-instant);
}
.pending-choice svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--brand-ink); }
.pending-choice:hover { border-color: var(--primary-color); background: color-mix(in srgb, var(--brand-ink) 6%, #fff); /* tokens-allow: #fff base in color-mix for always-light hover — same reason as .pending-hero */ }
.pending-choice:active { transform: scale(0.99); }

/* "← Back" */
.pending-back {
    background: none; border: none; cursor: pointer; padding: 0 0 var(--space-2-5);
    color: var(--text-muted); font-size: 0.88rem; font-weight: 600;
}
.pending-back:hover { color: var(--charcoal); }

/* footer sign-out — clean, not a bare red link */
.pending-footer {
    margin-top: var(--space-6); padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle); text-align: center;
}
.pending-signout {
    display: inline-flex; align-items: center; gap: var(--space-2);
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
    padding: var(--space-1-5) var(--space-2-5); border-radius: var(--radius-md);
}
.pending-signout svg { width: 15px; height: 15px; }
.pending-signout:hover { color: var(--danger-ink, #c62828); background: var(--raise-1); }
