:root {
    --bg: #ebf1f7;
    --bg-deep: #dfe8f1;
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: #f4f8fc;
    --panel-dark: #0f1c2e;
    --ink: #102133;
    --muted: #5d7086;
    --line: #d3dfeb;
    --brand: #0d7c82;
    --brand-strong: #095d62;
    --accent: #ef8b2c;
    --danger: #b44835;
    --success: #2d6a4f;
    --warning: #b07a12;
    --info: #2f5d8a;
    --shadow: 0 18px 45px rgba(14, 28, 46, 0.08);
    --shadow-strong: 0 26px 60px rgba(14, 28, 46, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    position: relative;
    font-family: "Aptos", "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(13, 124, 130, 0.18), transparent 28%),
        radial-gradient(circle at left 18%, rgba(239, 139, 44, 0.14), transparent 24%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(16, 33, 51, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 33, 51, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 88%);
    pointer-events: none;
    z-index: 0;
}

.app-header,
.page-shell {
    position: relative;
    z-index: 1;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.35rem;
    width: min(1440px, calc(100% - 2rem));
    margin: 1rem auto 0;
    padding: 1.1rem 1.35rem;
    background:
        linear-gradient(135deg, rgba(15, 28, 46, 0.96), rgba(24, 44, 69, 0.94)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    position: sticky;
    top: 0.85rem;
    z-index: 30;
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(20px);
}

.brand-kicker {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.brand-title {
    display: inline-block;
    font-family: "Bahnschrift SemiBold", "Aptos Display", "Aptos", sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #f7fbff;
    letter-spacing: 0.01em;
}

.brand-title:hover {
    text-decoration: none;
}

.brand-subtitle {
    margin-top: 0.35rem;
    max-width: 46rem;
    color: rgba(226, 235, 245, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

.header-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.header-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(240, 247, 252, 0.9);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
}

.actor-current {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    color: rgba(240, 247, 252, 0.88);
}

.actor-current-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(226, 235, 245, 0.62);
}

.admin-override-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.82rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(239, 139, 44, 0.94), rgba(180, 72, 53, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff7ef;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 12px 24px rgba(180, 72, 53, 0.24);
}

.header-note {
    color: rgba(226, 235, 245, 0.72);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.app-nav {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.app-nav a {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    color: rgba(226, 235, 245, 0.76);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.app-nav a.active,
.app-nav a:hover {
    background: linear-gradient(135deg, rgba(13, 124, 130, 0.95), rgba(8, 93, 98, 0.95));
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.page-shell {
    width: min(1480px, calc(100% - 2rem));
    margin: 1.4rem auto 3rem;
}

.auth-shell {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 1.4rem;
}

.auth-card {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 1.55rem;
    background:
        radial-gradient(circle at right top, rgba(239, 139, 44, 0.16), transparent 22%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(243, 249, 253, 0.92));
}

.auth-kicker {
    display: inline-flex;
    margin-bottom: 0.45rem;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    background: rgba(13, 124, 130, 0.08);
    color: var(--brand-strong);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-info-strip {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.4rem 0 1rem;
}

.auth-info-strip span,
.user-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.36rem 0.68rem;
    border-radius: 999px;
    background: rgba(47, 93, 138, 0.08);
    border: 1px solid rgba(47, 93, 138, 0.12);
    color: var(--info);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.1;
}

.auth-form {
    display: block;
}

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

.auth-footnote {
    margin: 0.95rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.role-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.role-check-card {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(13, 124, 130, 0.12);
    box-shadow: 0 8px 18px rgba(16, 33, 51, 0.05);
    cursor: pointer;
}

.role-check-card input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
}

.role-check-card span {
    font-weight: 700;
    color: var(--ink);
}

.user-role-badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.user-table td {
    white-space: normal;
}

.page-head,
.section-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.page-head {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.25rem;
    padding: 1.4rem 1.55rem;
    background:
        radial-gradient(circle at right top, rgba(239, 139, 44, 0.22), transparent 24%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 254, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.page-head::after {
    content: "";
    position: absolute;
    inset: auto -6% -48% auto;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(13, 124, 130, 0.12), transparent 68%);
    pointer-events: none;
}

.dashboard-page-head {
    margin-bottom: 1rem;
}

.dashboard-band {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.2rem;
    padding: 1.15rem 1.35rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 28, 46, 0.92), rgba(25, 52, 81, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.dashboard-band h2 {
    margin: 0 0 0.35rem;
    color: #f7fbff;
    font-family: "Bahnschrift SemiBold", "Aptos Display", "Aptos", sans-serif;
}

.dashboard-band p {
    margin: 0;
    max-width: 42rem;
    color: rgba(226, 235, 245, 0.74);
    line-height: 1.45;
}

.dashboard-band-kicker {
    display: inline-flex;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.dashboard-band-tags {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-band-tags span,
.section-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.36rem 0.72rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-band-tags span {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(240, 247, 252, 0.9);
}

.section-pill {
    background: rgba(13, 124, 130, 0.1);
    border: 1px solid rgba(13, 124, 130, 0.14);
    color: var(--brand-strong);
}

.page-head h1,
.section-head h2,
.modal-head h3 {
    margin: 0 0 0.35rem;
    font-family: "Bahnschrift SemiBold", "Aptos Display", "Aptos", sans-serif;
    letter-spacing: 0.01em;
}

.page-head p,
.section-head p,
.modal-head p {
    margin: 0;
    color: var(--muted);
}

.compact {
    margin-bottom: 1rem;
}

.section-card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    padding: 1.3rem;
    margin-bottom: 1.25rem;
}

.erp-form,
.filter-bar,
.inline-form,
.action-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.form-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.order-source-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.92rem;
}

.order-source-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.92rem;
}

.label-wide {
    grid-column: span 2;
}

.label-full {
    grid-column: 1 / -1;
}

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd8e5;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.72rem 0.82rem;
    color: var(--ink);
    box-shadow: inset 0 1px 1px rgba(16, 33, 51, 0.02);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(13, 124, 130, 0.45);
    box-shadow: 0 0 0 4px rgba(13, 124, 130, 0.12);
}

input[readonly] {
    background: var(--panel-strong);
}

input[disabled],
select[disabled],
textarea[disabled] {
    background: var(--panel-strong);
    color: var(--muted);
    cursor: not-allowed;
}

textarea {
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid transparent;
    padding: 0.72rem 1rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    box-shadow: 0 14px 28px rgba(13, 124, 130, 0.24);
}

.button-primary:hover {
    background: var(--brand-strong);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
    border-color: #cad7e4;
    box-shadow: 0 10px 22px rgba(16, 33, 51, 0.06);
}

.button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.flash {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow);
}

.flash-success {
    border-color: rgba(45, 106, 79, 0.25);
    background: rgba(45, 106, 79, 0.08);
}

.flash-danger {
    border-color: rgba(180, 72, 53, 0.25);
    background: rgba(180, 72, 53, 0.08);
}

.flash-warning {
    border-color: rgba(176, 122, 18, 0.25);
    background: rgba(176, 122, 18, 0.1);
}

.kpi-grid,
.summary-grid,
.dashboard-grid,
.legend-grid,
.dashboard-kpi-board {
    display: grid;
    gap: 1rem;
}

.kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-bottom: 1.2rem;
}

.summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.order-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.detail-meta-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.detail-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    background: rgba(13, 124, 130, 0.08);
    border: 1px solid rgba(13, 124, 130, 0.12);
    color: var(--brand-strong);
    font-size: 0.79rem;
    font-weight: 700;
    line-height: 1.15;
}

.detail-meta-pill-alert {
    background: rgba(239, 139, 44, 0.14);
    border-color: rgba(239, 139, 44, 0.2);
    color: #91520f;
}

.planning-page-note {
    margin-top: 0.85rem;
    color: var(--muted);
    line-height: 1.45;
}

.planning-lock-chip-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.75rem;
}

.planning-lock-chip-row small {
    color: var(--muted);
    line-height: 1.35;
}

.planning-lock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.36rem 0.72rem;
    border-radius: 999px;
    background: rgba(239, 139, 44, 0.16);
    border: 1px solid rgba(239, 139, 44, 0.2);
    color: #91520f;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.planning-lock-badge-revise {
    background: rgba(47, 93, 138, 0.12);
    border-color: rgba(47, 93, 138, 0.18);
    color: var(--info);
}

.planning-lock-banner {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(239, 139, 44, 0.1);
    border: 1px solid rgba(239, 139, 44, 0.16);
}

.planning-lock-banner strong {
    display: block;
    margin-bottom: 0.28rem;
    color: #91520f;
}

.planning-lock-banner p {
    margin: 0;
    color: var(--ink);
    line-height: 1.45;
}

.planning-lock-banner-revise {
    background: rgba(47, 93, 138, 0.09);
    border-color: rgba(47, 93, 138, 0.14);
}

.planning-lock-banner-revise strong {
    color: var(--info);
}

.order-summary-section .section-head,
.order-stage-plan-section .section-head,
.order-header-card .section-head {
    margin-bottom: 0.2rem;
}

.summary-card-order-status {
    grid-column: span 2;
}

.summary-hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr);
    gap: 0.9rem;
    align-items: start;
}

.summary-hero-main,
.summary-hero-metric {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
}

.summary-hero-metric {
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
    background: rgba(13, 124, 130, 0.06);
    border: 1px solid rgba(13, 124, 130, 0.12);
}

.summary-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.95rem;
}

