:root {
    --ink: #18171c;
    --muted: #686575;
    --line: #e8e3dd;
    --paper: #fbfaf8;
    --panel: #ffffff;
    --coal: #242229;
    --gold: #b8945f;
    --rose: #c77b7b;
    --sage: #6d8d82;
    --blue: #607d9b;
    --danger: #b84d4d;
    --success: #3f7f68;
    --shadow: 0 18px 45px rgba(24, 23, 28, .11);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        linear-gradient(115deg, rgba(184, 148, 95, .10), transparent 35%),
        linear-gradient(35deg, rgba(96, 125, 155, .11), transparent 40%),
        var(--paper);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    letter-spacing: 0;
}

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

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        linear-gradient(rgba(24, 23, 28, .52), rgba(24, 23, 28, .42)),
        url("../img/st-model-pro-pattern.svg");
    background-size: cover;
}

.login-box {
    width: min(430px, 100%);
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 8px;
    padding: 34px;
    box-shadow: var(--shadow);
    animation: enter .65s ease both;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--coal), var(--gold));
    font-family: Georgia, serif;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    color: #f7f3ee;
    background: linear-gradient(180deg, #242229, #343039);
}

.sidebar .brand {
    margin-bottom: 28px;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav a {
    padding: 12px 13px;
    border-radius: 8px;
    color: rgba(255,255,255,.76);
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav a:hover,
.nav a.active {
    color: #fff;
    background: rgba(255,255,255,.10);
    transform: translateX(3px);
}

.main {
    padding: 26px clamp(18px, 3vw, 42px) 48px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--gold);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
}

h1, h2, h3 {
    margin: 0;
    line-height: 1.12;
}

h1 {
    font-size: clamp(28px, 4vw, 44px);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
}

h2 {
    font-size: 22px;
}

h3 {
    font-size: 17px;
}

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

.grid {
    display: grid;
    gap: 18px;
}

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

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

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

.panel,
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(24,23,28,.06);
}

.panel {
    padding: 20px;
    animation: rise .45s ease both;
}

.stat {
    padding: 18px;
    position: relative;
    overflow: hidden;
}

.stat::after {
    content: "";
    position: absolute;
    right: -34px;
    top: -42px;
    width: 105px;
    height: 105px;
    border: 1px solid rgba(184,148,95,.28);
    transform: rotate(24deg);
}

.stat strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

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

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #fff;
    background: var(--coal);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover,
button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(24,23,28,.16);
}

.btn.secondary,
button.secondary {
    color: var(--coal);
    background: #fff;
    border-color: var(--line);
}

.btn.gold {
    background: var(--gold);
}

.btn.danger {
    background: var(--danger);
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1ece5;
    color: #5f4c31;
    font-size: 12px;
    font-weight: 800;
}

.pill.green {
    background: #e6f2ed;
    color: var(--success);
}

.pill.red {
    background: #f7e6e6;
    color: var(--danger);
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

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

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

.hero-strip {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    display: grid;
    align-items: end;
    padding: 28px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(24,23,28,.92), rgba(24,23,28,.42)),
        url("../img/st-model-pro-pattern.svg");
    background-size: cover;
    border-radius: 8px;
}

.hero-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0 40%, rgba(255,255,255,.18) 48%, transparent 56%);
    animation: runway 4s ease-in-out infinite;
}

.hero-strip > * {
    position: relative;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.model-card {
    overflow: hidden;
}

.model-photo {
    aspect-ratio: 4 / 5;
    width: 100%;
    object-fit: cover;
    background: #eee8df;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-family: Georgia, serif;
    font-size: 40px;
}

.model-card .content {
    padding: 14px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.gallery img,
.gallery video {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.signature-pad {
    width: 100%;
    height: 170px;
    border: 1px dashed var(--gold);
    border-radius: 8px;
    background: #fff;
}

.flash {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #e6f2ed;
    color: var(--success);
    font-weight: 700;
    animation: rise .3s ease both;
}

.flash.error {
    background: #f7e6e6;
    color: var(--danger);
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.book-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px;
    background: #fff;
}

.book-cover {
    min-height: 72vh;
    display: grid;
    align-items: end;
    padding: 42px;
    color: #fff;
    background-size: cover;
    background-position: center;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes enter {
    from { opacity: 0; transform: scale(.98) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes runway {
    0%, 55% { transform: translateX(-80%); opacity: 0; }
    70% { opacity: 1; }
    100% { transform: translateX(80%); opacity: 0; }
}

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

    .sidebar {
        position: static;
        height: auto;
    }

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

    .grid.cols-2,
    .grid.cols-3,
    .grid.cols-4,
    .form-row {
        grid-template-columns: 1fr;
    }

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

@media print {
    .sidebar,
    .topbar,
    .no-print,
    .btn {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .app-shell {
        display: block;
    }

    .main {
        padding: 0;
    }

    .panel,
    .card {
        box-shadow: none;
    }
}
