:root {
    --ink: #162033;
    --navy: #1d3557;
    --paper: #fff8f0;
    --surface: #ffffff;
    --mint: #2a9d8f;
    --coral: #e76f51;
    --line: #d9d6cf;
    --muted: #667085;
    --soft: #f4eee5;
    --shadow: 0 14px 45px rgba(29, 53, 87, .10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.brand strong {
    display: block;
    font-size: 20px;
    letter-spacing: 0;
}

.brand span,
.eyebrow,
.sidebar__note span,
.metric span,
.lane__meta,
.item__meta,
.search span,
.setting__key,
.member__meta {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.brand span,
.sidebar__note span {
    color: rgba(255, 248, 240, .68);
}

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

.nav__item {
    border: 0;
    color: rgba(255, 248, 240, .72);
    background: transparent;
    border-radius: 8px;
    text-align: left;
    padding: 12px 12px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav__item:hover,
.nav__item.is-active {
    background: rgba(255, 248, 240, .11);
    color: var(--paper);
}

.nav__item:active {
    transform: translateY(1px);
}

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

.sidebar__note b {
    display: block;
    margin-top: 7px;
    line-height: 1.45;
    font-size: 14px;
    font-weight: 650;
}

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

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

.eyebrow {
    color: var(--mint);
    margin: 0 0 5px;
    font-weight: 700;
}

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

h1 {
    margin-bottom: 0;
    font-size: clamp(26px, 3vw, 44px);
    letter-spacing: 0;
    line-height: 1.05;
}

h2 {
    margin-bottom: 0;
    font-size: 22px;
    letter-spacing: 0;
}

.sync {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .62);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.sync__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 5px rgba(42, 157, 143, .14);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.metric {
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.metric b {
    display: block;
    font-size: 26px;
    margin-top: 5px;
}

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

.toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.search {
    display: grid;
    gap: 6px;
    min-width: min(340px, 100%);
    color: var(--muted);
}

.search input {
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--ink);
    background: var(--surface);
    outline: 0;
}

.search input:focus {
    border-color: var(--mint);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, .14);
}

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

.chip {
    min-height: 36px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .7);
    color: var(--ink);
    border-radius: 999px;
    padding: 7px 12px;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.chip.is-active,
.chip:hover {
    border-color: var(--navy);
    background: var(--navy);
    color: var(--paper);
}

.view {
    display: none;
}

.view.is-active {
    display: block;
    animation: rise .22s ease both;
}

.view[data-panel="queue"].is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 318px;
    gap: 16px;
}

.lane-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 10px;
}

.lane {
    min-width: 0;
    background: rgba(255, 255, 255, .68);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.lane__head {
    min-height: 70px;
    padding: 13px;
    border-top: 4px solid var(--mint);
    border-bottom: 1px solid var(--line);
}

.lane__head h3 {
    margin: 0 0 7px;
    font-size: 16px;
}

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

.lane__body {
    display: grid;
    gap: 8px;
    padding: 9px;
}

.item {
    position: relative;
    width: 100%;
    border: 1px solid rgba(29, 53, 87, .12);
    background: var(--surface);
    border-radius: 8px;
    padding: 12px;
    text-align: left;
    min-height: 148px;
    box-shadow: 0 6px 20px rgba(29, 53, 87, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.item:hover,
.item.is-selected {
    transform: translateY(-2px);
    border-color: var(--mint);
    box-shadow: var(--shadow);
}

.item__time {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.item__title {
    display: block;
    line-height: 1.25;
    overflow-wrap: anywhere;
    margin-bottom: 8px;
}

.item__meta {
    color: var(--muted);
    line-height: 1.45;
}

.resource {
    margin-top: 10px;
    height: 7px;
    background: #eee6db;
    border-radius: 999px;
    overflow: hidden;
}

.resource i {
    display: block;
    height: 100%;
    width: var(--fill);
    background: var(--mint);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 3px 8px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    color: var(--navy);
    background: rgba(42, 157, 143, .13);
    white-space: nowrap;
}

.badge--hard {
    color: #842715;
    background: rgba(231, 111, 81, .16);
}

.badge--soft {
    color: #715a00;
    background: rgba(232, 184, 48, .2);
}

.conflict {
    margin-top: 8px;
    padding: 8px;
    border-left: 3px solid var(--coral);
    background: rgba(231, 111, 81, .08);
    color: #6d2d20;
    font-size: 12px;
    line-height: 1.35;
}

.inspector {
    position: sticky;
    top: 18px;
    align-self: start;
    background: var(--navy);
    color: var(--paper);
    border-radius: 8px;
    padding: 18px;
    min-height: 420px;
    box-shadow: var(--shadow);
}

.inspector h3 {
    margin: 0 0 8px;
    font-size: 21px;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.inspector p {
    color: rgba(255, 248, 240, .76);
    line-height: 1.5;
}

.inspector__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 16px 0;
}

.inspector__cell {
    border-top: 1px solid rgba(255, 248, 240, .2);
    padding-top: 9px;
}

.inspector__cell span {
    display: block;
    color: rgba(255, 248, 240, .58);
    font-size: 12px;
}

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

.actions button {
    min-height: 38px;
    border: 1px solid rgba(255, 248, 240, .18);
    border-radius: 8px;
    color: var(--paper);
    background: rgba(255, 248, 240, .08);
}

.actions button:hover {
    background: var(--mint);
    border-color: var(--mint);
}

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

.section-head span {
    color: var(--muted);
    text-align: right;
}

.timeline,
.settings-table,
.team-list {
    display: grid;
    gap: 8px;
}

.timeline__row,
.setting,
.member {
    display: grid;
    gap: 10px;
    align-items: center;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
}

.timeline__row {
    grid-template-columns: 150px 160px minmax(0, 1fr);
}

.timeline__row b,
.setting b,
.member b {
    overflow-wrap: anywhere;
}

.setting {
    grid-template-columns: 130px minmax(130px, 1fr) 110px 110px 90px;
}

.setting__key,
.member__meta {
    color: var(--muted);
}

.member {
    grid-template-columns: minmax(150px, 1.3fr) minmax(130px, 1fr) 1fr 90px;
}

.progress {
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: #eee6db;
}

.progress i {
    display: block;
    width: var(--fill);
    height: 100%;
    background: linear-gradient(90deg, var(--mint), var(--coral));
}

.empty,
.error {
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, .52);
}

.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    max-width: min(360px, calc(100vw - 36px));
    background: var(--ink);
    color: var(--paper);
    border-radius: 8px;
    padding: 12px 14px;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 5;
        padding: 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .nav {
        display: flex;
        overflow-x: auto;
        max-width: 58vw;
    }

    .sidebar__note {
        display: none;
    }

    .view[data-panel="queue"].is-active {
        grid-template-columns: 1fr;
    }

    .inspector {
        position: static;
        min-height: 0;
    }
}

@media (max-width: 820px) {
    .workspace {
        padding: 16px;
    }

    .topbar,
    .toolbar,
    .section-head {
        display: grid;
        align-items: stretch;
    }

    .sync,
    .section-head span {
        justify-self: start;
        text-align: left;
    }

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

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

    .timeline__row,
    .setting,
    .member {
        grid-template-columns: 1fr;
    }

    .filters {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .sidebar {
        display: grid;
    }

    .nav {
        max-width: 100%;
    }

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

    .brand strong {
        font-size: 18px;
    }

    h1 {
        font-size: 28px;
    }
}

