:root {
    --bg: #080D1A;
    --surface: #0E1526;
    --surface-soft: #151F33;
    --gold: #C8961C;
    --gold-bright: #F0B42A;
    --text: #D8E2F0;
    --muted: #7D8EA8;
    --danger: #DA3633;
    --success: #2EA043;

    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(200, 150, 28, 0.14), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(21, 31, 51, 0.9), transparent 28rem),
        var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

header {
    border-bottom: 1px solid rgba(216, 226, 240, 0.08);
    background: rgba(8, 13, 26, 0.88);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 10;
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

nav > a {
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--gold-bright);
}

.mobile-nav {
    display: none;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

nav li a {
    color: var(--muted);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

nav li a:hover {
    color: var(--gold-bright);
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 1.25rem;
}

main > section {
    margin: 0;
}

main > section + section {
    margin-top: 2rem;
}

h1 {
    font-size: clamp(2.3rem, 6vw, 5rem);
    line-height: 0.95;
    margin: 0 0 1rem;
    letter-spacing: -0.06em;
}

p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 720px;
}

footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.25rem;
    border-top: 1px solid rgba(216, 226, 240, 0.08);
    color: var(--muted);
}

.card {
    background: linear-gradient(145deg, rgba(14, 21, 38, 0.96), rgba(21, 31, 51, 0.88));
    border: 1px solid rgba(216, 226, 240, 0.08);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.2rem;
    border-radius: 999px;
    background: var(--gold);
    color: #080D1A;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
    background: var(--gold-bright);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--gold-bright);
    border: 1px solid rgba(240, 180, 42, 0.45);
}

.btn-outline:hover {
    background: rgba(240, 180, 42, 0.08);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 2rem;
    align-items: center;
}

