/* ============================================================
   SECTION 1 — Light theme tokens
   ============================================================ */
[data-theme="light"] {
    --sh-bg-page: #F4F4F5;
    --sh-bg-surface: #FFFFFF;
    --sh-bg-sunken: #F4F4F5;
    --sh-bg-elevated: #FFFFFF;
    --sh-bg-overlay: #FFFFFF;
    --sh-border: #E4E4E7;
    --sh-border-strong: #D4D4D8;
    --sh-text-primary: #18181B;
    --sh-text-secondary: #52525B;
    --sh-text-tertiary: #A1A1AA;
    --sh-text-placeholder: #A1A1AA;
    --sh-text-disabled: #D4D4D8;
    --sh-accent: #F10F78;
    --sh-accent-hover: #C90C63;
    --sh-accent-subtle: #FEF0F6;
    --sh-accent-text: #A80A55;
    --sh-green-bg: #F0FDF4; --sh-green-border: #BBF7D0; --sh-green-text: #15803D;
    --sh-blue-bg: #EFF6FF; --sh-blue-border: #BFDBFE; --sh-blue-text: #1D4ED8;
    --sh-amber-bg: #FFFBEB; --sh-amber-border: #FDE68A; --sh-amber-text: #B45309;
    --sh-red-bg: #FEF2F2; --sh-red-border: #FECACA; --sh-red-text: #B91C1C;
    --sh-gray-bg: #F4F4F5; --sh-gray-border: #E4E4E7; --sh-gray-text: #71717A;
    --sh-hover: rgba(0,0,0,0.04);
    --sh-active: rgba(0,0,0,0.08);
    --sh-focus-ring: #F10F78;
    --sh-radius-sm: 4px;
    --sh-radius-md: 6px;
    --sh-radius-lg: 8px;
    --sh-radius-xl: 12px;
    --sh-radius-full: 9999px;
    --sh-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --sh-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --sh-sidebar-width: 220px;
    --sh-topbar-height: 52px;
    --sh-content-padding: 24px;
}

/* ============================================================
   SECTION 2 — Dark theme tokens
   ============================================================ */
[data-theme="dark"] {
    --sh-bg-page: #0F0F10;
    --sh-bg-surface: #18181B;
    --sh-bg-sunken: #111113;
    --sh-bg-elevated: #1C1C1F;
    --sh-bg-overlay: #1C1C1F;
    --sh-border: #2E2E32;
    --sh-border-strong: #4B4B52;
    --sh-text-primary: #FAFAFA;
    --sh-text-secondary: #A1A1AA;
    --sh-text-tertiary: #71717A;
    --sh-text-placeholder: #52525B;
    --sh-text-disabled: #3F3F46;
    --sh-accent: #F10F78;
    --sh-accent-hover: #F540A0;
    --sh-accent-subtle: #3D0B23;
    --sh-accent-text: #F472B6;
    --sh-green-bg: #052E16; --sh-green-border: #14532D; --sh-green-text: #4ADE80;
    --sh-blue-bg: #0C1A3A; --sh-blue-border: #1E3A6E; --sh-blue-text: #60A5FA;
    --sh-amber-bg: #1C1200; --sh-amber-border: #422006; --sh-amber-text: #FCD34D;
    --sh-red-bg: #1F0505; --sh-red-border: #450A0A; --sh-red-text: #F87171;
    --sh-gray-bg: #18181B; --sh-gray-border: #27272A; --sh-gray-text: #71717A;
    --sh-hover: rgba(255,255,255,0.04);
    --sh-active: rgba(255,255,255,0.08);
    --sh-focus-ring: #F10F78;
    --sh-radius-sm: 4px;
    --sh-radius-md: 6px;
    --sh-radius-lg: 8px;
    --sh-radius-xl: 12px;
    --sh-radius-full: 9999px;
    --sh-shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --sh-shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --sh-sidebar-width: 220px;
    --sh-topbar-height: 52px;
    --sh-content-padding: 24px;
}


/* ============================================================
   SECTION 3 — Base styles
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background: var(--sh-bg-page);
    color: var(--sh-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--sh-accent-text); text-decoration: none; }
a:hover { color: var(--sh-accent); }


/* ============================================================
   SECTION 4 — App shell
   ============================================================ */
.sh-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--sh-bg-page);
}

.sh-sidebar {
    width: var(--sh-sidebar-width);
    flex-shrink: 0;
    height: 100%;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--sh-bg-surface);
    border-right: 1px solid var(--sh-border);
    display: flex;
    flex-direction: column;
}

.sh-sidebar__logo {
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    flex-shrink: 0;
}

.sh-sidebar__logo img {
    height: 24px;
    width: 24px;
}

.sh-sidebar__logo-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--sh-accent);
    letter-spacing: -0.01em;
}

.sh-sidebar__nav {
    flex: 1;
    padding: 4px 0;
    overflow-y: auto;
}

.sh-sidebar__spacer { flex: 1; }

