:root {
    color-scheme: dark;
    --bg: #101014;
    --bg-soft: #15151c;
    --panel: #181820;
    --panel-2: #222230;
    --line: #31313d;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --accent: #facc15;
    --accent-hover: #eab308;
    --danger: #ef4444;
    --success: #22c55e;
    --info: #38bdf8;
    --warning: #f59e0b;
    --focus: #fde047;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .2);
    --shadow-soft: 0 1px 0 rgba(255, 255, 255, .035) inset;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f7f7fb;
    --bg-soft: #ffffff;
    --panel: #ffffff;
    --panel-2: #f0f0f5;
    --line: #d8d8e2;
    --text: #17171c;
    --muted: #5f6470;
    --accent: #d6a600;
    --accent-hover: #b98c00;
    --danger: #dc2626;
    --success: #15803d;
    --info: #0284c7;
    --warning: #b45309;
    --focus: #b98c00;
    --shadow: 0 10px 26px rgba(20, 20, 30, .1);
    --shadow-soft: 0 1px 0 rgba(255, 255, 255, .8) inset;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, var(--bg)) 0, var(--bg) 280px, var(--bg-soft) 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--focus) 75%, transparent);
    outline-offset: 3px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 70px;
    padding: 10px clamp(16px, 4vw, 44px);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    min-width: 0;
    letter-spacing: .01em;
}

.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex: 0 0 auto;
}

[data-theme="dark"] .brand-logo-light,
[data-theme="light"] .brand-logo-dark {
    display: none;
}

.top-nav,
.sub-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.top-nav {
    justify-content: flex-end;
}

.top-nav a,
.sub-nav a,
.theme-toggle,
.button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 140ms var(--ease),
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.top-nav a:hover,
.sub-nav a:hover,
.theme-toggle:hover,
.button:hover,
button:hover,
input[type="submit"]:hover {
    border-color: var(--accent);
}

.top-nav a:active,
.sub-nav a:active,
.theme-toggle:active,
.button:active,
button:active,
input[type="submit"]:active {
    transform: translateY(0) scale(.985);
}

.top-nav .is-active,
.sub-nav .is-active,
.button-primary,
input[type="submit"].button-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #101014;
}

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

.button-muted {
    background: transparent;
}

button:disabled,
input[type="submit"]:disabled,
.button[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

@media (hover: hover) and (pointer: fine) {
    .top-nav a:hover,
    .sub-nav a:hover,
    .theme-toggle:hover,
    .button:hover,
    button:hover,
    input[type="submit"]:hover {
        transform: translateY(-1px);
    }
}

.main {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 26px 0 48px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 24px clamp(16px, 4vw, 44px);
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(22px, 4vw, 46px);
    align-items: center;
    min-height: min(640px, calc(100vh - 128px));
    padding: clamp(22px, 5vw, 58px) 0;
}

.hero h1,
.page-title h1 {
    margin: 0;
    font-size: clamp(2.1rem, 5.2vw, 4.9rem);
    line-height: 1;
    letter-spacing: 0;
    text-wrap: balance;
}

.hero p,
.lead {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.08rem;
    text-wrap: pretty;
}

.hero-logo {
    justify-self: center;
    width: min(280px, 70vw);
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .32));
}

.kicker {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
    color: var(--accent);
    font-weight: 900;
    letter-spacing: 0;
    font-size: .88rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

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

.dashboard-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-stats .card {
    padding: 14px 16px;
}

.dashboard-stats .stat strong {
    font-size: 1.8rem;
}

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

.card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.card {
    padding: 16px;
}

.panel {
    padding: clamp(16px, 3vw, 26px);
    margin-bottom: 18px;
}

.card h2,
.card h3,
.panel h2,
.panel h3 {
    margin-top: 0;
    line-height: 1.15;
    text-wrap: balance;
}

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

.stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat strong {
    font-size: clamp(1.55rem, 3vw, 1.95rem);
    line-height: 1.05;
}

.alert {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 92%, var(--accent) 8%);
}

.alert-success {
    border-color: color-mix(in srgb, var(--success) 55%, var(--line));
    background: color-mix(in srgb, var(--panel) 88%, var(--success) 12%);
}

.alert-warning {
    border-color: color-mix(in srgb, var(--warning) 55%, var(--line));
    background: color-mix(in srgb, var(--panel) 88%, var(--warning) 12%);
}