.hero-kicker {
    color: var(--gold-bright);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    margin-bottom: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card strong {
    display: block;
    color: var(--gold-bright);
    font-size: 1.8rem;
}

.stat-card span {
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 760px) {
    nav {
        align-items: center;
        flex-direction: row;
    }

    .desktop-nav {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    main {
        padding-top: 2.5rem;
    }
}

.auth-card {
    max-width: 720px;
    margin: 0 auto;
}

.auth-card h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

form {
    display: grid;
    gap: 1.1rem;
    margin-top: 2rem;
    max-width: 520px;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    max-width: none;
}

.inline-form select {
    min-width: 130px;
    padding: 0.55rem 0.7rem;
}

.recurring-form {
    flex-wrap: wrap;
    max-width: none;
}

.recurring-form label {
    color: var(--muted);
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.compact-form {
    margin-top: 1.25rem;
}

.round-results-form {
    max-width: none;
}

.compact-details {
    margin-top: 1rem;
}

.compact-details summary {
    color: var(--gold-bright);
    cursor: pointer;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.field-help {
    color: var(--muted);
    font-size: 0.88rem;
    margin: 0.1rem 0 0;
}

label {
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
}

input,
select,
textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(216, 226, 240, 0.14);
    background: rgba(8, 13, 26, 0.85);
    color: var(--text);
    font: inherit;
}

select {
    cursor: pointer;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(240, 180, 42, 0.75);
    box-shadow: 0 0 0 3px rgba(240, 180, 42, 0.12);
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1.5rem;
    border: 1px solid rgba(216, 226, 240, 0.12);
}

.alert ul {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.compact-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.alert-danger {
    background: rgba(218, 54, 51, 0.12);
    border-color: rgba(218, 54, 51, 0.4);
    color: var(--text);
}

.alert-success {
    background: rgba(46, 160, 67, 0.14);
    border-color: rgba(46, 160, 67, 0.4);
    color: var(--text);
}

.dashboard-header {
    margin-bottom: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 0;
}

.card h2 {
    margin-top: 0;
}

@media (max-width: 760px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    margin: 0;
}

.section-header p {
    margin: 0.35rem 0 0;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(216, 226, 240, 0.08);
    vertical-align: top;
}

th {
    color: var(--gold-bright);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

td {
    color: var(--text);
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: capitalize;
}

.status-active {
    background: rgba(46, 160, 67, 0.14);
    color: #7ee787;
    border: 1px solid rgba(46, 160, 67, 0.35);
}

.status-inactive {
    background: rgba(125, 142, 168, 0.14);
    color: var(--muted);
    border: 1px solid rgba(125, 142, 168, 0.35);
}

@media (max-width: 760px) {
    .section-header {
        flex-direction: column;
    }
}

.btn-sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.event-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card h2 {
    margin: 0;
    font-size: 1.6rem;
}

.event-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.event-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.event-meta div {
    padding: 0.9rem;
    border-radius: var(--radius-sm);
    background: rgba(8, 13, 26, 0.42);
    border: 1px solid rgba(216, 226, 240, 0.08);
}

.event-meta span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.event-meta strong {
    color: var(--text);
    font-size: 0.95rem;
}

.readiness-panel {
    padding: 0.9rem;
    border: 1px solid rgba(216, 226, 240, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(8, 13, 26, 0.32);
}

.readiness-panel > strong {
    display: block;
    margin-bottom: 0.6rem;
}

.readiness-panel ul {
    display: grid;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.readiness-item {
    color: var(--muted);
    font-size: 0.9rem;
}

.readiness-item::before {
    content: "-";
    display: inline-block;
    margin-right: 0.45rem;
}

.readiness-item-done {
    color: #7ee787;
}

.readiness-item-risk {
    color: #ff7b72;
}

.readiness-item-todo {
    color: var(--gold-bright);
}

.status-open {
    background: rgba(46, 160, 67, 0.14);
    color: #7ee787;
    border: 1px solid rgba(46, 160, 67, 0.35);
}

.status-full {
    background: rgba(240, 180, 42, 0.14);
    color: var(--gold-bright);
    border: 1px solid rgba(240, 180, 42, 0.35);
}

.status-closed,
.status-cancelled {
    background: rgba(218, 54, 51, 0.12);
    color: #ff7b72;
    border: 1px solid rgba(218, 54, 51, 0.35);
}

@media (max-width: 900px) {
    .event-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .event-meta {
        grid-template-columns: 1fr;
    }

    .event-card-top {
        flex-direction: column;
    }
}

.event-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 1.5rem;
    align-items: start;
}

.event-summary-card h2 {
    margin-top: 0;
}

.summary-list {
    display: grid;
    gap: 0.8rem;
}

.summary-list div {
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(8, 13, 26, 0.42);
    border: 1px solid rgba(216, 226, 240, 0.08);
}

.summary-list span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.summary-list strong {
    color: var(--text);
}

@media (max-width: 900px) {
    .event-detail-hero {
        grid-template-columns: 1fr;
    }
}

.no-margin {
    margin: 0;
}

button:disabled,
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.status-pending,
.status-unpaid,
.status-scheduled,
.status-setup {
    background: rgba(240, 180, 42, 0.14);
    color: var(--gold-bright);
    border: 1px solid rgba(240, 180, 42, 0.35);
}

.status-confirmed,
.status-verified,
.status-paid_cash,
.status-paid_eft,
.status-checked_in,
.status-comped {
    background: rgba(46, 160, 67, 0.14);
    color: #7ee787;
    border: 1px solid rgba(46, 160, 67, 0.35);
}

.status-cancelled,
.status-no_show,
.status-refunded {
    background: rgba(218, 54, 51, 0.12);
    color: #ff7b72;
    border: 1px solid rgba(218, 54, 51, 0.35);
}

.status-waitlisted,
.status-proof_uploaded {
    background: rgba(125, 142, 168, 0.14);
    color: var(--muted);
    border: 1px solid rgba(125, 142, 168, 0.35);
}

.status-uploaded {
    background: rgba(125, 142, 168, 0.14);
    color: var(--muted);
    border: 1px solid rgba(125, 142, 168, 0.35);
}

.status-approved {
    background: rgba(46, 160, 67, 0.14);
    color: #7ee787;
    border: 1px solid rgba(46, 160, 67, 0.35);
}

.status-rejected {
    background: rgba(218, 54, 51, 0.12);
    color: #ff7b72;
    border: 1px solid rgba(218, 54, 51, 0.35);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.shortcut-card {
    display: block;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: rgba(8, 13, 26, 0.46);
    border: 1px solid rgba(216, 226, 240, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.shortcut-card strong {
    display: block;
    color: var(--gold-bright);
    margin-bottom: 0.4rem;
}

.shortcut-card span {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.shortcut-card:hover {
    transform: translateY(-2px);
    border-color: rgba(240, 180, 42, 0.45);
    background: rgba(240, 180, 42, 0.06);
}

.shortcut-card.is-disabled {
    opacity: 0.52;
    cursor: not-allowed;
}

.shortcut-card.is-disabled:hover {
    transform: none;
    border-color: rgba(216, 226, 240, 0.08);
    background: rgba(8, 13, 26, 0.46);
}

.finance-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.finance-section {
    margin-bottom: 0;
}

.finance-filter {
    margin-top: 0;
    max-width: none;
}

.finance-filter label {
    min-width: 150px;
}

.finance-actions {
    justify-content: flex-end;
}

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

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

.notice {
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
}

.notice.success {
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.35);
}

.notice.error {
    background: rgba(244, 67, 54, 0.12);
    border: 1px solid rgba(244, 67, 54, 0.35);
}

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

    .finance-actions {
        justify-content: stretch;
    }
}

@media (max-width: 760px) {
    main > section + section {
        margin-top: 1.25rem;
    }
}

@media (max-width: 1050px) {
    .shortcut-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .shortcut-grid {
        grid-template-columns: 1fr;
    }
}

.status-draft {
    background: rgba(125, 142, 168, 0.14);
    color: var(--muted);
    border: 1px solid rgba(125, 142, 168, 0.35);
}

.status-published,
.status-running,
.status-completed {
    background: rgba(46, 160, 67, 0.14);
    color: #7ee787;
    border: 1px solid rgba(46, 160, 67, 0.35);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-row:has(.form-group:nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 760px) {
    .form-row,
    .form-row:has(.form-group:nth-child(3)) {
        grid-template-columns: 1fr;
    }
}

.status-active {
    background: rgba(46, 160, 67, 0.14);
    color: #7ee787;
    border: 1px solid rgba(46, 160, 67, 0.35);
}

.status-eliminated,
.status-withdrawn {
    background: rgba(218, 54, 51, 0.12);
    color: #ff7b72;
    border: 1px solid rgba(218, 54, 51, 0.35);
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 1rem;
}

.profile-layout .card:last-child {
    grid-column: 1 / -1;
}

.profile-summary {
    display: grid;
    gap: 0.8rem;
}

.profile-summary div {
    padding: 0.9rem;
    border-radius: var(--radius-sm);
    background: rgba(8, 13, 26, 0.42);
    border: 1px solid rgba(216, 226, 240, 0.08);
}

.profile-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

.profile-summary strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.profile-register-card {
    border-color: rgba(240, 180, 42, 0.28);
}

@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    :root {
        --radius: 12px;
        --radius-sm: 8px;
    }

    body {
        background: var(--bg);
    }

    nav {
        gap: 0.9rem;
        padding: 0.85rem 1rem;
        position: relative;
    }

    nav > a {
        font-size: 1rem;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: block;
        margin-left: auto;
        position: relative;
    }

    .mobile-nav summary {
        list-style: none;
        min-height: 40px;
        padding: 0.55rem 0.85rem;
        border: 1px solid rgba(240, 180, 42, 0.45);
        border-radius: 8px;
        background: rgba(216, 226, 240, 0.06);
        color: var(--gold-bright);
        cursor: pointer;
        font-weight: 700;
    }

    .mobile-nav summary::-webkit-details-marker {
        display: none;
    }

    .mobile-nav summary::after {
        content: "v";
        margin-left: 0.45rem;
        font-size: 0.8rem;
    }

    .mobile-nav[open] summary::after {
        content: "^";
    }

    .mobile-nav ul {
        position: absolute;
        right: 0;
        top: calc(100% + 0.55rem);
        width: 100%;
        min-width: min(82vw, 260px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        padding: 0.45rem;
        border: 1px solid rgba(216, 226, 240, 0.12);
        border-radius: 10px;
        background: rgba(8, 13, 26, 0.98);
        box-shadow: var(--shadow);
    }

    .mobile-nav li a {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-height: 40px;
        padding: 0.6rem 0.75rem;
        border-radius: 8px;
        background: rgba(216, 226, 240, 0.06);
        font-size: 0.9rem;
        text-align: left;
    }

    main {
        padding: 1.75rem 0.9rem;
    }

    h1 {
        font-size: clamp(2rem, 13vw, 3rem);
        line-height: 1;
        letter-spacing: 0;
    }

    p {
        font-size: 0.98rem;
    }

    .card {
        padding: 1rem;
        box-shadow: none;
    }

    form {
        max-width: none;
    }

    input,
    select,
    textarea {
        min-height: 44px;
        padding: 0.85rem;
        font-size: 16px;
    }

    .hero-actions,
    .table-actions,
    .inline-form {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .btn,
    .btn-sm,
    .hero-actions .btn,
    .table-actions .btn,
    .table-actions a,
    .inline-form .btn {
        width: 100%;
        min-height: 44px;
    }

    .dashboard-grid,
    .stat-grid,
    .shortcut-grid,
    .event-grid {
        gap: 0.75rem;
    }

    .shortcut-card {
        padding: 0.9rem;
    }

    .table-wrap {
        border: 1px solid rgba(216, 226, 240, 0.08);
        border-radius: 8px;
    }

    table {
        min-width: 680px;
    }

    th,
    td {
        padding: 0.75rem;
    }

    .status-pill {
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .desktop-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-meta,
    .summary-list,
    .profile-summary {
        gap: 0.6rem;
    }
}

@media print {
    header,
    footer,
    .dashboard-header .hero-actions,
    form,
    .btn,
    .shortcut-grid {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    main {
        max-width: none;
        padding: 0;
    }

    .card {
        border: none;
        box-shadow: none;
        background: #fff;
    }

    table {
        color: #000;
    }
}
