:root {
    --bg: #070809;
    --bg-soft: #101214;
    --surface: rgba(18, 20, 24, 0.92);
    --surface-strong: #14171b;
    --surface-soft: rgba(255, 255, 255, 0.04);
    --card: rgba(23, 26, 31, 0.88);
    --ink: #f4f5f7;
    --muted: #a6adb8;
    --line: rgba(255, 255, 255, 0.1);
    --gold: #ffd33d;
    --gold-strong: #ffb800;
    --gold-soft: rgba(255, 211, 61, 0.12);
    --accent: #f2ede3;
    --danger: #ff7d7d;
    --success: #69d48f;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.25);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 211, 61, 0.16), transparent 18%),
        radial-gradient(circle at 80% 22%, rgba(255, 184, 0, 0.12), transparent 22%),
        linear-gradient(180deg, #0a0b0d 0%, #090b0f 38%, #050607 100%);
    min-height: 100vh;
    position: relative;
}

.app-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 22%),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.012) 0,
            rgba(255, 255, 255, 0.012) 1px,
            transparent 1px,
            transparent 120px
        );
    opacity: 0.6;
}

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

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

img {
    max-width: 100%;
    display: block;
}

.table-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.table-thumb-placeholder,
.detail-image-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.84rem;
    text-align: center;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.2rem;
    background: rgba(10, 11, 14, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
}

