@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --ink: #F4F4F4;
    --cream: #171717;
    --paper: #242424;
    --paper-2: #2B2B2B;
    --brass: #C79A55;
    --brass-dark: #E0B66F;
    --chalk: #A7A7A7;
    --thread: #E27676;
    --line: #464646;
    --green: #79B879;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--cream);
    color: var(--ink);
    font-size: 15px;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('assets/logo.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: min(620px, 70vw) auto;
    opacity: .035;
    pointer-events: none;
    z-index: 0;
}

body > * { position: relative; z-index: 1; }

a { color: var(--brass-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 2rem 3rem; }

header.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(20,20,20,.92);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand .logo { height: 72px; width: auto; max-width: 180px; display: block; object-fit: contain; }
.brand .name { font-family: 'Fraunces', serif; font-weight: 700; font-size: 22px; line-height: 1; }
.brand .tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--chalk); margin-top: 4px; }

nav.main { display: flex; gap: 4px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; flex-wrap: wrap; }
nav.main a {
    padding: .5rem .9rem; font-size: 13px; font-weight: 600; color: var(--ink);
    text-decoration: none;
}
nav.main a.active { background: var(--brass); color: #111; }
nav.main a:hover:not(.active) { background: var(--paper-2); text-decoration: none; }

h1.page-title { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 700; margin: 0 0 1.5rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 2rem; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; }
.stat .label { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--chalk); }
.stat .value { font-family: 'Fraunces', serif; font-size: 27px; font-weight: 700; margin-top: 4px; }
.stat.warn .value { color: var(--thread); }

.card {
    background: rgba(36,36,36,.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.6rem;
    box-shadow: 0 8px 25px rgba(0,0,0,.12);
}

.section-label {
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--brass-dark); margin-bottom: 1rem;
}

.measurement-card { margin-top: 1.2rem; }
.measurement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1.25rem; }
.measurement-group { display: none; }
.measurement-group.active { display: block; }

table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
table th, table td { text-align: left; padding: .65rem .9rem; border-bottom: 1px solid var(--line); font-size: 14px; }
table th { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--chalk); background: var(--paper-2); }
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: #303030; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.field { margin-bottom: .9rem; }
.field label { display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--chalk); margin-bottom: 5px; }
.field input, .field select, .field textarea {
    width: 100%; padding: .55rem .7rem; font-family: 'Inter', sans-serif; font-size: 14.5px;
    color: var(--ink); background: #151515; border: 1px solid var(--line); border-radius: 4px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brass); }
.field textarea { min-height: 64px; resize: vertical; }

.btn {
    font-family: 'Inter', sans-serif; font-size: 13.5px; font-weight: 600; letter-spacing: .01em;
    padding: .6rem 1.1rem; border-radius: 4px; cursor: pointer; border: 1px solid transparent;
    display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brass); color: #111; border-color: var(--brass); }
.btn-primary:hover { background: var(--brass-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-danger { background: transparent; color: var(--thread); border-color: var(--thread); font-size: 12.5px; padding: .4rem .7rem; }
.btn-danger:hover { background: #3a2323; }

.badge { display: inline-block; padding: .2rem .6rem; border-radius: 12px; font-size: 12px; font-weight: 700; }
.badge-pending { background: #463823; color: var(--brass-dark); }
.badge-delivered { background: #263D26; color: var(--green); }

.tape { display: flex; align-items: center; width: 100%; margin: .6rem 0; }
.tape .dot-wrap { display: flex; align-items: center; flex: 1; }
.tape .dot-wrap:last-child { flex: 0 0 auto; }
.tape .dot {
    width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--line);
    background: var(--paper); flex-shrink: 0; cursor: pointer; padding: 0;
}
.tape .dot.done { border-color: var(--brass); background: var(--brass); }
.tape .bar { flex: 1; height: 2px; background: var(--line); background-image: repeating-linear-gradient(90deg, var(--line) 0 3px, transparent 3px 6px); }
.tape .bar.done { background: var(--brass); background-image: none; }
.tape form { display: contents; }

.empty { text-align: center; padding: 3.2rem 1rem; color: var(--chalk); }
.empty .icon { font-size: 28px; margin-bottom: 8px; }
.empty h2 { font-family: 'Fraunces', serif; font-size: 18px; color: var(--ink); margin: 0 0 6px; }

.flash { background: #263D26; color: var(--green); border: 1px solid #3B5D3B; padding: .7rem 1rem; border-radius: 4px; margin-bottom: 1.4rem; font-size: 14px; }
.money { font-variant-numeric: tabular-nums; }
.muted { color: var(--chalk); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1.2rem; }
.filters a { font-size: 12.5px; font-weight: 600; padding: .35rem .8rem; border-radius: 14px; border: 1px solid var(--line); color: var(--chalk); }
.filters a.active { background: var(--brass); border-color: var(--brass); color: #111; }
.actions-row { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; flex-wrap: wrap; gap: 10px; }
.report-table { margin-bottom: 1.6rem; }
.report-total { font-weight: 700; color: var(--brass-dark); }
.site-footer { text-align:center; color:var(--chalk); padding:1rem 0 2rem; font-size:12px; }

@media (max-width: 760px) {
    .wrap { padding: 0 1rem 2rem; }
    header.top { padding: 1rem; }
    .brand .logo { height: 58px; }
    nav.main { width: 100%; justify-content: center; }
    .form-row, .measurement-grid { grid-template-columns: 1fr; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
}