.sh-sidebar__bottom {
    border-top: 1px solid var(--sh-border);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sh-sidebar__user-info { flex: 1; min-width: 0; }

.sh-sidebar__user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--sh-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sh-sidebar__user-role {
    font-size: 12px;
    color: var(--sh-text-tertiary);
}

/* Nav groups */
.sh-nav-group { margin-top: 20px; }
.sh-nav-group:first-child { margin-top: 0; }

.sh-nav-group__label {
    font-size: 11px;
    font-weight: 500;
    color: var(--sh-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0 16px;
    margin-bottom: 2px;
}

/* Nav items */
.sh-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    margin: 1px 4px;
    border-radius: var(--sh-radius-md);
    font-size: 14px;
    color: var(--sh-text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: background 120ms, color 120ms;
    border: none;
    background: none;
    width: calc(100% - 8px);
    border-left: 2px solid transparent;
}

.sh-nav-item:hover {
    background: var(--sh-hover);
    color: var(--sh-text-primary);
    text-decoration: none;
}

.sh-nav-item--active {
    background: var(--sh-accent-subtle);
    color: var(--sh-accent-text);
    border-left-color: var(--sh-accent);
}

.sh-nav-item--active:hover {
    background: var(--sh-accent-subtle);
}

.sh-nav-item__icon {
    width: 16px;
    height: 16px;
    color: var(--sh-text-tertiary);
    flex-shrink: 0;
}

.sh-nav-item--active .sh-nav-item__icon {
    color: var(--sh-accent);
}

[data-theme="dark"] .sh-nav-item--active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--sh-text-primary);
    border-left-color: var(--sh-text-primary);
}
[data-theme="dark"] .sh-nav-item--active:hover {
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .sh-nav-item--active .sh-nav-item__icon {
    color: var(--sh-text-primary);
}

.sh-nav-item__text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sh-nav-item__badge {
    font-size: 12px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: var(--sh-radius-full);
    background: var(--sh-amber-bg);
    color: var(--sh-amber-text);
    border: 1px solid var(--sh-amber-border);
}

/* Main area */
.sh-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.sh-topbar {
    height: var(--sh-topbar-height);
    flex-shrink: 0;
    border-bottom: 1px solid var(--sh-border);
    background: var(--sh-bg-surface);
    display: flex;
    align-items: center;
    padding: 0 var(--sh-content-padding);
    gap: 12px;
    position: relative;
}

.sh-topbar__left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.sh-topbar__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--sh-text-primary);
    margin: 0;
    white-space: nowrap;
}

.sh-topbar__subtitle {
    font-size: 13px;
    color: var(--sh-text-tertiary);
}

.sh-topbar__center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.sh-topbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sh-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--sh-content-padding);
}


/* ============================================================
   SECTION 5 — Components
   ============================================================ */

/* ── 5a: ShBadge ── */
.sh-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: var(--sh-radius-full);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
    font-family: inherit;
}
.sh-badge--success { background: var(--sh-green-bg); color: var(--sh-green-text); border-color: var(--sh-green-border); }
.sh-badge--warning { background: var(--sh-amber-bg); color: var(--sh-amber-text); border-color: var(--sh-amber-border); }
.sh-badge--danger  { background: var(--sh-red-bg);   color: var(--sh-red-text);   border-color: var(--sh-red-border); }
.sh-badge--info    { background: var(--sh-blue-bg);  color: var(--sh-blue-text);  border-color: var(--sh-blue-border); }
.sh-badge--neutral { background: var(--sh-gray-bg);  color: var(--sh-gray-text);  border-color: var(--sh-gray-border); }
.sh-badge--accent  { background: var(--sh-accent-subtle); color: var(--sh-accent-text); border-color: transparent; }
.sh-badge--md { font-size: 12px; padding: 3px 9px; }

/* ── 5b: ShButton ── */
.sh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--sh-radius-md);
    border: 1px solid var(--sh-border);
    cursor: pointer;
    transition: background 120ms, border-color 120ms, color 120ms;
    white-space: nowrap;
    padding: 0 12px;
    height: 36px;
    text-decoration: none;
    line-height: 1;
    outline: none;
}
.sh-btn--sm { height: 30px; padding: 0 10px; font-size: 12px; }
.sh-btn--secondary {
    background: var(--sh-bg-surface);
    color: var(--sh-text-primary);
    border-color: var(--sh-border);
}
.sh-btn--secondary:hover { background: var(--sh-hover); border-color: var(--sh-border-strong); }
[data-theme="dark"] .sh-btn--secondary { border-color: var(--sh-border-strong); }
.sh-btn--primary {
    background: var(--sh-accent);
    color: #fff;
    border-color: transparent;
}
.sh-btn--primary:hover { background: var(--sh-accent-hover); }
.sh-btn--ghost {
    background: transparent;
    color: var(--sh-text-secondary);
    border-color: transparent;
}
.sh-btn--ghost:hover { background: var(--sh-hover); color: var(--sh-text-primary); }
.sh-btn--danger {
    background: var(--sh-red-bg);
    color: var(--sh-red-text);
    border-color: var(--sh-red-border);
}
.sh-btn--danger:hover { filter: brightness(0.95); }
.sh-btn:disabled, .sh-btn--disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.sh-btn:focus-visible { box-shadow: 0 0 0 3px var(--sh-accent-subtle), 0 0 0 1px var(--sh-accent); }
.sh-btn:active:not(:disabled) { transform: scale(0.99); background: var(--sh-active); }

.sh-btn__spinner {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: sh-spin 0.6s linear infinite;
}
@keyframes sh-spin { to { transform: rotate(360deg); } }

/* ── 5c: Typed input components (shared base) ── */

/* Field wrapper */
.sh-field { display: flex; flex-direction: column; gap: 5px; }

/* Label — .sh-input-label kept for direct usages in pages */
.sh-field-label, .sh-input-label { font-size: 12px; font-weight: 500; color: var(--sh-text-secondary); }

/* Inner wrapper (position context for prefix/suffix/icons) */
.sh-input-wrap { position: relative; }

