:root {
    color-scheme: light;
    --bg: #eef2eb;
    --bg-strong: #d7e1d0;
    --panel: rgba(255, 255, 255, 0.8);
    --panel-strong: rgba(247, 250, 245, 0.96);
    --line: rgba(18, 30, 22, 0.12);
    --text: #101612;
    --muted: #607066;
    --accent: #00ce06;
    --accent-strong: #0b8f1c;
    --accent-soft: rgba(0, 206, 6, 0.12);
    --danger: #ce2d1f;
    --warning: #d28f12;
    --info: #0a6b6b;
    --neutral: #6d776f;
    --shadow: 0 24px 60px rgba(16, 24, 18, 0.12);
    --shadow-soft: 0 14px 32px rgba(16, 24, 18, 0.08);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

[data-theme='dark'] {
    color-scheme: dark;
    --bg: #071108;
    --bg-strong: #102015;
    --panel: rgba(13, 24, 16, 0.82);
    --panel-strong: rgba(9, 18, 12, 0.96);
    --line: rgba(222, 236, 224, 0.12);
    --text: #edf4ed;
    --muted: #9db0a1;
    --accent: #2ce840;
    --accent-strong: #74ff7c;
    --accent-soft: rgba(44, 232, 64, 0.16);
    --danger: #ff7165;
    --warning: #ffcf5e;
    --info: #71e2da;
    --neutral: #bac8bc;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 16px 36px rgba(0, 0, 0, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(0, 206, 6, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(20, 40, 24, 0.18), transparent 24%),
        linear-gradient(135deg, var(--bg), var(--bg-strong));
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: auto;
    z-index: -1;
    pointer-events: none;
    filter: blur(4px);
}

body::before {
    top: -8rem;
    right: -5rem;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 206, 6, 0.26), transparent 66%);
}

