:root {
    --bg: #f6f3ee;
    --bg-soft: #eee9df;
    --surface: #ffffff;
    --surface-2: #fbfaf7;
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --border: #e1dbd0;

    --nav-bg: #09090b;
    --nav-bg-2: #111113;
    --nav-border: #27272a;
    --nav-text: #e5edf8;
    --nav-muted: #94a3b8;

    --primary: #f97316;
    --primary-dark: #c2410c;
    --primary-soft: #ffedd5;

    --success: #16a34a;
    --success-soft: #dcfce7;

    --warning: #f59e0b;
    --warning-soft: #fef3c7;

    --danger: #dc2626;
    --danger-soft: #fee2e2;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;

    --shadow-sm: 0 8px 20px rgba(15, 23, 42, .06);
    --shadow: 0 18px 45px rgba(15, 23, 42, .10);

    --sidebar-width: 280px;
    --topbar-height: 74px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, .10), transparent 34rem),
        linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
    color: var(--ink);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    max-width: 100%;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background:
        linear-gradient(180deg, rgba(6, 182, 212, .10), transparent 18rem),
        var(--nav-bg);
    color: var(--nav-text);
    border-right: 1px solid var(--nav-border);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 4px 18px;
    border-bottom: 1px solid var(--nav-border);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #06b6d4);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    letter-spacing: -.04em;
    box-shadow: 0 12px 30px rgba(249, 115, 22, .30);
}

.brand-text {
    line-height: 1.1;
}

.brand-title {
    font-weight: 800;
    letter-spacing: -.02em;
    font-size: 16px;
}

.brand-subtitle {
    color: var(--nav-muted);
    font-size: 12px;
    margin-top: 4px;
}

.sidebar-section-label {
    color: var(--nav-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin: 8px 10px 6px;
}

.nav-list {
    display: grid;
    gap: 6px;
}

.nav-item {
    color: var(--nav-text);
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 12px;
    border-radius: 14px;
    font-weight: 650;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(148, 163, 184, .12);
    text-decoration: none;
}

.nav-item.active {
    background: rgba(249, 115, 22, .18);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(6, 182, 212, .24);
}

.nav-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(148, 163, 184, .14);
    font-size: 14px;
}

.nav-item.active .nav-icon {
    background: rgba(249, 115, 22, .30);
}

.sidebar-footer {
    margin-top: auto;
    background: rgba(15, 23, 42, .58);
    border: 1px solid var(--nav-border);
    border-radius: 18px;
    padding: 14px;
}

.sidebar-footer-name {
    font-weight: 750;
}

.sidebar-footer-meta {
    color: var(--nav-muted);
    font-size: 13px;
    margin-top: 4px;
}

.main-area {
    min-width: 0;
}

.topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-title {
    min-width: 0;
}

.eyebrow {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.page-title {
    margin: 3px 0 0;
    font-size: 23px;
    letter-spacing: -.035em;
    line-height: 1.15;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.content {
    padding: 28px;
    max-width: 1440px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.page-header h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -.045em;
    line-height: 1.05;
}

.page-header p {
    margin: 8px 0 0;
    color: var(--muted);
    max-width: 760px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card {
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.card h2,
.card h3 {
    margin-top: 0;
    letter-spacing: -.025em;
}

.card-muted {
    color: var(--muted);
}

.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -24px -44px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(249, 115, 22, .10);
}

.metric-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .10em;
}

.metric-value {
    margin-top: 10px;
    font-size: 38px;
    font-weight: 850;
    letter-spacing: -.055em;
}

.metric-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: var(--surface);
    color: var(--ink);
    font-weight: 750;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-muted {
    background: var(--surface-2);
    border-color: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.form-card {
    max-width: 860px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 7px;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    font-weight: 800;
    font-size: 13px;
    color: var(--ink-soft);
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, .10);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

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

.table th,
.table td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.table th {
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .10em;
}

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

.table-title {
    font-weight: 800;
    color: var(--ink);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
    text-transform: capitalize;
}

.badge-draft {
    background: var(--warning-soft);
    color: #92400e;
}

.badge-active,
.badge-completed,
.badge-approved {
    background: var(--success-soft);
    color: #166534;
}

.badge-locked {
    background: var(--primary-soft);
    color: #1e40af;
}

.badge-cancelled,
.badge-flagged {
    background: var(--danger-soft);
    color: #991b1b;
}

.alert {
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 700;
}

.alert-danger {
    background: var(--danger-soft);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.empty-state {
    text-align: center;
    padding: 42px 18px;
    color: var(--muted);
}

.mobile-nav-toggle {
    display: none;
}

@media (max-width: 1050px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 320px);
        transform: translateX(-105%);
        transition: transform .22s ease;
        z-index: 50;
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .topbar {
        padding: 0 18px;
    }

    .content {
        padding: 20px;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .topbar-actions {
        display: none;
    }

    .metric-value {
        font-size: 32px;
    }
}

.alert-success {
    background: var(--success-soft);
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-group.form-check {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding-top: 18px;
}

.form-check label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 800;
    color: var(--ink-soft);
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    display: inline-block !important;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 4px !important;
    accent-color: var(--primary);
    box-shadow: none !important;
}


/* =========================================================
   PXPrep Setting Toggle Cards
   ========================================================= */

.setting-toggle {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    cursor: pointer;
}

.setting-toggle:hover {
    border-color: #b8c5d6;
    background: #ffffff;
}

.setting-toggle-text {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.setting-toggle-title {
    font-size: 15px;
    font-weight: 850;
    color: var(--ink);
}

.setting-toggle-description {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
}

.setting-toggle input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    min-height: 1px !important;
    max-width: 1px !important;
    max-height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.setting-toggle-control {
    width: 56px;
    height: 32px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    flex: 0 0 auto;
    transition: background .18s ease;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
}

.setting-toggle-control::after {
    content: "";
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #ffffff;
    position: absolute;
    top: 4px;
    left: 4px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .28);
    transition: transform .18s ease;
}

.setting-toggle input[type="checkbox"]:checked + .setting-toggle-control {
    background: var(--primary);
}

.setting-toggle input[type="checkbox"]:checked + .setting-toggle-control::after {
    transform: translateX(24px);
}

.setting-toggle input[type="checkbox"]:focus-visible + .setting-toggle-control {
    outline: 4px solid rgba(249, 115, 22, .18);
    outline-offset: 3px;
}


/* Parent portal and public registration shell */
.public-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, .16), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(6, 182, 212, .15), transparent 30rem),
        linear-gradient(180deg, #fbfaf7 0%, #f4f2ee 100%);
    color: var(--ink);
}

.public-wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 30px 16px 54px;
}

.public-hero {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(17, 17, 19, .96)),
        #111113;
    color: #fff;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 26px 70px rgba(17, 17, 19, .22);
    position: relative;
    overflow: hidden;
}

