:root {
    --sos-obsidian: #0F172A;
    --sos-charcoal: #1E293B;
    --sos-stone: #E2E8F0;
    --sos-gold: #E6C15A;
    --sos-essence: #F8FAFC;

    --sos-bg: #F8FAFC;
    --sos-surface: #FFFFFF;
    --sos-surface-2: #F1F5F9;
    --sos-ink: #0F172A;
    --sos-muted: #334155;
    --sos-line: #E2E8F0;
    --sos-line-soft: rgba(51, 65, 85, 0.12);
    --sos-primary: #A16207;
    --sos-primary-soft: rgba(230, 193, 90, 0.22);
    --sos-secondary: #0F172A;
    --sos-secondary-soft: rgba(15, 23, 42, 0.06);
    --sos-info: #A16207;
    --sos-info-soft: rgba(230, 193, 90, 0.12);
    --sos-success: #10B981;
    --sos-warning: #D97706;
    --sos-danger: #B91C1C;
    --sos-radius: 16px;
    --sos-radius-sm: 10px;
    --sos-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
    --sos-shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.10);
    --sos-font: "Inter", "Myanmar Text", "Segoe UI", sans-serif;
    --sos-display: "Plus Jakarta Sans", "Inter", "Segoe UI", sans-serif;
    --sos-mono: "DM Mono", ui-monospace, monospace;
}

html, body {
    font-family: var(--sos-font);
    background: var(--sos-bg);
    color: var(--sos-ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html, body, #app {
    height: 100%;
    min-height: 100dvh;
}

body {
    margin: 0;
    background: #F8FAFC;
    min-height: 100%;
    font-size: 16px;
    line-height: 1.6;
    color: #334155;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--sos-primary);
}

code {
    color: var(--sos-secondary);
    background: var(--sos-surface-2);
    border: 1px solid var(--sos-line-soft);
    border-radius: 6px;
    padding: 0.12rem 0.4rem;
    font-size: 0.82em;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #F8FAFC;
    color: var(--sos-ink);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-family: var(--sos-font);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.55rem;
}

.blazor-error-boundary {
    background: #0F172A;
    padding: 1rem 1rem 1rem 1.25rem;
    color: white;
    border-radius: var(--sos-radius);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

#app:has(> .loader) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
}

.loader {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 40;
    width: clamp(56px, 16vw, 84px);
    height: auto;
    aspect-ratio: 5 / 2;
    margin: 0;
    --loader-dot: #0F172A;
    --g: radial-gradient(farthest-side, #0000 calc(95% - 3px), var(--loader-dot) calc(100% - 3px) 98%, #0000 101%) no-repeat;
    background: var(--g), var(--g), var(--g);
    background-size: 28% 70%;
    animation: l9 1s infinite alternate;
}

.loader--sm {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    z-index: auto;
    width: 60px;
    height: 24px;
    aspect-ratio: auto;
    margin: 0;
    background-size: 16px 16px;
}

.cc-btn--solid .loader {
    --loader-dot: #E2E8F0;
}

.cc-empty,
.loader-wrap {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 50dvh;
}

.cc-empty {
    height: 100%;
    min-height: 100%;
    text-align: center;
    color: #0F172A;
    padding: 24px;
}

@keyframes l9 {
    0% {
        background-position: 0 50%, 50% 50%, 100% 50%;
    }
    20% {
        background-position: 0 0, 50% 50%, 100% 50%;
    }
    40% {
        background-position: 0 100%, 50% 0, 100% 50%;
    }
    60% {
        background-position: 0 50%, 50% 100%, 100% 0;
    }
    80% {
        background-position: 0 50%, 50% 50%, 100% 100%;
    }
    100% {
        background-position: 0 50%, 50% 50%, 100% 50%;
    }
}

/* Shell */
.mud-layout {
    background: transparent;
    position: relative;
    z-index: 1;
}

.mud-appbar {
    border-bottom: 1px solid rgba(226, 232, 240, 0.16) !important;
    backdrop-filter: blur(18px) saturate(1.2);
    background: rgba(15, 23, 42, 0.94) !important;
    color: var(--sos-stone) !important;
    z-index: 1100 !important;
}

.mud-drawer {
    border-right: 1px solid rgba(226, 232, 240, 0.12) !important;
    background:
        radial-gradient(420px 240px at 0% 0%, rgba(15, 23, 42, 0.5), transparent 62%),
        #0F172A !important;
    color: var(--sos-stone);
    display: flex;
    flex-direction: column;
}

.mud-drawer .mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mud-main-content {
    min-height: 100vh;
    padding-top: var(--mud-appbar-height, 68px);
    background: transparent;
}

.sos-main {
    padding-right: 1.25rem;
    padding-bottom: 2.75rem;
    padding-left: 1.25rem;
    animation: sos-fade-up 360ms ease-out both;
}

@media (min-width: 960px) {
    .sos-main {
        padding-right: 2.25rem;
        padding-bottom: 3.25rem;
        padding-left: 2.25rem;
    }
}

.smartos-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
    text-decoration: none;
}

.smartos-brand:hover,
.smartos-brand:focus-visible {
    color: inherit;
    text-decoration: none;
    opacity: 0.92;
}

.smartos-brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
    background: #E2E8F0;
    box-shadow: 0 0 0 1px rgba(226, 232, 240, 0.35);
}