body::after {
    bottom: -10rem;
    left: -6rem;
    width: 28rem;
    height: 28rem;
    border-radius: 48% 52% 62% 38% / 43% 39% 61% 57%;
    background: radial-gradient(circle, rgba(7, 24, 11, 0.18), transparent 68%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

textarea {
    resize: vertical;
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 360ms ease, transform 360ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.glass-card,
.panel,
.entity-card,
.page-header,
.search-bar,
.metric-card,
.hero-panel,
.flash,
.hero-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.panel,
.entity-card,
.page-header,
.hero-panel,
.search-bar,
.metric-card,
.hero-card {
    border-radius: var(--radius-lg);
}

.button,
.theme-toggle,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.9rem;
    padding: 0.85rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.theme-toggle:hover,
.icon-button:hover {
    transform: translateY(-1px);
}

.button.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #061106;
    font-weight: 800;
    box-shadow: 0 18px 30px rgba(0, 206, 6, 0.24);
}

.button.secondary,
.theme-toggle,
.icon-button {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--line);
    color: var(--text);
}

[data-theme='dark'] .button.secondary,
[data-theme='dark'] .theme-toggle,
[data-theme='dark'] .icon-button {
    background: rgba(9, 16, 12, 0.48);
}

.text-link {
    color: var(--accent-strong);
    font-weight: 700;
}

.status-pill,
.soft-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.soft-pill {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid var(--line);
}

.tone-success {
    background: rgba(0, 206, 6, 0.14);
    color: var(--accent-strong);
}

.tone-warning {
    background: rgba(210, 143, 18, 0.16);
    color: var(--warning);
}

.tone-danger {
    background: rgba(206, 45, 31, 0.16);
    color: var(--danger);
}

.tone-info {
    background: rgba(10, 107, 107, 0.14);
    color: var(--info);
}

.tone-neutral {
    background: rgba(109, 119, 111, 0.14);
    color: var(--neutral);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 460px);
    gap: 2rem;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-hero,
.login-panel {
    position: relative;
}

.login-hero {
    padding: 3rem;
}

.login-hero h1 {
    max-width: 12ch;
    margin: 0 0 1rem;
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    line-height: 0.95;
}

.login-hero p {
    max-width: 65ch;
    color: var(--muted);
    font-size: 1.02rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid var(--line);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.hero-card {
    padding: 1.25rem;
}

.hero-card span {
    display: inline-flex;
    width: 2.4rem;
    height: 2.4rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1rem;
    background: rgba(0, 206, 6, 0.14);
    color: var(--accent-strong);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

.hero-card strong,
.demo-credentials h3,
.entity-head h3,
.panel-head h3,
.timeline-body h3,
.list-card h4,
.page-header h2,
.metric-card strong,
.sidebar-card h3 {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

.login-panel .panel {
    padding: 1.6rem;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.panel-head.compact {
    align-items: center;
}

.panel-head h2,
.panel-head h3,
.page-header h2,
.hero-panel h2,
.metric-card strong,
.entity-card h3 {
    margin: 0;
}

.panel-head p,
.entity-card p,
.timeline-body p,
.list-card p,
.metric-card p,
.sidebar-card p,
.page-header p,
.empty-state p,
.roadmap-list p {
    margin: 0;
    color: var(--muted);
}

.demo-credentials {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.4rem;
}

.demo-credentials div {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--line);
}

.demo-credentials p {
    margin-top: 0.35rem;
    color: var(--muted);
    word-break: break-word;
}

.app-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1.5rem;
    min-height: 100vh;
    padding: 1.5rem;
}

.sidebar {
    position: sticky;
    top: 1.5rem;
    height: calc(100vh - 3rem);
    padding: 1.35rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(10, 18, 12, 0.98), rgba(24, 38, 28, 0.86));
    box-shadow: var(--shadow);
    color: #eef6ef;
}

[data-theme='dark'] .sidebar {
    background: linear-gradient(180deg, rgba(4, 8, 5, 0.98), rgba(12, 22, 15, 0.92));
}

.brand-block {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.8rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), #9ef4a2);
    color: #081108;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    box-shadow: 0 16px 30px rgba(0, 206, 6, 0.22);
}

.brand-block strong {
    display: block;
    font-size: 1.1rem;
}

.brand-block p {
    margin: 0.18rem 0 0;
    color: rgba(238, 246, 239, 0.72);
}

.nav-list {
    display: grid;
    gap: 0.7rem;
}

.nav-link {
    display: grid;
    gap: 0.15rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    color: rgba(238, 246, 239, 0.86);
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-link:hover,
.nav-link.active {
    transform: translateX(2px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.08);
}

.nav-link span {
    font-weight: 700;
}

.nav-link small {
    color: rgba(238, 246, 239, 0.6);
}

.sidebar-card {
    margin-top: 1.3rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.content-area {
    display: grid;
    gap: 1.25rem;
    padding-bottom: 2rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0;
}

.topbar h1 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-only {
    display: none;
}

.hero-panel {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.8rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.5)),
        linear-gradient(135deg, rgba(0, 206, 6, 0.18), transparent 55%);
}

[data-theme='dark'] .hero-panel {
    background:
        linear-gradient(135deg, rgba(8, 16, 10, 0.9), rgba(8, 16, 10, 0.6)),
        linear-gradient(135deg, rgba(44, 232, 64, 0.16), transparent 55%);
}

.hero-panel p {
    max-width: 74ch;
}

.hero-actions,
.stack-inline,
.muted-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.metric-card {
    padding: 1.4rem;
}

.metric-card span {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--muted);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-card strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.metric-card.accent {
    background: linear-gradient(135deg, rgba(0, 206, 6, 0.18), rgba(255, 255, 255, 0.76));
}

.metric-card.accent-soft {
    background: linear-gradient(135deg, rgba(24, 36, 26, 0.08), rgba(0, 206, 6, 0.08));
}

[data-theme='dark'] .metric-card.accent,
[data-theme='dark'] .metric-card.accent-soft {
    background: linear-gradient(135deg, rgba(44, 232, 64, 0.16), rgba(10, 18, 12, 0.88));
}

.dashboard-grid,
.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1rem;
}

.dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-grid > .panel,
.dashboard-grid > .glass-card {
    padding: 1.35rem;
}

.roadmap-card {
    background:
        linear-gradient(160deg, rgba(0, 206, 6, 0.12), transparent 52%),
        var(--panel);
}

.roadmap-list {
    display: grid;
    gap: 1rem;
}

.roadmap-list strong {
    display: block;
    margin-bottom: 0.35rem;
}

.stack-list {
    display: grid;
    gap: 0.8rem;
}

.compact-list {
    gap: 0.65rem;
}

.list-card,
.contact-chip,
.subform-block,
.record-snippet,
.empty-state {
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.14);
}

[data-theme='dark'] .list-card,
[data-theme='dark'] .contact-chip,
[data-theme='dark'] .subform-block,
[data-theme='dark'] .record-snippet,
[data-theme='dark'] .empty-state {
    background: rgba(255, 255, 255, 0.03);
}

.list-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.timeline {
    display: grid;
    gap: 1rem;
}

