:root {
    --bg: #f3f5f7;
    --surface: #ffffff;
    --surface-muted: #f7f8fa;
    --ink: #151922;
    --ink-soft: #5f6878;
    --line: #e3e7ec;
    --line-strong: #d5dae2;
    --sidebar: #10151d;
    --sidebar-soft: #1a222e;
    --accent: #5ce0a4;
    --accent-strong: #1b9b69;
    --blue: #4774ff;
    --violet: #8c6cff;
    --amber: #eaa63a;
    --green: #27a875;
    --danger: #d24f57;
    --shadow: 0 14px 40px rgba(20, 28, 40, 0.07);
    --radius: 18px;
    --radius-small: 11px;
    --sidebar-width: 250px;
    font-family:
        Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--ink);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
}

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

h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.045em;
}

h2 {
    margin-bottom: 6px;
    font-size: 1.15rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h3 {
    margin-bottom: 6px;
}

small {
    color: var(--ink-soft);
}

code,
pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

:focus-visible {
    outline: 3px solid rgba(71, 116, 255, 0.35);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.clipboard-fallback {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.skip-link {
    position: fixed;
    z-index: 200;
    top: 10px;
    left: 10px;
    transform: translateY(-150%);
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

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

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

.sidebar {
    position: fixed;
    z-index: 80;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 28px 18px 20px;
    color: #f5f7fa;
    background:
        radial-gradient(circle at 20% 0%, rgba(92, 224, 164, 0.12), transparent 34%),
        var(--sidebar);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 0 8px;
}

.brand__mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 13px;
    color: #0d1712;
    background: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

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

.brand strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 0.93rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand small {
    color: #8994a5;
    font-size: 0.72rem;
}

.nav-list {
    display: grid;
    gap: 24px;
    margin-top: 42px;
}

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

.nav-section__label {
    margin: 0 0 5px 13px;
    color: #687588;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #aab3c1;
    font-weight: 650;
    transition:
        color 160ms ease,
        background 160ms ease,
        border-color 160ms ease;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.045);
}

.nav-link.is-active {
    color: #ffffff;
    border-color: rgba(92, 224, 164, 0.14);
    background: rgba(92, 224, 164, 0.1);
}

.nav-link__icon {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 8px;
    color: #aab3c1;
    background: rgba(255, 255, 255, 0.05);
    font-size: 1.1rem;
}

.nav-link.is-active .nav-link__icon {
    color: var(--accent);
    background: rgba(92, 224, 164, 0.12);
}

.nav-section--hubber .nav-link.is-active {
    border-color: rgba(94, 169, 255, 0.18);
    background: rgba(94, 169, 255, 0.1);
}

.nav-section--hubber .nav-link.is-active .nav-link__icon {
    color: #70b5ff;
    background: rgba(94, 169, 255, 0.13);
}

.sync-state--hubber .sync-state__dot {
    background: #5ea9ff;
    box-shadow: 0 0 0 5px rgba(94, 169, 255, 0.13);
}

.order-hero--hubber {
    border-color: rgba(94, 169, 255, 0.24);
}

.hubber-outgoings-table td:nth-child(2) {
    min-width: 280px;
}

.sidebar__footer {
    display: grid;
    gap: 14px;
    margin-top: auto;
    padding: 18px 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.account {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.account__avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: var(--accent);
    background: var(--sidebar-soft);
    font-weight: 800;
}

.account__name {
    overflow: hidden;
    color: #c6ced9;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace {
    grid-column: 2;
    min-width: 0;
}

.page {
    width: min(100%, 1600px);
    margin: 0 auto;
    padding: 42px clamp(24px, 3.5vw, 58px) 64px;
}

.mobile-header {
    display: none;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.page-header__lead {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--ink-soft);
    font-size: 1rem;
}

.eyebrow {
    margin-bottom: 7px;
    color: var(--accent-strong);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: var(--accent);
}

.muted {
    color: var(--ink-soft);
}

.sync-state {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.64);
}

.sync-state__dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border: 2px solid rgba(39, 168, 117, 0.25);
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(39, 168, 117, 0.1);
}

.sync-state > span:last-child {
    display: flex;
    flex-direction: column;
}

.sync-state small {
    font-size: 0.7rem;
}

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

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 18px;
}

.metric-card {
    position: relative;
    min-height: 168px;
    overflow: hidden;
    padding: 21px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(20, 28, 40, 0.045);
}

.metric-card::after {
    position: absolute;
    right: -28px;
    bottom: -42px;
    width: 110px;
    height: 110px;
    border: 22px solid rgba(71, 116, 255, 0.04);
    border-radius: 50%;
    content: "";
}

.metric-card--dark {
    color: #ffffff;
    border-color: var(--sidebar);
    background:
        radial-gradient(circle at 90% 10%, rgba(92, 224, 164, 0.16), transparent 42%),
        var(--sidebar);
}

.metric-card--dark::after {
    border-color: rgba(92, 224, 164, 0.08);
}

.metric-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 750;
}

