:root {
    --navy: #071b3a;
    --navy-2: #0c2e62;
    --red: #c8102e;
    --gold: #c9a227;
    --gold-2: #e8c547;
    --paper: #eef2f8;
    --line: #d7deea;
    --muted: #5c6b82;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    background: var(--paper);
    color: #142033;
}
h1, h2, h3, .brand strong, .dash-hero h1, .stat b {
    font-family: Sora, "Plus Jakarta Sans", sans-serif;
}
a { color: inherit; text-decoration: none; }
.admin-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: linear-gradient(180deg, #071b3a 0%, #0a2448 100%);
    color: #d5deec;
    padding: 22px 16px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(201,162,39,.22);
}
.sidebar .brand {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #fff;
    margin-bottom: 22px;
    padding: 4px 6px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar img {
    width: 42px;
    height: 48px;
    object-fit: contain;
    background: rgba(255,255,255,.06);
    padding: 4px;
    border-radius: 10px;
}
.sidebar .brand strong { display: block; font-size: 16px; }
.sidebar .brand em {
    display: block;
    font-style: normal;
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold);
}
.nav-label {
    margin: 16px 8px 6px;
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(201,162,39,.85);
    font-weight: 800;
}
.sidebar nav { flex: 1; overflow-y: auto; }
.sidebar nav a {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 10px;
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 13px;
    color: #c5d0e0;
}
.sidebar nav a.active, .sidebar nav a:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.sidebar nav a.active {
    background: rgba(201,162,39,.16);
    color: var(--gold-2);
    box-shadow: inset 3px 0 0 var(--gold);
}
.sidebar-foot {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.sidebar-foot span {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.main { padding: 28px 30px 40px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; }
.top h1 { margin: 0; font-size: 28px; color: var(--navy); }

.dash-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    background:
        linear-gradient(120deg, rgba(201,162,39,.18), transparent 40%),
        linear-gradient(135deg, #071b3a 0%, #0c2e62 58%, #7a0e22 130%);
    color: #fff;
    border-radius: 22px;
    padding: 28px 30px;
    margin-bottom: 20px;
    border-bottom: 4px solid var(--gold);
    position: relative;
    overflow: hidden;
}
.dash-hero::after {
    content: "";
    position: absolute;
    right: -40px; top: -40px;
    width: 180px; height: 180px;
    border: 18px solid rgba(201,162,39,.12);
    border-radius: 50%;
}
.dash-kicker {
    margin: 0 0 8px;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800;
    color: var(--gold-2);
}
.dash-hero h1 { margin: 0; font-size: clamp(26px, 3vw, 36px); color: #fff; }
.dash-sub { margin: 8px 0 0; color: rgba(255,255,255,.7); }
.dash-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    background:
        linear-gradient(120deg, rgba(201,162,39,.18), transparent 40%),
        linear-gradient(135deg, #071b3a 0%, #0c2e62 70%);
    color: #fff;
    border-radius: 20px;
    padding: 22px 26px;
    margin-bottom: 18px;
    border-bottom: 4px solid var(--gold);
}
.page-head h1 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); color: #fff; }

.form-layout {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 16px;
    align-items: start;
}
.value-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.value-card {
    background: #f6f8fc;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
}
.photo-frame {
    background: #071b3a;
    border-radius: 14px;
    padding: 10px;
    margin: 0 0 12px;
}
.photo-frame img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    object-position: center;
    display: block;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(7,27,58,.06);
    display: flex;
    flex-direction: column;
}
.media-card .shot {
    background: #071b3a;
    margin: 0;
}
.media-card .shot img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    object-position: center;
    display: block;
}
.media-card .body { padding: 14px 16px 16px; flex: 1; }
.media-card small {
    display: block;
    color: var(--red);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 4px;
}
.media-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--navy); }
.media-card p { margin: 0; color: var(--muted); font-size: 13px; }
.media-card .foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 0 16px 16px;
}
.empty-box {
    background: #fff;
    border-radius: 18px;
    padding: 36px 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(7,27,58,.06);
}
.empty-box strong { display: block; font-size: 18px; color: var(--navy); margin-bottom: 6px; }
.empty-box p { color: var(--muted); margin: 0 0 16px; }
.inbox-list { display: grid; gap: 10px; }
.inbox-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 18px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(7,27,58,.06);
}
.inbox-card strong { display: block; color: var(--navy); }
.quote-admin {
    background: #071b3a;
    color: #fff;
    border-radius: 18px;
    padding: 18px;
    border-top: 4px solid var(--gold);
}
.quote-admin p { margin: 8px 0 12px; font-size: 15px; }
.quote-admin span { color: #b7c3d6; font-size: 12px; }
.form-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(7,27,58,.06);
    overflow: hidden;
}
.form-section { padding: 22px 24px; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; }
.form-section h3 {
    margin: 0 0 6px;
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--navy);
}
.form-section .hint { margin: 0 0 16px; }
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 24px 20px;
    background: #f4f7fb;
}
.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin: 10px 0;
}
.logo-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.logo-box {
    background: #071b3a;
    border-radius: 14px;
    padding: 14px;
    color: #fff;
}
.logo-box label { color: #e8c547; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.logo-box img { margin: 10px 0; max-height: 56px; width: auto; }
.logo-box input { color: #fff; }
.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    padding: 6px 0 8px;
}
.meta-item span {
    display: block;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 4px;
}
.meta-item p, .meta-item a { margin: 0; font-weight: 700; color: var(--navy); word-break: break-word; }
.pager { display: flex; gap: 16px; padding: 14px 18px; font-weight: 800; }
.pager a { color: var(--red); }
.btn-soft { background: #fff; color: var(--navy); border: 1px solid rgba(255,255,255,.35); }
.page-head .btn-ghost, .page-head .btn-soft { color: #fff; border: 1px solid rgba(255,255,255,.3); background: transparent; }
.page-head .btn-ghost:hover, .page-head .btn-soft:hover { background: rgba(255,255,255,.1); }

.stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.stat, .panel {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(7,27,58,.06);
}
.panel:has(.panel-head),
.panel:has(.table-wrap) {
    padding: 0;
    overflow: hidden;
}
.stat {
    display: block;
    border: 1px solid transparent;
    transition: .2s ease;
}
.stat:hover {
    transform: translateY(-3px);
    border-color: rgba(201,162,39,.45);
    box-shadow: 0 16px 32px rgba(7,27,58,.1);
}
.stat-ico {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 12px;
    color: #fff;
}
.ico-red { background: var(--red); }
.ico-navy { background: var(--navy); }
.ico-gold { background: var(--gold); color: var(--navy); }
.stat b { display: block; font-size: 30px; color: var(--navy); line-height: 1; }
.stat-label { display: block; margin-top: 6px; font-weight: 800; font-size: 13px; color: var(--navy); }
.stat small { display: block; margin-top: 4px; color: var(--muted); font-weight: 600; }

.quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.quick-row a {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 800;
    color: var(--navy);
}
.quick-row a:hover { border-color: var(--gold); background: #fff8e8; }

.dash-alert {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    background: #fff4e5;
    border: 1px solid #f1d7a5;
    border-left: 4px solid var(--gold);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #6b4e12;
}
.dash-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 16px;
    margin-bottom: 16px;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 10px;
}
.panel-head h3 { margin: 0; font-size: 16px; color: var(--navy); }
.panel-head a, .link { color: var(--red); font-weight: 800; font-size: 13px; }
.cell-muted { color: var(--muted); font-size: 12px; margin-top: 2px; }
.empty { color: var(--muted); padding: 8px 18px 16px; }

.review-wait {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
}
.review-wait span { display: block; color: var(--muted); font-size: 12px; margin: 4px 0 6px; }
.review-wait p { margin: 0; color: #24344d; }
.review-wait form { flex-shrink: 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    background: #f7f9fc;
}
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 800; cursor: pointer;
}
.btn-red { background: var(--red); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); }
.sidebar .btn-ghost { color: #fff; padding: 8px 12px; border: 1px solid rgba(255,255,255,.18); }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; text-transform: capitalize; }
.badge-new { background: #fde8eb; color: var(--red); }
.badge-ok { background: #e8f8ee; color: #146c38; }
.form { max-width: 980px; background: #fff; padding: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(7,27,58,.06); }
.form > .field, .form > h3, .form > label, .form > p, .form > .alert, .form > .field-row { margin-left: 24px; margin-right: 24px; }
.form > h3 { padding-top: 22px; }
.form > .field:first-child, .form > .alert:first-child { padding-top: 8px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid rgba(201,162,39,.45); border-color: var(--gold);
}
.field textarea { min-height: 88px; resize: vertical; }
.logo-box input[type="file"] {
    width: 100%;
    color: #fff;
    font-size: 12px;
}
.panel-head span { color: var(--muted); font-size: 13px; font-weight: 700; }
.login-wrap {
    min-height: 100vh; display: grid; place-items: center;
    background:
        linear-gradient(120deg, rgba(201,162,39,.2), transparent 42%),
        linear-gradient(140deg, #071b3a 0%, #0c2e62 50%, #7a0e22 130%);
}
.login-card {
    width: min(420px, calc(100% - 32px));
    background: #fff; padding: 32px 28px; border-radius: 22px;
    border-bottom: 4px solid var(--gold);
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.login-card h2 { margin: 8px 0 6px; color: var(--navy); }
.login-card > p { color: var(--muted); margin: 0 0 18px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 8px; }
.alert { padding: 12px 14px; border-radius: 12px; background: #e8f8ee; color: #146c38; margin-bottom: 14px; font-weight: 700; }
.alert-err { background: #fde8eb; color: #8e0b20; }
.hint { color: #5c6b82; margin: -8px 0 18px; max-width: 68ch; }
.form-wide { max-width: 820px; }
.form h3 { margin: 22px 0 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.preview-logo { height: 56px; width: auto; background: #071b3a; padding: 6px; border-radius: 8px; }
.preview-logo.small { height: 32px; }
.preview-wide { max-width: 280px; height: auto; background: #071b3a; }
.thumb { width: 72px; height: 48px; object-fit: contain; background: #071b3a; }
.table-wrap { overflow-x: auto; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nav-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    background: #c8102e;
    color: #fff;
    font-size: 11px;
    font-style: normal;
}
.admin-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #071b3a;
    color: #fff;
}
.admin-bar a { color: #e8c547; font-weight: 700; }
.admin-menu {
    width: 42px; height: 42px;
    border: 1px solid rgba(255,255,255,.2);
    background: transparent;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}
.admin-mask { display: none; }
@media (max-width: 1200px) {
    .stats { grid-template-columns: repeat(3, 1fr); }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .dash-hero, .page-head { flex-direction: column; align-items: flex-start; }
    .form-layout, .meta-grid, .value-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-bar { display: flex; position: sticky; top: 0; z-index: 30; }
    .admin-mask.open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(7,27,58,.45);
        z-index: 40;
    }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(280px, 86vw);
        z-index: 50;
        transform: translateX(-105%);
        transition: transform .25s ease;
        overflow-y: auto;
        height: 100vh;
    }
    .sidebar.open { transform: none; }
    .stats { grid-template-columns: 1fr 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .main { padding: 18px 14px 32px; }
    .top { flex-wrap: wrap; gap: 10px; }
    .form { padding: 16px; }
    .review-wait { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
    .stats { grid-template-columns: 1fr; }
    .card-grid, .card-grid.three, .card-grid.two { grid-template-columns: 1fr; }
    .inbox-card { grid-template-columns: 1fr; }
}