.dense-timeline {
    max-height: calc(100vh - 14rem);
    overflow: auto;
    padding-right: 0.35rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.14);
}

.timeline-item.stretch {
    grid-template-columns: 160px minmax(0, 1fr);
}

.timeline-date {
    color: var(--accent-strong);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
}

.timeline-body {
    display: grid;
    gap: 0.75rem;
}

.section-head {
    display: grid;
    gap: 1rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.5rem;
}

.header-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-stats div {
    min-width: 110px;
    padding: 0.85rem 0.95rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid var(--line);
}

.header-stats span,
.mini-grid span {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.header-stats strong,
.mini-grid strong {
    display: block;
}

.search-bar {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
}

.search-bar input,
.search-bar select {
    flex: 1;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.entity-card,
.panel {
    padding: 1.35rem;
}

.entity-card {
    display: grid;
    gap: 1rem;
}

.entity-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.entity-head.inline {
    align-items: center;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.contact-stack {
    display: grid;
    gap: 0.65rem;
}

.contact-chip strong {
    display: block;
    margin-bottom: 0.2rem;
}

.sticky-panel {
    position: sticky;
    top: 1.5rem;
    align-self: start;
}

.form-grid {
    display: grid;
    gap: 0.95rem;
}

.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-grid {
    gap: 0.7rem;
}

.field {
    display: grid;
    gap: 0.4rem;
}

.field span,
.subform-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    min-height: 3rem;
    padding: 0.82rem 0.95rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.32);
    color: var(--text);
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

[data-theme='dark'] .field input,
[data-theme='dark'] .field textarea,
[data-theme='dark'] .field select {
    background: rgba(255, 255, 255, 0.04);
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.search-bar input:focus,
.search-bar select:focus {
    border-color: rgba(0, 206, 6, 0.55);
    box-shadow: 0 0 0 4px rgba(0, 206, 6, 0.12);
}

.search-bar input,
.search-bar select {
    min-height: 3rem;
    padding: 0.82rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.32);
    color: var(--text);
    outline: none;
}

[data-theme='dark'] .search-bar input,
[data-theme='dark'] .search-bar select {
    background: rgba(255, 255, 255, 0.04);
}

.span-2 {
    grid-column: 1 / -1;
}

.subform-block {
    display: grid;
    gap: 0.8rem;
}

.assignment-block {
    padding-top: 0.3rem;
    border-top: 1px dashed var(--line);
}

.assignment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
}

.assignment-grid .button {
    grid-column: 1 / -1;
}

.record-snippet strong {
    display: block;
    margin-bottom: 0.35rem;
}

.service-card {
    display: grid;
    gap: 1rem;
}

.helper-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.compact-stack {
    gap: 0.55rem;
}

.top-gap {
    margin-top: 1.35rem;
}

.subpanel {
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.12);
}

[data-theme='dark'] .subpanel {
    background: rgba(255, 255, 255, 0.03);
}

.subpanel summary {
    cursor: pointer;
    font-weight: 700;
}

.is-selected {
    border-color: rgba(0, 206, 6, 0.32);
    box-shadow: 0 18px 40px rgba(0, 206, 6, 0.12);
}

.part-usage-board {
    display: grid;
    gap: 0.6rem;
    max-height: 19rem;
    overflow: auto;
    padding-right: 0.2rem;
}

.part-usage-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 0.8rem;
    align-items: center;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.14);
}

[data-theme='dark'] .part-usage-row {
    background: rgba(255, 255, 255, 0.03);
}

.part-usage-row.is-suggested {
    border-color: rgba(28, 155, 84, 0.38);
    box-shadow: 0 16px 34px rgba(28, 155, 84, 0.12);
    background:
        linear-gradient(135deg, rgba(28, 155, 84, 0.1), rgba(255, 255, 255, 0.16));
}

[data-theme='dark'] .part-usage-row.is-suggested {
    border-color: rgba(109, 214, 152, 0.34);
    background:
        linear-gradient(135deg, rgba(16, 64, 34, 0.62), rgba(255, 255, 255, 0.04));
}

.part-usage-row input {
    min-height: 2.7rem;
    text-align: center;
}

.suggestion-summary {
    margin: 0 0 0.35rem;
}

.suggestion-badge {
    border-color: rgba(28, 155, 84, 0.32);
    background: rgba(28, 155, 84, 0.12);
    color: #0d5a30;
}

[data-theme='dark'] .suggestion-badge {
    color: #b7f0c9;
    background: rgba(28, 155, 84, 0.22);
}

.suggestion-reason {
    margin-top: 0.25rem;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-table td small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
}