.metric-card--dark .metric-card__top,
.metric-card--dark p {
    color: #98a3b3;
}

.metric-card__symbol {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    color: var(--accent);
    background: rgba(92, 224, 164, 0.12);
    font-weight: 850;
}

.metric-card__symbol--mint {
    color: var(--green);
    background: rgba(39, 168, 117, 0.11);
}

.metric-card__symbol--blue {
    color: var(--blue);
    background: rgba(71, 116, 255, 0.1);
}

.metric-card__symbol--amber {
    color: #b77917;
    background: rgba(234, 166, 58, 0.13);
}

.metric-card > strong {
    display: block;
    position: relative;
    z-index: 1;
    margin-top: 18px;
    font-size: clamp(1.55rem, 2.2vw, 2.05rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.metric-card p {
    position: relative;
    z-index: 1;
    margin: 10px 0 0;
    color: var(--ink-soft);
    font-size: 0.75rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.8fr);
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-grid--lower {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
}

.chart-card,
.status-card,
.recent-card,
.delivery-card {
    min-width: 0;
    padding: 24px;
}

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

.section-heading h2 {
    margin-bottom: 0;
}

.section-heading .eyebrow {
    margin-bottom: 5px;
}

.legend {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 0.72rem;
}

.legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
}

.chart-wrap {
    position: relative;
    height: 255px;
}

.orders-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.status-breakdown {
    display: grid;
    gap: 15px;
}

.status-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
    color: var(--ink);
}

.status-row:hover .status-row__label {
    color: var(--blue);
}

.status-row__label {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-row > strong {
    font-size: 0.77rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--blue);
}

.status-dot--violet {
    background: var(--violet);
}

.status-dot--amber {
    background: var(--amber);
}

.status-dot--green {
    background: var(--green);
}

.status-dot--slate {
    background: #7d8796;
}

.status-progress {
    width: 100%;
    height: 5px;
    grid-column: 1 / -1;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #eef1f4;
    appearance: none;
}

.status-progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #eef1f4;
}

.status-progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--blue);
}

.status-progress::-moz-progress-bar {
    border-radius: 999px;
    background: var(--blue);
}

.status-progress--violet::-webkit-progress-value {
    background: var(--violet);
}

.status-progress--violet::-moz-progress-bar {
    background: var(--violet);
}

.status-progress--amber::-webkit-progress-value {
    background: var(--amber);
}

.status-progress--amber::-moz-progress-bar {
    background: var(--amber);
}

.status-progress--green::-webkit-progress-value {
    background: var(--green);
}

.status-progress--green::-moz-progress-bar {
    background: var(--green);
}

.status-progress--slate::-webkit-progress-value {
    background: #7d8796;
}

.status-progress--slate::-moz-progress-bar {
    background: #7d8796;
}

