:root {
    --ink: #111a2c;
    --ink-2: #17243a;
    --paper: #ffffff;
    --canvas: #f3f6fa;
    --canvas-2: #e9eef5;
    --line: #dfe5ed;
    --text: #172033;
    --muted: #667085;
    --soft: #98a2b3;
    --orange: #ff6b3d;
    --orange-deep: #e54f24;
    --orange-soft: #fff0ea;
    --lime: #d8f45f;
    --lime-deep: #6e8418;
    --lime-soft: #f3fbd2;
    --blue: #5ca9ff;
    --blue-soft: #eaf4ff;
    --danger: #ca3f36;
    --danger-soft: #fff0ee;
    --purple: #7756db;
    --purple-soft: #f0edff;
    --sidebar: 16.75rem;
    --topbar: 4.75rem;
    --shadow: 0 14px 38px rgba(17, 26, 44, 0.09);
    --shadow-strong: 0 28px 80px rgba(17, 26, 44, 0.2);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 20rem;
    margin: 0;
    color: var(--text);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

button,
select {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(92, 169, 255, 0.5);
    outline-offset: 2px;
}

svg {
    display: block;
}

.icon-sprite {
    width: 0;
    height: 0;
    position: absolute;
    overflow: hidden;
}

.sr-only {
    width: 1px;
    height: 1px;
    position: absolute;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 999;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.65rem 0.85rem;
    color: #fff;
    background: var(--ink);
    border-radius: 0.55rem;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.app-shell {
    min-height: 100dvh;
}

.sidebar {
    width: var(--sidebar);
    height: 100dvh;
    position: fixed;
    z-index: 120;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(92, 169, 255, 0.11), transparent 30%),
        linear-gradient(180deg, var(--ink), #0c1424);
    overflow-y: auto;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0.45rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    width: 2.25rem;
    aspect-ratio: 1;
    position: relative;
    display: grid;
    place-items: center;
    background: var(--orange);
    border-radius: 0.72rem;
    box-shadow: 0 8px 24px rgba(255, 107, 61, 0.25);
}

.brand-mark::before {
    content: "";
    width: 1.2rem;
    height: 0.28rem;
    position: absolute;
    top: 1.15rem;
    background: var(--ink);
    border-radius: 999px;
}

.brand-mark::after {
    content: "";
    width: 0.85rem;
    height: 0.55rem;
    position: absolute;
    top: 0.6rem;
    border: 0.22rem solid var(--ink);
    border-bottom: 0;
    border-radius: 0.8rem 0.8rem 0 0;
}

.brand-mark i {
    width: 0.22rem;
    aspect-ratio: 1;
    position: absolute;
    top: 0.4rem;
    background: var(--ink);
    border-radius: 50%;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-copy strong {
    font-size: 1.14rem;
    letter-spacing: -0.04em;
}

.brand-copy strong span {
    color: var(--orange);
}

.brand-copy small {
    margin-top: 0.22rem;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.icon-button {
    width: 2.55rem;
    height: 2.55rem;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    color: var(--muted);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0.78rem;
}

.icon-button:hover {
    color: var(--text);
    background: var(--canvas);
}

.icon-button svg {
    width: 1.08rem;
    height: 1.08rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-close,
.mobile-menu,
.mobile-search-button {
    display: none;
}

.demo-chip {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 1.35rem 0.35rem 1.45rem;
    padding: 0.55rem 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.7rem;
    font-size: 0.72rem;
}

.demo-chip i,
.eyebrow i,
.service-status::before,
.sync-dot,
.pulse-dot {
    width: 0.48rem;
    aspect-ratio: 1;
    display: inline-block;
    background: var(--lime);
    border-radius: 50%;
    box-shadow: 0 0 0 0.24rem rgba(216, 244, 95, 0.12);
}

.sidebar-nav {
    display: grid;
    gap: 0.3rem;
}

.nav-label {
    margin: 0 0.55rem 0.45rem;
    color: rgba(255, 255, 255, 0.36);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-item {
    min-height: 3rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    border-radius: 0.82rem;
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease;
}

.nav-item:hover,
.nav-item.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-item.is-active {
    box-shadow: inset 3px 0 var(--orange);
}

.nav-item svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-item b {
    min-width: 1.5rem;
    padding: 0.14rem 0.4rem;
    color: var(--ink);
    background: var(--lime);
    border-radius: 999px;
    font-size: 0.7rem;
    text-align: center;
}

.service-card {
    margin-top: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
}

.service-card-head,
.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.service-card-head > span:first-child {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
}

.service-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--lime);
    font-size: 0.7rem;
    font-weight: 750;
}

.service-status.is-closed {
    color: #ff9d87;
}

.service-status.is-closed::before {
    background: #ff8a70;
    box-shadow: 0 0 0 0.24rem rgba(255, 107, 61, 0.12);
}

.service-card > strong {
    display: block;
    margin-top: 0.9rem;
    font-size: 0.95rem;
}

.service-card p {
    margin: 0.2rem 0 0.85rem;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.75rem;
}

.switch-row {
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 650;
}

.switch-row input,
.availability-choice input,
.availability-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-row i,
.availability-choice i,
.availability-switch i {
    width: 2.45rem;
    height: 1.38rem;
    position: relative;
    display: block;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    transition: background 160ms ease;
}

.switch-row i::after,
.availability-choice i::after,
.availability-switch i::after {
    content: "";
    width: 1rem;
    aspect-ratio: 1;
    position: absolute;
    top: 0.19rem;
    left: 0.2rem;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 160ms ease;
}

.switch-row input:checked + i,
.availability-choice input:checked + i,
.availability-switch input:checked + i {
    background: var(--lime-deep);
}

.switch-row input:checked + i::after,
.availability-choice input:checked + i::after,
.availability-switch input:checked + i::after {
    transform: translateX(1.05rem);
}

.switch-row:has(input:focus-visible) i,
.availability-choice:has(input:focus-visible) i,
.availability-switch:has(input:focus-visible) i {
    outline: 3px solid rgba(92, 169, 255, 0.55);
    outline-offset: 2px;
}

.sidebar-footer {
    margin-top: 0.9rem;
}

.profile-card,
.topbar-profile {
    border: 0;
}

.profile-card {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem;
    color: #fff;
    background: transparent;
    border-radius: 0.75rem;
    text-align: left;
}

.profile-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.profile-card > span:nth-child(2),
.topbar-profile > span:nth-child(2) {
    display: flex;
    flex-direction: column;
}

.profile-card strong,
.topbar-profile strong {
    font-size: 0.78rem;
}

.profile-card small,
.topbar-profile small {
    margin-top: 0.08rem;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.7rem;
}

.profile-card svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.avatar {
    width: 2.15rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    color: var(--ink);
    background: var(--lime);
    border-radius: 0.65rem;
    font-size: 0.7rem;
    font-weight: 850;
}

.workspace {
    min-height: 100dvh;
    margin-left: var(--sidebar);
}

.topbar {
    height: var(--topbar);
    position: sticky;
    z-index: 90;
    top: 0;
    display: grid;
    grid-template-columns: minmax(13rem, 1fr) minmax(18rem, 32rem) auto;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1.75rem;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.branch-picker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    justify-self: start;
}

.branch-picker > svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: var(--orange);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.branch-picker > span {
    display: flex;
    flex-direction: column;
}

.branch-picker small {
    color: var(--soft);
    font-size: 0.68rem;
}

.branch-picker select {
    max-width: 13rem;
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 0.82rem;
    font-weight: 750;
}

.global-search,
.compact-search {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--canvas);
    border: 1px solid transparent;
    border-radius: 0.8rem;
}

.global-search {
    min-height: 2.75rem;
    padding: 0 0.8rem;
}

.global-search:focus-within,
.compact-search:focus-within {
    background: #fff;
    border-color: #b8cdf0;
    box-shadow: 0 0 0 3px rgba(92, 169, 255, 0.12);
}

.global-search svg,
.compact-search svg,
.select-control svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: var(--soft);
    stroke-width: 1.9;
    stroke-linecap: round;
}

.global-search input,
.compact-search input {
    min-width: 0;
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 0.8rem;
}

.global-search input::placeholder,
.compact-search input::placeholder {
    color: var(--soft);
}

.global-search kbd {
    padding: 0.12rem 0.35rem;
    color: var(--soft);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.35rem;
    font-family: inherit;
    font-size: 0.64rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-self: end;
}

.notification-button {
    position: relative;
}

.notification-button > span {
    width: 1.05rem;
    aspect-ratio: 1;
    position: absolute;
    top: -0.22rem;
    right: -0.2rem;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--orange);
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 0.56rem;
    font-weight: 800;
}

.topbar-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.3rem 0.5rem 0.3rem 0.3rem;
    background: transparent;
    border-radius: 0.75rem;
    text-align: left;
}

