* {
    box-sizing: border-box;
}

html {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f3f1ec;
    color: #161513;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(197, 154, 108, 0.18), transparent 32%),
        linear-gradient(180deg, #f8f5ef 0%, #f3f1ec 100%);
}

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

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

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(248, 245, 239, 0.9);
    border-bottom: 1px solid rgba(22, 21, 19, 0.08);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-kicker,
.eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: rgba(22, 21, 19, 0.58);
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav a,
.nav button,
.button,
.button-secondary,
.button-danger,
.link-button {
    border: 1px solid rgba(22, 21, 19, 0.16);
    background: white;
    padding: 12px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
}

.button,
.nav a.active {
    background: #161513;
    color: white;
}

.button-secondary {
    background: transparent;
}

.button-danger {
    background: #6d1f1f;
    color: white;
    border-color: #6d1f1f;
}

.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page {
    padding: 28px 0 64px;
}

.hero-panel,
.panel,
.stat-card,
.login-card {
    border: 1px solid rgba(22, 21, 19, 0.08);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 60px rgba(38, 27, 13, 0.08);
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 24px;
    padding: 28px;
    border-radius: 28px;
}

.hero-panel h1,
.section-title {
    margin: 12px 0 0;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 0.92;
    letter-spacing: -0.06em;
    text-transform: uppercase;
}

.hero-copy {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(22, 21, 19, 0.72);
}

.panel {
    border-radius: 24px;
    padding: 24px;
}

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

.stat-card {
    border-radius: 24px;
    padding: 20px;
}

.stat-value {
    margin-top: 14px;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.06em;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: rgba(22, 21, 19, 0.58);
}

.stack {
    display: grid;
    gap: 20px;
}

.split {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 20px;
}

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

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

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(22, 21, 19, 0.08);
    text-align: left;
    vertical-align: top;
}

th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(22, 21, 19, 0.58);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    background: #ece8df;
}

.badge.success {
    background: #ddebd7;
    color: #254419;
}

.badge.warning {
    background: #f3e5c8;
    color: #66420a;
}

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

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

.field {
    display: grid;
    gap: 8px;
}

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

.field label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(22, 21, 19, 0.62);
}

.field input,
.field textarea,
.field select {
    width: 100%;
    border: 1px solid rgba(22, 21, 19, 0.14);
    border-radius: 16px;
    padding: 14px 16px;
    background: white;
    font: inherit;
    color: #161513;
}

.field textarea {
    min-height: 140px;
    resize: vertical;
}

.checkbox-row,
.inline-help {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    width: auto;
}

.hint {
    font-size: 0.84rem;
    line-height: 1.6;
    color: rgba(22, 21, 19, 0.58);
}

.flash,
.error-list {
    border-radius: 18px;
    padding: 14px 16px;
}

.flash {
    background: #dfeede;
    color: #26451d;
}

.error-list {
    background: #f7dddd;
    color: #6d1f1f;
}

.media-preview,
.gallery-grid {
    display: grid;
    gap: 14px;
}

.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.gallery-card {
    border: 1px solid rgba(22, 21, 19, 0.08);
    border-radius: 18px;
    overflow: hidden;
    background: white;
}

.gallery-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.gallery-card-body {
    padding: 12px;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(520px, 100%);
    border-radius: 28px;
    padding: 28px;
}

.muted {
    color: rgba(22, 21, 19, 0.6);
}

@media (max-width: 900px) {
    .hero-panel,
    .split,
    .stats-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
