:root {
    --bg: #f7f3ed;
    --surface: #fffaf3;
    --text: #26211b;
    --muted: #73685b;
    --line: #e2d8c9;
    --amber: #c87922;
    --amber-dark: #8a4c15;
    --green: #3f6f52;
    --shadow: 0 18px 45px rgba(73, 52, 28, 0.12);
}

.tasting-page {
    max-width: 980px;
}

.tasting-thanks {
    max-width: 620px;
}

.tasting-question {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, .12);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.tasting-question:first-of-type {
    border-top: 0;
    margin-top: .75rem;
    padding-top: 0;
}

.tasting-question legend {
    float: none;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.tasting-scale {
    display: grid;
    gap: .55rem;
}

.tasting-option {
    align-items: center;
    border: 1px solid rgba(0, 0, 0, .16);
    border-radius: .65rem;
    cursor: pointer;
    display: grid;
    gap: .7rem;
    grid-template-columns: auto 2rem 1fr;
    padding: .7rem .8rem;
}

.tasting-option:has(input:checked) {
    background: rgba(181, 112, 35, .12);
    border-color: #b57023;
}

.tasting-option input {
    height: 1.15rem;
    margin: 0;
    width: 1.15rem;
}

.tasting-value {
    font-size: 1.05rem;
    font-weight: 800;
    text-align: center;
}

body {
    min-height: 100vh;
    background:
        linear-gradient(120deg, rgba(200, 121, 34, 0.12), transparent 32%),
        linear-gradient(210deg, rgba(63, 111, 82, 0.12), transparent 36%),
        var(--bg);
    color: var(--text);
}

.login-page { display: grid; place-items: center; padding: 2rem 0; }
.login-shell { display: flex; justify-content: center; }
.login-card {
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    max-width: 460px;
    overflow: hidden;
    width: 100%;
}
.login-logo { display: block; height: auto; max-width: 100%; width: 285px; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
    border-bottom: 1px solid rgba(226, 216, 201, 0.78);
}

.brand-logo {
    display: block;
    width: min(285px, 52vw);
    height: auto;
}

.btn-primary {
    background-color: var(--amber);
    border-color: var(--amber);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--amber-dark);
    border-color: var(--amber-dark);
}

.card,
.form-section,
.hero-card,
.latest-band,
.empty-state {
    border-color: var(--line);
    border-radius: 8px;
    background: rgba(255, 250, 243, 0.9);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--amber-dark);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    max-width: 760px;
    margin-bottom: 18px;
    font-size: clamp(2.15rem, 7vw, 5.25rem);
    line-height: 0.98;
}

.hero-copy {
    padding: clamp(28px, 6vw, 64px) 0;
}

.hero-copy p:not(.eyebrow) {
    max-width: 640px;
    color: var(--muted);
    font-size: 1.12rem;
}

.hero-card {
    min-height: 330px;
}

.liquid-visual {
    position: relative;
    min-height: 160px;
    background:
        radial-gradient(circle at 22% 28%, rgba(255, 255, 255, 0.75) 0 13px, transparent 14px),
        linear-gradient(180deg, #fed489, #c87922);
}

.liquid-visual span {
    position: absolute;
    right: 24px;
    bottom: 22px;
    width: 72px;
    height: 100px;
    border: 4px solid rgba(38, 33, 27, 0.72);
    border-radius: 8px 8px 20px 20px;
}

.liquid-visual span::before {
    content: "";
    position: absolute;
    right: -32px;
    top: 28px;
    width: 28px;
    height: 38px;
    border: 4px solid rgba(38, 33, 27, 0.72);
    border-left: 0;
    border-radius: 0 16px 16px 0;
}

.hero-card dl {
    display: grid;
    margin: 0;
}

.hero-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-top: 1px solid var(--line);
}

dt,
.batch-card p,
.latest-band span,
.latest-band small,
.panel p {
    color: var(--muted);
}