.topbar-profile:hover {
    background: var(--canvas);
}

.topbar-profile small {
    color: var(--soft);
}

.popover {
    min-width: 18rem;
    position: absolute;
    z-index: 150;
    top: calc(100% - 0.3rem);
    right: 1.75rem;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    box-shadow: var(--shadow-strong);
}

.popover[hidden] {
    display: none;
}

.popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.65rem 0.75rem;
}

.popover-head strong {
    font-size: 0.84rem;
}

.popover-head > span {
    color: var(--orange-deep);
    font-size: 0.7rem;
    font-weight: 750;
}

.popover button {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem;
    background: transparent;
    border: 0;
    border-radius: 0.65rem;
    text-align: left;
}

.popover button:hover {
    background: var(--canvas);
}

.popover button span {
    display: flex;
    flex-direction: column;
}

.popover button strong {
    font-size: 0.76rem;
}

.popover button small {
    margin-top: 0.18rem;
    color: var(--soft);
    font-size: 0.68rem;
}

.notice-dot {
    width: 0.5rem;
    aspect-ratio: 1;
    margin-top: 0.35rem;
    flex: 0 0 auto;
    border-radius: 50%;
}

.notice-dot-coral { background: var(--orange); }
.notice-dot-lime { background: var(--lime-deep); }