.public-hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -70px;
    top: -90px;
    background: radial-gradient(circle, rgba(6, 182, 212, .38), transparent 66%);
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    margin-bottom: 22px;
}

.public-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: linear-gradient(135deg, #f97316, #06b6d4);
    display: grid;
    place-items: center;
    font-weight: 900;
    letter-spacing: -.05em;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

.public-brand-title {
    font-weight: 900;
    letter-spacing: -.03em;
}

.public-brand-subtitle {
    color: rgba(255, 255, 255, .70);
    font-size: 13px;
    margin-top: 2px;
}

.public-hero h1 {
    margin: 0;
    position: relative;
    z-index: 1;
    font-size: clamp(32px, 5vw, 54px);
    line-height: .98;
    letter-spacing: -.06em;
    max-width: 720px;
}

.public-hero p {
    position: relative;
    z-index: 1;
    max-width: 680px;
    color: rgba(255, 255, 255, .76);
    font-size: 17px;
    line-height: 1.55;
    margin: 16px 0 0;
}

.public-facts {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.public-fact {
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    padding: 14px;
}

.public-fact-label {
    color: rgba(255, 255, 255, .62);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.public-fact-value {
    font-weight: 900;
}

.portal-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 20px;
}

.portal-choice-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.portal-choice-card h2 {
    margin-top: 0;
    letter-spacing: -.03em;
}

.portal-choice-card p {
    color: var(--muted);
    line-height: 1.55;
}

.portal-note {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    border-radius: 18px;
    padding: 16px;
    margin-top: 18px;
    line-height: 1.5;
    font-weight: 650;
}

.child-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    background: var(--surface-2);
    margin-top: 12px;
}

.child-card-title {
    font-weight: 900;
}

.child-card-meta {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

@media (max-width: 760px) {
    .public-facts,
    .portal-card-grid {
        grid-template-columns: 1fr;
    }

    .public-hero {
        padding: 24px;
        border-radius: 22px;
    }

    .child-card {
        align-items: stretch;
        flex-direction: column;
    }
}


/* V3 visual refinement: Option 2 + 3 hybrid, cleaner typography */
body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 15px;
    letter-spacing: normal;
}

h1,
h2,
h3,
.page-title,
.card-title,
.table-title,
.public-hero h1,
.public-brand-title,
.child-card-title {
    letter-spacing: -0.025em;
}

h1,
.page-header h1 {
    font-weight: 760;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.08;
}

h2 {
    font-weight: 720;
    font-size: 20px;
}

h3 {
    font-weight: 680;
}

.public-hero h1 {
    font-size: clamp(30px, 4.2vw, 46px);
    font-weight: 760;
    line-height: 1.02;
}

.public-hero p {
    font-size: 16px;
    line-height: 1.55;
}

.public-brand-title {
    font-weight: 760;
}

.public-brand-subtitle,
.brand-subtitle,
.card-muted,
.metric-note,
.child-card-meta {
    font-weight: 450;
}

.btn,
button,
.sample-btn {
    font-weight: 720;
    letter-spacing: -0.01em;
}

.btn {
    border-radius: 11px;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c);
}

.brand-mark,
.public-mark {
    background: linear-gradient(135deg, #f97316, #06b6d4);
}

.card,
.portal-choice-card {
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}

.public-hero {
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(17, 24, 39, .94)),
        #111827;
}

.public-fact {
    border-radius: 14px;
}

.public-fact-value {
    font-weight: 690;
}

.metric-value {
    font-weight: 740;
}

.nav-link,
.sidebar a,
.main-nav a {
    font-weight: 590;
}

label {
    font-weight: 650;
}

input,
select,
textarea {
    border-radius: 10px;
    font-size: 15px;
}

.child-card {
    border-radius: 16px;
}

.child-card-title {
    font-weight: 700;
}

.portal-note {
    border-radius: 14px;
    font-weight: 560;
}

.badge {
    font-weight: 680;
}

/* Make public choice cards cleaner and less heavy */
.portal-choice-card h2 {
    font-size: 21px;
    font-weight: 720;
}