.text-link {
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 750;
}

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

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.data-table th {
    padding: 0 14px 11px;
    color: #7b8492;
    border-bottom: 1px solid var(--line);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    padding: 15px 14px;
    border-bottom: 1px solid #edf0f3;
    color: #323944;
    font-size: 0.8rem;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 120ms ease;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table td > strong,
.data-table td > small {
    display: block;
}

.data-table td > strong {
    color: var(--ink);
    font-size: 0.81rem;
}

.data-table td > small {
    margin-top: 3px;
    font-size: 0.7rem;
}

.align-right {
    text-align: right !important;
}

.order-link {
    color: #315ccd;
    font-weight: 850;
}

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

.amount-cell {
    color: var(--ink) !important;
    font-weight: 850;
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    min-height: 26px;
    padding: 4px 9px;
    overflow: hidden;
    border-radius: 999px;
    color: #315ccd;
    background: #edf2ff;
    font-size: 0.67rem;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge--violet {
    color: #6744d5;
    background: #f0ecff;
}

.status-badge--amber {
    color: #94600e;
    background: #fff3de;
}

.status-badge--green {
    color: #16724c;
    background: #e7f8f0;
}

.status-badge--slate {
    color: #56606e;
    background: #eef0f3;
}

.status-badge--large {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 0.72rem;
}

.delivery-list {
    display: grid;
}

.delivery-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f3;
}

.delivery-item:last-child {
    border-bottom: 0;
}

.delivery-item:hover .delivery-item__name strong {
    color: var(--blue);
}

.delivery-item__rank {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    color: #758090;
    background: var(--surface-muted);
    font-size: 0.68rem;
    font-weight: 850;
}

.delivery-item__name {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.delivery-item__name strong {
    overflow: hidden;
    font-size: 0.79rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delivery-item__name small {
    font-size: 0.66rem;
}

.delivery-item > strong {
    font-size: 0.78rem;
}

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    transition:
        transform 120ms ease,
        border-color 120ms ease,
        background 120ms ease;
}

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

.button--primary {
    color: #0b2419;
    background: var(--accent);
}

.button--primary:hover {
    background: #6de8b0;
}

.button--secondary {
    color: #303744;
    border-color: var(--line-strong);
    background: var(--surface);
}

.button--secondary:hover {
    border-color: #bfc7d2;
    background: #fafbfc;
}

.button--dark {
    color: #ffffff;
    background: var(--sidebar);
}

.button--dark:hover {
    background: #1d2632;
}

.button--ghost {
    color: var(--ink-soft);
    border-color: transparent;
    background: transparent;
}

.sidebar .button--ghost {
    color: #929dac;
    border-color: rgba(255, 255, 255, 0.08);
}

.button--full {
    width: 100%;
}

.button--large {
    min-height: 48px;
    font-size: 0.84rem;
}

.button-row,
.export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.icon-button {
    display: inline-grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
    background: var(--surface);
    font-weight: 800;
}

.icon-button--small {
    width: 32px;
    height: 32px;
    color: var(--blue);
    font-size: 1rem;
}

.field {
    display: grid;
    gap: 7px;
}

.field > span:first-child {
    color: #444c59;
    font-size: 0.74rem;
    font-weight: 750;
}

.field input,
.field select,
.search-field input {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    outline: 0;
    background: var(--surface);
    font-size: 0.82rem;
    transition:
        border-color 120ms ease,
        box-shadow 120ms ease;
}

.field input:focus,
.field select:focus,
.search-field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(71, 116, 255, 0.11);
}

.field--compact {
    gap: 5px;
}

.field--compact input,
.field--compact select {
    min-height: 40px;
    padding: 7px 10px;
    background: #fbfcfd;
}

.filter-card {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 8px 28px rgba(20, 28, 40, 0.045);
}

.filter-card__search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.search-field {
    position: relative;
}

.search-field__icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 14px;
    color: #8b94a2;
    font-size: 1.15rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-field input {
    padding-left: 42px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 13px;
    padding-top: 16px;
}

.filter-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.filter-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #315ccd;
    font-size: 0.73rem;
    font-weight: 750;
}

.filter-state::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
    content: "";
}

.orders-card {
    overflow: hidden;
}

.orders-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 19px 22px 12px;
}

.orders-card__header h2 {
    margin: 0;
}