/* Base input element — .sh-input kept as alias for raw <input class="sh-input"> usages in pages */
.sh-input-base, .sh-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    background: var(--sh-bg-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-md);
    color: var(--sh-text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 120ms, box-shadow 120ms;
}
.sh-input-base::placeholder, .sh-input::placeholder { color: var(--sh-text-placeholder); }
.sh-input-base:hover:not(:disabled), .sh-input:hover { border-color: var(--sh-border-strong); }
.sh-input-base:focus, .sh-input:focus { border-color: var(--sh-accent); box-shadow: 0 0 0 3px var(--sh-accent-subtle); }
.sh-input-base:disabled { opacity: 0.5; cursor: not-allowed; background: var(--sh-bg-sunken); }
.sh-input-base--error, .sh-input--error { border-color: var(--sh-red-border); }
.sh-input-base--error:focus, .sh-input--error:focus { box-shadow: 0 0 0 3px var(--sh-red-bg); }
textarea.sh-input-base, textarea.sh-input { height: auto; padding: 8px 12px; resize: vertical; }

/* Error message */
.sh-field-error, .sh-input-error-msg { font-size: 12px; color: var(--sh-red-text); }

/* Icon prefix */
.sh-input-icon-left, .sh-input-icon {
    position: absolute;
    left: 10px; top: 50%;
    transform: translateY(-50%);
    color: var(--sh-text-tertiary);
    pointer-events: none;
    width: 16px; height: 16px;
}
.sh-input-base--has-icon, .sh-input--has-icon { padding-left: 34px; }