.brand-logo {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(255, 211, 61, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-copy {
    display: grid;
    gap: 0.12rem;
}

.brand-copy strong {
    font-size: 1.08rem;
    letter-spacing: 0.03em;
}

.brand-copy span {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.site-nav a {
    padding: 0.72rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    transition: 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 211, 61, 0.24);
    transform: translateY(-1px);
}

.page-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 1.4rem auto 4rem;
    position: relative;
    z-index: 1;
}

.hero,
.panel,
.auth-card,
.stat-card,
.mini-panel {
    background: linear-gradient(180deg, rgba(20, 23, 27, 0.95), rgba(14, 16, 19, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 1.4rem;
    padding: 2rem;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -10% auto auto -8%;
    width: 20rem;
    height: 20rem;
    background: radial-gradient(circle, rgba(255, 211, 61, 0.22), transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -4rem -5rem auto;
    width: 18rem;
    height: 18rem;
    background: radial-gradient(circle, rgba(255, 184, 0, 0.18), transparent 60%);
    pointer-events: none;
}

.hero-content,
.hero-panel,
.panel,
.auth-card,
.mini-panel {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    gap: 1.25rem;
}

.hero-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
}

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

.hero-logo {
    width: clamp(110px, 22vw, 170px);
    filter: drop-shadow(0 0 25px rgba(255, 211, 61, 0.18));
}

.hero-title {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.hero-title .gold {
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255, 211, 61, 0.28);
}

.hero-copy,
.page-header p,
.empty-state,
.flash,
label,
td,
th,
tbody span,
.support-copy {
    color: var(--muted);
}

.hero-copy {
    margin: 0;
    max-width: 54ch;
    font-size: 1.06rem;
    line-height: 1.7;
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.highlight-pill {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.highlight-pill span {
    display: block;
    color: var(--gold);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
}

.highlight-pill strong {
    display: block;
    margin-top: 0.45rem;
    color: var(--ink);
    font-size: 1rem;
}

.hero-panel {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 211, 61, 0.12), rgba(255, 184, 0, 0.04)),
        rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 211, 61, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-panel h2,
.hero-panel strong {
    color: var(--ink);
}

.hero-panel-grid {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.hero-panel-card {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-panel-card span {
    display: block;
    color: var(--gold);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-panel-card strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.02rem;
}

.feature-strip,
.content-grid,
.utility-grid {
    display: grid;
    gap: 1rem;
}

.feature-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.content-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    margin-top: 1rem;
}

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

.panel,
.auth-card,
.mini-panel {
    padding: 1.4rem;
}

.mini-panel {
    background:
        linear-gradient(180deg, rgba(255, 211, 61, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(20, 23, 27, 0.95);
}

.mini-panel h2,
.panel h2,
.page-header h1,
.auth-card h1,
.section-title {
    margin: 0;
    color: var(--ink);
}

.mini-panel h2 {
    margin-top: 0.45rem;
    font-size: 1.24rem;
    line-height: 1.25;
}

.section-title {
    font-size: 1.1rem;
}

.page-header {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.page-header-inline,
.panel-header,
.filter-bar,
.actions,
.inline-form,
.hero-actions,
.auth-actions,
.split-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.page-header-inline,
.panel-header {
    justify-content: space-between;
}

.page-header h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
}

.panel-header {
    margin-bottom: 1rem;
}

.button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.82rem 1.16rem;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: 160ms ease;
}

.button-primary {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-strong) 100%);
    color: #15120a;
    box-shadow: 0 14px 28px rgba(255, 184, 0, 0.22);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.button-link {
    padding: 0;
    background: none;
    color: var(--danger);
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.button-primary:hover,
.button-primary:focus-visible {
    box-shadow: 0 16px 32px rgba(255, 184, 0, 0.26);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    padding: 1.35rem;
    background:
        linear-gradient(180deg, rgba(255, 211, 61, 0.07), rgba(255, 255, 255, 0.02)),
        rgba(20, 23, 27, 0.96);
}

.stat-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    color: var(--muted);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-icon {
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--gold-soft);
    color: var(--gold);
    font-weight: 800;
}

.stat-card strong {
    display: block;
    margin-top: 0.8rem;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1;
}

.stat-card.alert .stat-icon,
.stat-card.alert strong {
    color: var(--danger);
}

.stat-card.alert .stat-icon {
    background: rgba(255, 125, 125, 0.12);
}

.flash-stack {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.flash {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.flash-success {
    color: var(--success);
    border-color: rgba(105, 212, 143, 0.22);
}

.flash-error {
    color: var(--danger);
    border-color: rgba(255, 125, 125, 0.22);
}

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

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

.full-width {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 0.45rem;
    font-weight: 700;
}

label span {
    color: var(--ink);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.92rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
}

select {
    color-scheme: dark;
}

select option,
select optgroup {
    background: #f5f1e8;
    color: #15171b;
}

input::placeholder,
textarea::placeholder {
    color: #7e8793;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(255, 211, 61, 0.14);
    border-color: rgba(255, 211, 61, 0.36);
    background: rgba(255, 255, 255, 0.06);
}

input[readonly] {
    background: rgba(255, 255, 255, 0.03);
}

input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--gold);
}

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

.auth-card {
    background:
        linear-gradient(180deg, rgba(255, 211, 61, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(20, 23, 27, 0.95);
}

.auth-card h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.auth-meta {
    display: grid;
    gap: 1rem;
}

.auth-side-card {
    padding: 1.35rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-side-card h2 {
    margin: 0;
    font-size: 1.15rem;
}

.auth-side-card ul {
    margin: 0.9rem 0 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.7;
}

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

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

thead th {
    padding: 0 0 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    color: var(--gold);
    text-align: left;
}

th,
td {
    padding: 1rem 0.7rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.inline-form {
    margin: 0;
}

.inline-form select {
    min-width: 9rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    background: rgba(255, 211, 61, 0.12);
    color: var(--gold);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dashboard-list {
    display: grid;
    gap: 0.85rem;
}

.dashboard-item {
    display: grid;
    gap: 0.35rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.dashboard-item strong {
    font-size: 1rem;
}

.dashboard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.stack {
    display: grid;
    gap: 1rem;
}

.support-copy {
    margin: 0;
    line-height: 1.6;
}

.detail-image {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.detail-image-placeholder {
    min-height: 320px;
    padding: 2rem;
}

.form-image-preview {
    max-width: 240px;
    max-height: 240px;
}

.image-editor {
    display: grid;
    gap: 1rem;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.checkbox-row input {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
}

@media (max-width: 980px) {
    .hero,
    .content-grid,
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .feature-strip,
    .utility-grid,
    .hero-highlights,
    .stat-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .page-shell {
        width: min(100% - 1rem, 1180px);
        margin-top: 1rem;
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.9rem 1rem;
    }

    .site-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-nav a,
    .button {
        width: 100%;
        justify-content: center;
    }

    .hero,
    .panel,
    .auth-card,
    .mini-panel,
    .stat-card {
        border-radius: 22px;
    }

    .hero,
    .panel,
    .auth-card,
    .mini-panel {
        padding: 1.15rem;
    }

    .hero-brand {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-title {
        font-size: clamp(2rem, 12vw, 3.6rem);
    }

    .page-header-inline,
    .panel-header,
    .filter-bar,
    .actions,
    .inline-form,
    .hero-actions,
    .auth-actions,
    .split-actions {
        align-items: stretch;
    }

    .filter-bar > *,
    .actions > *,
    .inline-form > *,
    .hero-actions > *,
    .auth-actions > *,
    .split-actions > * {
        flex: 1 1 100%;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tbody {
        display: grid;
        gap: 0.9rem;
    }

    tr {
        padding: 1rem;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    td {
        padding: 0.35rem 0;
        border: none;
    }

    td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.2rem;
        color: var(--gold);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    td.actions,
    td[data-label="Actions"] {
        padding-top: 0.75rem;
    }
}