.orders-card__header p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 0.73rem;
}

.orders-card .data-table th:first-child,
.orders-card .data-table td:first-child {
    padding-left: 22px;
}

.orders-card .data-table th:last-child,
.orders-card .data-table td:last-child {
    padding-right: 22px;
}

.orders-table td {
    padding-top: 17px;
    padding-bottom: 17px;
}

.micro-badge,
.count-chip {
    display: inline-flex;
    width: fit-content;
    margin-top: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    color: #5d6674;
    background: #eff1f4;
    font-size: 0.59rem;
    font-weight: 800;
    text-transform: uppercase;
}

.count-chip {
    margin-top: 0;
    padding: 6px 10px;
    font-size: 0.67rem;
}

.row-action {
    width: 54px;
}

.pagination {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 17px 22px;
    border-top: 1px solid var(--line);
}

.pagination__link {
    color: #4f5967;
    font-size: 0.73rem;
    font-weight: 750;
}

.pagination__link.is-disabled {
    color: #b2bac5;
    pointer-events: none;
}

.pagination__pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pagination__pages a,
.pagination__pages span {
    display: grid;
    min-width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    color: #66707e;
    font-size: 0.71rem;
    font-weight: 750;
}

.pagination__pages a:hover {
    background: var(--surface-muted);
}

.pagination__pages a.is-current {
    color: #0c2118;
    background: var(--accent);
}

.empty-state {
    display: grid;
    justify-items: center;
    padding: 48px 20px;
    text-align: center;
}

.empty-state__symbol {
    display: grid;
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    place-items: center;
    border-radius: 17px;
    color: var(--blue);
    background: #edf2ff;
    font-size: 1.5rem;
}

.empty-state h3,
.empty-state h1 {
    margin-bottom: 7px;
}

.empty-state p {
    max-width: 480px;
    margin-bottom: 19px;
    color: var(--ink-soft);
}

.empty-state--page {
    min-height: 65vh;
    align-content: center;
}

.empty-state__code {
    margin-bottom: 14px;
    color: var(--accent-strong);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.empty-inline {
    padding: 25px;
    color: var(--ink-soft);
    text-align: center;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--ink-soft);
    font-size: 0.74rem;
}

.breadcrumbs a {
    color: var(--blue);
    font-weight: 750;
}

.order-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 18px;
    padding: 28px 30px;
    border-radius: 22px;
    color: #ffffff;
    background:
        radial-gradient(circle at 88% 10%, rgba(92, 224, 164, 0.2), transparent 34%),
        linear-gradient(135deg, #121820, #1b2531);
    box-shadow: var(--shadow);
}

.order-hero .eyebrow {
    color: var(--accent);
}

.order-hero__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.order-hero__title .eyebrow {
    width: 100%;
    margin-bottom: -4px;
}

.order-hero__title h1 {
    margin: 0;
}

.copy-button {
    padding: 5px 8px;
    color: #9ca7b6;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.65rem;
    font-weight: 750;
}

.copy-button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.copy-button--inline {
    margin-left: 5px;
    color: var(--blue);
    background: #edf2ff;
}

.copy-button--inline:hover {
    color: #244bb9;
    background: #e0e8ff;
}

.order-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 13px;
    color: #9ea9b8;
    font-size: 0.72rem;
}

.order-hero__summary {
    display: grid;
    justify-items: end;
    gap: 6px;
    text-align: right;
}

.order-hero__summary > strong {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.order-hero__summary > small {
    color: #96a2b1;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.detail-grid--bottom {
    align-items: start;
}

.detail-card,
.timeline-card {
    padding: 23px;
}

.detail-card--accent {
    border-color: rgba(92, 224, 164, 0.5);
}

.detail-card__heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-card__index {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    color: var(--blue);
    background: #edf2ff;
    font-size: 0.65rem;
    font-weight: 900;
}

.detail-card__heading .eyebrow {
    margin-bottom: 3px;
}

.detail-card__heading h2 {
    margin: 0;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    margin: 0;
}

.detail-list > div {
    min-width: 0;
}

.detail-list dt,
.delivery-facts dt {
    margin-bottom: 4px;
    color: #818b99;
    font-size: 0.65rem;
    font-weight: 750;
    text-transform: uppercase;
}

.detail-list dd,
.delivery-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #2e3540;
    font-size: 0.82rem;
    font-weight: 700;
}