/* Date picker */
.sh-datepicker { position: relative; }
.sh-datepicker__trigger { position: relative; cursor: pointer; }
.sh-datepicker__trigger input { cursor: pointer; padding-right: 36px; }
.sh-datepicker__icon {
    position: absolute;
    right: 10px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--sh-text-tertiary);
    pointer-events: none;
}
.sh-datepicker__backdrop {
    position: fixed; inset: 0; z-index: 999;
}
.sh-datepicker__dropdown {
    position: absolute; top: 100%; left: 0; z-index: 1000;
    margin-top: 4px;
    width: 280px;
    background: var(--sh-bg-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    padding: 12px;
    animation: sh-datepicker-in 120ms ease-out;
}
@keyframes sh-datepicker-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.sh-datepicker__nav {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.sh-datepicker__nav-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border: none; border-radius: var(--sh-radius-sm);
    background: transparent; color: var(--sh-text-secondary); cursor: pointer;
    transition: background 120ms;
}
.sh-datepicker__nav-btn:hover { background: var(--sh-hover); color: var(--sh-text-primary); }
.sh-datepicker__month-label {
    font-size: 13px; font-weight: 600; color: var(--sh-text-primary);
    text-transform: capitalize;
}
.sh-datepicker__grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.sh-datepicker__day-header {
    font-size: 11px; font-weight: 600; color: var(--sh-text-tertiary);
    text-align: center; padding: 4px 0;
}
.sh-datepicker__cell {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; margin: 0 auto;
    font-size: 13px; border: none; border-radius: var(--sh-radius-sm);
    background: transparent; color: var(--sh-text-primary); cursor: pointer;
    transition: background 100ms, color 100ms;
}
.sh-datepicker__cell:hover:not(:disabled) { background: var(--sh-hover); }
.sh-datepicker__cell--today { font-weight: 700; box-shadow: inset 0 0 0 1px var(--sh-accent); }
.sh-datepicker__cell--selected { background: var(--sh-accent) !important; color: #fff !important; font-weight: 600; }
.sh-datepicker__cell--disabled { color: var(--sh-text-disabled); cursor: not-allowed; opacity: 0.4; }
.sh-datepicker__cell--empty { cursor: default; }
.sh-datepicker__footer {
    display: flex; justify-content: space-between;
    margin-top: 8px; padding-top: 8px;
    border-top: 1px solid var(--sh-border);
}
.sh-datepicker__footer-btn {
    font-size: 12px; font-weight: 500; border: none;
    background: transparent; color: var(--sh-accent); cursor: pointer;
    padding: 4px 8px; border-radius: var(--sh-radius-sm);
    transition: background 100ms;
}
.sh-datepicker__footer-btn:hover { background: var(--sh-hover); }

/* Number input */
.sh-number-wrap { position: relative; display: flex; align-items: center; }
.sh-number-input { flex: 1; }
.sh-number-input::-webkit-inner-spin-button,
.sh-number-input::-webkit-outer-spin-button { appearance: none; }
.sh-number-input { -moz-appearance: textfield; }
.sh-number-affix {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    font-size: 13px;
    color: var(--sh-text-tertiary);
    pointer-events: none;
}
.sh-number-affix--left { left: 12px; }
.sh-number-affix--right { right: 12px; }
.sh-number-input--has-prefix { padding-left: 28px; }
.sh-number-input--has-suffix { padding-right: 28px; }

/* Select error modifier */
.sh-select--error { border-color: var(--sh-red-border); }

/* Password show/hide toggle */
.sh-input-base--has-eye { padding-right: 36px; }
.sh-input-eye-btn {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: var(--sh-text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--sh-radius-sm);
    line-height: 0;
    transition: color 120ms;
}
.sh-input-eye-btn:hover { color: var(--sh-text-primary); }
.sh-input-eye-icon { width: 16px; height: 16px; }

/* OTP boxes */
.sh-otp-wrap {
    display: inline-flex;
    gap: 8px;
}
.sh-otp-input {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    border: 1.5px solid var(--sh-border);
    border-radius: var(--sh-radius-md);
    background: var(--sh-bg-surface);
    color: var(--sh-text-primary);
    caret-color: var(--sh-accent);
    outline: none;
    cursor: text;
    transition: border-color 120ms, box-shadow 120ms;
    -moz-appearance: textfield;
}
.sh-otp-input:focus {
    border-color: var(--sh-accent);
    box-shadow: 0 0 0 3px var(--sh-accent-subtle);
}
.sh-otp-input.sh-otp-box--filled { border-color: var(--sh-border-strong); }
.sh-otp-input.sh-otp-box--error { border-color: var(--sh-red-border); }
.sh-otp-input.sh-otp-box--error:focus { box-shadow: 0 0 0 3px var(--sh-red-bg); }

/* ── 5d: ShSelect ── */
.sh-select {
    width: 100%;
    height: 36px;
    padding: 0 32px 0 12px;
    background: var(--sh-bg-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-md);
    color: var(--sh-text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 120ms;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}
.sh-select:hover { border-color: var(--sh-border-strong); }
.sh-select:focus { border-color: var(--sh-focus-ring); box-shadow: 0 0 0 3px var(--sh-accent-subtle); }

/* ── 5e: ShCard ── */
.sh-card {
    background: var(--sh-bg-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-lg);
}
.sh-card--padded { padding: 16px 20px; }
.sh-card--hoverable { cursor: pointer; transition: border-color 120ms; }
.sh-card--hoverable:hover { border-color: var(--sh-border-strong); }

/* ── 5f: ShStat ── */
.sh-stat {
    background: var(--sh-bg-sunken);
    border-radius: var(--sh-radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sh-stat__icon { color: var(--sh-text-tertiary); width: 20px; height: 20px; }
.sh-stat__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--sh-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.sh-stat__value {
    font-size: 28px;
    font-weight: 600;
    color: var(--sh-text-primary);
    line-height: 1;
}
.sh-stat__delta { font-size: 12px; font-weight: 500; }
.sh-stat__delta--positive { color: var(--sh-green-text); }
.sh-stat__delta--negative { color: var(--sh-red-text); }

/* ── 5g: ShSegmented ── */
.sh-segmented {
    display: inline-flex;
    background: var(--sh-bg-sunken);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-md);
    padding: 2px;
    gap: 1px;
}
.sh-segmented__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    height: 28px;
    font-size: 13px;
    font-weight: 500;
    color: var(--sh-text-secondary);
    border-radius: calc(var(--sh-radius-md) - 1px);
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: inherit;
    transition: all 120ms;
}
.sh-segmented__item:hover { color: var(--sh-text-primary); }
.sh-segmented__item--active {
    background: var(--sh-bg-surface);
    color: var(--sh-text-primary);
    box-shadow: var(--sh-shadow-sm);
}
.sh-segmented--full {
    display: flex;
    width: 100%;
}
.sh-segmented--full .sh-segmented__item {
    flex: 1;
    justify-content: center;
}

/* ── 5h: ShModal ── */
dialog.sh-modal {
    border: none;
    border-radius: var(--sh-radius-xl);
    background: var(--sh-bg-surface);
    color: var(--sh-text-primary);
    padding: 0;
    max-height: 85vh;
    overflow: hidden;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 0 0 1px var(--sh-border);
}
dialog.sh-modal[open] { display: flex; }
dialog.sh-modal::backdrop { background: rgba(0,0,0,0.4); }
dialog.sh-modal--sm { width: 400px; }
dialog.sh-modal--md { width: 560px; }
dialog.sh-modal--lg { width: 720px; }
.sh-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sh-border);
    flex-shrink: 0;
}
.sh-modal__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--sh-text-primary);
    margin: 0;
}
.sh-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: var(--sh-radius-sm);
    color: var(--sh-text-tertiary);
    cursor: pointer;
    transition: background 120ms;
}
.sh-modal__close:hover { background: var(--sh-hover); color: var(--sh-text-primary); }
.sh-modal__body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}
.sh-modal__footer {
    padding: 16px 20px;
    border-top: 1px solid var(--sh-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

/* ── 5i: ShToast ── */
.sh-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.sh-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--sh-radius-lg);
    background: var(--sh-bg-surface);
    border: 1px solid var(--sh-border);
    box-shadow: var(--sh-shadow-md);
    min-width: 280px;
    max-width: 420px;
    pointer-events: auto;
    animation: sh-toast-in 200ms ease-out;
}
@keyframes sh-toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
.sh-toast__icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.sh-toast--success .sh-toast__icon { color: var(--sh-green-text); }
.sh-toast--error .sh-toast__icon { color: var(--sh-red-text); }
.sh-toast--warning .sh-toast__icon { color: var(--sh-amber-text); }
.sh-toast--info .sh-toast__icon { color: var(--sh-blue-text); }
.sh-toast__message { flex: 1; font-size: 13px; color: var(--sh-text-primary); line-height: 1.4; }
.sh-toast__close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--sh-text-tertiary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--sh-radius-sm);
}
.sh-toast__close:hover { color: var(--sh-text-primary); background: var(--sh-hover); }

