html {
    min-height: 100%;
    color-scheme: var(--sempo-color-scheme, dark);
    background: var(--sempo-canvas-deep);
}

body,
body.dashboard-view,
body.orders-view,
body.warehouse-view {
    min-height: 100%;
    font-family: var(--sempo-font-sans);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    color: var(--sempo-text);
    background:
        radial-gradient(circle at 70% -12%, var(--sempo-desktop-decoration, rgba(126, 166, 92, 0.055)), transparent 32%),
        linear-gradient(135deg, var(--sempo-canvas) 0%, var(--sempo-canvas-lift) 54%, var(--sempo-canvas-deep) 100%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

:where([hidden]:not([hidden="until-found"])) {
    display: none !important;
}

/* Shared disclosure presentation. Native keyboard/toggle behavior is retained. */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
.sempo-disclosure > summary { display: flex; align-items: center; gap: var(--sempo-space-2); cursor: pointer; }
.sempo-disclosure > summary::after {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-left: auto;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sempo-disclosure[open] > summary::after { transform: rotate(180deg); }

select,
option {
    color-scheme: var(--sempo-color-scheme, dark);
}

::selection {
    color: var(--sempo-text-strong);
    background: var(--sempo-desktop-primary-soft, rgba(125, 166, 92, 0.38));
}

a,
button,
input,
select,
textarea,
summary,
[tabindex] {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible:not(input, textarea) {
    outline: var(--sempo-focus-outline);
    outline-offset: var(--sempo-focus-outline-offset);
}

input:focus-visible,
textarea:focus-visible {
    outline: 0;
}

@media (min-width: 320px) and (max-width: 599px) {
    body.mobile-workspace-chrome {
        --sempo-focus-outline: none;
    }

    html[data-sempo-input="keyboard"] body.mobile-workspace-chrome {
        --sempo-focus-outline: 2px solid var(--sempo-text-secondary);
    }
}

.main h1,
.main .page-header h1,
.login-panel h1 {
    margin: 0;
    color: var(--sempo-text-strong);
    font-family: var(--sempo-font-display);
    font-size: clamp(36px, 2.7vw, 42px);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.025em;
}

.main h2 {
    color: var(--sempo-text);
    font-family: var(--sempo-font-sans);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.42;
}

.main h3,
.panel-head h3 {
    color: var(--sempo-text);
    font-family: var(--sempo-font-sans);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.43;
}

.subtle,
.muted,
.stat-label {
    color: var(--sempo-text-muted);
}

.num,
.stat-value,
.v,
[data-numeric],
[data-money],
[data-sku] {
    font-variant-numeric: tabular-nums;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--sempo-text);
    -webkit-box-shadow: 0 0 0 1000px var(--sempo-surface-input) inset;
    caret-color: var(--sempo-text);
}

* {
    scrollbar-color: var(--sempo-desktop-text-muted, #3b4247) transparent;
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--sempo-row);
}

*::-webkit-scrollbar-thumb {
    border: 2px solid var(--sempo-row);
    border-radius: 999px;
    background: var(--sempo-desktop-text-muted, #394139);
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--sempo-desktop-text-secondary, #4b5748);
    background-clip: padding-box;
}

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

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