:root {
    --ink: #0f1f1c;
    --paper: #f8f9fa;
    --rose: #c9ada7;
    --willow: #4a7c59;
    --line: rgba(15, 31, 28, 0.14);
    --muted: rgba(15, 31, 28, 0.64);
    --panel: #ffffff;
    --warn: #b66a3c;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--paper);
    color: var(--ink);
    font-family: "Arial Narrow", "Inter Tight", "Segoe UI", Arial, sans-serif;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 34px;
    padding: 24px 18px;
    background: var(--ink);
    color: var(--paper);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand img {
    width: 42px;
    height: 42px;
}

.brand span {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0;
}

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

.nav__item {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-left: 3px solid transparent;
    padding: 10px 12px;
    background: transparent;
    color: rgba(248, 249, 250, 0.72);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nav__item:hover,
.nav__item.is-active {
    background: rgba(248, 249, 250, 0.08);
    border-color: var(--rose);
    color: var(--paper);
}

.sidebar__note {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(248, 249, 250, 0.16);
}

.sidebar__note span {
    display: block;
    margin-bottom: 8px;
    color: var(--rose);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.sidebar__note strong {
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

.workspace {
    min-width: 0;
    padding: 28px;
}

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

.eyebrow {
    margin: 0 0 8px;
    color: var(--willow);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 780px;
    margin-bottom: 0;
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.02;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 0;
    font-size: 24px;
    line-height: 1.1;
}

.status-pill {
    flex: 0 0 auto;
    min-width: 118px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    color: var(--willow);
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.metrics article {
    min-width: 0;
    padding: 18px 18px 16px 0;
    border-right: 1px solid var(--line);
}

.metrics article + article {
    padding-left: 18px;
}

.metrics article:last-child {
    border-right: 0;
}

.metrics span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metrics strong {
    display: block;
    margin-top: 8px;
    font-size: 32px;
    line-height: 1;
}

.control-strip {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 24px 0;
}

.search {
    display: grid;
    gap: 8px;
    width: min(100%, 330px);
}

.search span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.search input {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 0 12px;
    background: #fff;
    color: var(--ink);
    outline-color: var(--willow);
}

.segments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.segment,
.action-btn {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 0 12px;
    background: transparent;
    color: var(--ink);
    transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.segment:hover,
.action-btn:hover {
    transform: translateY(-1px);
}

.segment.is-active,
.action-btn:first-child {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
    gap: 24px;
}

.timeline-panel,
.detail-sheet,
.calendar-view,
.report-view {
    min-width: 0;
}

.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-head span {
    color: var(--muted);
    font-size: 13px;
}

.timeline {
    display: grid;
    gap: 10px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 76px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--rose);
    padding: 12px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--ink);
    text-align: left;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.timeline-item:hover,
.timeline-item.is-selected {
    border-color: rgba(74, 124, 89, 0.55);
    box-shadow: 0 12px 30px rgba(15, 31, 28, 0.08);
    transform: translateY(-1px);
}

.timeline-item__time {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.timeline-item__main {
    min-width: 0;
}

.timeline-item__main strong,
.timeline-item__main small {
    display: block;
    overflow-wrap: anywhere;
}

.timeline-item__main strong {
    margin-bottom: 5px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
}

.timeline-item__main small {
    color: var(--muted);
    line-height: 1.4;
}

.stage {
    min-width: 118px;
    padding: 7px 9px;
    background: rgba(74, 124, 89, 0.12);
    color: var(--willow);
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.stage--concert {
    background: rgba(201, 173, 167, 0.28);
    color: #704e48;
}

.stage--schedule {
    background: rgba(15, 31, 28, 0.08);
    color: var(--ink);
}

.detail-sheet {
    position: sticky;
    top: 22px;
    align-self: start;
    min-height: 560px;
    border-left: 1px solid var(--line);
    padding-left: 24px;
}

.sheet-kicker {
    color: var(--willow);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.detail-sheet h2 {
    margin: 12px 0 14px;
    font-size: 34px;
}

.detail-sheet p {
    color: var(--muted);
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.7;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.detail-list div {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.detail-list dt {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-list dd {
    margin: 5px 0 0;
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.vote-box {
    border: 1px solid var(--line);
    padding: 16px;
    background: #fff;
}

.vote-box__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.vote-bar {
    height: 9px;
    margin: 14px 0 10px;
    background: rgba(15, 31, 28, 0.12);
}

.vote-bar i {
    display: block;
    height: 100%;
    background: var(--willow);
    transition: width 220ms ease;
}

.vote-box small {
    color: var(--muted);
    line-height: 1.45;
}

.action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.calendar-slot {
    min-height: 150px;
    padding: 14px;
    background: var(--paper);
}

.calendar-slot time,
.calendar-slot span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.calendar-slot strong {
    display: block;
    margin: 14px 0 10px;
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.3;
}

.report-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.quality-ring {
    display: grid;
    place-items: center;
    width: 250px;
    aspect-ratio: 1;
    border: 18px solid var(--rose);
    outline: 1px solid var(--line);
    outline-offset: 10px;
    background: #fff;
    text-align: center;
}

.quality-ring span {
    display: block;
    font-size: 54px;
    font-weight: 900;
}

.quality-ring small {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.load-list {
    display: grid;
    gap: 14px;
}

.load-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 2fr) 52px;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.load-row strong,
.load-row span {
    display: block;
}

.load-row span {
    color: var(--muted);
    font-size: 13px;
}

.load-row meter {
    width: 100%;
    height: 12px;
}

.load-row em {
    font-style: normal;
    font-weight: 800;
}

.empty {
    border: 1px dashed var(--line);
    padding: 22px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.55);
}

.is-hidden {
    display: none;
}

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

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nav {
        display: flex;
        overflow-x: auto;
    }

    .nav__item {
        min-width: 128px;
    }

    .sidebar__note {
        margin-top: 0;
    }

    .workspace {
        padding: 22px 16px;
    }

    .topbar,
    .control-strip {
        display: grid;
    }

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

    .metrics article:nth-child(2) {
        border-right: 0;
    }

    .metrics article:nth-child(3) {
        padding-left: 0;
    }

    .dashboard,
    .report-layout {
        grid-template-columns: 1fr;
    }

    .detail-sheet {
        position: static;
        min-height: 0;
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 22px 0 0;
    }

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

@media (max-width: 640px) {
    h1 {
        font-size: 31px;
    }

    .metrics {
        grid-template-columns: 1fr;
    }

    .metrics article,
    .metrics article + article,
    .metrics article:nth-child(3) {
        border-right: 0;
        padding-left: 0;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .stage {
        min-width: 0;
        width: fit-content;
    }

    .detail-list,
    .action-row,
    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .quality-ring {
        width: min(100%, 230px);
    }

    .load-row {
        grid-template-columns: 1fr;
    }
}