/* ── 5j: ShTable / QuickGrid ── */
.sh-table-wrap {
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-lg);
    overflow: hidden;
    background: var(--sh-bg-surface);
}
.sh-table-wrap table { width: 100%; border-collapse: collapse; }
.sh-table-wrap thead th {
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--sh-text-tertiary);
    background: var(--sh-bg-sunken);
    border-bottom: 1px solid var(--sh-border);
    white-space: nowrap;
}
.sh-table-wrap tbody tr {
    border-bottom: 1px solid var(--sh-border);
    transition: background 80ms;
}
.sh-table-wrap tbody tr:last-child { border-bottom: none; }
.sh-table-wrap tbody tr:hover { background: var(--sh-hover); }
.sh-table-wrap tbody td {
    padding: 11px 16px;
    font-size: 13px;
    color: var(--sh-text-primary);
    vertical-align: middle;
}
.sh-table-wrap .col-sort-asc::after  { content: ' \2191'; color: var(--sh-accent); }
.sh-table-wrap .col-sort-desc::after { content: ' \2193'; color: var(--sh-accent); }
.sh-table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--sh-border);
    font-size: 13px;
    color: var(--sh-text-secondary);
    background: var(--sh-bg-sunken);
}

/* ── 5k: ShEmptyState ── */
.sh-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 8px;
    text-align: center;
}
.sh-empty__icon { color: var(--sh-text-tertiary); margin-bottom: 4px; width: 40px; height: 40px; }
.sh-empty__title { font-size: 14px; font-weight: 500; color: var(--sh-text-primary); }
.sh-empty__desc { font-size: 13px; color: var(--sh-text-tertiary); max-width: 320px; }

/* ── 5l: ShAvatar ── */
.sh-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--sh-radius-full);
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
    overflow: hidden;
}
.sh-avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.sh-avatar--md { width: 32px; height: 32px; font-size: 12px; }
.sh-avatar--lg { width: 40px; height: 40px; font-size: 14px; }
.sh-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── 5m: ShPageHeader ── */
.sh-page-header { margin-bottom: 24px; }
.sh-breadcrumb { font-size: 12px; color: var(--sh-text-tertiary); margin-bottom: 6px; }
.sh-breadcrumb a { color: var(--sh-text-tertiary); text-decoration: none; }
.sh-breadcrumb a:hover { color: var(--sh-text-secondary); }
.sh-page-header__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.sh-page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--sh-text-primary);
    margin: 0;
    line-height: 1.2;
}
.sh-page-subtitle {
    font-size: 13px;
    color: var(--sh-text-tertiary);
    margin: 4px 0 0;
}
.sh-page-freshness {
    font-size: 0.75rem;
    color: var(--sh-text-tertiary);
    font-weight: normal;
    white-space: nowrap;
}
.sh-page-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── 5n: Skeleton shimmer ── */
.sh-skeleton {
    background: linear-gradient(90deg, var(--sh-border) 25%, var(--sh-bg-sunken) 50%, var(--sh-border) 75%);
    background-size: 200% 100%;
    animation: sh-shimmer 1.5s infinite;
    border-radius: var(--sh-radius-sm);
}
@keyframes sh-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── 5o: Icon button ── */
.sh-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-md);
    background: transparent;
    cursor: pointer;
    transition: background 120ms;
    padding: 0;
    color: var(--sh-text-secondary);
}
.sh-icon-btn:hover {
    background: var(--sh-hover);
    border-color: var(--sh-border-strong);
    color: var(--sh-text-primary);
}
.sh-icon-btn--ghost {
    border-color: transparent;
}
.sh-icon-btn--ghost:hover {
    border-color: transparent;
}

.sh-icon {
    width: 16px;
    height: 16px;
    color: inherit;
    stroke-width: 1.5;
}

/* ── 5p: Popup/Dropdown ── */
.sh-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
}
.sh-popup {
    position: fixed;
    z-index: 1000;
    background: var(--sh-bg-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-lg);
    box-shadow: var(--sh-shadow-md);
    min-width: 220px;
    padding: 4px 0;
}
.sh-popup__header {
    padding: 8px 16px;
    border-bottom: 1px solid var(--sh-border);
    margin-bottom: 4px;
}
.sh-popup__header-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--sh-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}
.sh-popup__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--sh-text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: background 80ms;
}
.sh-popup__item:hover { background: var(--sh-hover); text-decoration: none; color: var(--sh-text-primary); }
.sh-popup__item--active { background: var(--sh-accent-subtle); }
.sh-popup__item-icon { width: 18px; height: 18px; flex-shrink: 0; }
.sh-popup__item-text { flex: 1; }
.sh-popup__empty {
    padding: 16px;
    text-align: center;
    color: var(--sh-text-tertiary);
    font-size: 13px;
}

/* ── Notification badge ── */
.sh-notification-dot {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--sh-red-text);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}


/* ── 5q: ShAlert ── */
.sh-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--sh-radius-md);
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.5;
}
.sh-alert--success { background: var(--sh-green-bg); color: var(--sh-green-text); border-color: var(--sh-green-border); }
.sh-alert--warning { background: var(--sh-amber-bg); color: var(--sh-amber-text); border-color: var(--sh-amber-border); }
.sh-alert--danger  { background: var(--sh-red-bg);   color: var(--sh-red-text);   border-color: var(--sh-red-border); }
.sh-alert--info    { background: var(--sh-blue-bg);  color: var(--sh-blue-text);  border-color: var(--sh-blue-border); }
.sh-alert__icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.sh-alert__content { flex: 1; }
.sh-alert__title { font-weight: 600; margin-bottom: 2px; }

/* ── 5r: ShSpinner ── */
.sh-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sh-spinner__circle {
    border: 2.5px solid var(--sh-border);
    border-top-color: var(--sh-accent);
    border-radius: 50%;
    animation: sh-spin 0.7s linear infinite;
}
.sh-spinner--sm .sh-spinner__circle { width: 16px; height: 16px; }
.sh-spinner--md .sh-spinner__circle { width: 24px; height: 24px; }
.sh-spinner--lg .sh-spinner__circle { width: 36px; height: 36px; }