dd {
    margin: 0;
    font-weight: 900;
}

.latest-band {
    display: flex;
    margin-top: 28px;
    padding: 18px 20px;
}

.latest-band span,
.latest-band small {
    display: block;
}

.latest-band strong {
    display: block;
    font-size: 1.25rem;
}

.search {
    max-width: 360px;
}

.status {
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(63, 111, 82, 0.12);
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 850;
}

.batch-card {
    min-height: 245px;
}

.batch-card-top,
.batch-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.batch-card h3 {
    margin: 18px 0 6px;
    font-size: 1.35rem;
}

.batch-card time {
    color: var(--muted);
    font-size: 0.9rem;
}

.batch-stats {
    margin-top: auto;
    padding-top: 18px;
}

.batch-stats span {
    font-weight: 850;
}

.card-link,
.back-link {
    display: inline-flex;
    width: fit-content;
    margin-top: 16px;
    color: var(--amber-dark);
    font-weight: 850;
    text-decoration: none;
}

.metric span,
.metric strong {
    display: block;
}

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

.metric strong {
    font-size: 1.8rem;
}

.panel h2,
.form-section h2 {
    margin-bottom: 12px;
    font-size: 1rem;
}

.table-title {
    margin: 0;
    font-size: 1rem;
}

.editable-table {
    margin-bottom: 0;
}

.editable-table th {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
}

.editable-table .quantity-col {
    width: 130px;
}

.editable-table .ion-input {
    min-width: 76px;
}

.editable-table .action-col {
    width: 44px;
}

.editable-table .table-input {
    min-height: 36px;
    border-color: transparent;
    background: transparent;
    padding: 6px 8px;
}

.editable-table .table-input:focus {
    border-color: var(--amber);
    background: #fff;
    box-shadow: 0 0 0 0.2rem rgba(200, 121, 34, 0.16);
}

.panel p {
    margin-bottom: 0;
}

.gallery-panel { border-color: var(--line); box-shadow: var(--shadow); }
.gallery-upload { min-width: min(100%, 470px); }
.gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.gallery-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: .8rem;
    overflow: hidden;
}
.gallery-item img {
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    transition: transform .2s ease;
    width: 100%;
}
.gallery-item a:hover img { transform: scale(1.025); }
.gallery-item figcaption {
    align-items: center;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
    padding: .7rem;
}
.gallery-item figcaption span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gallery-empty {
    background: rgba(200, 121, 34, .07);
    border: 1px dashed var(--line);
    border-radius: .8rem;
    color: var(--muted);
    padding: 2rem;
    text-align: center;
}

label {
    color: var(--muted);
    font-weight: 750;
}

textarea.form-control {
    min-height: 128px;
    resize: vertical;
}

.sticky-actions {
    position: sticky;
    bottom: 16px;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 767.98px) {
    .brand-logo {
        width: min(240px, 70vw);
    }

    h1 {
        font-size: 2.35rem;
    }

    .search,
    .sticky-actions .btn {
        max-width: none;
        width: 100%;
    }
}

.temperature-chart-summary span {
    min-width: 86px;
    padding: .55rem .75rem;
    border: 1px solid rgba(18, 54, 43, .14);
    border-radius: .65rem;
    background: rgba(255, 255, 255, .72);
}

.temperature-chart-summary small,
.temperature-chart-summary strong {
    display: block;
}

.temperature-chart-summary small {
    color: var(--bs-secondary-color);
    font-size: .72rem;
}

.temperature-chart-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.temperature-chart-svg {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1200 / 420;
}

.temperature-chart-grid {
    stroke: rgba(18, 54, 43, .15);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.temperature-chart-line {
    fill: none;
    stroke: #1a8460;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.temperature-chart-label {
    fill: #64736e;
    font-family: system-ui, sans-serif;
    font-size: 14px;
}

.temperature-chart-tooltip {
    margin-top: .75rem;
    color: var(--bs-secondary-color);
    font-size: .9rem;
}