.detail-list--json dd {
    max-height: 110px;
    overflow: auto;
    white-space: pre-wrap;
}

.delivery-detail,
.items-card,
.comments-card {
    margin-bottom: 18px;
    padding: 24px;
}

.address-block {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid #dce5ff;
    border-radius: 14px;
    background: #f6f8ff;
}

.address-block__pin {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50% 50% 50% 0;
    color: #ffffff;
    background: var(--blue);
    transform: rotate(-45deg);
}

.address-block__pin::first-letter {
    transform: rotate(45deg);
}

.address-block > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.address-block small {
    margin-bottom: 3px;
    font-size: 0.65rem;
    font-weight: 750;
    text-transform: uppercase;
}

.address-block strong {
    font-size: 0.94rem;
}

.address-block p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 0.75rem;
}

.delivery-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
}

.ttn-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    padding: 7px 11px;
    color: #2c559e;
    border: 1px solid #dbe5f8;
    border-radius: 10px;
    cursor: pointer;
    background: #f4f8ff;
    font-size: 0.72rem;
    font-weight: 800;
}

.ttn-chip span {
    color: #8492a7;
    font-size: 0.61rem;
}

.items-card {
    padding-right: 0;
    padding-left: 0;
    overflow: hidden;
}

.items-card .section-heading {
    padding: 0 24px;
}

.items-card .data-table th:first-child,
.items-card .data-table td:first-child {
    padding-left: 24px;
}

.items-card .data-table th:last-child,
.items-card .data-table td:last-child {
    padding-right: 24px;
}

.timeline {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 11px;
    min-height: 52px;
}

.timeline li::before {
    position: absolute;
    top: 14px;
    bottom: -4px;
    left: 5px;
    width: 1px;
    background: #dfe4e9;
    content: "";
}

.timeline li:last-child::before {
    display: none;
}

.timeline li > i {
    position: relative;
    z-index: 1;
    width: 11px;
    height: 11px;
    margin-top: 3px;
    border: 3px solid #dfe7ff;
    border-radius: 50%;
    background: var(--blue);
}

.timeline li > div {
    display: flex;
    flex-direction: column;
}

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

.timeline small {
    font-size: 0.67rem;
}

.timeline__empty {
    display: block !important;
    color: var(--ink-soft);
}

.comments-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.comments-grid blockquote {
    margin: 0;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: #444c58;
    background: var(--surface-muted);
    font-size: 0.82rem;
}

.comments-grid blockquote span {
    display: block;
    margin-bottom: 7px;
    color: var(--ink-soft);
    font-size: 0.62rem;
    font-weight: 850;
    text-transform: uppercase;
}

.raw-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.raw-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 23px;
    cursor: pointer;
    list-style: none;
}

.raw-panel summary::-webkit-details-marker {
    display: none;
}

.raw-panel summary > span:first-child {
    display: flex;
    flex-direction: column;
}

.raw-panel summary strong {
    font-size: 0.84rem;
}

.raw-panel summary small {
    font-size: 0.68rem;
}

.raw-panel summary > span:last-child {
    font-size: 1.3rem;
    transition: transform 160ms ease;
}

.raw-panel[open] summary > span:last-child {
    transform: rotate(45deg);
}

.raw-panel__body {
    display: grid;
    justify-items: start;
    gap: 12px;
    padding: 0 23px 23px;
}

.raw-panel pre,
.command-block {
    width: 100%;
    max-height: 540px;
    margin: 0;
    padding: 17px;
    overflow: auto;
    border-radius: 12px;
    color: #d8e0eb;
    background: #10151d;
    font-size: 0.7rem;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.setup-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 22px 17px;
    max-width: 900px;
    padding: 26px;
}