.portal-choice-card p {
    font-size: 15px;
}

/* Reduce shouty table/header elements */
.table th {
    font-size: 12px;
    font-weight: 680;
    letter-spacing: .03em;
}

.table-title {
    font-weight: 680;
}

/* Dashboard sample page should reflect the cleaner direction too */
.sample-title {
    font-weight: 720 !important;
    letter-spacing: -0.02em;
}

.sample-card h2 {
    font-weight: 720;
}

.sample-number {
    font-weight: 720;
}


/* Fast registration/admin polish pass */
.app-main,
.main-content,
.page-content {
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, .045), transparent 32rem),
        linear-gradient(180deg, #fbfaf7 0%, #f6f3ee 100%);
}

.page-header {
    gap: 20px;
    margin-bottom: 22px;
}

.page-header h1 {
    margin-bottom: 6px;
}

.page-header p {
    max-width: 920px;
}

.card {
    padding: 22px;
}

.content > .card + .card,
.mt-18 {
    margin-top: 18px;
}

.grid > .card,
.grid-2 > .card,
.grid-3 > .card,
.grid-4 > .card {
    margin-top: 0;
}

.grid {
    gap: 18px;
}

.metric-card {
    min-height: 128px;
    padding: 22px;
}

.metric-label {
    font-size: 12px;
    letter-spacing: .09em;
}

.metric-value {
    font-size: 34px;
    line-height: 1;
    margin: 14px 0 10px;
}

.metric-note {
    line-height: 1.35;
}

.alert {
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 18px;
    line-height: 1.45;
}

.alert-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    box-shadow: 0 12px 30px rgba(124, 45, 18, .08);
}

.alert-warning strong {
    color: #431407;
}

.alert-success,
.success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #14532d;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #7f1d1d;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 16px;
}

.table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    white-space: nowrap;
}

.table td,
.table th {
    vertical-align: middle;
    padding: 14px 16px;
}

.table-title {
    line-height: 1.25;
}

.btn-row {
    gap: 10px;
}

.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Registration link cards */
.registration-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.registration-link-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-2);
    padding: 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

.registration-link-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.registration-link-title {
    font-weight: 760;
    color: var(--ink);
    margin-bottom: 4px;
}

.registration-link-meta {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.registration-link-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 14px 0;
}

.registration-link-stat {
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 10px;
    background: #fff;
}

.registration-link-stat-value {
    font-size: 20px;
    line-height: 1;
    font-weight: 760;
    color: var(--ink);
}