.summary-mini-grid > div {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(211, 223, 235, 0.88);
}

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

.legend-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dashboard-kpi-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1.2rem;
}

.kpi-card,
.summary-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 254, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1.05rem 1.15rem;
    position: relative;
    overflow: hidden;
}

.dashboard-panel {
    min-height: 100%;
    overflow: hidden;
}

.kpi-card-primary {
    grid-column: span 2;
    background:
        radial-gradient(circle at right top, rgba(239, 139, 44, 0.22), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 251, 0.95));
}

.summary-card-primary {
    background:
        radial-gradient(circle at right top, rgba(239, 139, 44, 0.2), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 251, 0.94));
}

.kpi-card::before,
.summary-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(13, 124, 130, 0.9), rgba(239, 139, 44, 0.72));
}

.legend-card {
    background: linear-gradient(180deg, rgba(13, 124, 130, 0.08), rgba(255, 255, 255, 0.94));
    border: 1px solid rgba(13, 124, 130, 0.14);
    border-radius: 20px;
    padding: 1rem 1.05rem;
}

.tracker-guide-card {
    background: linear-gradient(180deg, rgba(13, 124, 130, 0.05), rgba(255, 255, 255, 0.94));
}

.tracker-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.tracker-step {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(13, 124, 130, 0.12);
}

.tracker-step h3 {
    margin: 0 0 0.35rem;
}

.tracker-step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.42;
}

.tracker-step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    margin-bottom: 0.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.legend-card h3 {
    margin: 0 0 0.45rem;
}

.legend-card p,
.legend-card small {
    color: var(--muted);
    display: block;
    line-height: 1.45;
}

.legend-card p {
    margin: 0 0 0.45rem;
    color: var(--ink);
}