.smartos-brand__name {
    font-weight: 740;
    letter-spacing: -0.03em;
    font-size: 1.08rem;
    color: var(--sos-stone);
}

.smartos-drawer-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.3rem 1.15rem 1.1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.14);
    margin-bottom: 0.4rem;
}

.smartos-drawer-brand__mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: block;
    object-fit: contain;
    background: #E2E8F0;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(226, 232, 240, 0.4);
}

.smartos-drawer-brand__title {
    font-weight: 740;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--sos-stone);
    font-size: 1.05rem;
}

.smartos-drawer-brand__sub {
    color: rgba(226, 232, 240, 0.58);
    font-size: 0.74rem;
    margin-top: 0.15rem;
}

.sos-nav {
    flex: 1;
    padding-bottom: 1rem;
}

.sos-nav-label {
    padding: 0.95rem 1.25rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.38);
}

.sos-nav .mud-nav-link {
    margin: 0.12rem 0.7rem;
    border-radius: 12px !important;
    min-height: 42px;
    color: rgba(226, 232, 240, 0.72) !important;
    font-weight: 550;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.sos-nav .mud-nav-link .mud-nav-link-icon {
    color: inherit !important;
}

.sos-nav .mud-nav-link:hover {
    background: rgba(226, 232, 240, 0.12) !important;
    color: #E2E8F0 !important;
}

.sos-nav .mud-nav-link.active {
    background: rgba(226, 232, 240, 0.16) !important;
    color: #E2E8F0 !important;
    font-weight: 680;
    box-shadow: inset 3px 0 0 #E6C15A;
}

.sos-drawer-foot {
    margin-top: auto;
    padding: 1rem 1.15rem 1.25rem;
    border-top: 1px solid rgba(226, 232, 240, 0.12);
}

.sos-drawer-foot__name {
    font-weight: 680;
    color: var(--sos-stone);
    letter-spacing: -0.02em;
}

.sos-drawer-foot__hint {
    font-size: 0.72rem;
    color: rgba(226, 232, 240, 0.5);
    margin-top: 0.15rem;
}

.sos-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.28rem 0.72rem;
    font-size: 0.74rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.sos-status-pill--online {
    background: rgba(226, 232, 240, 0.22);
    color: #E2E8F0;
    border-color: rgba(226, 232, 240, 0.45);
}

.sos-status-pill--offline {
    background: rgba(226, 232, 240, 0.16);
    color: #E2E8F0;
    border-color: rgba(226, 232, 240, 0.35);
}

.sos-status-pill--queue {
    background: rgba(226, 232, 240, 0.06);
    color: #E2E8F0;
    border-color: rgba(226, 232, 240, 0.22);
}

.sos-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}

.sos-toolbar-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-right: 0.45rem;
}

.sos-merchant-chip {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 999px;
    padding: 0.28rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 650;
    background: rgba(226, 232, 240, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.2);
    margin-right: 0.25rem;
}

/* Page structure */
.sos-page {
    position: relative;
    z-index: 0;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding-top: 1.6rem;
    box-sizing: border-box;
    overflow-x: clip;
}

@media (min-width: 960px) {
    .sos-page {
        padding-top: 1.9rem;
    }
}