.profile-popover {
    min-width: 13rem;
}

.profile-popover hr {
    margin: 0.35rem 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.main-content {
    width: min(100%, 104rem);
    margin: 0 auto;
    padding: 1.75rem;
}

.view[hidden] {
    display: none;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.eyebrow,
.section-kicker {
    margin: 0 0 0.25rem;
    color: var(--orange-deep);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eyebrow i {
    background: var(--orange);
    box-shadow: 0 0 0 0.24rem rgba(255, 107, 61, 0.12);
}

.page-head h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 3.3vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.page-head > div > p:last-child {
    margin: 0.5rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.page-head > div > p strong {
    color: var(--text);
}

.page-actions {
    display: flex;
    gap: 0.65rem;
}

.button {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem;
    border: 1px solid transparent;
    border-radius: 0.78rem;
    font-size: 0.8rem;
    font-weight: 750;
    text-decoration: none;
    transition: transform 150ms ease, background 150ms ease, border 150ms ease;
}

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

.button svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button-primary {
    color: #fff;
    background: var(--orange);
    border-color: var(--orange);
    box-shadow: 0 8px 22px rgba(255, 107, 61, 0.2);
}

.button-primary:hover {
    background: var(--orange-deep);
    border-color: var(--orange-deep);
}

.button-secondary {
    color: var(--text);
    background: #fff;
    border-color: var(--line);
}

.button-secondary:hover {
    border-color: #bdc7d4;
}

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

.metric-card {
    min-height: 8.6rem;
    position: relative;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 1.15rem 1.2rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(17, 26, 44, 0.035);
    overflow: hidden;
}

.metric-card > span {
    color: var(--muted);
    font-size: 0.76rem;
}

.metric-card > strong {
    margin: 0.3rem 0;
    color: var(--ink);
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    letter-spacing: -0.05em;
}

.metric-card small {
    color: var(--soft);
    font-size: 0.7rem;
}

.metric-card small b {
    color: var(--muted);
}

.metric-card-dark {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.metric-card-dark::after {
    content: "";
    width: 6rem;
    aspect-ratio: 1;
    position: absolute;
    right: -1.5rem;
    bottom: -2.7rem;
    border: 1.2rem solid rgba(216, 244, 95, 0.12);
    border-radius: 50%;
}

.metric-card-dark > span,
.metric-card-dark small {
    color: rgba(255, 255, 255, 0.55);
}

.metric-card-dark > strong {
    color: #fff;
}

.metric-card-dark small {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.metric-card-dark small i {
    width: 0.42rem;
    aspect-ratio: 1;
    background: var(--lime);
    border-radius: 50%;
}

.trend {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--lime-deep) !important;
}

.trend svg {
    width: 0.9rem;
    height: 0.9rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-strip {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) minmax(10rem, 1.3fr) auto;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.8rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.95rem;
}

.service-strip-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pulse-dot {
    background: var(--lime-deep);
    box-shadow: 0 0 0 0.28rem var(--lime-soft);
    animation: pulse 1.8s infinite;
}

.service-strip-title > span:last-child,
.service-facts span {
    display: flex;
    flex-direction: column;
}

.service-strip-title strong,
.service-facts strong {
    font-size: 0.78rem;
}

.service-strip-title small,
.service-facts small {
    color: var(--soft);
    font-size: 0.68rem;
}

.capacity-meter {
    height: 0.42rem;
    overflow: hidden;
    background: var(--canvas-2);
    border-radius: 999px;
}

.capacity-meter i {
    height: 100%;
    display: block;
    background: linear-gradient(90deg, var(--lime-deep), var(--lime));
    border-radius: inherit;
}

.service-facts {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.board-panel,
.panel,
.relations-section {
    margin-top: 0.8rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(17, 26, 44, 0.035);
}

.board-panel {
    padding: 1.1rem;
}

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

.board-head {
    margin-bottom: 1rem;
}

.board-head h2,
.panel-head h2,
.section-head h2,
.courier-pulse-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
    letter-spacing: -0.025em;
}

.section-kicker {
    color: var(--soft);
    font-size: 0.66rem;
}

.board-tools,
.toolbar-controls {
    display: flex;
    gap: 0.55rem;
}

.compact-search {
    min-width: 14rem;
    min-height: 2.45rem;
    padding: 0 0.7rem;
}

.select-control {
    min-height: 2.45rem;
    display: flex;
    align-items: center;
    padding: 0 0.65rem;
    background: var(--canvas);
    border: 1px solid transparent;
    border-radius: 0.72rem;
}

.select-control:focus-within {
    background: #fff;
    border-color: #b8cdf0;
}

.select-control select {
    max-width: 11rem;
    padding-right: 0.4rem;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 0.74rem;
}

.order-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(14rem, 1fr));
    gap: 0.7rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.order-column {
    min-width: 0;
    padding: 0.65rem;
    background: var(--canvas);
    border: 1px solid #e8edf3;
    border-radius: 0.85rem;
}

.order-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.15rem 0.15rem 0.65rem;
}

.order-column-head > span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.76rem;
    font-weight: 800;
}

.column-dot {
    width: 0.48rem;
    aspect-ratio: 1;
    border-radius: 50%;
}

.column-new { background: var(--orange); }
.column-preparing { background: var(--blue); }
.column-ready { background: var(--lime-deep); }
.column-dispatched { background: var(--purple); }

.order-column-head b {
    min-width: 1.45rem;
    padding: 0.14rem 0.35rem;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.65rem;
    text-align: center;
}

.order-stack {
    display: grid;
    align-content: start;
    gap: 0.55rem;
}

.order-card {
    position: relative;
    padding: 0.8rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    box-shadow: 0 3px 10px rgba(17, 26, 44, 0.035);
    transition: border 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.order-card:hover {
    border-color: #c4ccd7;
    box-shadow: 0 8px 20px rgba(17, 26, 44, 0.08);
    transform: translateY(-1px);
}

.order-card.is-urgent {
    border-left: 3px solid var(--orange);
}

.order-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}

.order-number {
    display: flex;
    flex-direction: column;
}

.order-number strong {
    color: var(--ink);
    font-size: 0.82rem;
}

.order-number small {
    color: var(--soft);
    font-size: 0.66rem;
}

.timer {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.4rem;
    color: var(--muted);
    background: var(--canvas);
    border-radius: 0.45rem;
    font-size: 0.64rem;
    font-weight: 750;
}

.timer.is-urgent {
    color: var(--danger);
    background: var(--danger-soft);
}

.timer svg {
    width: 0.78rem;
    height: 0.78rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.order-customer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0 0.55rem;
}

.mini-avatar {
    width: 1.8rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--ink);
    background: var(--orange-soft);
    border-radius: 0.5rem;
    font-size: 0.62rem;
    font-weight: 850;
}

.order-customer > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.order-customer strong {
    overflow: hidden;
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-customer small {
    color: var(--soft);
    font-size: 0.65rem;
}

.order-items {
    min-height: 2.4rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.55;
}

.order-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.7rem 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.22rem 0.38rem;
    border-radius: 0.4rem;
    font-size: 0.59rem;
    font-weight: 750;
}

.tag-payment { color: #286d4f; background: #e9f7f0; }
.tag-cash { color: #8a6414; background: #fff7da; }
.tag-delivery { color: #286aa6; background: var(--blue-soft); }
.tag-pickup { color: #634bb2; background: var(--purple-soft); }

.order-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--line);
}

.order-card-foot strong {
    font-size: 0.78rem;
}

.order-card-actions {
    display: flex;
    gap: 0.35rem;
}

.small-action {
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0 0.55rem;
    color: var(--text);
    background: var(--canvas);
    border: 1px solid transparent;
    border-radius: 0.52rem;
    font-size: 0.65rem;
    font-weight: 750;
}

.small-action:hover {
    border-color: #cbd3df;
}

.small-action.primary {
    color: #fff;
    background: var(--ink);
}

.small-action svg {
    width: 0.72rem;
    height: 0.72rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.empty-column {
    min-height: 8rem;
    display: grid;
    place-items: center;
    color: var(--soft);
    border: 1px dashed #cfd6e1;
    border-radius: 0.65rem;
    font-size: 0.7rem;
    text-align: center;
}

.product-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 1.2fr;
    margin-bottom: 0.8rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1rem;
    overflow: hidden;
}

.product-summary > div {
    min-height: 6.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    border-right: 1px solid var(--line);
}

.product-summary > div:last-child {
    border-right: 0;
}

.product-summary > div > span:last-child {
    display: flex;
    flex-direction: column;
}

.product-summary small {
    color: var(--soft);
    font-size: 0.7rem;
}

.product-summary strong {
    color: var(--ink);
    font-size: 1.1rem;
}

.summary-icon {
    width: 2.6rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 0.75rem;
}

.summary-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.summary-icon-orange { color: var(--orange-deep); background: var(--orange-soft); }
.summary-icon-lime { color: var(--lime-deep); background: var(--lime-soft); }
.summary-icon-muted { color: var(--muted); background: var(--canvas); }

.sync-note {
    background: var(--canvas);
}

.sync-dot {
    background: var(--blue);
    box-shadow: 0 0 0 0.24rem var(--blue-soft);
}

.product-panel {
    margin-top: 0;
    overflow: hidden;
}

.product-toolbar {
    padding: 1.15rem 1.2rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 54rem;
    border-collapse: collapse;
}

th,
td {
    padding: 0.85rem 1.2rem;
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--soft);
    background: var(--canvas);
    border-block: 1px solid var(--line);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

td {
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    font-size: 0.76rem;
}

tbody tr {
    transition: background 150ms ease;
}

tbody tr:hover {
    background: #fbfcfd;
}

.numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.product-symbol {
    width: 2.5rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--ink);
    background: var(--orange-soft);
    border-radius: 0.7rem;
    font-size: 0.66rem;
    font-weight: 850;
}

.product-cell > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.product-cell strong {
    color: var(--text);
    font-size: 0.78rem;
}

.product-cell small {
    color: var(--soft);
    font-size: 0.65rem;
}

.availability-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.availability-switch i {
    width: 2.2rem;
    height: 1.22rem;
    background: #cbd2dc;
}

.availability-switch i::after {
    width: 0.88rem;
    top: 0.17rem;
    left: 0.17rem;
}

.availability-switch input:checked + i::after {
    transform: translateX(0.98rem);
}

.availability-switch input:checked + i {
    background: var(--lime-deep);
}

.edit-button {
    width: 2.15rem;
    height: 2.15rem;
}

.panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    color: var(--soft);
    font-size: 0.68rem;
}

.courier-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(21rem, 0.75fr);
    gap: 0.8rem;
}