.legend-kicker {
    display: inline-flex;
    margin-bottom: 0.55rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(187, 122, 31, 0.12);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.kpi-card-alert {
    background: linear-gradient(180deg, rgba(180, 72, 53, 0.1), rgba(255, 255, 255, 0.9));
}

.kpi-label,
.summary-label {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.kpi-value {
    font-size: 1.95rem;
    line-height: 1;
}

.summary-card strong {
    font-size: 1.15rem;
}

.kpi-primary-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 0.45rem;
}

.kpi-footnote {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.35;
}

.kpi-meta-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.kpi-meta {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    background: rgba(13, 124, 130, 0.08);
    border: 1px solid rgba(13, 124, 130, 0.12);
    color: var(--brand-strong);
    font-size: 0.79rem;
    font-weight: 700;
}

.kpi-card-danger::before {
    background: linear-gradient(90deg, rgba(180, 72, 53, 0.92), rgba(239, 139, 44, 0.72));
}

.summary-card small {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
}

.status-ok {
    color: var(--success);
}

.status-warn {
    color: var(--warning);
}

.status-bad {
    color: var(--danger);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.9rem;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-not-started,
.status-planned,
.status-preprod-open,
.status-not-applicable {
    background: rgba(106, 115, 129, 0.12);
    border-color: rgba(106, 115, 129, 0.18);
    color: var(--muted);
}

.status-in-progress,
.status-submitted {
    background: rgba(31, 92, 87, 0.12);
    border-color: rgba(31, 92, 87, 0.2);
    color: var(--brand-strong);
}

.status-pending-buyer,
.status-pending-buyer-response {
    background: rgba(187, 122, 31, 0.14);
    border-color: rgba(187, 122, 31, 0.24);
    color: var(--accent);
}

.status-pending-internal,
.status-pending-internal-completion,
.status-in-followup {
    background: rgba(47, 93, 138, 0.12);
    border-color: rgba(47, 93, 138, 0.2);
    color: var(--info);
}

.status-approved,
.status-approved-comments,
.status-ready-for-handover,
.status-handed-over {
    background: rgba(45, 106, 79, 0.12);
    border-color: rgba(45, 106, 79, 0.24);
    color: var(--success);
}

.status-rejected,
.status-cancelled,
.status-order-cancelled {
    background: rgba(180, 72, 53, 0.12);
    border-color: rgba(180, 72, 53, 0.24);
    color: var(--danger);
}

.status-rework-in-progress,
.status-on-hold,
.status-order-on-hold {
    background: rgba(176, 122, 18, 0.12);
    border-color: rgba(176, 122, 18, 0.24);
    color: var(--warning);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 18px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 0.75rem 0.65rem;
    border-bottom: 1px solid rgba(211, 223, 235, 0.88);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: rgba(15, 28, 46, 0.03);
}

.data-table tbody tr:hover {
    background: rgba(13, 124, 130, 0.05);
}

.dashboard-table-wrap {
    width: 100%;
    margin-top: 0.8rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.15rem;
}

.dashboard-data-table {
    min-width: 1320px;
}

.dashboard-data-table th,
.dashboard-data-table td {
    white-space: nowrap;
}

.dashboard-data-table td:nth-child(2) {
    white-space: normal;
    min-width: 180px;
}

.dashboard-blocker-cell {
    min-width: 290px;
    white-space: normal !important;
}

.dashboard-blocker-cell strong {
    display: block;
    margin-bottom: 0.22rem;
    color: var(--ink);
    font-size: 0.88rem;
}

.dashboard-blocker-cell small {
    display: block;
    color: var(--muted);
    line-height: 1.38;
}

.dashboard-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.dashboard-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.34rem 0.6rem;
    border-radius: 999px;
    background: rgba(13, 124, 130, 0.08);
    border: 1px solid rgba(13, 124, 130, 0.12);
    color: var(--brand-strong);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.dashboard-actions a:hover {
    background: rgba(13, 124, 130, 0.14);
    text-decoration: none;
}

.dashboard-order-cell strong {
    display: block;
    color: var(--ink);
    font-size: 0.92rem;
    line-height: 1.3;
}

.dashboard-order-cell small {
    display: block;
    margin-top: 0.24rem;
    color: var(--muted);
    line-height: 1.35;
}

.table-subnote {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.order-stage-plan-table {
    min-width: 1100px;
}

.order-window-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.order-window-card {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(13, 124, 130, 0.12);
    box-shadow: 0 10px 22px rgba(16, 33, 51, 0.05);
}

.order-window-card strong {
    display: block;
    font-size: 1.12rem;
    line-height: 1.2;
}

.order-window-card small {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    line-height: 1.4;
}

.order-window-card-primary {
    background:
        radial-gradient(circle at right top, rgba(239, 139, 44, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(240, 248, 251, 0.95));
}

.order-stage-plan-stage-title {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}

.order-stage-plan-seq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: rgba(47, 93, 138, 0.1);
    color: var(--info);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
}

.order-stage-plan-actions {
    margin-top: 1rem;
}

.order-stage-plan-table input,
.order-stage-plan-table select {
    min-width: 88px;
    padding: 0.55rem 0.6rem;
}

.planning-help-block {
    margin-bottom: 0.9rem;
}

.planning-window-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.7rem;
}

.planning-window-tags span {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.68rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(13, 124, 130, 0.12);
    color: var(--brand-strong);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.15;
}

.order-stage-plan-row {
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.order-stage-plan-row:hover {
    transform: translateY(-1px);
}

.compact-table th,
.compact-table td {
    padding: 0.55rem 0.5rem;
}

.empty-state,
.empty-cell {
    color: var(--muted);
    padding: 1rem 0.25rem;
}

.filter-bar {
    margin-bottom: 1rem;
}

.filter-bar input,
.filter-bar select {
    max-width: 220px;
}

.tabulator-host {
    margin-top: 0.5rem;
}

.tabulator-host-tall .tabulator,
.tabulator-host .tabulator {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: rgba(255, 255, 255, 0.88);
}

.tabulator .tabulator-header {
    background: linear-gradient(180deg, rgba(243, 248, 252, 0.98), rgba(232, 239, 246, 0.96));
    border-bottom: 1px solid #d5e0eb;
}

.tabulator .tabulator-header .tabulator-col {
    background: transparent;
    border-right: 1px solid rgba(211, 223, 235, 0.75);
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tabulator .tabulator-row {
    background: transparent;
    border-bottom: 1px solid rgba(211, 223, 235, 0.65);
}

.tabulator .tabulator-row:hover {
    background: rgba(13, 124, 130, 0.05);
}

.tabulator-row.tabulator-selected,
.tabulator-row.tabulator-selected:hover {
    background: rgba(13, 124, 130, 0.12) !important;
}

.tabulator-row.stage-overdue {
    background: rgba(180, 72, 53, 0.08) !important;
}

.tabulator-row.stage-overdue .tabulator-cell {
    border-bottom-color: rgba(180, 72, 53, 0.18);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(30, 36, 48, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
}

.modal-card {
    width: min(980px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(18px);
}

.modal-card-compact {
    width: min(820px, 100%);
}

.modal-head,
.modal-body {
    padding: 1rem 1.25rem;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
}

.modal-callout {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(31, 92, 87, 0.16);
    border-radius: 14px;
    background: rgba(31, 92, 87, 0.06);
}

.modal-callout strong {
    display: block;
    margin-bottom: 0.35rem;
}

.modal-callout p {
    margin: 0 0 0.6rem;
    color: var(--ink);
}

.modal-callout-compact {
    display: flex;
    gap: 0.55rem;
    align-items: baseline;
    padding: 0.75rem 0.9rem;
}

.modal-callout-compact strong {
    margin-bottom: 0;
    white-space: nowrap;
}

.modal-callout-compact span {
    color: var(--ink);
    line-height: 1.4;
}

.modal-callout-meta {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.modal-callout-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(31, 92, 87, 0.14);
    color: var(--muted);
    font-size: 0.82rem;
}

.mobile-action-modal {
    display: flex;
    flex-direction: column;
}

.modal-context-stack,
.modal-input-stack {
    min-width: 0;
}

.modal-context-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.modal-context-card,
.modal-history-card {
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(13, 124, 130, 0.12);
    box-shadow: 0 10px 22px rgba(16, 33, 51, 0.05);
}

.modal-history-card {
    margin-bottom: 1rem;
}

.handover-review-card {
    background: linear-gradient(180deg, rgba(13, 124, 130, 0.05), rgba(255, 255, 255, 0.95));
}

.handover-review-metrics {
    margin-bottom: 0.9rem;
}

.handover-review-metrics > div {
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(13, 124, 130, 0.1);
}

.handover-review-list {
    display: grid;
    gap: 0.75rem;
}

.handover-review-item {
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(13, 124, 130, 0.12);
    box-shadow: 0 10px 22px rgba(16, 33, 51, 0.05);
}

.handover-review-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.55rem;
}

.handover-review-meta {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}

.handover-review-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    background: rgba(47, 93, 138, 0.08);
    border: 1px solid rgba(47, 93, 138, 0.12);
    color: var(--info);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.1;
}

.handover-review-item p {
    margin: 0 0 0.45rem;
    color: var(--ink);
    line-height: 1.45;
}

.context-line {
    margin-top: 0.32rem;
    color: var(--ink);
    line-height: 1.34;
}

.context-line strong {
    color: var(--brand-strong);
}

.inline-link {
    color: var(--brand-strong);
    font-weight: 600;
    text-decoration: none;
}

.inline-link:hover {
    text-decoration: underline;
}

.modal-form .form-grid,
.modal-form-grid {
    margin-top: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.modal-form .form-grid label {
    gap: 0.28rem;
}

.modal-form .field-help {
    font-size: 0.78rem;
    line-height: 1.35;
}

.modal-form textarea {
    min-height: 86px;
}

.modal-form .action-row {
    margin-top: 0.85rem;
    justify-content: flex-end;
}

.modal-history-note {
    margin: 0 0 1rem;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    background: rgba(47, 93, 138, 0.08);
    border: 1px solid rgba(47, 93, 138, 0.12);
    color: var(--ink);
    line-height: 1.4;
}

.field-help {
    margin-top: 0.1rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.tracker-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.8rem;
}

.tracker-filter-group,
.tracker-toolbar-right,
.tracker-toolbar-meta {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.tracker-toolbar-meta {
    margin-bottom: 0.75rem;
}

.tracker-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.48rem 0.8rem;
    border-radius: 999px;
    border: 1px solid #cbd8e5;
    background: rgba(255, 255, 255, 0.86);
    color: var(--muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.tracker-filter.active,
.tracker-filter:hover {
    background: rgba(13, 124, 130, 0.1);
    border-color: rgba(13, 124, 130, 0.18);
    color: var(--brand-strong);
}

.tracker-search {
    min-width: 260px;
}

.tracker-toolbar-note {
    color: var(--muted);
    font-size: 0.84rem;
}

.tracker-stage-switcher {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.tracker-stage-selector {
    align-items: flex-end;
}

.tracker-stage-select-label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: min(420px, 100%);
}

.tracker-stage-select-label span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tracker-mobile-stage-list {
    display: none;
}

.tracker-mobile-stage-card {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(13, 124, 130, 0.12);
    box-shadow: 0 10px 24px rgba(16, 33, 51, 0.06);
    color: var(--ink);
    text-decoration: none;
}

.tracker-mobile-stage-card:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.tracker-mobile-stage-card.active {
    border-color: rgba(13, 124, 130, 0.3);
    background: linear-gradient(180deg, rgba(13, 124, 130, 0.08), rgba(255, 255, 255, 0.94));
    box-shadow: 0 16px 28px rgba(13, 124, 130, 0.12);
}

.tracker-mobile-stage-top {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: flex-start;
}

.tracker-mobile-stage-seq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: rgba(47, 93, 138, 0.1);
    color: var(--info);
    font-size: 0.8rem;
    font-weight: 700;
}

.tracker-mobile-stage-card strong {
    font-size: 0.96rem;
    line-height: 1.3;
}

.tracker-mobile-stage-card small {
    color: var(--muted);
    line-height: 1.35;
}

.tracker-mobile-stage-note {
    color: var(--ink) !important;
}

.tracker-focus-shell {
    margin-bottom: 1rem;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(13, 124, 130, 0.06), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(13, 124, 130, 0.12);
}

.tracker-focus-shell #tracker-quick-edit {
    min-height: 220px;
}

.tracker-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
    gap: 1rem;
    align-items: start;
}

.tracker-grid-shell,
.tracker-editor-shell {
    min-width: 0;
}

.tracker-grid-shell {
    width: 100%;
}

.tracker-editor-card,
.tracker-editor-placeholder {
    padding: 1.05rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(13, 124, 130, 0.12);
    box-shadow: var(--shadow);
}

.tracker-editor-placeholder h3,
.tracker-editor-card h3 {
    margin: 0 0 0.35rem;
}

.tracker-editor-placeholder p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.tracker-editor-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tracker-editor-help {
    margin-top: 0.9rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: rgba(13, 124, 130, 0.06);
    border: 1px solid rgba(13, 124, 130, 0.1);
}

.tracker-editor-help strong {
    display: block;
    margin-bottom: 0.3rem;
}

.tracker-editor-help p {
    margin: 0;
    color: var(--muted);
    line-height: 1.42;
}

.handover-help-block {
    margin-bottom: 1rem;
}

.tracker-editor-actions-block {
    margin-top: 0.95rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(211, 223, 235, 0.88);
}

.tracker-editor-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 0.55rem;
}

.tracker-editor-actions .button {
    min-height: 2.85rem;
}

.stage-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.tracker-stage-cell,
.tracker-guidance,
.tracker-date-cell,
.tracker-owner-cell {
    display: flex;
    flex-direction: column;
}

.tracker-stage-cell {
    gap: 0.32rem;
}

.tracker-stage-cell strong,
.tracker-owner-cell strong,
.tracker-date-cell strong {
    font-size: 0.88rem;
}

.tracker-stage-meta {
    display: flex;
    gap: 0.32rem;
    flex-wrap: wrap;
}

.stage-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.48rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
}

.stage-meta-code {
    background: rgba(47, 93, 138, 0.1);
    color: var(--info);
}

.stage-meta-mandatory {
    background: rgba(239, 139, 44, 0.12);
    color: var(--accent);
}

.stage-meta-applicable {
    background: rgba(45, 106, 79, 0.1);
    color: var(--success);
}

.stage-meta-na {
    background: rgba(106, 115, 129, 0.12);
    color: var(--muted);
}

.aging-stack {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.aging-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.aging-chip-ok {
    background: rgba(45, 106, 79, 0.1);
    border-color: rgba(45, 106, 79, 0.2);
    color: var(--success);
}

.aging-chip-info {
    background: rgba(47, 93, 138, 0.1);
    border-color: rgba(47, 93, 138, 0.2);
    color: var(--info);
}

.aging-chip-warn {
    background: rgba(176, 122, 18, 0.1);
    border-color: rgba(176, 122, 18, 0.2);
    color: var(--warning);
}

.aging-chip-danger {
    background: rgba(180, 72, 53, 0.1);
    border-color: rgba(180, 72, 53, 0.2);
    color: var(--danger);
}

.tracker-guidance {
    gap: 0.18rem;
    line-height: 1.35;
}

.tracker-guidance strong {
    font-size: 0.85rem;
}

.tracker-guidance small {
    color: var(--muted);
}

.tracker-date-cell small,
.tracker-owner-cell small {
    margin-top: 0.18rem;
    color: var(--muted);
}

.action-wrap {
    display: inline-flex;
}

.mini-button {
    border: 1px solid var(--line);
    background: var(--panel-strong);
    border-radius: 10px;
    padding: 0.3rem 0.55rem;
    cursor: pointer;
    font-size: 0.8rem;
}

.mini-button:hover:not(:disabled) {
    background: rgba(31, 92, 87, 0.1);
    border-color: rgba(31, 92, 87, 0.25);
}

.mini-button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-strong);
    text-decoration: none;
}

.mini-button-link:hover {
    text-decoration: none;
}

.mini-button:disabled,
.mini-button-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f4efe5;
    color: var(--muted);
}