/* ── 5s: ShSwitch ── */
.sh-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--sh-text-primary);
}
.sh-switch__input { position: absolute; opacity: 0; width: 0; height: 0; }
.sh-switch__track {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: var(--sh-border-strong);
    transition: background 120ms;
    position: relative;
    flex-shrink: 0;
}
.sh-switch__input:checked + .sh-switch__track { background: var(--sh-accent); }
.sh-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 120ms;
}
.sh-switch__input:checked + .sh-switch__track .sh-switch__thumb { transform: translateX(16px); }
.sh-switch__input:focus-visible + .sh-switch__track { box-shadow: 0 0 0 3px var(--sh-accent-subtle); }

/* ── 5t: ShCheckbox ── */
.sh-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--sh-text-primary);
}
.sh-checkbox__input {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1.5px solid var(--sh-border-strong);
    background: var(--sh-bg-surface);
    appearance: none;
    cursor: pointer;
    transition: all 120ms;
    display: grid;
    place-content: center;
    flex-shrink: 0;
}
.sh-checkbox__input:checked {
    background: var(--sh-accent);
    border-color: var(--sh-accent);
}
.sh-checkbox__input:checked::after {
    content: '';
    width: 8px;
    height: 5px;
    border: 2px solid #fff;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    margin-top: -1px;
}
.sh-checkbox__input:focus-visible { box-shadow: 0 0 0 3px var(--sh-accent-subtle); }

/* ── 5u: ShTabs ── */
.sh-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--sh-border);
    margin-bottom: 16px;
}
.sh-tabs__item {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--sh-text-secondary);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 120ms, border-color 120ms;
    font-family: inherit;
}
.sh-tabs__item:hover { color: var(--sh-text-primary); }
.sh-tabs__item--active {
    color: var(--sh-accent-text);
    border-bottom-color: var(--sh-accent);
}

/* ── 5v: Layout utilities ── */
.sh-flex { display: flex; }
.sh-flex-col { display: flex; flex-direction: column; }
.sh-flex-row { display: flex; flex-direction: row; }
.sh-flex-wrap { flex-wrap: wrap; }
.sh-flex-1 { flex: 1; min-width: 0; }
.sh-items-center { align-items: center; }
.sh-items-start { align-items: flex-start; }
.sh-items-end { align-items: flex-end; }
.sh-justify-between { justify-content: space-between; }
.sh-justify-center { justify-content: center; }
.sh-justify-end { justify-content: flex-end; }
.sh-gap-xs { gap: 4px; }
.sh-gap-sm { gap: 8px; }
.sh-gap-md { gap: 12px; }
.sh-gap-lg { gap: 16px; }
.sh-gap-xl { gap: 24px; }
.sh-grid { display: grid; }
.sh-grid-2 { grid-template-columns: repeat(2, 1fr); }
.sh-grid-3 { grid-template-columns: repeat(3, 1fr); }
.sh-grid-4 { grid-template-columns: repeat(4, 1fr); }
.sh-grid-5 { grid-template-columns: repeat(5, 1fr); }
.sh-w-full { width: 100%; }
.sh-text-center { text-align: center; }
.sh-text-right { text-align: right; }
.sh-text-sm { font-size: 12px; }
.sh-text-xs { font-size: 11px; }
.sh-text-muted { color: var(--sh-text-secondary); }
.sh-text-tertiary { color: var(--sh-text-tertiary); }
.sh-font-medium { font-weight: 500; }
.sh-font-semibold { font-weight: 600; }
.sh-mt-sm { margin-top: 8px; }
.sh-mt-md { margin-top: 16px; }
.sh-mt-lg { margin-top: 24px; }
.sh-mb-sm { margin-bottom: 8px; }
.sh-mb-md { margin-bottom: 16px; }
.sh-mb-lg { margin-bottom: 24px; }
.sh-p-md { padding: 16px; }
.sh-p-lg { padding: 24px; }
.sh-hidden { display: none; }

/* ── 5w: Data grid (QuickGrid) ── */
.sh-table-wrap .quickgrid { width: 100%; border-collapse: collapse; }
.sh-table-wrap .quickgrid thead th {
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--sh-text-tertiary);
    background: var(--sh-bg-sunken);
    border-bottom: 1px solid var(--sh-border);
    white-space: nowrap;
    cursor: pointer;
}
.sh-table-wrap .quickgrid tbody tr {
    border-bottom: 1px solid var(--sh-border);
    transition: background 80ms;
}
.sh-table-wrap .quickgrid tbody tr:last-child { border-bottom: none; }
.sh-table-wrap .quickgrid tbody tr:hover { background: var(--sh-hover); }
.sh-table-wrap .quickgrid tbody td {
    padding: 11px 16px;
    font-size: 13px;
    color: var(--sh-text-primary);
    vertical-align: middle;
}
.sh-table-wrap .quickgrid .col-sort-asc::after { content: ' \2191'; color: var(--sh-accent); }
.sh-table-wrap .quickgrid .col-sort-desc::after { content: ' \2193'; color: var(--sh-accent); }

/* ── 5x: Progress bar linear ── */
.sh-progress {
    width: 100%;
    height: 6px;
    background: var(--sh-bg-sunken);
    border-radius: 3px;
    overflow: hidden;
}
.sh-progress__bar {
    height: 100%;
    background: var(--sh-accent);
    border-radius: 3px;
    transition: width 300ms ease;
}
.sh-progress--indeterminate .sh-progress__bar {
    width: 40%;
    animation: sh-progress-slide 1.2s ease-in-out infinite;
}
@keyframes sh-progress-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* ── 5x2: ShLoadingBar ── */
.sh-loading-bar {
    width: 80px;
    height: 4px;
    background: var(--sh-border);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}