.registration-link-stat-label {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.copy-field-group {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.copy-field-group label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.copy-field-group input,
.copy-field-group textarea {
    background: #fff;
    border: 1px solid var(--border);
    font-size: 14px;
}

.copy-field-group textarea {
    min-height: 120px;
    resize: vertical;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.section-heading-row h2 {
    margin: 0;
}

.section-count {
    font-size: 28px;
    line-height: 1;
    font-weight: 740;
    color: var(--ink);
}

.registration-section-card {
    padding: 20px;
}

/* Event detail pending banner */
.pending-review-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.pending-review-banner-title {
    font-size: 16px;
    font-weight: 760;
}

.pending-review-banner-sub {
    margin-top: 5px;
    color: #7c2d12;
}

/* Public registration pages */
.public-wrap {
    max-width: 1040px;
    padding-top: 24px;
}

.public-hero {
    padding: 28px;
}

.portal-card-grid {
    gap: 16px;
}

.portal-choice-card {
    padding: 22px;
}

.form-grid {
    gap: 16px;
}

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

@media (max-width: 900px) {
    .card {
        padding: 18px;
    }

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

    .registration-link-grid {
        grid-template-columns: 1fr;
    }

    .registration-link-card-header,
    .section-heading-row {
        flex-direction: column;
    }

    .registration-link-stats {
        grid-template-columns: 1fr;
    }

    .page-header {
        align-items: stretch;
    }

    .page-header .btn-row {
        justify-content: flex-start;
    }

    .table {
        min-width: 780px;
    }

    .table-wrap {
        overflow-x: auto;
    }
}


/* Clean reusable metric layout */
.metric-grid {
    display: grid;
    gap: 18px;
    width: 100%;
    align-items: stretch;
    margin-bottom: 18px;
}

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

.metric-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid > .metric-card,
.metric-grid > .card {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

.metric-grid .metric-card {
    min-height: 128px;
}

/* Keeps older dashboard/page metric rows stable without page-specific overrides */
.grid.grid-4 > .metric-card,
.grid.grid-3 > .metric-card,
.grid.grid-2 > .metric-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .metric-grid-4,
    .metric-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .metric-grid-4,
    .metric-grid-3,
    .metric-grid-2 {
        grid-template-columns: 1fr;
    }
}



/* =========================================================
   Current platform catch-up patch
   Added after restored working theme.
   ========================================================= */

/* Metric grid aliases used by newer event/detail/approval pages. */
.metric-grid {
    display: grid;
    gap: 18px;
    width: 100%;
    align-items: stretch;
    margin-bottom: 18px;
}

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

.metric-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid > .metric-card,
.metric-grid > .card {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .metric-grid-4,
    .metric-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .metric-grid-4,
    .metric-grid-3,
    .metric-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Normal checkboxes without disturbing text inputs, selects, buttons, cards, colors, or setting toggles. */
input[type="checkbox"]:not(.setting-toggle input),
input[type="radio"]:not(.setting-toggle input),
.table input[type="checkbox"]:not(.setting-toggle input),
.table input[type="radio"]:not(.setting-toggle input),
input.registration-check,
th.checkbox-cell input[type="checkbox"],
td.checkbox-cell input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    border-radius: 3px !important;
    accent-color: var(--primary);
}

.checkbox-cell,
.table th.checkbox-cell,
.table td.checkbox-cell {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    text-align: center !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

/* Approval duplicate warnings. */
.duplicate-warning {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(245, 158, 11, .45);
    background: rgba(245, 158, 11, .10);
    border-radius: 10px;
    color: #92400e;
    font-size: 12px;
    line-height: 1.35;
}

.duplicate-warning strong {
    color: #78350f;
}

/* Badge aliases used by newer workflows. */
.badge-pending,
.badge-not_checked_in {
    background: var(--warning-soft);
    color: #92400e;
}

.badge-rejected,
.badge-removed,
.badge-inactive,
.badge-no_show {
    background: var(--danger-soft);
    color: #991b1b;
}

.badge-open,
.badge-active,
.badge-approved,
.badge-rostered,
.badge-checked_in {
    background: var(--success-soft);
    color: #166534;
}

/* Small utility helpers used in recent page patches. */
.mt-18 {
    margin-top: 18px;
}

.table .btn {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    white-space: nowrap;
}

/* Keep approval/filter cards from stretching awkwardly when a page uses form-grid inside cards. */
.card .form-grid {
    align-items: end;
}


/* Tryout group builder */
.tryout-group-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    align-items: start;
    margin-top: 18px;
}

.tryout-group-column {
    min-width: 0;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tryout-group-column > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.tryout-group-column > header > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-count {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 800;
}

.tryout-group-dropzone {
    min-height: 150px;
    padding: 12px;
    display: grid;
    gap: 10px;
    align-content: start;
    transition: background .15s ease, box-shadow .15s ease;
}

.tryout-group-dropzone.is-over {
    background: rgba(249, 115, 22, .08);
    box-shadow: inset 0 0 0 2px rgba(249, 115, 22, .35);
}

.tryout-candidate-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 12px;
    cursor: grab;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
    transition: opacity .15s ease, transform .15s ease, border-color .15s ease;
}

.tryout-candidate-card:active { cursor: grabbing; }
.tryout-candidate-card.is-dragging { opacity: .48; transform: scale(.98); }
.tryout-candidate-card.is-saving { border-color: var(--warning); }
.tryout-candidate-card.is-saved { border-color: var(--success); }

.tryout-candidate-name {
    font-weight: 760;
    color: var(--ink);
}

.tryout-candidate-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 9px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 760px) {
    .tryout-group-board { grid-template-columns: 1fr; }
}

/* Tryout timing capture */
.capture-grid-table {
    min-width: 1120px;
}

.capture-grid-table input {
    min-width: 78px;
    text-align: center;
}

.capture-grid-table .calc-cell {
    font-weight: 760;
    white-space: nowrap;
}

.capture-grid-table .mph-row td {
    padding-top: 6px;
    padding-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
}

.capture-grid-table .athlete-block {
    border-top: 2px solid var(--border);
}

.capture-grid-table .locked-input {
    background: var(--surface-2);
    color: var(--ink-soft);
    opacity: .68;
}

.save-state {
    min-width: 90px;
    font-size: 12px;
    white-space: nowrap;
    color: var(--muted);
}

.save-state.is-saving,
.save-state.is-pending,
.save-state.is-editing {
    color: #92400e;
}

.save-state.is-saved {
    color: #166534;
}

.save-state.is-error {
    color: #991b1b;
}

.timing-connection {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--success-soft);
    color: #166534;
    font-size: 12px;
    font-weight: 760;
}

.timing-connection.is-offline {
    background: var(--danger-soft);
    color: #991b1b;
}

.tryout-card-move {
    min-height: 36px;
    margin-top: 10px;
    padding: 7px 9px;
    font-size: 12px;
}

/* =========================================================
   Tryout candidate registration / check-in
   Compact event-day layout
   ========================================================= */

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

.tryout-candidates-page {
    display: grid;
    gap: 10px;
}

.tryout-candidates-page .tryout-candidates-header {
    margin-bottom: 0;
    align-items: center;
}

.tryout-candidates-page .tryout-candidates-header h1 {
    font-size: 27px;
}

.tryout-candidates-page .tryout-candidates-header p {
    margin-top: 3px;
}

.tryout-candidates-page .btn {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 12.5px;
}

.tryout-status-line {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, .90);
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.tryout-status-line span {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}

.tryout-status-line strong {
    color: var(--ink);
    font-size: 16px;
    line-height: 1;
}

.tryout-status-line .tryout-next-bib {
    margin-left: auto;
    padding-left: 18px;
    border-left: 1px solid var(--border);
    color: var(--primary-dark);
}

.tryout-compact-card,
.tryout-candidate-list-card,
.tryout-walkup-card {
    margin-top: 0;
    padding: 12px 14px;
    border-radius: 13px;
}

.tryout-filter-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.tryout-filter-bar input,
.tryout-filter-bar select {
    width: auto;
    min-height: 33px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12.5px;
}

.tryout-filter-bar .tryout-search-input {
    flex: 0 1 230px;
    width: 230px;
    max-width: 230px;
}

.tryout-filter-bar select[name="session_id"] {
    width: 170px;
}

.tryout-filter-bar select[name="group_id"] {
    width: 115px;
}

.tryout-filter-bar select[name="status"] {
    width: 125px;
}

.tryout-candidates-page .form-group {
    gap: 4px;
    margin-bottom: 0;
}

.tryout-candidates-page label {
    font-size: 11px;
}

.tryout-candidates-page input,
.tryout-candidates-page select {
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12.5px;
}

.tryout-walkup-card {
    padding: 0;
}

.tryout-walkup-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 14px;
    cursor: pointer;
    list-style: none;
    font-weight: 720;
    font-size: 13px;
}