.overdue-chip {
    color: var(--danger);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 1100px) {
    .dashboard-kpi-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kpi-card-primary {
        grid-column: span 2;
    }

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

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

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

    .summary-card-order-status {
        grid-column: span 2;
    }

    .summary-mini-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .modal-form .form-grid,
    .modal-form-grid {
        grid-template-columns: 1fr;
    }

    .auth-form .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app-header,
    .page-head,
    .section-head,
    .dashboard-band {
        flex-direction: column;
    }

    .tracker-toolbar,
    .tracker-toolbar-right,
    .tracker-toolbar-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .tracker-workbench,
    .tracker-editor-meta,
    .modal-context-grid {
        grid-template-columns: 1fr;
    }

    .tracker-guide-card,
    .tracker-desktop-board,
    .tracker-stage-selector {
        display: none;
    }

    .tracker-mobile-stage-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .tracker-focus-shell {
        padding: 0.85rem;
        border-radius: 20px;
    }

    .tracker-focus-shell #tracker-quick-edit {
        min-height: 0;
    }

    .tracker-editor-card,
    .tracker-editor-placeholder {
        padding: 0.9rem;
        border-radius: 18px;
    }

    .tracker-editor-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .tracker-editor-help {
        padding: 0.75rem 0.8rem;
    }

    .tracker-editor-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .tracker-editor-actions .button {
        width: 100%;
        min-height: 3rem;
        padding: 0.72rem 0.7rem;
        font-size: 0.9rem;
    }

    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
        background: rgba(30, 36, 48, 0.5);
    }

    .modal-card,
    .modal-card-compact {
        width: 100%;
        max-height: 94dvh;
        border-radius: 22px 22px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }

    .modal-head,
    .modal-body {
        padding: 0.85rem 0.95rem;
    }

    .modal-head {
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.96);
        z-index: 2;
    }

    .modal-head .button {
        min-height: 2.75rem;
    }

    .mobile-action-modal .modal-input-stack {
        order: 1;
        margin-top: 0;
    }

    .mobile-action-modal .modal-context-stack {
        order: 2;
        margin-top: 0.9rem;
    }

    .mobile-action-modal .modal-callout {
        padding: 0.75rem 0.8rem;
        margin-bottom: 0.75rem;
    }

    .mobile-action-modal .modal-callout-compact span {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .mobile-action-modal .modal-context-card,
    .mobile-action-modal .modal-history-card {
        padding: 0.75rem 0.8rem;
    }

    .mobile-action-modal .modal-form-grid {
        margin-top: 0;
        gap: 0.7rem;
    }

    .mobile-action-modal .modal-form-grid label {
        gap: 0.3rem;
    }

    .mobile-action-modal .handover-review-metrics {
        gap: 0.65rem;
    }

    .modal-form .action-row {
        position: sticky;
        bottom: 0;
        margin: 0;
        padding-top: 0.8rem;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.98) 30%);
        justify-content: stretch;
    }

    .modal-form .action-row .button {
        flex: 1 1 100%;
        min-height: 3rem;
    }

    .tracker-search {
        min-width: 0;
        width: 100%;
    }

    .header-side {
        width: 100%;
        align-items: flex-start;
    }

    .actor-current {
        align-items: flex-start;
    }

    .page-shell {
        width: min(100% - 1rem, 1440px);
    }

    .dashboard-grid,
    .kpi-grid,
    .dashboard-kpi-board,
    .summary-grid,
    .legend-grid,
    .form-grid,
    .order-source-grid {
        grid-template-columns: 1fr;
    }

    .modal-callout-compact {
        flex-direction: column;
        align-items: flex-start;
    }

    .handover-review-top {
        flex-direction: column;
    }

    .handover-review-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-shell {
        padding-top: 0.25rem;
    }

    .auth-card {
        padding: 1.15rem;
    }

    .kpi-card-primary {
        grid-column: span 1;
    }

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

    .summary-card-order-status {
        grid-column: span 1;
    }

    .summary-hero-row,
    .summary-mini-grid {
        grid-template-columns: 1fr;
    }

    .order-detail-head-actions,
    .order-header-actions {
        width: 100%;
    }

    .order-detail-head-actions .button,
    .order-header-actions .button {
        width: 100%;
    }

    .order-stage-plan-section .section-head .action-row {
        width: 100%;
    }

    .order-stage-plan-section .section-head .action-row .button {
        width: 100%;
    }

    .detail-meta-row {
        gap: 0.45rem;
    }

    .detail-meta-pill {
        width: 100%;
        justify-content: center;
    }

    .planning-page-note {
        font-size: 0.9rem;
    }

    .planning-lock-chip-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .planning-lock-badge {
        width: 100%;
        justify-content: center;
    }

    .planning-lock-banner {
        padding: 0.85rem 0.9rem;
    }

    .summary-hero-metric,
    .summary-mini-grid > div {
        padding-top: 0;
        border-top: none;
    }

    .summary-mini-grid > div {
        padding: 0.8rem 0.9rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(13, 124, 130, 0.1);
    }

    .order-window-strip {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .order-stage-plan-wrap {
        overflow: visible;
        margin-top: 0.25rem;
    }

    .order-stage-plan-table {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
    }

    .order-stage-plan-table thead {
        display: none;
    }

    .order-stage-plan-table,
    .order-stage-plan-table tbody,
    .order-stage-plan-table tr,
    .order-stage-plan-table td {
        display: block;
        width: 100%;
    }

    .order-stage-plan-table tbody {
        display: grid;
        gap: 0.85rem;
    }

    .order-stage-plan-table tr {
        padding: 0.9rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(13, 124, 130, 0.12);
        box-shadow: 0 12px 24px rgba(16, 33, 51, 0.06);
    }

    .order-stage-plan-table td {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 0.7rem;
        align-items: start;
        padding: 0.45rem 0;
        border-bottom: 1px solid rgba(211, 223, 235, 0.7);
        white-space: normal;
    }

    .order-stage-plan-table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .order-stage-plan-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.73rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        line-height: 1.3;
    }

    .order-stage-plan-table td.order-stage-plan-stage-cell,
    .order-stage-plan-table td.order-stage-plan-status-cell {
        grid-template-columns: 1fr;
    }

    .order-stage-plan-table td.order-stage-plan-stage-cell::before,
    .order-stage-plan-table td.order-stage-plan-status-cell::before {
        margin-bottom: 0.15rem;
    }

    .order-stage-plan-table td.order-stage-plan-status-cell .status-badge {
        justify-self: flex-start;
    }

    .order-stage-plan-stage-title {
        gap: 0.55rem;
    }

    .order-stage-plan-seq {
        min-width: 1.8rem;
        height: 1.8rem;
        font-size: 0.78rem;
    }

    .planning-window-tags span {
        width: 100%;
        justify-content: center;
    }

    .order-stage-plan-actions {
        flex-direction: column;
    }

    .order-stage-plan-actions .button {
        width: 100%;
        min-height: 3rem;
    }

    .label-wide,
    .label-full {
        grid-column: span 1;
    }

    .filter-bar input,
    .filter-bar select {
        max-width: none;
        width: 100%;
    }

    .dashboard-table-wrap {
        overflow: visible;
        margin-top: 0.45rem;
    }

    .dashboard-data-table {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
    }

    .dashboard-data-table thead {
        display: none;
    }

    .dashboard-data-table,
    .dashboard-data-table tbody,
    .dashboard-data-table tr,
    .dashboard-data-table td {
        display: block;
        width: 100%;
    }

    .dashboard-data-table tbody {
        display: grid;
        gap: 0.85rem;
    }

    .dashboard-data-table tr {
        padding: 0.9rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(13, 124, 130, 0.12);
        box-shadow: 0 12px 24px rgba(16, 33, 51, 0.06);
    }

    .dashboard-data-table td {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 0.72rem;
        align-items: start;
        padding: 0.42rem 0;
        border-bottom: 1px solid rgba(211, 223, 235, 0.72);
        white-space: normal;
    }

    .dashboard-data-table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .dashboard-data-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.73rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        line-height: 1.3;
    }

    .dashboard-data-table td.dashboard-order-cell,
    .dashboard-data-table td.dashboard-blocker-cell {
        grid-template-columns: 1fr;
    }

    .dashboard-data-table td.dashboard-order-cell::before,
    .dashboard-data-table td.dashboard-blocker-cell::before {
        margin-bottom: 0.18rem;
    }

    .dashboard-data-table td .status-badge {
        justify-self: flex-start;
    }

    .dashboard-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .dashboard-actions a {
        width: 100%;
        min-height: 2.65rem;
    }
}