.setup-card__step {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    color: #0f2b1e;
    background: var(--accent);
    font-weight: 900;
}

.code-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 11px 0 0;
    padding: 0;
    list-style: none;
}

.code-list code {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 7px;
    color: #3e4b5b;
    background: #edf0f3;
    font-size: 0.71rem;
}

.auth-page {
    background: var(--surface);
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1.1fr) minmax(420px, 0.9fr);
    min-height: 100vh;
}

.auth-intro {
    position: relative;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(34px, 5vw, 72px);
    color: #ffffff;
    background:
        radial-gradient(circle at 78% 15%, rgba(92, 224, 164, 0.16), transparent 30%),
        radial-gradient(circle at 10% 90%, rgba(71, 116, 255, 0.2), transparent 34%),
        var(--sidebar);
}

.brand--auth {
    padding: 0;
}

.auth-intro__copy {
    position: relative;
    z-index: 2;
    max-width: 680px;
    margin: auto 0;
    padding: 70px 0;
}

.auth-intro__copy h1 {
    max-width: 650px;
    margin-bottom: 22px;
    font-size: clamp(2.6rem, 5.3vw, 5.5rem);
    line-height: 0.98;
}

.auth-intro__copy > p:last-child {
    max-width: 550px;
    margin: 0;
    color: #9da8b7;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.auth-intro__signal {
    position: absolute;
    right: -2%;
    bottom: 5%;
    display: flex;
    height: 90px;
    align-items: flex-end;
    gap: 8px;
    opacity: 0.16;
    transform: rotate(-8deg);
}

.auth-intro__signal span {
    width: 13px;
    border-radius: 8px 8px 2px 2px;
    background: var(--accent);
}

.auth-intro__signal span:nth-child(1) { height: 18%; }
.auth-intro__signal span:nth-child(2) { height: 40%; }
.auth-intro__signal span:nth-child(3) { height: 30%; }
.auth-intro__signal span:nth-child(4) { height: 65%; }
.auth-intro__signal span:nth-child(5) { height: 52%; }
.auth-intro__signal span:nth-child(6) { height: 82%; }
.auth-intro__signal span:nth-child(7) { height: 58%; }
.auth-intro__signal span:nth-child(8) { height: 95%; }
.auth-intro__signal span:nth-child(9) { height: 72%; }
.auth-intro__signal span:nth-child(10) { height: 100%; }

.auth-panel {
    display: grid;
    place-items: center;
    padding: 32px;
    background: #f7f8fa;
}

.login-card {
    display: grid;
    width: min(100%, 440px);
    gap: 20px;
    padding: clamp(28px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(20, 28, 40, 0.1);
}

.login-card h2 {
    margin-bottom: 8px;
    font-size: 1.7rem;
}

.login-card .muted {
    margin: 0;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 84px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    padding: 5px 7px;
    color: var(--blue);
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    background: transparent;
    font-size: 0.67rem;
    font-weight: 750;
    transform: translateY(-50%);
}

.login-card__note {
    margin: -5px 0 0;
    color: #8a93a0;
    font-size: 0.67rem;
    text-align: center;
}

.alert {
    padding: 12px 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.76rem;
}

.alert--danger {
    color: #9d3038;
    border-color: #f1cdd0;
    background: #fff1f2;
}

.toast {
    position: fixed;
    z-index: 300;
    right: 22px;
    bottom: 22px;
    padding: 11px 14px;
    opacity: 0;
    border-radius: 11px;
    color: #ffffff;
    background: #18212c;
    box-shadow: var(--shadow);
    font-size: 0.76rem;
    font-weight: 750;
    transform: translateY(12px);
    pointer-events: none;
    transition:
        opacity 160ms ease,
        transform 160ms ease;
}

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

.sidebar-scrim {
    position: fixed;
    z-index: 70;
    inset: 0;
    background: rgba(9, 13, 18, 0.5);
    backdrop-filter: blur(2px);
}

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

    .filter-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

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

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .workspace {
        min-height: 100vh;
    }

    .mobile-header {
        position: sticky;
        z-index: 60;
        top: 0;
        display: flex;
        height: 64px;
        align-items: center;
        gap: 12px;
        padding: 0 20px;
        border-bottom: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(12px);
    }

    .mobile-header__title {
        font-size: 0.86rem;
        font-weight: 850;
    }

    .page {
        padding-top: 30px;
    }

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

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

    .auth-intro {
        min-height: 390px;
    }

    .auth-intro__copy {
        padding: 60px 0 15px;
    }

    .auth-intro__copy h1 {
        max-width: 760px;
        font-size: clamp(2.5rem, 8vw, 4.6rem);
    }
}