.tryout-walkup-card > summary::-webkit-details-marker {
    display: none;
}

.tryout-walkup-card > summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 17px;
}

.tryout-walkup-card[open] > summary::after {
    content: "−";
}

.tryout-walkup-summary-note {
    margin-left: auto;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 560;
}

.tryout-walkup-form {
    border-top: 1px solid var(--border);
    padding: 12px 14px 14px;
}

.tryout-walkup-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    align-items: end;
}

.tryout-walkup-options {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tryout-check-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    cursor: pointer;
}

.tryout-check-option input[type="checkbox"] {
    width: 15px !important;
    min-width: 15px !important;
    max-width: 15px !important;
    height: 15px !important;
    min-height: 15px !important;
    max-height: 15px !important;
}

.tryout-walkup-actions {
    margin-top: 9px;
}

.tryout-list-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 8px;
}

.tryout-list-heading h2 {
    margin: 0;
    font-size: 16px;
}

.tryout-list-heading p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.tryout-candidate-table-wrap {
    border-radius: 10px;
}

.tryout-candidate-table {
    min-width: 990px;
    font-size: 12.5px;
}

.tryout-candidate-table th,
.tryout-candidate-table td {
    padding: 7px 8px;
}

.tryout-candidate-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 10px;
    letter-spacing: .035em;
}

.tryout-candidate-table tbody tr.is-checked-in {
    background: rgba(22, 163, 74, .035);
}

.tryout-candidate-table tbody tr:hover {
    background: rgba(249, 115, 22, .045);
}

.tryout-bib-cell {
    width: 70px;
}

.tryout-bib-input {
    width: 58px !important;
    min-width: 58px !important;
    text-align: center;
    font-weight: 760;
}

.tryout-candidate-cell {
    min-width: 210px;
}

.tryout-candidate-cell > strong {
    font-size: 12.5px;
}

.tryout-candidate-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 7px;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.25;
}

.tryout-candidate-cell .badge {
    margin-top: 3px;
}

.tryout-row-select {
    width: 92px !important;
    min-width: 92px !important;
}

.tryout-group-select {
    width: 72px !important;
    min-width: 72px !important;
}

.tryout-eligibility-cell {
    white-space: nowrap;
}

.tryout-eligibility-cell span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.tryout-candidate-table .badge {
    min-height: 21px;
    padding: 3px 7px;
    font-size: 10px;
    white-space: nowrap;
}

.tryout-row-actions {
    width: 142px;
}

.tryout-row-actions form {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.tryout-row-actions .btn {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 11.5px;
}

@media (max-width: 1000px) {
    .tryout-status-line {
        gap: 14px;
    }

    .tryout-filter-bar .tryout-search-input {
        flex-basis: 190px;
        width: 190px;
        max-width: 190px;
    }

    .tryout-walkup-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .tryout-candidates-page .tryout-candidates-header {
        align-items: flex-start;
    }

    .tryout-status-line {
        gap: 10px 16px;
        flex-wrap: wrap;
        white-space: normal;
    }

    .tryout-status-line .tryout-next-bib {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }

    .tryout-filter-bar {
        align-items: stretch;
    }

    .tryout-filter-bar .tryout-search-input,
    .tryout-filter-bar select[name="session_id"],
    .tryout-filter-bar select[name="group_id"],
    .tryout-filter-bar select[name="status"] {
        flex: 1 1 145px;
        width: auto;
        max-width: none;
    }

    .tryout-walkup-grid {
        grid-template-columns: 1fr;
    }

    .tryout-walkup-summary-note {
        display: none;
    }
}


/* Candidate operations actions */
.tryout-row-actions {
    width: 175px;
}

.tryout-row-action-line {
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
}

.tryout-row-actions form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.tryout-row-actions .btn {
    min-width: 72px;
}

.tryout-text-action {
    appearance: none;
    min-height: 0;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font: inherit;
    font-size: 10.5px;
    line-height: 1.2;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    cursor: pointer;
}

.tryout-text-action:hover,
.tryout-text-action:focus-visible {
    background: transparent;
    box-shadow: none;
    color: var(--danger);
}

.tryout-text-action:disabled {
    color: var(--muted);
    cursor: wait;
    opacity: .55;
}

.tryout-archive-action {
    color: var(--muted);
}

.tryout-row-save-state {
    display: block;
    min-height: 13px;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.2;
}

.tryout-row-save-state.is-saving {
    color: var(--warning);
}

.tryout-row-save-state.is-saved {
    color: var(--success);
}

.tryout-row-save-state.is-error {
    color: var(--danger);
}

.tryout-row-save-state.is-changed {
    color: var(--muted);
}


/* Global topbar cleanup */
.topbar-title {
    display: flex;
    align-items: center;
}

.topbar-title .page-title {
    margin: 0;
}

/* Separate destructive candidate actions from operational controls */
.tryout-row-action-line {
    gap: 0;
}

.tryout-row-action-line > form,
.tryout-row-action-line > .btn {
    margin-right: 14px;
}

.tryout-row-action-line .tryout-text-action {
    position: relative;
    margin-left: 0;
    padding-left: 14px;
}

.tryout-row-action-line .tryout-text-action::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 16px;
    background: var(--border);
    transform: translateY(-50%);
}