.courier-pulse-card {
    min-height: 15rem;
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) 12rem;
    grid-template-rows: 1fr auto;
    gap: 1rem 2rem;
    padding: 1.35rem;
    color: #fff;
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 1rem;
    overflow: hidden;
}

.courier-pulse-card .section-kicker {
    color: var(--lime);
}

.courier-pulse-card h2 {
    color: #fff;
    font-size: 1.35rem;
}

.courier-pulse-card p:not(.section-kicker) {
    margin: 0.4rem 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
}

.courier-radar {
    width: 11rem;
    aspect-ratio: 1;
    position: relative;
    align-self: center;
    justify-self: center;
    background:
        radial-gradient(circle, transparent 0 23%, rgba(255,255,255,.11) 24% 25%, transparent 26% 47%, rgba(255,255,255,.09) 48% 49%, transparent 50%),
        linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 100% 100%, 1.4rem 1.4rem, 1.4rem 1.4rem;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
}

.radar-store {
    width: 2.6rem;
    aspect-ratio: 1;
    position: absolute;
    z-index: 2;
    inset: 50% auto auto 50%;
    display: grid;
    place-items: center;
    color: var(--ink);
    background: var(--orange);
    border: 0.25rem solid rgba(255,255,255,.12);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radar-store svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.courier-radar > i {
    width: 0.58rem;
    aspect-ratio: 1;
    position: absolute;
    top: var(--y);
    left: var(--x);
    background: var(--lime);
    border: 0.12rem solid var(--ink);
    border-radius: 50%;
    box-shadow: 0 0 0 0.18rem rgba(216, 244, 95, 0.18);
}

.courier-pulse-card dl {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.courier-pulse-card dl > div {
    padding-left: 1rem;
    border-left: 1px solid rgba(255,255,255,.1);
}

.courier-pulse-card dl > div:first-child {
    padding-left: 0;
    border-left: 0;
}

.courier-pulse-card dt {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.66rem;
}

.courier-pulse-card dd {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    font-weight: 750;
}

.courier-alerts {
    margin-top: 0;
    padding: 1.1rem;
}

.courier-alerts .panel-head {
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.count-chip {
    padding: 0.25rem 0.45rem;
    color: var(--orange-deep);
    background: var(--orange-soft);
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 750;
}

.courier-alerts > button {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line);
    text-align: left;
}

.courier-alerts > button:hover strong {
    color: var(--orange-deep);
}

.courier-alerts > button > span:nth-child(2) {
    display: flex;
    flex-direction: column;
}

.courier-alerts button strong {
    font-size: 0.75rem;
}

.courier-alerts button small {
    margin-top: 0.18rem;
    color: var(--soft);
    font-size: 0.67rem;
}

.alert-icon {
    width: 2.4rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 0.7rem;
}

.alert-icon svg,
.row-chevron {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.alert-orange { color: var(--orange-deep); background: var(--orange-soft); }
.alert-blue { color: #2b76ba; background: var(--blue-soft); }
.row-chevron { color: var(--soft); }

.relations-section {
    padding: 1.2rem;
}

.section-head {
    margin-bottom: 1rem;
}

.section-head > span {
    color: var(--soft);
    font-size: 0.68rem;
}

.relation-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.relation-card {
    padding: 1rem;
    background: var(--canvas);
    border: 1px solid #e4e9f0;
    border-radius: 0.9rem;
}

.relation-card.is-primary {
    background: #fffdfb;
    border-color: #ffc6b4;
    box-shadow: inset 0 3px var(--orange);
}

.relation-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
}

.relation-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.relation-logo {
    width: 2.6rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    color: var(--ink);
    background: var(--lime);
    border-radius: 0.72rem;
    font-size: 0.65rem;
    font-weight: 850;
}

.relation-logo.orange { background: var(--orange); }
.relation-logo.blue { background: var(--blue); }

.relation-brand > span:last-child {
    display: flex;
    flex-direction: column;
}

.relation-brand strong {
    font-size: 0.8rem;
}

.relation-brand small {
    color: var(--soft);
    font-size: 0.65rem;
}

.relation-badge {
    padding: 0.25rem 0.42rem;
    color: #557015;
    background: var(--lime-soft);
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 800;
}

.relation-badge.backup {
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
}

.relation-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin: 1rem 0;
}

.relation-metrics > div {
    padding: 0.65rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
}

.relation-metrics span {
    display: block;
    color: var(--soft);
    font-size: 0.62rem;
}

.relation-metrics strong {
    display: block;
    margin-top: 0.18rem;
    font-size: 0.72rem;
}

.relation-version {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0;
    color: var(--muted);
    border-block: 1px solid var(--line);
    font-size: 0.66rem;
}

.relation-version strong {
    color: var(--text);
}

.relation-actions {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.relation-actions .small-action {
    flex: 1;
}

.empty-state {
    min-height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--muted);
    text-align: center;
}

.empty-state[hidden] {
    display: none;
}

.empty-state svg {
    width: 1.8rem;
    height: 1.8rem;
    margin-bottom: 0.65rem;
    fill: none;
    stroke: var(--soft);
    stroke-width: 1.6;
}

.empty-state strong {
    font-size: 0.82rem;
}

.empty-state span {
    margin-top: 0.2rem;
    color: var(--soft);
    font-size: 0.7rem;
}

.drawer,
.form-dialog {
    max-width: none;
    padding: 0;
    color: var(--text);
    background: #fff;
    border: 0;
    box-shadow: var(--shadow-strong);
}

.drawer::backdrop,
.form-dialog::backdrop {
    background: rgba(8, 14, 26, 0.48);
    backdrop-filter: blur(2px);
}

.drawer {
    width: min(32rem, calc(100% - 0.75rem));
    height: 100dvh;
    max-height: none;
    position: fixed;
    inset: 0 0 0 auto;
    margin: 0;
    border-left: 1px solid var(--line);
}

.drawer[open] {
    display: grid;
    grid-template-rows: auto 1fr auto;
    animation: drawer-in 210ms ease both;
}

.drawer-head,
.dialog-head,
.drawer-footer,
.dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem;
    border-bottom: 1px solid var(--line);
}

.drawer-head h2,
.dialog-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.3rem;
    letter-spacing: -0.035em;
}