.alert-danger {
    border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
    background: color-mix(in srgb, var(--panel) 88%, var(--danger) 12%);
}

.alert-info {
    border-color: color-mix(in srgb, var(--info) 55%, var(--line));
    background: color-mix(in srgb, var(--panel) 88%, var(--info) 12%);
}

form {
    margin: 0;
}

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

.field,
.field-wide {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-wide {
    grid-column: 1 / -1;
}

.step-form {
    gap: 16px;
}

.form-step {
    grid-column: 1 / -1;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 92%, var(--bg-soft) 8%);
}

.form-step-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.form-step-heading h2 {
    margin: 0;
    font-size: 1.08rem;
}

.form-step-heading p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: .92rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--accent);
    color: #101014;
    font-weight: 900;
}

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

.form-step-actions {
    display: flex;
    justify-content: flex-end;
}

label {
    color: color-mix(in srgb, var(--text) 78%, var(--muted));
    font-weight: 700;
    font-size: .92rem;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
    color: var(--text);
    font: inherit;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

input::placeholder,
textarea::placeholder {
    color: color-mix(in srgb, var(--muted) 72%, transparent);
}

input:focus,
select:focus,
textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
    background: color-mix(in srgb, var(--bg-soft) 90%, var(--accent) 10%);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}

input:disabled,
select:disabled,
textarea:disabled {
    opacity: .62;
    cursor: not-allowed;
}

textarea {
    min-height: 108px;
    resize: vertical;
}

.compact-form {
    gap: 12px;
}

.compact-form textarea {
    min-height: 76px;
}

.compact-form textarea[rows="8"],
.compact-form textarea[rows="14"] {
    min-height: auto;
}

.placeholder-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
}

.placeholder-list code {
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    background: var(--panel-2);
    color: var(--accent);
    font-size: .82rem;
}

.attachment-list,
.empty-state {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
}

.attachment-list .check-row {
    justify-content: flex-start;
}

.sponsor-admin-list {
    gap: 12px;
}

.sponsor-admin-slot {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--bg-soft);
}

.sponsor-admin-slot legend {
    padding: 0 6px;
    color: var(--accent);
    font-weight: 800;
}

.sponsor-logo-preview {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-2);
}

.sponsor-logo-preview img {
    width: 120px;
    max-height: 64px;
    object-fit: contain;
    padding: 6px;
    border-radius: var(--radius-sm);
    background: #fff;
}

.admin-media-preview {
    display: grid;
    place-items: center;
    min-height: 150px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
    overflow: hidden;
}

.admin-media-preview img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.admin-media-preview-profile img {
    max-width: 180px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-height: auto;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-weight: 600;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    background: var(--panel);
}

.member-table {
    min-width: 0;
    border-collapse: separate;
    background: transparent;
}

.member-list-wrap {
    overflow-x: visible;
    border: 0;
}

.member-table thead {
    display: none;
}

.member-table,
.member-table tbody,
.member-table tr,
.member-table td {
    display: block;
}

.member-table tbody {
    display: grid;
    gap: 14px;
}