@media (max-width: 720px) {
    h1 {
        font-size: 2rem;
    }

    .page {
        padding: 24px 15px 48px;
    }

    .page-header,
    .order-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .page-header--actions {
        gap: 17px;
    }

    .export-actions .button {
        flex: 1;
    }

    .sync-state {
        width: 100%;
    }

    .metric-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .metric-card {
        min-height: 150px;
        padding: 17px;
    }

    .metric-card > strong {
        font-size: 1.45rem;
    }

    .chart-card,
    .status-card,
    .recent-card,
    .delivery-card {
        padding: 19px;
    }

    .chart-wrap {
        height: 220px;
    }

    .filter-card {
        padding: 14px;
    }

    .filter-card__search {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .filter-card__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-card__footer .button-row {
        justify-content: flex-end;
    }

    .orders-card {
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .orders-card__header {
        padding: 0 0 14px;
    }

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

    .orders-table thead {
        display: none;
    }

    .orders-table tbody {
        display: grid;
        gap: 11px;
    }

    .orders-table tr {
        position: relative;
        padding: 15px;
        border: 1px solid var(--line);
        border-radius: 15px;
        background: var(--surface);
        box-shadow: 0 7px 22px rgba(20, 28, 40, 0.045);
    }

    .orders-table td,
    .orders-card .orders-table td:first-child,
    .orders-card .orders-table td:last-child {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        padding: 8px 0;
        border: 0;
        text-align: left !important;
    }

    .orders-table td::before {
        color: #8a93a0;
        content: attr(data-label);
        font-size: 0.63rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .orders-table .row-action {
        position: absolute;
        top: 12px;
        right: 12px;
        display: block;
        width: auto;
    }

    .orders-table .row-action::before {
        display: none;
    }

    .pagination {
        grid-template-columns: 1fr 1fr;
        margin-top: 15px;
        padding: 15px 0;
    }

    .pagination__pages {
        display: none;
    }

    .pagination__link:last-child {
        text-align: right;
    }

    .order-hero {
        padding: 23px;
    }

    .order-hero__summary {
        justify-items: start;
        text-align: left;
    }

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

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

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

    .items-table thead {
        display: none;
    }

    .items-table tr {
        padding: 13px 18px;
        border-bottom: 1px solid var(--line);
    }

    .items-table td,
    .items-card .items-table td:first-child,
    .items-card .items-table td:last-child {
        display: grid;
        grid-template-columns: 100px minmax(0, 1fr);
        padding: 6px 0;
        border: 0;
        text-align: left !important;
    }

    .items-table td::before {
        color: #8a93a0;
        content: attr(data-label);
        font-size: 0.62rem;
        font-weight: 800;
        text-transform: uppercase;
    }

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

    .auth-intro {
        min-height: 330px;
        padding: 28px;
    }

    .auth-intro__copy {
        padding: 48px 0 5px;
    }

    .auth-intro__copy h1 {
        font-size: 2.55rem;
    }

    .auth-panel {
        padding: 20px 14px 34px;
    }

    .login-card {
        padding: 25px 20px;
    }
}

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

    .metric-card {
        min-height: 138px;
    }

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

    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .delivery-facts,
    .detail-list {
        grid-template-columns: 1fr;
    }

    .ttn-chip {
        width: 100%;
        justify-content: space-between;
    }

    .auth-intro__copy h1 {
        font-size: 2.15rem;
    }
}

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