.drawer-body {
    min-height: 0;
    padding: 1.2rem;
    overflow-y: auto;
}

.drawer-footer,
.dialog-footer {
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.detail-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin: 0 0 1.25rem;
}

.detail-grid > div {
    padding: 0.8rem;
    background: var(--canvas);
    border-radius: 0.7rem;
}

.detail-grid dt {
    margin-bottom: 0.2rem;
    color: var(--soft);
    font-size: 0.65rem;
}

.detail-grid dd {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 750;
}

.detail-section {
    margin-top: 1.3rem;
}

.detail-section h3 {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
}

.item-list,
.timeline,
.detail-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.item-list li,
.detail-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 0.76rem;
}

.item-list strong,
.detail-list strong {
    color: var(--text);
}

.detail-note {
    padding: 0.8rem;
    color: var(--muted);
    background: var(--orange-soft);
    border-radius: 0.7rem;
    font-size: 0.74rem;
}

.timeline li {
    position: relative;
    display: flex;
    gap: 0.7rem;
    padding-bottom: 1rem;
}

.timeline li:not(:last-child)::before {
    content: "";
    width: 1px;
    position: absolute;
    top: 0.55rem;
    bottom: 0;
    left: 0.25rem;
    background: var(--line);
}

.timeline i {
    width: 0.52rem;
    aspect-ratio: 1;
    position: relative;
    z-index: 1;
    margin-top: 0.25rem;
    flex: 0 0 auto;
    background: var(--orange);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--orange);
}