.tryout-row-action-line .tryout-text-action:hover::before,
.tryout-row-action-line .tryout-text-action:focus-visible::before {
    background: var(--border-strong);
}

/* Polished product headers: titles and actions only */
.page-header > div > p,
.page-header > div > .page-subtitle,
.page-header .page-description {
    display: none !important;
}

.page-header > div > h1 {
    margin-bottom: 0;
}

/* Keep destructive candidate actions clearly separated */
.tryout-row-action-line > form,
.tryout-row-action-line > .btn {
    margin-right: 18px;
}

.tryout-row-action-line .tryout-text-action {
    padding-left: 16px;
}


/* Check-in handoff confirmation */
.tryout-checkin-dialog {
    width: min(420px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
}

.tryout-checkin-dialog::backdrop {
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(2px);
}

.tryout-checkin-dialog-card {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 22px 60px rgba(15, 23, 42, .30);
    text-align: center;
}

.tryout-checkin-dialog-kicker {
    color: var(--success);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tryout-checkin-dialog-name {
    margin-top: 5px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 760;
}

.tryout-checkin-dialog-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}

.tryout-checkin-dialog-details > div {
    padding: 14px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.tryout-checkin-dialog-details span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.tryout-checkin-dialog-details strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 28px;
    line-height: 1;
}

.tryout-checkin-dialog .btn {
    min-width: 130px;
}


/* Coach packet management */
.coach-packet-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.coach-packet-toolbar form {
    display: flex;
    align-items: center;
    gap: 7px;
}

.coach-packet-toolbar label {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.coach-packet-toolbar select {
    width: 240px;
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12.5px;
}

.coach-packet-session-meta {
    display: flex;
    gap: 10px;
    color: var(--muted);
    font-size: 11.5px;
}

.coach-packet-toolbar > .btn {
    margin-left: auto;
}

.coach-packet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.coach-packet-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.coach-packet-card h2 {
    margin: 0;
    font-size: 16px;
}

.coach-packet-card p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11.5px;
}

/* Printable coach evaluation sheets */
.coach-packet-print-body {
    margin: 0;
    padding: 24px;
    background: #e5e7eb;
    color: #111827;
    font-family: Arial, Helvetica, sans-serif;
}

.coach-packet-print-controls {
    position: sticky;
    top: 12px;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.coach-evaluation-sheet {
    width: 11in;
    min-height: 8.5in;
    margin: 0 auto 22px;
    padding: .35in;
    background: #fff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .18);
    page-break-after: always;
}

.coach-evaluation-sheet:last-child {
    page-break-after: auto;
}

.coach-sheet-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid #111827;
}

.coach-sheet-org {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.coach-sheet-header h1 {
    margin: 3px 0 0;
    font-size: 22px;
}

.coach-sheet-group {
    font-size: 24px;
    font-weight: 800;
}

.coach-sheet-meta {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1.4fr;
    gap: 12px;
    margin-top: 12px;
}

.coach-sheet-meta > div,
.coach-sheet-criteria > div {
    display: grid;
    gap: 3px;
}

.coach-sheet-meta span,
.coach-sheet-criteria span {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.coach-sheet-meta strong {
    font-size: 11px;
}

.write-line {
    min-height: 15px;
    border-bottom: 1px solid #111827;
}

.coach-sheet-criteria {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 10px;
}

.coach-evaluation-table {
    width: 100%;
    margin-top: 12px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 9px;
}

.coach-evaluation-table th,
.coach-evaluation-table td {
    height: 28px;
    padding: 4px 5px;
    border: 1px solid #111827;
    vertical-align: middle;
}

.coach-evaluation-table th {
    background: #f3f4f6;
    font-size: 8px;
    line-height: 1.1;
    text-align: center;
}

.coach-evaluation-table .col-bib {
    width: .45in;
}

.coach-evaluation-table .col-player {
    width: 1.55in;
}

.coach-evaluation-table .col-id {
    width: .85in;
}

.coach-evaluation-table .col-age {
    width: .4in;
}

.coach-evaluation-table .col-rating {
    width: .42in;
}

.coach-evaluation-table .col-rank {
    width: .5in;
}

.coach-sheet-empty {
    text-align: center;
}

.coach-sheet-footer {
    margin-top: 12px;
    font-size: 9px;
    font-weight: 700;
}

.coach-sheet-notes-lines {
    height: .55in;
    margin-top: 5px;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 17px,
        #9ca3af 18px
    );
}

@media print {
    @page {
        size: landscape;
        margin: .25in;
    }

    .coach-packet-print-body {
        padding: 0;
        background: #fff;
    }

    .coach-packet-print-controls {
        display: none;
    }

    .coach-evaluation-sheet {
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
}

@media (max-width: 700px) {
    .coach-packet-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .coach-packet-toolbar form,
    .coach-packet-toolbar select {
        width: 100%;
    }

    .coach-packet-toolbar > .btn {
        margin-left: 0;
    }
}


/* Coach packet two-row evaluation builder */
.coach-packet-builder-form {
    margin-top: 10px;
}

.coach-packet-builder-card {
    padding: 14px;
}

.coach-packet-builder-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.coach-packet-builder-heading h2 {
    margin: 0;
    font-size: 17px;
}

.coach-packet-builder-heading p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11.5px;
}

.coach-packet-field-groups {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.coach-packet-field-groups fieldset {
    min-width: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.coach-packet-field-groups legend {
    padding: 0 6px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 800;
}

.coach-packet-field-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.coach-packet-field-grid label {
    min-width: 0;
}

.coach-packet-field-grid span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    text-transform: uppercase;
}

.coach-packet-field-grid input {
    width: 100%;
    min-width: 0;
    min-height: 33px;
    padding: 6px 7px;
    font-size: 11.5px;
}

.coach-packet-scale-note {
    margin-top: 10px;
    color: var(--muted);
    font-size: 10.5px;
}

.coach-packet-bib-warning {
    color: #b45309 !important;
    font-weight: 750;
}

.coach-packet-bib-ok {
    color: #15803d !important;
    font-weight: 750;
}

.coach-evaluation-table-two-row {
    margin-top: 10px;
    font-size: 8.5px;
}

.coach-evaluation-table-two-row th {
    height: 31px;
    padding: 3px 4px;
    font-size: 7.5px;
    line-height: 1.05;
}

.coach-evaluation-table-two-row td {
    height: 20px;
    padding: 2px 4px;
}

.coach-evaluation-table-two-row .col-bib {
    width: .38in;
}

.coach-evaluation-table-two-row .col-player {
    width: 1.42in;
}

.coach-evaluation-table-two-row .col-id {
    width: .70in;
}

.coach-evaluation-table-two-row .col-row-type {
    width: .43in;
}

.coach-evaluation-table-two-row .col-rating-title {
    width: .68in;
}

.coach-evaluation-table-two-row .col-notes {
    width: 2.55in;
}

.coach-athlete-bib,
.coach-athlete-id,
.coach-row-label {
    text-align: center;
}

.coach-athlete-bib {
    font-size: 13px;
    font-weight: 800;
}

.coach-athlete-name {
    font-size: 9px;
    font-weight: 750;
}

.coach-athlete-id {
    font-size: 7px;
}

.coach-row-label {
    background: #f3f4f6;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
}

.coach-athlete-row-trait td:not(.coach-row-label) {
    position: relative;
    padding-top: 10px;
}

.coach-athlete-row-trait td[data-title]::before {
    content: attr(data-title);
    position: absolute;
    top: 1px;
    left: 2px;
    right: 2px;
    overflow: hidden;
    color: #6b7280;
    font-size: 5.8px;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coach-athlete-notes {
    vertical-align: top !important;
}

.coach-trait-key {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 13px;
    margin-top: 5px;
    color: #374151;
    font-size: 7px;
}

.coach-trait-key strong {
    color: #111827;
}

@media (max-width: 900px) {
    .coach-packet-field-groups {
        grid-template-columns: 1fr;
    }

    .coach-packet-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    .coach-evaluation-table-two-row th {
        height: 28px;
    }

    .coach-evaluation-table-two-row td {
        height: 19px;
    }
}


/* Coach packet urgent layout correction */
.coach-evaluation-table-two-row {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

.coach-evaluation-table-two-row .col-bib {
    width: .42in;
}

.coach-evaluation-table-two-row .col-player {
    width: 1.72in;
}

.coach-evaluation-table-two-row .col-row-type {
    width: .48in;
}

.coach-evaluation-table-two-row .col-rating-title {
    width: .82in;
}

.coach-evaluation-table-two-row .col-notes {
    width: 2.75in;
}

.coach-evaluation-table-two-row thead th {
    height: 24px;
    padding: 3px 4px;
    border: 1px solid #4b5563;
    font-size: 7.4px;
    line-height: 1.05;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
}

.coach-header-skills th {
    background: #1f2937;
    color: #ffffff;
}

.coach-header-traits th {
    background: #e5e7eb;
    color: #111827;
}

.coach-evaluation-table-two-row tbody td {
    height: 19px;
    padding: 2px 4px;
    border: 1px solid #6b7280;
    vertical-align: middle;
}

.coach-athlete-row-trait td {
    background: #f8fafc;
}

.coach-athlete-row-trait td:not(.coach-row-label) {
    position: static;
    padding-top: 2px;
}

.coach-athlete-row-trait td[data-title]::before {
    content: none;
}

.coach-row-label {
    background: #f3f4f6 !important;
    font-size: 6.5px;
    font-weight: 800;
    letter-spacing: .2px;
    text-align: center;
    text-transform: uppercase;
}

.coach-athlete-name {
    font-size: 9px;
    font-weight: 800;
}

.coach-athlete-bib {
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.coach-athlete-notes {
    vertical-align: top !important;
}

.coach-trait-key {
    display: none !important;
}

@media print {
    .coach-evaluation-table-two-row thead th {
        height: 22px;
        font-size: 7px;
    }

    .coach-evaluation-table-two-row tbody td {
        height: 18px;
    }
}


/* Coach packet walk-up and header refinements */
.coach-walkup-row td {
    background: #ffffff;
}

.coach-walkup-row.coach-athlete-row-trait td {
    background: #fafafa;
}

.coach-walkup-name {
    color: #6b7280;
    font-size: 7.5px;
    font-style: italic;
    font-weight: 600;
    vertical-align: top !important;
}

.coach-walkup-name::after {
    content: "";
    display: block;
    width: 100%;
    margin-top: 10px;
    border-bottom: 1px solid #9ca3af;
}

.coach-evaluation-table-two-row thead th {
    font-size: 8.4px;
    line-height: 1.08;
}

@media print {
    .coach-evaluation-table-two-row thead th {
        font-size: 8px;
    }
}


/* Four unlabeled blank athlete entries */
.coach-blank-entry-row td {
    background: #ffffff;
}

.coach-blank-entry-row.coach-athlete-row-trait td {
    background: #f8fafc;
}

.coach-blank-entry-name {
    min-height: 38px;
}

.coach-blank-entry-name::after {
    content: none;
}

.coach-walkup-row,
.coach-walkup-name {
    display: none;
}


/* Single-row Queen City field sheet template */
.coach-packet-row-control {
    display: flex;
    align-items: end;
    gap: 14px;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}
.coach-packet-row-control label { min-width: 190px; }
.coach-packet-row-control label > span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}
.coach-packet-row-control select { width: 100%; }
.coach-packet-row-control p { margin: 0; color: var(--muted); font-size: 10.5px; }

.coach-field-sheet {
    box-sizing: border-box;
    width: 11in;
    min-height: 8.5in;
    margin: 0 auto;
    padding: .18in .20in .18in;
    page-break-after: always;
    background: #fff;
    color: #171b24;
    font-family: Arial, Helvetica, sans-serif;
}
.coach-field-sheet:last-child { page-break-after: auto; }
.coach-field-title h1 {
    margin: 0;
    font-size: 25px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.4px;
}
.coach-field-accent { margin-top: 8px; }
.coach-field-accent span:first-child {
    display: block;
    height: 7px;
    background: #5f23c5;
}
.coach-field-accent span:last-child {
    display: block;
    height: 2px;
    margin-top: 2px;
    background: #bf9b74;
}
.coach-field-meta {
    display: grid;
    grid-template-columns: 2.3fr 1.15fr 2.1fr 1.45fr .95fr 1.05fr;
    gap: 18px;
    margin: 9px 0 14px;
}
.coach-field-meta-item span {
    display: block;
    margin-bottom: 5px;
    color: #606672;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}
.coach-field-meta-item strong {
    display: block;
    min-height: 20px;
    padding: 0 2px 3px;
    border-bottom: 1px solid #8d929b;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
}
.coach-field-scale strong { font-size: 12px; }
.coach-field-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 9px;
}
.coach-field-table .field-col-bib { width: 5%; }
.coach-field-table .field-col-athlete { width: 20.5%; }
.coach-field-table .field-col-rating { width: 6.7%; }
.coach-field-table .field-col-notes { width: 20.9%; }
.coach-field-table th,
.coach-field-table td {
    border: 1px solid #a7abb3;
}
.coach-field-table thead th {
    padding: 5px 3px;
    text-align: center;
    vertical-align: middle;
}
.coach-field-band-row > th[rowspan] {
    background: #171b24;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    vertical-align: bottom;
    padding-bottom: 8px;
}
.coach-field-band {
    height: 25px;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .2px;
}
.coach-field-skills { background: #5f23c5; }
.coach-field-traits { background: #bf9b74; }
.coach-field-label-row th {
    height: 24px;
    background: #f0f0f2;
    color: #222733;
    font-size: 8px;
    font-weight: 800;
    line-height: 1.05;
}
.coach-field-table tbody tr { height: .435in; }
.coach-field-table tbody td { padding: 4px 5px; vertical-align: middle; }
.coach-field-table tbody tr:nth-child(even) td { background: #fafafa; }
.coach-field-bib { font-size: 11px; font-weight: 800; text-align: center; }
.coach-field-athlete { font-size: 10px; font-weight: 750; }
.coach-field-rating { text-align: center; }
.coach-field-notes { vertical-align: top !important; }
.coach-field-blank-row td { background: #fff !important; }

@media print {
    @page { size: letter landscape; margin: 0; }
    body.coach-packet-print-body { margin: 0; background: #fff; }
    .coach-packet-print-controls { display: none !important; }
    .coach-field-sheet { width: 11in; height: 8.5in; overflow: hidden; }
}


/* Field sheet readability refinements */
.coach-field-sheet-table thead th,
.coach-field-sheet-table .field-sheet-column-heading {
    font-size: 10.5px;
    line-height: 1.12;
    font-weight: 850;
}

.coach-field-sheet-table .field-sheet-section-heading {
    font-size: 11px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: .25px;
}

.coach-field-sheet-table .coach-field-bib,
.coach-field-sheet-table .field-sheet-bib {
    font-size: 17px;
    line-height: 1;
    font-weight: 900;
    text-align: center;
}

.coach-field-athlete {
    text-align: left;
    vertical-align: middle;
    white-space: normal;
}

.coach-athlete-first {
    display: block;
    font-size: 13.5px;
    line-height: 1.05;
    font-weight: 900;
}

.coach-athlete-last {
    display: block;
    margin-top: 1px;
    font-size: 9.5px;
    line-height: 1;
    font-weight: 650;
    color: #374151;
}

@media print {
    .coach-field-sheet-table thead th,
    .coach-field-sheet-table .field-sheet-column-heading {
        font-size: 10px;
    }

    .coach-field-sheet-table .field-sheet-section-heading {
        font-size: 10.5px;
    }

    .coach-field-sheet-table .coach-field-bib,
    .coach-field-sheet-table .field-sheet-bib {
        font-size: 16px;
    }

    .coach-athlete-first {
        font-size: 13px;
    }

    .coach-athlete-last {
        font-size: 9px;
    }
}