.sh-loading-bar__fill {
    height: 100%;
    background: var(--sh-accent);
    border-radius: 2px;
    transition: width 1s linear;
}

/* ── 5y: Dropdown button ── */
.sh-dropdown-wrap { position: relative; display: inline-flex; }
.sh-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 180px;
    background: var(--sh-bg-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-md);
    box-shadow: var(--sh-shadow-md);
    padding: 4px 0;
    margin-top: 4px;
}
.sh-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--sh-text-primary);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: background 80ms;
}
.sh-dropdown-item:hover { background: var(--sh-hover); }

/* ── 5z: Misc page utilities ── */
.sh-section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--sh-text-secondary);
    margin: 0 0 12px 0;
}
.sh-divider {
    height: 1px;
    background: var(--sh-border);
    margin: 16px 0;
}
.sh-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.sh-chart-card {
    background: var(--sh-bg-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-lg);
    padding: 20px;
}
.sh-chart-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--sh-text-secondary);
    margin: 0 0 12px 0;
}
.sh-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.sh-form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}
.sh-password-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    background: var(--sh-bg-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-md);
    color: var(--sh-text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 120ms;
    outline: none;
}
.sh-password-input::placeholder { color: var(--sh-text-placeholder); }
.sh-password-input:focus { border-color: var(--sh-focus-ring); box-shadow: 0 0 0 3px var(--sh-accent-subtle); }
.sh-numeric-input { width: 100%; }


/* ============================================================
   SECTION 6 — Page-specific: DeliveryOrders
   ============================================================ */
.page-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.page-header .rzi { display: none; }
.page-header h3 { margin: 0; font-weight: 600; font-size: 18px; color: var(--sh-text-primary); letter-spacing: -0.01em; }
.page-header .sh-text-sm { font-size: 13px; color: var(--sh-text-tertiary); }

.filter-bar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; background: var(--sh-bg-surface); border: 1px solid var(--sh-border); border-radius: 6px; padding: 0.75rem 1rem; margin-bottom: 0; }
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }

.grid-card { background: var(--sh-bg-surface); border: 1px solid var(--sh-border); border-radius: 6px; cursor: default; transition: border-color 100ms ease; }
.grid-card:hover { border-color: var(--sh-border-strong); }
.grid-card__body { padding: 14px; }
.grid-card__title { font-weight: 500; font-size: 13px; color: var(--sh-text-primary); }
.grid-card__value { font-weight: 500; font-size: 15px; color: var(--sh-text-primary); }
.grid-card__caption { font-size: 12px; color: var(--sh-text-secondary); }
.grid-card__detail { background: var(--sh-bg-sunken); border: 1px solid var(--sh-border); border-radius: 4px; padding: 8px 10px; }