.sos-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.sos-page-kicker {
    color: #0F172A;
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.sos-page-title {
    margin: 0 !important;
    letter-spacing: -0.035em;
}

.sos-page-subtitle {
    color: var(--sos-muted);
    margin-top: 0.4rem;
    max-width: 56ch;
}

.sos-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.sos-hero {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    padding: 0;
    border-radius: 0;
    color: #0F172A;
    background: transparent;
    border: 0;
    box-shadow: none;
}

@media (min-width: 800px) {
    .sos-hero {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: center;
        gap: 2rem;
    }
}

.sos-hero__title {
    font-family: var(--sos-display);
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    margin: 0 0 0.7rem;
    line-height: 1.05;
    color: #0F172A;
}

.sos-hero__copy {
    margin: 0 0 1.25rem;
    color: #334155;
    max-width: 42ch;
    font-size: 1rem;
    line-height: 1.6;
}

.sos-hero__visual {
    display: grid;
    gap: 0.75rem;
}

.sos-glass-stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #E2E8F0;
    backdrop-filter: blur(12px);
    box-shadow: none;
    transition: border-color 160ms ease, transform 160ms ease;
}

.sos-glass-stat:hover {
    border-color: #E6C15A;
    transform: translateY(-2px);
}

.sos-glass-stat span {
    color: #64748B;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sos-glass-stat strong {
    color: #0F172A;
    font-family: var(--sos-display);
    font-size: 1.05rem;
    letter-spacing: -0.03em;
    text-align: right;
}

.sos-bento {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

@media (min-width: 800px) {
    .sos-bento {
        grid-template-columns: 1.15fr 1fr;
    }
}

.sos-panel {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    box-shadow: none;
    overflow: hidden;
}

.sos-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--sos-line-soft);
    background: #F8FAFC;
}

.sos-panel__title {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sos-panel__body {
    padding: 1.2rem;
}

.sos-panel + .sos-panel {
    margin-top: 1rem;
}

.sos-metric-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.95rem;
}

@media (min-width: 700px) {
    .sos-metric-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.sos-metric {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 1.2rem 1.25rem 1.15rem;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.sos-metric::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: #E6C15A;
    opacity: 1;
}

.sos-metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--sos-shadow-lg);
    border-color: rgba(15, 23, 42, 0.18);
}

.sos-metric__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--sos-primary-soft);
    color: #0F172A;
    margin-bottom: 0.7rem;
}

.sos-metric__label {
    color: var(--sos-muted);
    font-size: 0.74rem;
    font-weight: 680;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sos-metric__value {
    margin-top: 0.4rem;
    font-size: 1.6rem;
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: 1.12;
}

.sos-metric__hint {
    margin-top: 0.35rem;
    color: var(--sos-muted);
    font-size: 0.8rem;
}

.sos-metric--warn::before { background: var(--sos-warning); }
.sos-metric--info::before { background: var(--sos-info); }
.sos-metric--accent::before { background: var(--sos-secondary); }

.sos-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

@media (min-width: 700px) {
    .sos-action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .sos-action-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.sos-action {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.15rem;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.72);
    transition: border-color 160ms ease, transform 160ms ease;
}

.sos-action:hover {
    border-color: #E6C15A;
    transform: translateY(-2px);
    box-shadow: none;
    text-decoration: none;
    color: inherit;
}

.sos-action__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--sos-primary-soft);
    color: #0F172A;
    flex-shrink: 0;
}

.sos-action__title {
    font-weight: 720;
    letter-spacing: -0.02em;
}

.sos-action__desc {
    color: var(--sos-muted);
    font-size: 0.82rem;
    margin-top: 0.2rem;
}

.sos-table-wrap .mud-table {
    background: transparent;
}

.sos-table-wrap .mud-table-container {
    border: 0;
    border-radius: 0;
    background: var(--sos-surface);
    box-shadow: none;
}

.sos-table-wrap .mud-table thead .mud-table-cell {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sos-muted);
    font-weight: 720;
    background: #F8FAFC;
}

.sos-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 720;
    letter-spacing: 0.02em;
}

