:root {
    --ink: #22333b;
    --paper: #f2f4f3;
    --accent: #e63946;
    --mist: #a8dadc;
    --line: rgba(34, 51, 59, 0.16);
    --muted: rgba(34, 51, 59, 0.62);
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

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

.rail {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 34px;
    height: 100vh;
    padding: 28px;
    background: var(--ink);
    color: var(--paper);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand img {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

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

.nav-tab {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: flex-start;
    border: 0;
    border-radius: 8px;
    padding: 0 13px;
    background: transparent;
    color: rgba(242, 244, 243, 0.74);
    cursor: pointer;
    text-align: left;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-tab:hover,
.nav-tab.is-active {
    background: rgba(168, 218, 220, 0.14);
    color: var(--white);
    transform: translateX(2px);
}

.metric-spine {
    align-self: end;
    display: grid;
    gap: 1px;
    border-top: 1px solid rgba(242, 244, 243, 0.16);
}

.metric-spine div {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    min-height: 58px;
    border-bottom: 1px solid rgba(242, 244, 243, 0.16);
}

.metric-spine span {
    color: rgba(242, 244, 243, 0.64);
    font-size: 12px;
}

.metric-spine strong {
    color: var(--mist);
    font-size: clamp(18px, 2vw, 28px);
    font-weight: 850;
}

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

.topbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    min-height: 86px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 22px;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 0;
    font-size: clamp(32px, 5vw, 72px);
    line-height: 0.92;
    letter-spacing: 0;
}

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

.search {
    display: grid;
    gap: 7px;
    min-width: min(360px, 100%);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.search input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    outline: 0;
}

.search input {
    height: 44px;
    padding: 0 14px;
}

.search input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.14);
}

.screen {
    display: none;
}

.screen.is-visible {
    display: block;
    animation: rise 220ms ease both;
}

.board-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 318px;
    gap: 22px;
    align-items: start;
}

.kanban {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 12px;
    min-width: 0;
}

.lane {
    min-width: 0;
    border-left: 1px solid var(--line);
    padding-left: 12px;
}

.lane header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.lane header strong {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
}

.lane-items {
    display: grid;
    gap: 10px;
}

.booking-card {
    position: relative;
    min-height: 190px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.76);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.booking-card:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 51, 59, 0.3);
    box-shadow: 0 18px 40px rgba(34, 51, 59, 0.08);
}

.booking-card[data-priority="urgent"] {
    border-color: rgba(230, 57, 70, 0.42);
}

.booking-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.booking-top span {
    color: var(--accent);
}

.booking-card h3 {
    margin: 18px 0 8px;
    font-size: 18px;
    line-height: 1.08;
}

.booking-card p {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.booking-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.booking-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

dt,
dd {
    margin: 0;
}

dt {
    color: var(--muted);
    font-size: 11px;
}

dd {
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}

.quick-panel {
    position: sticky;
    top: 24px;
    border-radius: 8px;
    background: var(--white);
    padding: 18px;
    box-shadow: 0 20px 58px rgba(34, 51, 59, 0.11);
}

.panel-head {
    margin-bottom: 18px;
}

form {
    display: grid;
    gap: 12px;
}

form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

select {
    height: 42px;
    padding: 0 10px;
}

textarea {
    min-height: 104px;
    resize: vertical;
    padding: 11px;
}

button[type="submit"] {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: var(--white);
    cursor: pointer;
    font-weight: 850;
    transition: transform 160ms ease, filter 160ms ease;
}

button[type="submit"]:hover {
    transform: translateY(-1px);
    filter: saturate(1.1);
}

.resources {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.resources h3 {
    margin: 0;
    font-size: 15px;
}

.resource-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.resource-row strong {
    color: var(--ink);
}

.resource-row i {
    grid-column: 1 / -1;
    height: 4px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--mist) var(--w), rgba(34, 51, 59, 0.12) var(--w));
}

.section-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
}

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

.timeline,
.workflow-grid,
.team-grid {
    display: grid;
    gap: 10px;
}

.timeline-item,
.workflow-step,
.team-row {
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}

.timeline-item {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
}

.timeline-item time,
.timeline-item span,
.workflow-step span,
.team-row span,
.team-row em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.timeline-item p,
.workflow-step p {
    margin: 5px 0 7px;
    color: var(--muted);
    line-height: 1.45;
}

.workflow-grid {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.workflow-step {
    min-height: 178px;
    padding-right: 18px;
}

.workflow-step h3 {
    margin: 12px 0 8px;
    font-size: 19px;
}

.workflow-step strong {
    color: var(--accent);
}

.team-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) minmax(110px, 0.8fr) minmax(130px, 1fr) 90px;
    gap: 16px;
    align-items: center;
}

.team-row div {
    display: grid;
    gap: 4px;
}

meter {
    width: 100%;
    height: 10px;
}

.empty-state {
    grid-column: 1 / -1;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: var(--white);
}

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

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

    .rail {
        position: static;
        height: auto;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .metric-spine {
        grid-template-columns: repeat(4, 1fr);
    }

    .metric-spine div {
        border-right: 1px solid rgba(242, 244, 243, 0.16);
        padding-right: 12px;
    }

    .board-layout {
        grid-template-columns: 1fr;
    }

    .quick-panel {
        position: static;
    }

    .kanban {
        overflow-x: auto;
        padding-bottom: 8px;
    }
}

@media (max-width: 720px) {
    .rail,
    .workspace {
        padding: 20px;
    }

    .topbar,
    .section-line {
        display: grid;
        align-items: start;
    }

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

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

    .kanban {
        grid-template-columns: minmax(240px, 82vw);
    }

    .timeline-item,
    .team-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

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