.flash-stack {
    display: grid;
    gap: 0.75rem;
}

.flash {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
}

.flash-success {
    border-color: rgba(0, 206, 6, 0.26);
    background: rgba(0, 206, 6, 0.12);
    color: var(--accent-strong);
}

.flash-danger {
    border-color: rgba(206, 45, 31, 0.26);
    background: rgba(206, 45, 31, 0.1);
    color: var(--danger);
}

.empty-state {
    text-align: center;
}

.empty-state h3,
.empty-state h4 {
    margin: 0 0 0.45rem;
}

.part-order-history {
    margin-top: 0.35rem;
}

.compact-entity-head {
    gap: 0.75rem;
    align-items: flex-start;
}

.order-summary-card,
.order-suggestion-card,
.order-workboard {
    display: grid;
    gap: 0.7rem;
}

.order-form {
    margin-top: 0.35rem;
}

.order-receipt-form {
    border-top: 1px solid var(--line);
    padding-top: 0.85rem;
}

.order-meta {
    color: var(--muted);
    font-size: 0.88rem;
}

.parts-report-grid > .panel,
.report-section,
.report-list,
.report-item,
.report-item-value {
    display: grid;
    gap: 0.75rem;
}

.parts-report-grid > .panel {
    align-content: start;
}

.report-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.18);
}

[data-theme='dark'] .report-item {
    background: rgba(9, 16, 12, 0.38);
}

.report-item strong,
.report-item p,
.report-item-value strong,
.report-item-value span {
    margin: 0;
}

.report-item p,
.report-item-value span {
    color: var(--muted);
    font-size: 0.88rem;
}

.report-item-value {
    justify-items: end;
    text-align: right;
}

.route-nav-actions {
    justify-content: flex-end;
}

.route-nav-actions .button {
    min-height: 2.45rem;
    padding: 0.65rem 0.95rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.route-drag-board {
    margin-top: 1rem;
}

.route-dropzone {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.2);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

[data-theme='dark'] .route-dropzone {
    background: rgba(9, 16, 12, 0.34);
}

.route-dropzone.is-drag-target {
    border-color: var(--accent-strong);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.route-dropzone-backlog {
    margin-top: 0.85rem;
}

.route-drag-item {
    display: grid;
    gap: 0.35rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
    cursor: grab;
}

[data-theme='dark'] .route-drag-item {
    background: rgba(12, 20, 15, 0.72);
}

.route-drag-item strong,
.route-drag-item p {
    margin: 0;
}

.route-drag-item p {
    color: var(--muted);
    font-size: 0.88rem;
}

.route-drag-item.is-dragging {
    opacity: 0.45;
}

.route-drag-item.is-static {
    cursor: default;
    opacity: 0.8;
}

.route-dropzone-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.forecast-item {
    border-left: 4px solid currentColor;
}

@media (max-width: 1220px) {
    .metric-grid,
    .card-grid,
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 1.2rem;
    }

    .hero-grid,
    .metric-grid,
    .card-grid,
    .dashboard-grid,
    .two-columns {
        grid-template-columns: 1fr;
    }

    .app-shell {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .report-item {
        grid-template-columns: 1fr;
    }

    .report-item-value {
        justify-items: start;
        text-align: left;
    }

    .route-nav-actions {
        justify-content: flex-start;
    }

    .sidebar {
        position: fixed;
        top: 1rem;
        left: 1rem;
        bottom: 1rem;
        width: min(82vw, 320px);
        height: auto;
        transform: translateX(-115%);
        transition: transform 220ms ease;
        z-index: 20;
    }

    .app-shell.nav-open .sidebar {
        transform: translateX(0);
    }

    .mobile-only {
        display: inline-flex;
    }

    .page-header,
    .hero-panel,
    .topbar,
    .timeline-item,
    .list-card,
    .entity-head,
    .entity-head.inline {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar {
        padding-top: 0.5rem;
    }

    .topbar-actions,
    .search-bar {
        width: 100%;
    }

    .assignment-grid {
        grid-template-columns: 1fr;
    }

    .theme-toggle,
    .button.secondary,
    .search-bar button {
        width: auto;
    }

    .dense-timeline {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .login-hero,
    .panel,
    .entity-card,
    .page-header,
    .hero-panel,
    .search-bar,
    .metric-card,
    .sidebar {
        padding: 1rem;
    }

    .login-hero h1 {
        max-width: none;
    }

    .header-stats {
        width: 100%;
    }

    .header-stats div {
        flex: 1 1 100%;
    }
}