.sos-badge--pending { background: rgba(15, 23, 42, 0.14); color: #0F172A; }
.sos-badge--confirmed { background: rgba(15, 23, 42, 0.14); color: #0F172A; }
.sos-badge--paid { background: rgba(15, 23, 42, 0.12); color: #0F172A; }
.sos-badge--packed { background: rgba(15, 23, 42, 0.14); color: #0F172A; }
.sos-badge--shipped { background: rgba(15, 23, 42, 0.14); color: #0F172A; }
.sos-badge--completed { background: rgba(15, 23, 42, 0.14); color: #0F172A; }
.sos-badge--cancelled { background: rgba(15, 23, 42, 0.14); color: #0F172A; }
.sos-badge--ready { background: rgba(226, 232, 240, 0.28); color: #0F172A; }
.sos-badge--blocked { background: rgba(15, 23, 42, 0.14); color: #0F172A; }

.sos-chat-feed {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    min-height: 280px;
    max-height: 52vh;
    overflow: auto;
}

.sos-chat-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.sos-chat-thread {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid var(--sos-line-soft);
    background: var(--sos-surface-2);
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.55rem;
    cursor: pointer;
    color: inherit;
}

.sos-chat-thread--active {
    border-color: var(--sos-primary);
    background: var(--sos-primary-soft);
}

.sos-chat-thread__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.sos-chat-thread__meta,
.sos-chat-thread__preview {
    color: var(--sos-muted);
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.sos-chat-thread__preview {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sos-chat-photo {
    display: block;
    max-width: min(280px, 100%);
    max-height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin: 0.35rem 0 0.5rem;
}

@media (max-width: 900px) {
    .sos-chat-layout {
        grid-template-columns: 1fr;
    }
}

.sos-chat-empty {
    margin: auto;
    text-align: center;
    color: var(--sos-muted);
    padding: 2.4rem 1rem;
}

.sos-chat-item {
    max-width: min(640px, 92%);
    border: 1px solid var(--sos-line-soft);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    background: var(--sos-surface-2);
    transition: background-color 160ms ease, border-color 160ms ease;
    animation: sos-fade-up 280ms ease-out both;
    cursor: pointer;
}

.sos-chat-item--in {
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    background: #F8FAFC;
}

.sos-chat-item--out {
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    background: #0F172A;
    color: #E2E8F0;
    border-color: transparent;
}

.sos-chat-item:hover {
    border-color: rgba(15, 23, 42, 0.18);
}

.sos-chat-item--out:hover {
    background: #0F172A;
}

.sos-chat-item--out .sos-chat-meta {
    color: rgba(226, 232, 240, 0.62);
}

.sos-chat-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    color: var(--sos-muted);
    font-size: 0.72rem;
    font-weight: 650;
    margin-bottom: 0.35rem;
}

.sos-ocr-raw {
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    background: #F8FAFC;
    border: 1px solid rgba(15, 23, 42, 0.22);
    border-radius: var(--sos-radius-sm);
    padding: 0.9rem 1rem;
    color: #0F172A;
}

.sos-file {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: var(--sos-radius);
    padding: 0.95rem 1rem;
    background: var(--sos-surface-2);
}

.sos-file input[type="file"] {
    font-family: var(--sos-font);
    font-size: 0.85rem;
}

.sos-channel-card {
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--sos-line);
    border-radius: 14px;
    background: var(--sos-surface-2);
}

.sos-muted {
    color: var(--sos-muted);
}

/* Login */
.sos-login {
    --sos-bg: #F8FAFC;
    --sos-surface: #FFFFFF;
    --sos-surface-2: #F1F5F9;
    --sos-ink: #0F172A;
    --sos-muted: #64748B;
    --sos-line: rgba(15, 23, 42, 0.14);
    --sos-line-soft: rgba(15, 23, 42, 0.08);
    --sos-primary: #0F172A;
    --sos-primary-soft: rgba(15, 23, 42, 0.08);
    color: #0F172A;
    min-height: 100dvh;
    width: 100%;
    overflow: auto;
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 960px) {
    .sos-login {
        grid-template-columns: minmax(280px, 0.72fr) 1.28fr;
    }
}

.sos-login__hero {
    position: relative;
    display: none;
    padding: 2.5rem;
    color: #F8FAFC;
    background:
        radial-gradient(420px 280px at 50% 42%, rgba(230, 193, 90, 0.28), transparent 68%),
        #0F172A;
    overflow: hidden;
}

@media (min-width: 960px) {
    .sos-login__hero {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.sos-login__hero-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    text-align: center;
}

.sos-login__hero-logo {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    object-fit: contain;
    background: #E6C15A;
    padding: 10px;
    box-shadow: 0 16px 40px rgba(230, 193, 90, 0.18);
}

.sos-login__hero-lockup span {
    font-family: var(--sos-display);
    font-weight: 700;
    letter-spacing: -0.03em;
    font-size: 1.35rem;
    color: #F8FAFC;
}

.sos-login__eyebrow {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #E6C15A;
}

.sos-login__eyebrow--ink {
    color: #A16207;
    margin-bottom: 0.35rem;
}

.sos-login__hero-copy h1 {
    font-family: var(--sos-display);
    font-size: clamp(2.6rem, 5vw, 3.75rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
    font-weight: 800;
    margin: 0 0 1rem;
    max-width: 11ch;
}

.sos-login__hero-copy p {
    margin: 0 0 1.4rem;
    color: rgba(226, 232, 240, 0.82);
    font-size: 1.04rem;
    line-height: 1.55;
}

.sos-login__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.sos-login__features li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.92rem;
}

.sos-login__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.45rem;
    background: var(--sos-gold);
    flex-shrink: 0;
}

.sos-login__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 2.5rem 1.5rem;
    background:
        radial-gradient(540px 280px at 100% 0%, rgba(230, 193, 90, 0.08), transparent 62%),
        #F8FAFC;
}

.sos-login__card {
    width: min(400px, 100%);
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.06);
    padding: 2rem 1.75rem 1.5rem;
    animation: sos-fade-up 420ms ease-out both;
}

@media (min-width: 960px) {
    .smartos-login-brand__mark {
        display: none;
    }
}

.sos-login .mud-input-outlined-border {
    border-color: rgba(15, 23, 42, 0.16) !important;
    border-radius: 14px !important;
}

.sos-login .mud-button-filled-primary {
    border-radius: 999px !important;
    min-height: 48px;
    margin-top: 0.35rem;
    background-color: #E6C15A !important;
    color: #0F172A !important;
    transition: transform 160ms ease, background-color 160ms ease;
}

.sos-login .mud-button-filled-primary:hover {
    background-color: #C9962A !important;
    color: #0F172A !important;
    transform: scale(1.02);
}

.mud-button-text-primary {
    color: #A16207 !important;
}

.smartos-login-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.35rem;
}

.sos-login__hero-logo {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    object-fit: contain;
    background: #E6C15A;
    padding: 10px;
    box-shadow: 0 16px 40px rgba(230, 193, 90, 0.18);
}

.smartos-login-brand__mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: block;
    object-fit: contain;
    background: #F8FAFC;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

@media (min-width: 960px) {
    .smartos-login-brand__mark {
        display: none;
    }
}

.sos-login__demo {
    margin-top: 1.15rem;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    background: var(--sos-surface-2);
    border: 1px solid var(--sos-line-soft);
    color: var(--sos-muted);
    font-size: 0.78rem;
}

.mud-button-filled-primary {
    box-shadow: 0 8px 18px rgba(226, 232, 240, 0.28) !important;
}

@keyframes sos-fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .sos-toolbar-meta .sos-status-pill--queue {
        display: none;
    }

    .sos-hero {
        padding: 1.15rem 1.15rem;
    }
}

.sos-metric__icon, .sos-action__icon { color: #A16207; }
.sos-metric:hover { border-color: #E6C15A; }
.mud-button-filled-primary {
    box-shadow: none !important;
    border-radius: 999px !important;
    transition: transform 160ms ease, background-color 160ms ease;
}
.mud-button-filled-primary:hover {
    transform: scale(1.02);
}
.sos-hero .mud-button-filled-primary {
    background-color: #E6C15A !important;
    color: #0F172A !important;
    box-shadow: none !important;
}
.mud-button-outlined-secondary,
.mud-button-filled-secondary {
    border-color: #E6C15A !important;
}
.mud-button-filled-secondary {
    background-color: #E6C15A !important;
    color: #0F172A !important;
}

@media (prefers-reduced-motion: reduce) {
    .sos-main,
    .sos-login__card,
    .sos-chat-item,
    .sos-metric,
    .sos-action,
    .sos-nav .mud-nav-link {
        animation: none !important;
        transition: none !important;
    }
}

.an {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 0 8px;
    display: grid;
    gap: 16px;
}

.an-head,
.an-panel__head,
.an-table__bar,
.an-pager,
.an-kpi__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.an-head h1,
.an-panel h2,
.an-table h2,
.an-kpi h2 {
    margin: 0;
    color: #0F172A;
    font-family: var(--sos-display);
    letter-spacing: -0.03em;
}

.an-head h1 { font-size: 22px; font-weight: 700; }
.an-head p,
.an-legend { margin: 4px 0 0; color: #64748B; font-size: 13px; }

.an-range {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
}

.an-range select,
.an-table__search input,
.an-pager button {
    height: 32px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #FFFFFF;
    color: #0F172A;
    font: inherit;
    font-size: 13px;
    padding: 0 10px;
}

.an-range select:focus,
.an-table__search input:focus {
    outline: none;
    border-color: #E6C15A;
    box-shadow: 0 0 0 3px rgba(230, 193, 90, 0.15);
}

.an-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.an-charts {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(220px, 3fr);
    gap: 16px;
}

.an-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 16px;
}

.an-kpi h2 {
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
}

.an-kpi__value {
    margin-top: 8px;
    font-family: var(--sos-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #0F172A;
    line-height: 1.1;
}

.an-delta {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}

.an-delta--up { color: #047857; background: #ECFDF5; }
.an-delta--down { color: #B91C1C; background: #FEF2F2; }

.an-spark { width: 84px; height: 28px; margin-top: 12px; display: block; }

.an-panel__head { margin-bottom: 8px; align-items: flex-start; }
.an-panel h2 { font-size: 15px; }
.an-legend { display: flex; align-items: center; gap: 6px; }
.an-legend i { width: 12px; height: 3px; border-radius: 99px; background: #E6C15A; display: inline-block; }

.an-plot { position: relative; }
.an-plot svg { width: 100%; height: auto; display: block; }

.an-tip {
    position: absolute;
    top: 12px;
    transform: translateX(-50%);
    background: #0F172A;
    color: #F8FAFC;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    pointer-events: none;
    display: grid;
    gap: 2px;
    min-width: 96px;
}

.an-tip strong { font-weight: 650; }
.an-donut { display: grid; grid-template-columns: 160px 1fr; gap: 8px; align-items: center; }
.an-donut ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.an-donut li { display: grid; grid-template-columns: 8px 1fr auto; gap: 8px; align-items: center; font-size: 13px; color: #334155; }
.an-donut i { width: 8px; height: 8px; border-radius: 99px; }
.an-donut strong { color: #0F172A; }

.an-table__search input { width: 200px; }
.an-table__wrap { overflow: auto; margin: 0 -16px; }
.an-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.an-table th, .an-table td { text-align: left; padding: 10px 16px; border-top: 1px solid #E2E8F0; white-space: nowrap; }
.an-table th { border-top: 0; color: #64748B; font-weight: 600; }
.an-table th button { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.an-table tbody tr:hover { background: #F8FAFC; }
.an-pill { display: inline-flex; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 650; background: #F1F5F9; color: #334155; }
.an-pill--paid, .an-pill--completed, .an-pill--packed, .an-pill--shipped { background: #EEF2FF; color: #C9962A; }
.an-pill--pending, .an-pill--confirmed { background: #FFFBEB; color: #B45309; }
.an-pill--cancelled { background: #FEF2F2; color: #B91C1C; }
.an-pager { margin-top: 12px; color: #64748B; font-size: 13px; }
.an-pager div { display: flex; gap: 8px; }
.an-pager button:disabled { opacity: 0.45; cursor: default; }
.an-empty { min-height: 140px; display: grid; place-items: center; text-align: center; color: #64748B; font-size: 14px; padding: 24px; }

.an-skel {
    height: 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 37%, #F1F5F9 63%);
    background-size: 400% 100%;
    animation: an-shimmer 1.2s ease infinite;
}
.an-skel--sm { width: 40%; }
.an-skel--lg { width: 70%; height: 28px; margin-top: 12px; }
.an-skel--md { width: 55%; margin-top: 16px; }
.an-skel-card { min-height: 118px; }
.an-skel-panel, .an-skel-table {
    min-height: 220px;
    background: linear-gradient(90deg, #F8FAFC 25%, #F1F5F9 37%, #F8FAFC 63%);
    background-size: 400% 100%;
    animation: an-shimmer 1.2s ease infinite;
}

@keyframes an-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

@media (max-width: 980px) {
    .an-kpis, .an-charts, .an-donut { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .an-skel, .an-skel-panel, .an-skel-table { animation: none; }
}