.timeline span {
    display: flex;
    flex-direction: column;
}

.timeline strong {
    font-size: 0.74rem;
}

.timeline small {
    color: var(--soft);
    font-size: 0.66rem;
}

.form-dialog {
    width: min(34rem, calc(100% - 1rem));
    border-radius: 1rem;
}

.form-dialog[open] {
    animation: dialog-in 180ms ease both;
}

.form-dialog form {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.dialog-body {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
}

.field,
.availability-choice {
    display: grid;
    gap: 0.4rem;
}

.field > span,
.availability-choice strong {
    font-size: 0.75rem;
    font-weight: 750;
}

.field input,
.field select {
    width: 100%;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    outline: 0;
    font-size: 0.8rem;
}

.field input:focus,
.field select:focus {
    background: #fff;
    border-color: #b8cdf0;
    box-shadow: 0 0 0 3px rgba(92, 169, 255, 0.12);
}

.field-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0.75rem;
}

.input-suffix {
    position: relative;
}

.input-suffix input {
    padding-right: 2.8rem;
}

.input-suffix > span {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    color: var(--soft);
    font-size: 0.72rem;
    transform: translateY(-50%);
}

.availability-choice {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0.85rem;
    background: var(--canvas);
    border-radius: 0.75rem;
}

.availability-choice > span {
    display: flex;
    flex-direction: column;
}