.do-layout { display: flex; gap: 0; min-height: calc(100vh - 120px); }
.do-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.do-content { flex: 1; overflow-y: auto; padding-top: 0.5rem; }
.do-sidebar { width: 210px; flex-shrink: 0; background: var(--sh-bg-surface); border-left: 1px solid var(--sh-border); padding: 14px 12px; overflow-y: auto; transition: width 150ms ease, padding 150ms ease, opacity 150ms ease; }
.do-sidebar--closed { width: 0; padding: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.do-sidebar-section { display: flex; flex-direction: column; gap: 2px; }
.do-sidebar-label { font-size: 11px; font-weight: 500; color: var(--sh-text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.do-sidebar-divider { height: 1px; background: var(--sh-border); margin: 10px 0; }

.do-status-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 13px; color: var(--sh-text-primary); border-left: 2px solid transparent; transition: background 80ms ease; }
.do-status-row .rzi { font-size: 14px !important; }
.do-status-row:hover { background: var(--sh-hover); }
.do-status-row--active { border-left-color: var(--sh-accent); background: var(--sh-accent-subtle); font-weight: 500; }
.do-status-row--active:hover { background: var(--sh-accent-subtle); }
.do-status-count { font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: 3px; background: var(--sh-bg-sunken); border: 1px solid var(--sh-border); color: var(--sh-text-tertiary); }
.do-status-count--active { background: var(--sh-accent-subtle); border-color: transparent; color: var(--sh-accent-text); }

.do-kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 100%; }
.do-kanban-col { background: var(--sh-bg-sunken); border-radius: 6px; padding: 10px; display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--sh-border); }
.do-kanban-col__title { font-size: 12px; font-weight: 500; color: var(--sh-text-secondary); }
.do-kanban-scroll { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.do-kanban-scroll .grid-card { padding: 10px; margin-bottom: 6px; border-radius: 5px; }

.do-tl-label { font-size: 11px; font-weight: 500; color: var(--sh-text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.do-tl-label::after { content: ''; flex: 1; height: 1px; background: var(--sh-border); }
.do-tl-row { border-left: 3px solid transparent; background: var(--sh-bg-surface); border-top: 1px solid var(--sh-border); border-right: 1px solid var(--sh-border); border-bottom: 1px solid var(--sh-border); border-radius: 0 5px 5px 0; padding: 8px 14px; }
.do-tl-row:hover { background: var(--sh-hover); }
.do-tl-row.avl { border-left-color: var(--sh-green-text); }
.do-tl-row.fil { border-left-color: var(--sh-amber-text); }
.do-tl-row.int { border-left-color: var(--sh-blue-text); }
.do-tl-row.can { border-left-color: var(--sh-red-text); }
.do-tl-row.exp { border-left-color: var(--sh-gray-text); }
.do-tl-row.cmp { border-left-color: var(--sh-green-text); }

.do-content .sh-empty { padding: 2rem; }


/* ============================================================
   SECTION 7 — KPI cards & charts
   ============================================================ */
.kpi-card { text-align: center; padding: 1rem; border-radius: 6px; background: var(--sh-bg-surface); border: 1px solid var(--sh-border); }
.kpi-card .kpi-value { font-size: 1.75rem; font-weight: 600; line-height: 1.2; color: var(--sh-text-primary); letter-spacing: -0.02em; }
.kpi-card .kpi-label { font-size: 11px; color: var(--sh-text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; }

.chart-container { background: var(--sh-bg-surface); border-radius: 6px; border: 1px solid var(--sh-border); padding: 1.25rem; }
.chart-container .chart-title { font-weight: 600; font-size: 13px; color: var(--sh-text-primary); margin-bottom: 0.75rem; }


/* ============================================================
   SECTION 10 — Scrollbars
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sh-border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--sh-text-tertiary); }


/* ============================================================
   SECTION 11 — Focus, selection, loading
   ============================================================ */
::selection {
    background: var(--sh-accent-subtle);
    color: var(--sh-accent-text);
}

*:focus-visible {
    outline: 2px solid var(--sh-focus-ring);
    outline-offset: 1px;
}

.loading-progress circle { stroke: var(--sh-border); }
.loading-progress circle:last-child { stroke: var(--sh-accent); }

#blazor-error-ui {
    background: var(--sh-red-bg);
    color: var(--sh-red-text);
    border-top: 1px solid var(--sh-red-border);
}


/* Icons are now rendered via CSS mask-image in lucide-icons.css —
   no empty-element placeholder needed. */


/* ============================================================
   SECTION 13 — ShFilterChip
   ============================================================ */
.sh-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    height: 28px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--sh-radius-full);
    border: 1px solid var(--sh-border);
    background: var(--sh-bg-surface);
    color: var(--sh-text-secondary);
    cursor: pointer;
    transition: all 120ms;
    white-space: nowrap;
    user-select: none;
    font-family: inherit;
    line-height: 1;
}
.sh-filter-chip:hover {
    border-color: var(--sh-border-strong);
    color: var(--sh-text-primary);
}
.sh-filter-chip--active {
    background: var(--sh-accent-subtle);
    border-color: var(--sh-accent-text);
    color: var(--sh-accent-text);
}
[data-theme="dark"] .sh-filter-chip--active {
    background: rgba(241, 15, 120, 0.15);
    border-color: var(--sh-accent);
    color: var(--sh-accent);
}
.sh-filter-chip__count {
    background: var(--sh-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 99px;
    padding: 0 5px;
    min-width: 16px;
    text-align: center;
    line-height: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* ============================================================
   SECTION 14 — Filter bar
   ============================================================ */
.sh-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.sh-filter-bar__search {
    flex: 1;
    min-width: 200px;
}
.sh-filter-bar__chips {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
}
.sh-filter-bar__right {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}
.sh-filter-bar__date {
    width: 140px;
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    font-family: inherit;
    background: var(--sh-bg-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-md);
    color: var(--sh-text-primary);
    outline: none;
    transition: border-color 120ms;
    cursor: pointer;
}
.sh-filter-bar__date:hover { border-color: var(--sh-border-strong); }
.sh-filter-bar__date:focus { border-color: var(--sh-focus-ring); box-shadow: 0 0 0 3px var(--sh-accent-subtle); }
.sh-filter-bar__sort {
    height: 28px;
    padding: 0 28px 0 10px;
    font-size: 12px;
    font-family: inherit;
    background: var(--sh-bg-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-md);
    color: var(--sh-text-primary);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
    transition: border-color 120ms;
    min-width: 130px;
}
.sh-filter-bar__sort:hover { border-color: var(--sh-border-strong); }
.sh-filter-bar__sort:focus { border-color: var(--sh-focus-ring); box-shadow: 0 0 0 3px var(--sh-accent-subtle); }
@media (max-width: 768px) {
    .sh-filter-bar__search { flex: unset; width: 100%; }
    .sh-filter-bar__right { margin-left: 0; }
}

.sh-deeplink-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin: 0 var(--sh-content-px, 1.5rem);
    background: var(--sh-accent-subtle);
    border: 1px solid var(--sh-accent-border);
    border-radius: var(--sh-radius-md);
    font-size: 13px;
    color: var(--sh-accent-text);
}
.sh-deeplink-bar__label { font-weight: 500; }
.sh-deeplink-bar__clear {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--sh-text-tertiary);
    padding: 2px;
    display: flex;
    border-radius: var(--sh-radius-sm);
}
.sh-deeplink-bar__clear:hover { color: var(--sh-text-primary); background: var(--sh-hover); }

.sh-stat-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    margin: 0 var(--sh-content-px, 1.5rem);
    font-size: 12px;
    color: var(--sh-text-secondary);
    flex-wrap: wrap;
}
.sh-stat-bar__item strong { font-weight: 600; }
.sh-stat-bar__item--warning strong { color: var(--sh-amber-text); }
.sh-stat-bar__item--success strong { color: var(--sh-green-text); }
.sh-stat-bar__item--danger strong { color: var(--sh-red-text); }
.sh-stat-bar__item--info strong { color: var(--sh-blue-text); }
.sh-stat-bar__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--sh-border-strong); flex-shrink: 0; }