@media (max-width: 480px) {
    .page-shell {
        width: calc(100% - 0.7rem);
        margin-top: 1rem;
    }

    .section-card,
    .page-head {
        padding: 1rem;
        border-radius: 22px;
    }

    .tracker-editor-meta {
        grid-template-columns: 1fr;
    }

    .tracker-editor-actions {
        grid-template-columns: 1fr;
    }

    .tracker-mobile-stage-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-data-table td,
    .order-stage-plan-table td {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .dashboard-data-table td::before,
    .order-stage-plan-table td::before {
        margin-bottom: 0.1rem;
    }

    .dashboard-actions {
        grid-template-columns: 1fr;
    }

    .modal-head,
    .modal-body {
        padding: 0.8rem 0.82rem;
    }

    .mobile-action-modal .modal-callout {
        padding: 0.7rem 0.72rem;
    }

    .mobile-action-modal .modal-context-card,
    .mobile-action-modal .modal-history-card,
    .handover-review-item {
        padding: 0.72rem 0.75rem;
    }

    .mobile-action-modal .modal-form .action-row .button {
        min-height: 3.15rem;
    }
}

.button-link {
    background: transparent;
    border-color: transparent;
    color: var(--brand-strong);
}

.button-link:hover {
    background: rgba(13, 124, 130, 0.08);
    border-color: rgba(13, 124, 130, 0.16);
}

.timeline-page-head {
    align-items: end;
}

.timeline-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
    padding: 0.35rem;
    border: 1px solid rgba(16, 33, 51, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 30px rgba(16, 33, 51, 0.06);
}

.timeline-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.timeline-tab.active {
    background: linear-gradient(135deg, rgba(13, 124, 130, 0.16), rgba(24, 91, 70, 0.12));
    color: var(--brand-strong);
}

.timeline-filter-bar {
    margin-bottom: 1.15rem;
}

.timeline-kpi-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.timeline-kpi-card {
    display: grid;
    gap: 0.35rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(16, 33, 51, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 30px rgba(16, 33, 51, 0.06);
}

.timeline-kpi-primary {
    background: linear-gradient(145deg, rgba(13, 124, 130, 0.12), rgba(255, 255, 255, 0.96));
}

.timeline-kpi-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.timeline-kpi-value {
    color: var(--heading);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
}

.timeline-kpi-card small {
    color: var(--muted);
}

.timeline-panel {
    overflow: hidden;
}

.timeline-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.timeline-panel-head h2 {
    margin: 0 0 0.3rem;
}

.timeline-panel-head p,
.timeline-panel-meta {
    color: var(--muted);
    margin: 0;
}

.timeline-panel-meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.timeline-board {
    display: block;
}

.timeline-board-shell {
    display: grid;
    grid-template-columns: 460px minmax(900px, 1fr);
    grid-template-rows: auto 1fr;
    border: 1px solid rgba(16, 33, 51, 0.08);
    border-radius: 1.1rem;
    overflow: hidden;
    background: rgba(245, 248, 252, 0.9);
}

.timeline-board-shell-tracking {
    grid-template-columns: 520px minmax(900px, 1fr);
}

.timeline-fixed-head,
.timeline-fixed-body {
    position: sticky;
    left: 0;
    z-index: 3;
    background: rgba(252, 253, 255, 0.98);
}

.timeline-fixed-head {
    top: 0;
    border-right: 1px solid rgba(16, 33, 51, 0.08);
    border-bottom: 1px solid rgba(16, 33, 51, 0.08);
}

.timeline-fixed-body {
    border-right: 1px solid rgba(16, 33, 51, 0.08);
}

.timeline-fixed-grid {
    display: grid;
}

.timeline-fixed-grid-planning {
    grid-template-columns: 1.2fr 1.1fr 1fr 0.9fr 0.95fr 1.5fr;
}

.timeline-fixed-grid-tracking {
    grid-template-columns: 1fr 1fr 0.9fr 0.9fr 0.85fr 1.45fr;
}

.timeline-fixed-head > div {
    padding: 0.9rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.timeline-fixed-row {
    border-bottom: 1px solid rgba(16, 33, 51, 0.08);
}

.timeline-cell {
    display: grid;
    gap: 0.2rem;
    align-content: center;
    min-width: 0;
    padding: 0.7rem 0.8rem;
}

.timeline-cell strong,
.timeline-cell small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-cell strong {
    color: var(--heading);
}

.timeline-cell small {
    color: var(--muted);
}

.timeline-cell-blocker strong {
    font-size: 0.88rem;
    font-weight: 700;
}

.timeline-row-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.timeline-row-links a {
    color: var(--brand-strong);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.timeline-row-links a:hover {
    text-decoration: underline;
}

.timeline-date-head {
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid rgba(16, 33, 51, 0.08);
    background: rgba(252, 253, 255, 0.98);
}

.timeline-date-header {
    min-width: calc(var(--days) * var(--day-width));
}

.timeline-week-row,
.timeline-day-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--day-width);
}

.timeline-week-block {
    padding: 0.35rem 0.4rem;
    border-left: 1px solid rgba(16, 33, 51, 0.08);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    background: rgba(13, 124, 130, 0.04);
}

.timeline-day {
    display: grid;
    place-items: center;
    gap: 0.1rem;
    min-height: 3.5rem;
    padding: 0.35rem 0.2rem;
    border-left: 1px solid rgba(16, 33, 51, 0.06);
    color: var(--muted);
    text-align: center;
}

.timeline-day.today {
    background: rgba(13, 124, 130, 0.08);
    color: var(--brand-strong);
}

.timeline-day.month-start {
    border-left-width: 2px;
    border-left-color: rgba(16, 33, 51, 0.16);
}

.timeline-day-no {
    font-weight: 800;
    color: var(--heading);
}

.timeline-day-name {
    font-size: 0.72rem;
}

.timeline-scroll-body {
    overflow: auto;
    background: rgba(255, 255, 255, 0.75);
}

.timeline-scroll-row {
    border-bottom: 1px solid rgba(16, 33, 51, 0.08);
}

.timeline-order-lanes,
.timeline-row-grid {
    position: relative;
    min-width: calc(var(--days) * var(--day-width));
    background-image: linear-gradient(90deg, rgba(16, 33, 51, 0.06) 1px, transparent 1px);
    background-size: var(--day-width) 100%;
}

.timeline-order-lanes {
    display: grid;
    align-content: start;
    padding: 0.35rem 0;
}

.timeline-lane {
    position: relative;
    min-height: 42px;
}

.timeline-row-grid {
    min-height: 72px;
}

.timeline-bar {
    position: absolute;
    top: 6px;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 0.8rem;
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(16, 33, 51, 0.12);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    z-index: 2;
}

.timeline-bar .bar-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-bar:hover {
    transform: translateY(-1px);
}

.bar-internal {
    background: linear-gradient(135deg, #0d7c82, #1f5c57);
}

.bar-buyer {
    background: linear-gradient(135deg, #ef8b2c, #bb7a1f);
}

.bar-approved {
    background: linear-gradient(135deg, #2d6a4f, #1f5c57);
}

.bar-handover {
    background: linear-gradient(135deg, #185b46, #123e31);
}

.bar-overrun,
.bar-overdue,
.bar-rejected,
.bar-followup-due {
    background: linear-gradient(135deg, #b44835, #8e3426);
}

.bar-in-progress {
    background: linear-gradient(135deg, #2f5d8a, #1c466d);
}

.bar-pending-buyer {
    background: linear-gradient(135deg, #ef8b2c, #c77620);
}

.bar-pending-internal {
    background: linear-gradient(135deg, #2f5d8a, #255074);
}

.bar-planned {
    background: linear-gradient(135deg, #6a7381, #4c5664);
}

.bar-na {
    background: linear-gradient(135deg, #b5bbc4, #8c96a3);
}

.bar-continues-left {
    border-top-left-radius: 0.45rem;
    border-bottom-left-radius: 0.45rem;
}

.bar-continues-right {
    border-top-right-radius: 0.45rem;
    border-bottom-right-radius: 0.45rem;
}

.timeline-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    z-index: 1;
}

.timeline-marker-prod-start {
    background: rgba(239, 139, 44, 0.75);
}

.timeline-marker-prod-end {
    background: rgba(47, 93, 138, 0.65);
}

.timeline-marker-exfactory {
    background: rgba(106, 115, 129, 0.6);
}

.timeline-empty-window {
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 0 1rem;
    color: var(--muted);
    font-weight: 600;
}

.timeline-row-note {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.2rem 0.85rem 0.6rem;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.timeline-row-note span {
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: rgba(16, 33, 51, 0.06);
}

.planning-status-not_planned,
.planning-status-partially_planned {
    background: rgba(187, 122, 31, 0.14);
    border-color: rgba(187, 122, 31, 0.24);
    color: var(--accent);
}

.planning-status-fully_planned,
.planning-status-closed {
    background: rgba(45, 106, 79, 0.12);
    border-color: rgba(45, 106, 79, 0.24);
    color: var(--success);
}

.planning-status-locked {
    background: rgba(47, 93, 138, 0.12);
    border-color: rgba(47, 93, 138, 0.2);
    color: var(--info);
}

.timeline-mobile-list {
    display: none;
}

.timeline-mobile-card {
    display: grid;
    gap: 0.7rem;
    padding: 1rem;
    border: 1px solid rgba(16, 33, 51, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 24px rgba(16, 33, 51, 0.06);
}

.timeline-mobile-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.75rem;
}

.timeline-mobile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.timeline-mobile-blocker {
    margin: 0;
    color: var(--heading);
    font-size: 0.92rem;
}

.timeline-mobile-strip {
    position: relative;
    min-height: 2.7rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(16, 33, 51, 0.05) 1px, transparent 1px);
    background-size: calc(100% / 10) 100%;
    background-color: rgba(245, 248, 252, 0.9);
    overflow: hidden;
}

.timeline-mobile-bar {
    position: absolute;
    top: 0.35rem;
    bottom: 0.35rem;
    display: inline-flex;
    align-items: center;
    min-width: 4rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
}

.timeline-mobile-empty {
    display: inline-flex;
    align-items: center;
    min-height: 2.7rem;
    padding: 0 0.85rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

@media (max-width: 1500px) {
    .timeline-kpi-board {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .timeline-board-shell {
        grid-template-columns: 420px minmax(840px, 1fr);
    }

    .timeline-board-shell-tracking {
        grid-template-columns: 480px minmax(840px, 1fr);
    }
}

@media (max-width: 1120px) {
    .timeline-kpi-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .timeline-panel-head,
    .timeline-page-head {
        flex-direction: column;
        align-items: start;
    }

    .timeline-board-shell,
    .timeline-board-shell-tracking {
        grid-template-columns: 360px minmax(760px, 1fr);
    }

    .timeline-fixed-grid-planning {
        grid-template-columns: 1.2fr 1fr 0.95fr 0.85fr 0.9fr 1.2fr;
    }

    .timeline-fixed-grid-tracking {
        grid-template-columns: 0.95fr 0.95fr 0.85fr 0.8fr 0.8fr 1.2fr;
    }
}

@media (max-width: 760px) {
    .timeline-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

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

    .timeline-board {
        display: none;
    }

    .timeline-mobile-list {
        display: grid;
        gap: 0.85rem;
    }

    .timeline-filter-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.7rem;
    }

    .timeline-filter-bar > * {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .timeline-filter-bar {
        grid-template-columns: 1fr;
    }

    .timeline-mobile-head {
        flex-direction: column;
        align-items: start;
    }

    .timeline-mobile-meta,
    .timeline-row-links {
        flex-direction: column;
        align-items: start;
    }
}

.timeline-guide-band {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(16, 33, 51, 0.08);
    border-radius: 1rem;
    background:
        radial-gradient(circle at top right, rgba(13, 124, 130, 0.12), transparent 32%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(245, 248, 252, 0.96));
    box-shadow: 0 14px 30px rgba(16, 33, 51, 0.05);
}

.timeline-guide-copy {
    max-width: 48rem;
}

.timeline-guide-copy strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-guide-copy p {
    margin: 0;
    color: var(--muted);
}

.timeline-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem 0.9rem;
}

.timeline-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.timeline-legend-swatch {
    width: 1.35rem;
    height: 0.8rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(16, 33, 51, 0.08);
}

.timeline-legend-line {
    display: inline-block;
    width: 2px;
    height: 1rem;
    border-radius: 999px;
}

.timeline-desktop-board {
    display: block;
}

.timeline-board-frame {
    border: 1px solid rgba(16, 33, 51, 0.08);
    border-radius: 1.1rem;
    background: linear-gradient(180deg, rgba(252, 253, 255, 0.96), rgba(244, 248, 252, 0.94));
    box-shadow: 0 16px 34px rgba(16, 33, 51, 0.06);
    overflow: hidden;
}

.timeline-board-scroll {
    overflow: auto;
}

.timeline-board-inner {
    width: max(100%, calc(var(--days) * var(--day-width)));
}

.timeline-date-header-sticky {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(252, 253, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(16, 33, 51, 0.08);
}

.timeline-card-stack {
    display: grid;
    gap: 0.95rem;
    padding: 1rem;
}

.timeline-card-row {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid rgba(16, 33, 51, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 24px rgba(16, 33, 51, 0.05);
}

.timeline-card-row-planning {
    background:
        radial-gradient(circle at top right, rgba(13, 124, 130, 0.08), transparent 22%),
        rgba(255, 255, 255, 0.94);
}

.timeline-card-row-tracking {
    background:
        radial-gradient(circle at top right, rgba(47, 93, 138, 0.08), transparent 22%),
        rgba(255, 255, 255, 0.94);
}

.timeline-card-head {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(320px, 1.6fr) auto;
    gap: 1rem;
    align-items: start;
}

.timeline-card-primary {
    display: grid;
    gap: 0.25rem;
}

.timeline-card-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.timeline-card-title {
    color: var(--heading);
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
}

.timeline-card-title:hover {
    color: var(--brand-strong);
}

.timeline-card-primary p {
    margin: 0;
    color: var(--muted);
}

.timeline-card-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.timeline-meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.25rem 0.7rem;
    border: 1px solid rgba(16, 33, 51, 0.08);
    border-radius: 999px;
    background: rgba(245, 248, 252, 0.9);
    color: var(--heading);
    font-size: 0.78rem;
    font-weight: 700;
}

.timeline-meta-chip-warn {
    background: rgba(187, 122, 31, 0.1);
    border-color: rgba(187, 122, 31, 0.18);
    color: var(--accent);
}

.timeline-meta-chip-danger {
    background: rgba(180, 72, 53, 0.1);
    border-color: rgba(180, 72, 53, 0.18);
    color: var(--danger);
}

.timeline-card-links {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.timeline-card-links a {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid rgba(16, 33, 51, 0.08);
    border-radius: 999px;
    background: rgba(245, 248, 252, 0.88);
    color: var(--brand-strong);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.timeline-card-links a:hover {
    background: rgba(13, 124, 130, 0.08);
}

.timeline-card-blocker {
    display: grid;
    gap: 0.18rem;
    padding: 0.7rem 0.9rem;
    border-radius: 0.9rem;
    background: rgba(16, 33, 51, 0.04);
}

.timeline-card-blocker strong {
    color: var(--heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-card-blocker p {
    margin: 0;
    color: var(--heading);
    font-weight: 600;
}

.timeline-card-canvas {
    position: relative;
    border: 1px solid rgba(16, 33, 51, 0.08);
    border-radius: 0.95rem;
    background:
        linear-gradient(90deg, rgba(16, 33, 51, 0.05) 1px, transparent 1px),
        linear-gradient(180deg, rgba(245, 248, 252, 0.92), rgba(255, 255, 255, 0.86));
    background-size: var(--day-width) 100%;
    overflow: hidden;
}

.timeline-card-canvas-planning {
    padding: 0.45rem 0 0.3rem;
}

.timeline-card-canvas-tracking {
    min-height: 3.6rem;
}

.timeline-card-lanes {
    position: relative;
}

.timeline-card-lane {
    position: relative;
    min-height: 2.7rem;
}

.timeline-card-note-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.timeline-card-note-row span {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(16, 33, 51, 0.06);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

@media (max-width: 1120px) {
    .timeline-guide-band,
    .timeline-card-head {
        grid-template-columns: 1fr;
    }

    .timeline-legend,
    .timeline-card-links {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .timeline-guide-band {
        display: grid;
    }

    .timeline-desktop-board {
        display: none;
    }
}

.timeline-clean-board {
    border: 1px solid rgba(16, 33, 51, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 24px rgba(16, 33, 51, 0.05);
    overflow: hidden;
}

.timeline-clean-scroll {
    overflow: auto;
}

.timeline-clean-head,
.timeline-clean-row {
    display: grid;
    grid-template-columns: 320px calc(var(--days) * var(--day-width));
}

.timeline-clean-head {
    position: sticky;
    top: 0;
    z-index: 4;
    background: rgba(252, 253, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(16, 33, 51, 0.08);
}

.timeline-clean-head-label {
    position: sticky;
    left: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    padding: 0.9rem 1rem;
    border-right: 1px solid rgba(16, 33, 51, 0.08);
    background: rgba(252, 253, 255, 0.98);
    color: var(--heading);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.timeline-date-header-clean {
    min-width: calc(var(--days) * var(--day-width));
}

.timeline-clean-stack {
    display: grid;
}

.timeline-clean-row {
    border-bottom: 1px solid rgba(16, 33, 51, 0.08);
}

.timeline-clean-meta {
    position: sticky;
    left: 0;
    z-index: 3;
    display: grid;
    gap: 0.45rem;
    padding: 0.9rem 1rem;
    border-right: 1px solid rgba(16, 33, 51, 0.08);
    background: rgba(255, 255, 255, 0.98);
}

.timeline-clean-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.timeline-clean-title {
    color: var(--heading);
    font-size: 0.98rem;
    font-weight: 800;
    text-decoration: none;
}

.timeline-clean-title:hover {
    color: var(--brand-strong);
}

.timeline-clean-sub {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.timeline-clean-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.timeline-clean-chip-row span {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: rgba(16, 33, 51, 0.06);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.timeline-clean-blocker {
    color: var(--heading);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
}

.timeline-clean-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.timeline-clean-links a {
    color: var(--brand-strong);
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
}

.timeline-clean-links a:hover {
    text-decoration: underline;
}

.timeline-clean-canvas {
    position: relative;
    min-width: calc(var(--days) * var(--day-width));
    background:
        linear-gradient(90deg, rgba(16, 33, 51, 0.05) 1px, transparent 1px),
        linear-gradient(180deg, rgba(245, 248, 252, 0.95), rgba(255, 255, 255, 0.88));
    background-size: var(--day-width) 100%;
}

.timeline-clean-canvas-planning {
    padding: 0.4rem 0 0.25rem;
}

.timeline-clean-canvas-tracking {
    min-height: 4rem;
}

.timeline-clean-lane {
    position: relative;
    min-height: 2.5rem;
}

@media (max-width: 760px) {
    .timeline-clean-board {
        display: none;
    }
}