.availability-choice small {
    margin-top: 0.15rem;
    color: var(--soft);
    font-size: 0.68rem;
}

.availability-choice i {
    background: #cbd2dc;
}

.form-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.7rem;
}

.form-note svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: var(--orange);
    stroke-width: 1.8;
}

.toast {
    position: fixed;
    z-index: 350;
    right: 1.2rem;
    bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 1rem;
    color: #fff;
    background: var(--ink);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 0.82rem;
    box-shadow: var(--shadow-strong);
    font-size: 0.76rem;
    animation: toast-in 180ms ease both;
}

.toast[hidden] {
    display: none;
}

.toast-icon {
    width: 1.55rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    color: var(--ink);
    background: var(--lime);
    border-radius: 50%;
}

.toast-icon svg {
    width: 0.9rem;
    height: 0.9rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0.24rem rgba(110, 132, 24, 0.12); }
    50% { box-shadow: 0 0 0 0.4rem rgba(110, 132, 24, 0); }
}

@keyframes drawer-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(0.6rem) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(0.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1320px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-board {
        grid-template-columns: repeat(4, minmax(15rem, 1fr));
        padding-bottom: 0.4rem;
    }

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

@media (max-width: 1080px) {
    .topbar {
        grid-template-columns: minmax(11rem, 1fr) minmax(15rem, 24rem) auto;
    }

    .courier-overview {
        grid-template-columns: 1fr;
    }

    .product-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-summary > div:nth-child(2) {
        border-right: 0;
    }

    .product-summary > div:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 960px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 200ms ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
        box-shadow: 24px 0 60px rgba(7, 13, 27, 0.28);
    }

    .sidebar-close,
    .mobile-menu {
        display: inline-grid;
    }

    .sidebar-close {
        color: rgba(255,255,255,.65);
        background: rgba(255,255,255,.07);
        border-color: rgba(255,255,255,.1);
    }

    .sidebar-overlay {
        position: fixed;
        z-index: 110;
        inset: 0;
        background: rgba(8, 13, 26, 0.48);
        opacity: 0;
        visibility: hidden;
        transition: opacity 180ms ease, visibility 180ms ease;
    }

    .sidebar-overlay.is-visible {
        opacity: 1;
        visibility: visible;
    }

    .workspace {
        margin-left: 0;
    }

    .topbar {
        grid-template-columns: auto minmax(10rem, 1fr) minmax(15rem, 23rem) auto;
        padding-inline: 1.2rem;
    }

    .service-strip {
        grid-template-columns: 1fr 1fr;
    }

    .service-facts {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@media (max-width: 760px) {
    .topbar {
        grid-template-columns: auto 1fr auto;
        gap: 0.65rem;
        padding-inline: 0.8rem;
    }

    .branch-picker > svg,
    .branch-picker small {
        display: none;
    }

    .branch-picker select {
        width: 100%;
        max-width: none;
        text-overflow: ellipsis;
    }

    .global-search {
        position: fixed;
        z-index: 170;
        top: calc(var(--topbar) + 0.5rem);
        right: 0.75rem;
        left: 0.75rem;
        display: none;
        background: #fff;
        border-color: var(--line);
        box-shadow: var(--shadow);
    }

    .global-search.is-open {
        display: flex;
    }

    .mobile-search-button {
        display: inline-grid;
    }

    .topbar-profile {
        display: none;
    }

    .main-content {
        padding: 1.1rem 0.8rem;
    }

    .page-head {
        align-items: stretch;
        flex-direction: column;
        gap: 1rem;
    }

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

    .metric-grid,
    .relation-grid {
        grid-template-columns: 1fr;
    }

    .service-strip {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .service-facts {
        grid-column: auto;
        justify-content: flex-start;
    }

    .board-head,
    .product-toolbar,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .board-tools,
    .toolbar-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .compact-search {
        min-width: 0;
        grid-column: 1 / -1;
    }

    .select-control select {
        width: 100%;
        max-width: none;
    }

    .product-summary {
        grid-template-columns: 1fr 1fr;
    }

    .product-summary > div {
        min-height: 5.4rem;
        padding: 0.8rem;
    }

    .product-summary > div:nth-child(3) {
        border-bottom: 0;
    }

    .summary-icon {
        width: 2.2rem;
    }

    .courier-pulse-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .courier-radar {
        width: 10rem;
    }

    .courier-pulse-card dl {
        grid-column: auto;
    }

    .panel-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .popover {
        right: 0.75rem;
        left: 0.75rem;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .page-actions,
    .board-tools,
    .toolbar-controls,
    .product-summary,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .product-summary > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .product-summary > div:nth-child(3) {
        border-bottom: 1px solid var(--line);
    }

    .product-summary > div:last-child {
        border-bottom: 0;
    }

    .courier-pulse-card dl {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .courier-pulse-card dl > div {
        padding: 0.6rem 0 0;
        border-top: 1px solid rgba(255,255,255,.1);
        border-left: 0;
    }

    .courier-pulse-card dl > div:first-child {
        padding-top: 0;
        border-top: 0;
    }

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

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

    .toast {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