.member-table tr {
    display: grid;
    grid-template-columns: minmax(150px, 1.1fr) minmax(64px, .42fr) minmax(100px, .65fr) minmax(120px, .8fr) minmax(92px, .55fr) minmax(128px, .78fr) minmax(105px, .65fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.member-table td {
    min-width: 0;
    padding: 0;
    border-bottom: 0;
}

.member-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.member-table td:nth-child(8),
.member-table td:nth-child(9) {
    grid-column: 1 / -1;
}

.member-table td:nth-child(9) {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.member-table td:nth-child(9)::before {
    display: none;
}

.upload-status-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.member-actions-row {
    display: grid !important;
    grid-template-columns: max-content max-content max-content !important;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.member-actions-row .inline-form {
    display: contents !important;
}

.member-actions-row .button,
.member-actions-row button {
    min-width: 150px;
    width: auto;
    justify-content: center;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: .82rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

tbody tr {
    transition: background-color 140ms ease;
}

tbody tr:hover {
    background: color-mix(in srgb, var(--panel-2) 52%, transparent);
}

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

.member-data-list {
    display: grid;
    gap: 6px;
    max-width: 100%;
}

.member-data-list div {
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.member-data-list strong {
    color: var(--text);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text);
    background: var(--panel-2);
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
}

.badge-success {
    border-color: color-mix(in srgb, var(--success) 65%, var(--line));
    color: var(--success);
    background: color-mix(in srgb, var(--success) 10%, var(--panel-2));
}

.badge-danger {
    border-color: color-mix(in srgb, var(--danger) 65%, var(--line));
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 10%, var(--panel-2));
}

.badge-warning {
    border-color: color-mix(in srgb, var(--warning) 65%, var(--line));
    color: var(--warning);
    background: color-mix(in srgb, var(--warning) 12%, var(--panel-2));
}

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

.event-selector {
    display: flex;
    align-items: end;
    gap: 10px;
    margin: 14px 0 18px;
}

.timeline {
    display: grid;
    gap: 10px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 135px minmax(0, 1fr);
    gap: 16px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.schedule-progress-item {
    --progress: 0%;
    --progress-color: var(--info);
    border: 2px solid transparent;
    background:
        linear-gradient(var(--panel), var(--panel)) padding-box,
        linear-gradient(90deg, var(--progress-color) var(--progress), var(--line) var(--progress)) border-box;
}

.schedule-current {
    --progress-color: var(--accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), var(--shadow-soft);
}

.schedule-done {
    --progress-color: var(--success);
}

.schedule-upcoming {
    --progress-color: var(--info);
}

.schedule-progress-meta {
    margin-top: 6px;
    color: var(--accent);
    font-size: .82rem;
    font-weight: 800;
}

.schedule-artist {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.schedule-artist p {
    margin: 0 0 6px;
}

.schedule-dj-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-soft);
    flex: 0 0 auto;
}

.button-small {
    min-height: 30px;
    padding: 5px 9px;
    font-size: .86rem;
    border-radius: var(--radius-sm);
}

.crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 14px;
}

.crew-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.crew-card p {
    margin: 0;
    padding: 0 14px 14px;
}

.crew-photo,
.profile-preview {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel-2);
}

.crew-photo {
    aspect-ratio: 4 / 5;
}

.crew-photo img,
.profile-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crew-photo-caption {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 2px;
    padding: 14px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .74));
    color: #fff;
}

.crew-photo-caption strong {
    font-size: 1.1rem;
}

.crew-photo-caption span {
    color: #facc15;
    font-weight: 800;
}

.profile-preview {
    max-width: 340px;
    aspect-ratio: 4 / 5;
}

.profile-preview > div {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 2px;
    padding: 14px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .74));
    color: #fff;
}

.profile-preview span {
    color: #facc15;
    font-weight: 800;
}

.poster-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr);
    gap: 18px;
    align-items: start;
}

.poster-background-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
}

.poster-background-strip img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}

.poster-preview-panel {
    position: sticky;
    top: 90px;
}

.poster-preview-img {
    display: block;
    width: 100%;
    max-width: 430px;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-soft);
}

.schedule-done .schedule-progress-meta {
    color: var(--success);
}

.schedule-upcoming .schedule-progress-meta {
    color: var(--info);
}

.message-important {
    border-color: var(--accent);
}

.qr-box {
    display: grid;
    place-items: center;
    min-height: 180px;
    padding: 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--panel-2);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    overflow-wrap: anywhere;
}

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

.page-title h1 {
    font-size: clamp(1.9rem, 4.5vw, 3.25rem);
}

.inline-form {
    display: inline;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

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

.hidden {
    display: none !important;
}

@media (max-width: 1100px) {
    .dashboard-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .member-table td:nth-child(8),
    .member-table td:nth-child(9) {
        grid-column: 1 / -1;
    }
}

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

    .top-nav,
    .sub-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .top-nav a,
    .sub-nav a,
    .theme-toggle {
        flex: 1 1 auto;
    }

    .poster-workspace {
        grid-template-columns: 1fr;
    }

    .poster-preview-panel {
        position: static;
    }

    .brand span {
        font-size: .95rem;
    }

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

    .hero {
        min-height: auto;
    }

    .hero-logo {
        width: min(210px, 58vw);
    }

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

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

    .form-step-actions {
        justify-content: stretch;
    }

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

    .member-table tr {
        grid-template-columns: 1fr;
    }

    .member-table td {
        grid-column: 1 / -1;
    }

    .member-actions-row .button,
    .member-actions-row button {
        min-width: 0;
        width: auto;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .page-title,
    .site-footer,
    .event-selector {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}
