:root {
    --bg: #ffffff;
    --bg-soft: #ffffff;
    --bg-deep: #e5eff1;
    --bg-card: #ffffff;
    --bg-card-strong: #f8fbfb;
    --line: #d8e5e8;
    --text: #18323a;
    --muted: #647b82;
    --accent: #0f6072;
    --accent-strong: #0b5060;
    --positive: #23745d;
    --warning: #9d543d;
    --shadow: 0 18px 40px rgba(24, 50, 58, 0.08);
    --radius-lg: 8px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --content: 1320px;
    --font-sans: "Avenir Next", "Segoe UI Light", "Helvetica Neue", "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;
}

html {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111816;
    --bg-soft: #17221f;
    --bg-deep: #213533;
    --bg-card: #17221f;
    --bg-card-strong: #1d2a27;
    --line: #2b3d3a;
    --text: #e7f0ee;
    --muted: #a6b8b4;
    --accent: #7cb6bf;
    --accent-strong: #a7d2d7;
    --positive: #79c69f;
    --warning: #e6b079;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
}

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

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

.app-shell {
    min-height: 100vh;
    position: relative;
    overflow-x: clip;
}

.app-shell::before,
.player-shell::before {
    display: none;
}

.topbar,
.page-shell,
.auth-wrapper,
.player-topbar,
.player-stage,
.player-empty {
    position: relative;
    z-index: 1;
}

.page-shell,
.auth-wrapper {
    width: min(calc(100% - 40px), var(--content));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-badge {
    display: block;
    width: 150px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    flex-shrink: 0;
    background: #669eaa;
}

.brand-badge img,
.hero-brand-chip img,
.brand-hero-logo,
.player-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-tagline {
    color: var(--muted);
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-lockup strong,
.section-head h1,
.section-head h2,
.panel h1,
.panel h2,
.player-topbar h1 {
    letter-spacing: -0.03em;
}

.topnav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link,
.button {
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--accent-strong);
    background: #eaf3f5;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--accent-strong);
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 800;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    outline: 0;
    border-color: currentColor;
    transform: translateY(-1px);
}

.theme-toggle__icon {
    position: relative;
    display: block;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    border-radius: 999px;
    background: currentColor;
    overflow: hidden;
}

.theme-toggle__icon::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -5px;
    width: 15px;
    height: 15px;
    border-radius: 999px;
    background: var(--bg-card);
    transition: opacity 160ms ease, transform 160ms ease;
}

html[data-theme="dark"] .theme-toggle__icon {
    background: transparent;
    border: 2px solid currentColor;
    overflow: visible;
}

html[data-theme="dark"] .theme-toggle__icon::after {
    top: 50%;
    right: 50%;
    width: 5px;
    height: 5px;
    background: currentColor;
    box-shadow:
        0 -8px 0 -2px currentColor,
        0 8px 0 -2px currentColor,
        8px 0 0 -2px currentColor,
        -8px 0 0 -2px currentColor;
    transform: translate(50%, -50%);
}

.user-badge {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--muted);
}

.flash-stack {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.flash {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #ffffff;
}

.flash p {
    margin: 0;
}

.flash-success {
    border-color: rgba(20, 92, 73, 0.34);
}

.flash-warning {
    border-color: rgba(15, 96, 114, 0.35);
}

.flash-danger {
    border-color: rgba(157, 84, 61, 0.4);
}

.panel,
.routine-card,
.selection-card,
.stat-card {
    border: 1px solid var(--line);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    backdrop-filter: none;
}

.panel,
.selection-card,
.stat-card {
    border-radius: var(--radius-lg);
    padding: 24px;
}

.panel-meta {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.panel-hero {
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.panel-hero--wide {
    min-height: 100%;
}

.panel-hero--brand {
    display: grid;
    gap: 22px;
}

.brand-note {
    display: grid;
    gap: 12px;
}

.brand-hero-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-badge--hero {
    width: min(260px, 100%);
    border-radius: 8px;
}

.brand-strands {
    flex: 1;
    min-height: 120px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 34%),
        linear-gradient(135deg, rgba(15, 96, 114, 0.34), rgba(255, 255, 255, 0.06));
    position: relative;
    overflow: hidden;
}

.login-brand {
    width: 210px;
    border-radius: 8px;
    overflow: hidden;
    background: #669eaa;
    margin-bottom: 8px;
}

.login-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.panel-login {
    width: min(100%, 460px);
    margin: 0 auto;
}

.brand-strands::before,
.brand-strands::after {
    content: "";
    position: absolute;
    inset: auto -6% 14% auto;
    width: 74%;
    height: 10px;
    border-radius: 999px;
    background: rgba(11, 80, 96, 0.72);
    transform: rotate(-24deg);
    transform-origin: center;
}

.brand-strands::after {
    inset: 20% auto auto 18%;
    width: 54%;
    height: 6px;
    opacity: 0.5;
    transform: rotate(10deg);
}

.hero-brand-chip {
    width: min(280px, 44%);
    margin-bottom: 18px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(11, 80, 96, 0.14);
}

.panel-actions {
    display: grid;
    gap: 18px;
    align-content: start;
}

.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--accent-strong);
}

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

h1 {
    font-size: clamp(2rem, 3vw, 3.3rem);
    margin-bottom: 12px;
}

h2 {
    font-size: clamp(1.4rem, 2vw, 2rem);
    margin-bottom: 12px;
}

.meta-text,
.routine-card__footer,
.selection-card__meta p,
.simple-list__item p,
.metric-card p,
.field span,
.checkbox-field span,
.empty-data p,
.pdf-placeholder p {
    color: var(--muted);
}

.hero-grid,
.content-grid,
.split-layout {
    display: grid;
    gap: 22px;
}

.hero-grid {
    grid-template-columns: 2fr minmax(300px, 1fr);
}

.content-grid,
.split-layout {
    grid-template-columns: 1fr 1fr;
}

.stack-section,
.stack-form {
    display: grid;
    gap: 18px;
}

.stats-grid,
.routine-grid,
.selection-grid,
.auth-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 22px 0;
}

.routine-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.auth-grid {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 130px);
    align-items: center;
    justify-items: center;
}

.selection-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

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

.field,
.checkbox-field {
    display: grid;
    gap: 8px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
}

.field input::placeholder,
.field textarea::placeholder {
    color: #9bb0b6;
}

.field textarea {
    resize: vertical;
}

.checkbox-field {
    grid-auto-flow: column;
    justify-content: start;
    align-items: center;
}

.checkbox-field--boxed {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px dashed var(--line);
    background: var(--bg-soft);
}

.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    cursor: pointer;
}

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

.button-block {
    width: 100%;
}

.button-primary {
    background: linear-gradient(135deg, #0f6072, #0b5060);
    color: #f8fcfc;
    border-color: var(--accent-strong);
}

.button-secondary {
    background: #eef6f7;
    border-color: #cfe2e6;
    color: var(--accent-strong);
}

.button-ghost {
    background: #ffffff;
    border-color: var(--line);
    color: var(--muted);
}

.button-danger {
    background: #fff0f2;
    border-color: #f0c7cf;
    color: #b64255;
}

.feature-list,
.simple-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.feature-list li,
.simple-list__item {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-card-strong);
    border: 1px solid var(--line);
}

.simple-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.stat-card {
    display: grid;
    gap: 10px;
}

.stat-card span {
    color: var(--muted);
}

.stat-card strong {
    font-size: 2rem;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.stack-card {
    display: grid;
}

.routine-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    border-radius: var(--radius-lg);
}

.routine-definition-card {
    display: grid;
    gap: 16px;
}

.routine-definition-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.routine-definition-card__head h3 {
    margin: 0;
    color: var(--ink);
}

.routine-definition-card .panel-meta {
    display: grid;
    gap: 8px;
    overflow-wrap: anywhere;
}

.routine-card--player {
    min-height: calc(100vh - 190px);
    padding: 28px;
    border-radius: 30px;
}

.routine-card__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.routine-card__header h3 {
    font-size: clamp(1.5rem, 2.8vw, 2.8rem);
    margin-bottom: 0;
}

.routine-card--compact .routine-card__header h3 {
    font-size: 1.15rem;
}

.routine-card__notes {
    margin-bottom: 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--muted);
}

.pill-success {
    background: #e5f5ee;
    color: var(--positive);
}

.pill-warning {
    background: #fff2ec;
    color: var(--warning);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.metric-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--bg-card-strong);
    border: 1px solid var(--line);
}

.metric-card strong {
    display: block;
    font-size: clamp(1.5rem, 2.4vw, 2.8rem);
    margin-bottom: 8px;
}

.metric-card span {
    color: var(--accent-strong);
}

.table-block {
    display: grid;
    gap: 10px;
}

.table-title {
    margin-bottom: 0;
}

.table-scroll {
    overflow: auto;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 540px;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.data-table th {
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.empty-data,
.pdf-placeholder {
    display: grid;
    gap: 8px;
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--line);
    background: var(--bg-soft);
}

.empty-data {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
}

.empty-data::before {
    content: "🧶";
    display: inline-grid;
    grid-row: span 2;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(145deg, #eaf5f7, #fff4ef);
    box-shadow: inset 0 0 0 1px rgba(111, 159, 166, 0.16), 0 10px 24px rgba(24, 50, 58, 0.08);
    font-size: 1.8rem;
    line-height: 1;
}

.empty-data strong,
.empty-data p {
    min-width: 0;
}

.empty-data strong {
    align-self: end;
}

.empty-data p {
    align-self: start;
    margin-bottom: 0;
}

.pdf-frame-wrapper {
    min-height: 68vh;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.pdf-frame {
    width: 100%;
    min-height: 68vh;
    border: 0;
    background: #fff;
}

.selection-card {
    display: grid;
    gap: 16px;
}

.selection-card--checked {
    border-color: var(--accent);
}

.selection-card--simple {
    align-content: start;
    min-height: 220px;
}

.selection-card__top,
.selection-check {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.selection-check {
    justify-content: start;
}

.player-shell {
    min-height: 100vh;
    padding: 26px;
    position: relative;
    background: var(--bg-soft);
}

.player-topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 20px;
}

.player-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.player-brand img {
    width: 158px;
    border-radius: 8px;
    box-shadow: none;
}

.player-topbar__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
}

.player-topbar__actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.player-exit-button {
    border-color: rgba(208, 77, 70, 0.28);
    color: #b73731;
}

.player-exit-button:hover,
.player-exit-button:focus-visible {
    border-color: rgba(208, 77, 70, 0.45);
    background: #fff5f3;
    color: #9f2f2a;
}

.player-stage {
    position: relative;
}

.player-stage--loading {
    min-height: 64vh;
}

.player-slide {
    display: none;
}

.player-slide.is-active {
    display: block;
    animation: slideIn 320ms ease;
}

.player-progress {
    height: 6px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: #d8e5e8;
    overflow: hidden;
}

.player-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #0f6072, #0b5060);
    transform-origin: left center;
}

.player-loading-card {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: calc(100vh - 210px);
    padding: 28px;
    border: 1px solid #d9e7ea;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(24, 50, 58, 0.14);
    color: #18323a;
    text-align: center;
}

.player-loading-card strong {
    color: #6f9fa6;
    font-size: clamp(1.25rem, 2.4vw, 2rem);
}

.player-loading-card p {
    margin: 0;
    color: #788890;
}

.player-loading-card--error {
    min-height: 48vh;
    border-color: #ffd7ca;
    background: #fff6f2;
}

.player-loading-card--error strong {
    color: #d46235;
}

.player-empty {
    display: grid;
    place-items: center;
    min-height: 70vh;
    text-align: center;
    gap: 12px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .hero-grid,
    .content-grid,
    .split-layout,
    .auth-grid,
    .permission-grid {
        grid-template-columns: 1fr;
    }

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

    .topbar,
    .player-topbar,
    .simple-list__item,
    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .brand-lockup,
    .player-brand,
    .brand-hero-head {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .page-shell,
    .auth-wrapper {
        width: min(calc(100% - 24px), var(--content));
        padding-top: 18px;
    }

    .stats-grid,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .player-shell {
        padding: 16px;
    }

    .routine-card--player {
        min-height: auto;
        padding: 20px;
    }

    .brand-badge,
    .player-brand img,
    .hero-brand-chip {
        width: min(100%, 230px);
    }
}

/* System shell */
.app-shell:not(.app-shell--guest) {
    background: #f5f6f7;
}

.system-topbar {
    height: 72px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    background: #6f9fa6;
    border-bottom: 0;
    box-shadow: none;
    color: #ffffff;
    backdrop-filter: none;
}

.system-brand,
.system-brand__mark,
.topbar-actions {
    display: flex;
    align-items: center;
}

.system-brand {
    gap: 12px;
    font-size: 1.32rem;
    font-weight: 800;
}

.system-brand__mark {
    width: 140px;
    height: 52px;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(18, 48, 56, 0.12);
}

.system-brand__mark img {
    width: 100%;
    max-height: 40px;
    height: auto;
    object-fit: contain;
}

.system-greeting {
    color: #ffffff;
    font-weight: 800;
}

.mobile-menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
}

.mobile-menu-button span,
.mobile-menu-button span::before,
.mobile-menu-button span::after {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mobile-menu-button span {
    position: relative;
}

.mobile-menu-button span::before,
.mobile-menu-button span::after {
    content: "";
    position: absolute;
    left: 0;
}

.mobile-menu-button span::before {
    top: -5px;
}

.mobile-menu-button span::after {
    top: 5px;
}

.mobile-menu-backdrop {
    display: none;
}

.button-small {
    min-height: 40px;
    padding: 0 15px;
    border-radius: 5px;
}

.system-topbar .button-ghost {
    background: #ffffff;
    border-color: #ffffff;
    color: #6f9fa6;
    font-weight: 800;
}

.system-topbar .theme-toggle {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.system-topbar .theme-toggle__icon::after {
    background: #6f9fa6;
}

html[data-theme="dark"] .system-topbar .theme-toggle__icon::after {
    background: currentColor;
}

.logout-link {
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    text-decoration: underline;
}

.app-layout {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: calc(100vh - 72px);
    background: #f5f6f7;
}

.sidebar {
    background: #ffffff;
    border-right: 1px solid #edf0f2;
    box-shadow: 8px 0 28px rgba(24, 50, 58, 0.06);
    padding: 26px 28px 40px;
}

.side-nav {
    display: grid;
    gap: 0;
}

.side-link,
.routine-menu-link {
    color: #151a1e;
}

.side-link {
    padding: 9px 0;
    font-size: 1rem;
    font-weight: 800;
}

.side-link:hover,
.side-link.is-active,
.routine-menu-link:hover,
.routine-menu-link.is-active {
    color: #6f9fa6;
}

.side-divider {
    height: 1px;
    margin: 26px 0;
    background: #e3e7ea;
}

.side-section {
    display: grid;
    gap: 5px;
    margin-bottom: 24px;
}

.side-section h2 {
    margin: 0 0 7px;
    color: #6f9fa6;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.routine-menu-link {
    display: block;
    padding: 2px 0 2px 18px;
    font-size: 0.96rem;
    line-height: 1.22;
}

.workspace {
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 38px 48px 64px;
    background: #f5f6f7;
}

.app-shell--routine-focus .mobile-menu-button {
    display: inline-flex;
}

.app-shell--routine-focus .app-layout {
    grid-template-columns: minmax(0, 1fr);
}

.app-shell--routine-focus .sidebar {
    position: fixed;
    inset: 72px auto 0 0;
    z-index: 42;
    width: min(86vw, 320px);
    height: calc(100dvh - 72px);
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 220ms ease;
}

.app-shell--routine-focus .mobile-menu-backdrop {
    position: fixed;
    inset: 72px 0 0;
    z-index: 40;
    display: block;
    border: 0;
    background: rgba(24, 50, 58, 0.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.app-shell--routine-focus.mobile-menu-open {
    overflow: hidden;
}

.app-shell--routine-focus.mobile-menu-open .sidebar {
    transform: translateX(0);
}

.app-shell--routine-focus.mobile-menu-open .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.app-shell--routine-focus .workspace {
    padding: 28px 32px 52px;
}

.system-page {
    width: 100%;
}

.system-page--narrow {
    max-width: 780px;
}

.system-card {
    width: 100%;
    padding: 22px;
    border: 0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(24, 50, 58, 0.1);
}

.table-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.table-page-head h1 {
    margin-bottom: 12px;
    color: #6f9fa6;
    font-size: 1.58rem;
    font-weight: 800;
}

.table-page-head p {
    margin-bottom: 0;
    color: #9aa4ae;
    font-size: 0.88rem;
    font-weight: 700;
}

.system-card--products .table-page-head {
    align-items: center;
    margin-bottom: 12px;
}

.system-card--products .table-page-head h1 {
    margin-bottom: 6px;
}

.system-card--products .table-page-head p {
    font-size: 0.82rem;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.table-actions .button-secondary {
    background: #6f9fa6;
    border-color: #6f9fa6;
    color: #ffffff;
    font-weight: 800;
}

.table-search {
    width: min(290px, 100%);
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #94b4bc;
    border-radius: 5px;
    background: #ffffff;
    color: var(--text);
}

.table-limit {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #94b4bc;
    border-radius: 5px;
    background: #ffffff;
    color: var(--text);
}

.product-search-form {
    min-width: min(100%, 820px);
}

.product-search-form .table-search,
.product-search-form .table-limit {
    min-height: 36px;
    border-radius: 8px;
}

.product-search-form .table-search {
    width: min(260px, 100%);
}

.product-search-form .table-limit {
    max-width: 190px;
}

.product-search-form .button {
    min-height: 36px;
    padding-inline: 16px;
}

.product-filter-panel {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid #dce9ec;
    border-radius: 18px;
    background: #fbfdfe;
}

.product-filter-panel label {
    display: grid;
    flex: 1 1 220px;
    gap: 7px;
}

.product-filter-panel label span {
    color: #71848b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.product-filter-panel select {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #cfe0e5;
    border-radius: 12px;
    background: #ffffff;
    color: #18323a;
    font: inherit;
    outline: none;
}

.product-filter-panel select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(111, 159, 166, 0.14);
}

.product-code-stack {
    display: grid;
    gap: 6px;
}

.product-code-stack strong {
    color: #18323a;
    font-weight: 900;
    white-space: nowrap;
}

.product-import-badge,
.product-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.product-import-badge {
    max-width: 178px;
    min-height: 28px;
    padding: 4px 10px;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
}

.product-import-badge--yes {
    background: #eaf5f7;
    color: #266c78;
}

.product-import-badge--no {
    background: #f0f4f5;
    color: #60737a;
}

.product-flag--yes {
    background: #e5f5ee;
    color: #3f8157;
}

.product-flag--no {
    background: #fff2ec;
    color: #b65a3d;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    color: #6f7c83;
    font-weight: 800;
}

.pagination .is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.data-table tr[data-product-code],
.data-table tr[data-client-id] {
    cursor: pointer;
}

.data-table tr[data-product-code]:focus,
.data-table tr[data-product-code]:hover,
.data-table tr[data-client-id]:focus,
.data-table tr[data-client-id]:hover {
    outline: 0;
    background: #edf7f9;
}

.product-modal[hidden] {
    display: none;
}

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 28px;
}

.product-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 32, 38, 0.42);
    backdrop-filter: blur(4px);
}

.product-modal__panel {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    max-height: min(760px, calc(100vh - 56px));
    overflow: auto;
    padding: 28px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(16, 32, 38, 0.28);
}

.product-modal__panel h2 {
    margin-bottom: 20px;
    color: #18323a;
    font-size: 1.55rem;
}

.product-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #edf3f4;
    color: #44656d;
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
}

.product-detail {
    display: grid;
    gap: 18px;
}

.product-detail__summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.product-detail__card {
    display: grid;
    gap: 6px;
    align-content: start;
    min-height: 96px;
    padding: 14px 16px;
    border: 1px solid #dfe8eb;
    border-radius: 14px;
    background: #f8fbfc;
}

.product-detail__card span,
.product-detail__descriptions > h3,
.product-description-card h3,
.product-detail dt {
    color: #6f9fa6;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-detail__card strong {
    color: #18323a;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25;
}

.product-detail__descriptions {
    display: grid;
    gap: 12px;
}

.product-detail__descriptions > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.product-description-card {
    display: grid;
    gap: 8px;
    align-content: start;
    min-height: 120px;
    padding: 16px;
    border: 1px solid #dfe8eb;
    border-radius: 14px;
    background: #ffffff;
}

.product-description-card.is-empty {
    background: #fafafa;
}

.product-description-card p {
    margin: 0;
    color: #18323a;
    font-weight: 800;
    line-height: 1.45;
}

.product-description-card--wide {
    grid-column: 1 / -1;
}

.product-edit-form,
.product-edit-form__body {
    display: grid;
    gap: 14px;
}

.product-edit-form__body {
    padding: 16px;
    border: 1px solid #dfe8eb;
    border-radius: 14px;
    background: #f8fbfc;
}

.product-edit-form__head h3,
.product-edit-field span,
.product-checkbox-field span {
    margin: 0;
    color: #6f9fa6;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-edit-form__head p {
    margin: 4px 0 0;
    color: #6f7c83;
    font-size: 0.9rem;
    font-weight: 700;
}

.product-edit-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.product-edit-field {
    display: grid;
    gap: 8px;
}

.product-edit-field textarea {
    width: 100%;
    min-height: 92px;
    padding: 11px 12px;
    border: 1px solid #cfe0e5;
    border-radius: 8px;
    background: #ffffff;
    color: #18323a;
    font: inherit;
    font-weight: 700;
    line-height: 1.4;
    outline: none;
    resize: vertical;
}

.product-edit-field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(111, 159, 166, 0.14);
}

.product-checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cfe0e5;
    border-radius: 8px;
    background: #ffffff;
}

.product-checkbox-field input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.product-save-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.product-save-button {
    gap: 8px;
}

.product-save-button.is-saving::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.58);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: productSaveSpin 0.75s linear infinite;
}

.product-save-status {
    min-height: 20px;
    color: #6f7c83;
    font-size: 0.88rem;
    font-weight: 800;
}

.product-save-status.is-success {
    color: #3f8157;
}

.product-save-status.is-error {
    color: #b65a3d;
}

@keyframes productSaveSpin {
    to {
        transform: rotate(360deg);
    }
}

.import-processes {
    display: grid;
    gap: 16px;
}

.import-processes__summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.import-processes__summary article {
    display: grid;
    gap: 6px;
    min-height: 96px;
    padding: 16px;
    border: 1px solid #dfe8eb;
    border-radius: 14px;
    background: #f8fbfc;
}

.import-processes__summary span {
    color: #6f9fa6;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.import-processes__summary strong {
    color: #18323a;
    font-size: 1.55rem;
    font-weight: 900;
}

.import-world-map {
    display: grid;
    overflow: hidden;
    border: 1px solid #d8e5e8;
    border-radius: 14px;
    background: #f8fbfc;
}

.import-world-map__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #d8e5e8;
    background: #ffffff;
}

.import-world-map__head span {
    display: grid;
    gap: 3px;
}

.import-world-map__head small {
    color: #6f9fa6;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.import-world-map__head strong {
    color: #18323a;
    font-size: 1.1rem;
    font-weight: 900;
}

.import-world-map__head em {
    color: #60737a;
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 800;
    text-align: right;
}

.import-world-map__body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
    gap: 12px;
    padding: 12px;
}

.import-world-map__canvas {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border: 1px solid #dfe8eb;
    border-radius: 12px;
    background:
        repeating-linear-gradient(0deg, rgba(47, 128, 168, 0.08) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(90deg, rgba(47, 128, 168, 0.06) 0 1px, transparent 1px 52px),
        radial-gradient(ellipse at 30% 28%, rgba(255, 255, 255, 0.88), transparent 42%),
        linear-gradient(135deg, #e8f6fa 0%, #f8fcfd 54%, #eef8fb 100%);
}

.import-world-map__canvas::before,
.import-world-map__canvas::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.import-world-map__canvas::before {
    inset: 16px;
    border: 1px solid rgba(47, 128, 168, 0.14);
    border-radius: 8px;
    background:
        linear-gradient(90deg, transparent 49.8%, rgba(47, 128, 168, 0.12) 50%, transparent 50.2%),
        linear-gradient(0deg, transparent 49.8%, rgba(47, 128, 168, 0.12) 50%, transparent 50.2%);
    opacity: 0.58;
}

.import-world-map__canvas::after {
    right: 18px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(47, 128, 168, 0.24);
    border-radius: 999px;
    background:
        linear-gradient(45deg, transparent 44%, rgba(47, 128, 168, 0.32) 45%, rgba(47, 128, 168, 0.32) 55%, transparent 56%),
        linear-gradient(-45deg, transparent 44%, rgba(47, 128, 168, 0.16) 45%, rgba(47, 128, 168, 0.16) 55%, transparent 56%);
    opacity: 0.48;
}

.import-world-map__art {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.import-world-map__continent {
    fill: none;
    opacity: 0.42;
    stroke: rgba(47, 128, 168, 0.12);
    stroke-width: 1.2;
}

.import-world-map__continent--small {
    fill: none;
}

.import-world-map__route-line {
    fill: none;
    stroke: rgba(47, 128, 168, 0.42);
    stroke-dasharray: 12 10;
    stroke-linecap: round;
    stroke-width: 3;
}

.import-world-map__route-line--lower {
    stroke: rgba(201, 133, 43, 0.22);
}

.import-world-map__port {
    position: absolute;
    z-index: 3;
    top: 12px;
    padding: 6px 9px;
    border: 1px solid rgba(47, 128, 168, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    color: #496e76;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.import-world-map__port--origin {
    left: 12px;
}

.import-world-map__port--destination {
    right: 12px;
}

.import-world-map__ship {
    position: absolute;
    z-index: 4;
    top: var(--ship-y);
    left: var(--ship-x);
    display: grid;
    grid-template-columns: 34px auto;
    align-items: center;
    gap: 7px;
    width: max-content;
    min-width: 142px;
    max-width: 180px;
    padding: 7px 9px;
    border: 1px solid rgba(160, 194, 202, 0.84);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 16px rgba(24, 50, 58, 0.1);
    color: #18323a;
    text-decoration: none;
    transform: translate(-50%, -50%);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.import-world-map__ship:hover,
.import-world-map__ship:focus-visible {
    border-color: #9cc2c8;
    background: #ffffff;
    outline: 0;
    transform: translate(-50%, -52%);
}

.import-world-map__ship.is-delayed {
    border-color: #efc6cd;
    background: #fff7f8;
}

.import-world-map__ship-icon {
    position: relative;
    width: 32px;
    height: 26px;
}

.import-world-map__ship-icon::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 3px;
    left: 2px;
    height: 12px;
    border-radius: 0 0 12px 12px;
    background: linear-gradient(135deg, #1f6478 0 58%, #4e9b67 58% 77%, #c9852b 77%);
    clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%, 4% 68%);
}

.import-world-map__ship-icon span::before {
    content: "";
    position: absolute;
    bottom: 15px;
    left: 10px;
    width: 18px;
    height: 8px;
    border: 2px solid #b16d24;
    border-radius: 3px;
    background: repeating-linear-gradient(90deg, #f1b24b 0 5px, #d88c31 5px 8px);
}

.import-world-map__ship strong {
    display: block;
    overflow: hidden;
    max-width: 126px;
    color: #18323a;
    font-size: 0.8rem;
    font-weight: 900;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-world-map__ship em {
    display: block;
    overflow: hidden;
    max-width: 126px;
    margin-top: 3px;
    padding: 2px 0 0;
    border-radius: 999px;
    color: #2d748f;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-world-map__ship.is-delayed em {
    color: #b64255;
}

.import-world-map__voyages {
    display: grid;
    align-content: start;
    gap: 8px;
    max-height: 230px;
    overflow: auto;
}

.import-world-map__voyage {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid #dfe8eb;
    border-radius: 10px;
    background: #ffffff;
    color: #18323a;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.import-world-map__voyage:hover,
.import-world-map__voyage:focus-visible {
    border-color: #9cc2c8;
    background: #f8fbfc;
    outline: 0;
}

.import-world-map__voyage.is-delayed {
    border-color: #efc6cd;
    background: #fff7f8;
}

.import-world-map__voyage-top,
.import-world-map__voyage-dates {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.import-world-map__voyage-top strong {
    overflow: hidden;
    color: #18323a;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-world-map__voyage-top em {
    color: #2d748f;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
}

.import-world-map__voyage.is-delayed .import-world-map__voyage-top em {
    color: #b64255;
}

.import-world-map__voyage small {
    overflow: hidden;
    color: #60737a;
    font-size: 0.76rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-world-map__progress {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6eef0;
}

.import-world-map__progress span {
    display: block;
    width: var(--progress);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f80a8, #4e9b67);
}

.import-world-map__voyage.is-delayed .import-world-map__progress span {
    background: linear-gradient(90deg, #b64255, #d39a34);
}

.import-world-map__voyage-dates b {
    color: #496e76;
    font-size: 0.72rem;
    font-weight: 900;
}

.import-process-map {
    display: grid;
    overflow: hidden;
    border: 1px solid #d8e5e8;
    border-radius: 14px;
    background: #f8fbfc;
}

.import-process-map__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #d8e5e8;
    background: #ffffff;
}

.import-process-map__head span:first-child {
    display: grid;
    gap: 3px;
}

.import-process-map__head small {
    color: #6f9fa6;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.import-process-map__head strong {
    color: #18323a;
    font-size: 1.1rem;
    font-weight: 900;
}

.import-process-map__legend {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #60737a;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.import-process-map__legend b {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #c9852b;
}

.import-process-map__legend b:nth-of-type(2) {
    background: #2f80a8;
}

.import-process-map__legend b:nth-of-type(3) {
    background: #4e9b67;
}

.import-process-map__stage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    overflow-x: auto;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 250, 251, 0.94)),
        repeating-linear-gradient(0deg, rgba(47, 128, 168, 0.08) 0 2px, transparent 2px 22px);
}

.import-process-map__stage {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 170px;
    min-height: 210px;
    padding: 12px;
    border-right: 1px solid rgba(216, 229, 232, 0.86);
}

.import-process-map__stage:last-child {
    border-right: 0;
}

.import-process-map__stage header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
}

.import-process-map__stage header span {
    color: #496e76;
    font-size: 0.78rem;
    font-weight: 900;
}

.import-process-map__stage-title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.import-process-map__stage-title em {
    color: #7a8e94;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.import-process-map__stage header strong {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ffffff;
    color: #18323a;
    font-weight: 900;
}

.import-process-map__stage p {
    margin: 0;
    color: #8b9ca2;
    font-size: 0.82rem;
    font-weight: 800;
}

.import-process-map__fleet {
    display: grid;
    gap: 8px;
    max-height: 280px;
    overflow: auto;
    padding-right: 2px;
}

.import-process-map__marker {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 3px 8px;
    align-items: center;
    min-height: 68px;
    padding: 8px;
    border: 1px solid rgba(216, 229, 232, 0.92);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 18px rgba(24, 50, 58, 0.05);
}

.import-process-map__marker:hover {
    border-color: #9cc2c8;
    background: #ffffff;
}

.import-process-map__icon {
    position: relative;
    grid-row: span 3;
    width: 30px;
    height: 30px;
}

.import-process-map__icon::before {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 5px;
    left: 1px;
    height: 10px;
    border-radius: 0 0 12px 12px;
    background: #2f80a8;
    clip-path: polygon(0 0, 100% 0, 84% 100%, 12% 100%);
}

.import-process-map__icon span::before {
    content: "";
    position: absolute;
    left: 11px;
    bottom: 15px;
    width: 12px;
    height: 8px;
    border: 2px solid #2f80a8;
    border-radius: 3px 3px 0 0;
    background: #ffffff;
}

.import-process-map__marker--boarding .import-process-map__icon::before,
.import-process-map__marker--pending .import-process-map__icon::before {
    right: 4px;
    bottom: 6px;
    left: 4px;
    height: 15px;
    border: 2px solid #b16d24;
    border-radius: 4px;
    background: repeating-linear-gradient(90deg, #f1b24b 0 5px, #d88c31 5px 8px);
    clip-path: none;
}

.import-process-map__marker--boarding .import-process-map__icon span::before {
    left: 4px;
    bottom: 22px;
    width: 22px;
    height: 3px;
    border: 0;
    border-radius: 999px;
    background: #9a6322;
    transform: rotate(-18deg);
}

.import-process-map__marker--pending .import-process-map__icon {
    opacity: 0.62;
}

.import-process-map__marker--clearance .import-process-map__icon::before {
    background: #4e9b67;
}

.import-process-map__marker--scheduled .import-process-map__icon,
.import-process-map__marker--unscheduled .import-process-map__icon {
    opacity: 0.55;
}

.import-process-map__marker strong {
    overflow: hidden;
    color: #18323a;
    font-size: 0.82rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-process-map__marker small {
    overflow: hidden;
    color: #60737a;
    font-size: 0.72rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-process-map__marker-quantity {
    justify-self: start;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef6f7;
    color: #315f64;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.import-processes__toolbar {
    display: flex;
    justify-content: flex-end;
}

.import-processes__toolbar input {
    width: min(360px, 100%);
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #cfe0e5;
    border-radius: 8px;
    background: #ffffff;
    color: #18323a;
    font: inherit;
    outline: none;
}

.import-processes__toolbar input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(111, 159, 166, 0.14);
}

.import-processes__list {
    display: grid;
    gap: 12px;
}

.import-process {
    border: 1px solid #dfe8eb;
    border-left: 5px solid #9eb5bb;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

.import-process--ok {
    border-left-color: #4e9b67;
}

.import-process--warning {
    border-left-color: #d39a34;
}

.import-process--danger {
    border-left-color: #c95858;
}

.import-process--transit {
    border-left-color: #2f80a8;
}

.import-process--pending {
    border-left-color: #c9852b;
}

.import-process summary {
    display: grid;
    grid-template-columns:
        minmax(250px, 1.2fr)
        minmax(86px, 0.36fr)
        minmax(260px, 1fr)
        minmax(72px, 0.28fr)
        minmax(104px, 0.4fr)
        minmax(82px, 0.3fr)
        minmax(112px, 0.42fr)
        156px;
    gap: 10px 18px;
    align-items: center;
    min-height: 84px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
}

.import-process summary::-webkit-details-marker {
    display: none;
}

.import-process summary:hover,
.import-process[open] summary {
    background: #f8fbfc;
}

.import-process summary > span {
    display: grid;
    gap: 4px;
    align-content: center;
    min-width: 0;
    min-height: 48px;
}

.import-process summary > span:not(.import-process__status) {
    justify-self: stretch;
}

.import-process summary small {
    overflow: hidden;
    color: #71848b;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-process summary strong {
    overflow: hidden;
    color: #18323a;
    font-size: 1.02rem;
    font-weight: 900;
    line-height: 1.14;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-process__main small {
    color: #496e76;
    font-size: 0.78rem;
}

.import-process summary > span:nth-child(6),
.import-process summary > span:nth-child(7) {
    justify-items: end;
    text-align: right;
}

.import-process summary > span:nth-child(8) {
    justify-self: stretch;
}

.import-process__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: stretch;
    width: 100%;
    min-height: 28px;
    min-width: 0;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.import-process__status--ok {
    background: #e5f5ee;
    color: #3f8157;
}

.import-process__status--warning {
    background: #fff5dc;
    color: #8a6420;
}

.import-process__status--danger {
    background: #fff0f2;
    color: #b64255;
}

.import-process__status--transit {
    background: #e6f3f7;
    color: #2d748f;
}

.import-process__status--pending {
    background: #fff3dd;
    color: #9a6322;
}

.import-process__status--neutral {
    background: #f0f4f5;
    color: #60737a;
}

.import-process__pending-cell strong {
    color: #9a6322;
}

.import-process__details {
    display: grid;
    gap: 16px;
    padding: 0 18px 18px;
}

.import-process__modal-card {
    display: grid;
    gap: 16px;
}

.import-process__modal-backdrop,
.import-process__modal-close {
    display: none;
}

.import-process__modal-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #dfe8eb;
}

.import-process__modal-head > span:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.import-process__modal-head small {
    color: #6f9fa6;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.import-process__modal-head strong {
    color: #18323a;
    font-size: 1.4rem;
    font-weight: 900;
}

.import-process__modal-head em {
    overflow: hidden;
    color: #60737a;
    font-size: 0.94rem;
    font-style: normal;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-processes--page .import-process[open] {
    overflow: visible;
}

.import-processes--page .import-process[open] > summary {
    background: #edf7f9;
}

.import-processes--page .import-process__details {
    display: contents;
    padding: 0;
}

.import-processes--page .import-process[open] .import-process__modal-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 74;
    border: 0;
    background: rgba(16, 32, 38, 0.44);
    backdrop-filter: blur(4px);
    cursor: default;
}

.import-processes--page .import-process[open] .import-process__modal-card {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 75;
    width: min(1180px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 24px;
    border: 1px solid #d8e5e8;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(16, 32, 38, 0.28);
    transform: translate(-50%, -50%);
}

.import-processes--page .import-process__modal-close {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #edf3f4;
    color: #44656d;
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
}

.import-processes--page .import-process__modal-close:hover,
.import-processes--page .import-process__modal-close:focus-visible {
    background: #dfeaec;
    outline: 0;
}

.import-processes--page .import-process[open] .import-process-route {
    border: 1px solid #dfe8eb;
    border-radius: 14px;
}

.import-process-route {
    --route-progress: 12%;
    --delay-position: var(--route-progress);
    --route-waterline: 32px;
    display: grid;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid #dfe8eb;
    border-bottom: 1px solid #dfe8eb;
    background: linear-gradient(180deg, #fbfdfe 0%, #f6fbfc 100%);
}

.import-process-route--boarding {
    --route-progress: 18%;
}

.import-process-route--sailing {
    --route-progress: 50%;
}

.import-process-route--clearance {
    --route-progress: 84%;
}

.import-process-route--pending,
.import-process-route--unscheduled {
    --route-progress: 8%;
}

.import-process-route__places,
.import-process-route__dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 14px;
}

.import-process-route__places span,
.import-process-route__dates span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.import-process-route__places span:last-child,
.import-process-route__dates span:last-child {
    justify-items: end;
    text-align: right;
}

.import-process-route__places small {
    color: #6f9fa6;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.import-process-route__places strong {
    overflow: hidden;
    color: #18323a;
    font-size: 1rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-process-route__dates {
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
    color: #60737a;
    font-size: 0.84rem;
    font-weight: 800;
}

.import-process-route__dates b {
    color: #18323a;
}

.import-process-route__track {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 22px;
    gap: 10px;
    align-items: center;
    min-height: 96px;
    padding: 0 18px;
}

.import-process-route__node {
    width: 18px;
    height: 18px;
    border: 3px solid #76a8b0;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 0 0 5px rgba(118, 168, 176, 0.13);
    transform: translateY(10px);
}

.import-process-route__node--destination {
    border-color: #4e9b67;
    box-shadow: 0 0 0 5px rgba(78, 155, 103, 0.13);
}

.import-process-route__line {
    position: relative;
    min-height: 88px;
}

.import-process-route__line::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: var(--route-waterline);
    left: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #9cc2c8, #6f9fa6 45%, #4e9b67);
}

.import-process-route__line::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: calc(var(--route-waterline) - 10px);
    left: 0;
    height: 5px;
    background: repeating-linear-gradient(90deg, rgba(47, 128, 168, 0.18) 0 14px, transparent 14px 28px);
}

.import-process-route__dock {
    display: none;
}

.import-process-route__delay {
    display: none;
    position: absolute;
    bottom: calc(var(--route-waterline) + 38px);
    left: var(--delay-position);
    z-index: 4;
    width: 36px;
    height: 36px;
    transform: translateX(-50%);
}

.import-process-route__delay::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid #b64255;
    border-radius: 999px;
    background: #fff5f7;
    box-shadow: 0 8px 18px rgba(182, 66, 85, 0.18);
}

.import-process-route__delay::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 16px;
    width: 3px;
    height: 12px;
    border-radius: 999px;
    background: #b64255;
    transform: rotate(-35deg);
    transform-origin: 50% 100%;
}

.import-process-route__delay span::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 17px;
    width: 10px;
    height: 3px;
    border-radius: 999px;
    background: #b64255;
}

.import-process-route__delay span::after {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff5f7;
    border-radius: 999px;
    background: #b64255;
}

.import-process-route--delayed .import-process-route__delay {
    display: block;
}

.import-process-route--delayed-prevetd {
    --delay-position: 18%;
}

.import-process-route--delayed-preveta {
    --delay-position: var(--route-progress);
}

.import-process-route__ship {
    position: absolute;
    bottom: calc(var(--route-waterline) + 2px);
    left: var(--route-progress);
    z-index: 3;
    width: 86px;
    height: 44px;
    transform: translateX(-50%);
    transition: left 180ms ease;
}

.import-process-route__ship::before {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 0;
    left: 6px;
    height: 18px;
    border-radius: 0 0 16px 16px;
    background: linear-gradient(135deg, #1f6478 0 58%, #4e9b67 58% 77%, #c9852b 77%);
    clip-path: polygon(0 0, 100% 0, 89% 100%, 16% 100%, 4% 68%);
    box-shadow: inset 0 -4px 0 rgba(24, 50, 58, 0.12);
}

.import-process-route__ship::after {
    content: "";
    position: absolute;
    right: 13px;
    bottom: 18px;
    left: 15px;
    height: 4px;
    border-radius: 999px;
    background: #7eaeb5;
}

.import-process-route__ship span::before {
    content: "";
    position: absolute;
    left: 20px;
    bottom: 22px;
    width: 48px;
    height: 17px;
    border: 2px solid #b16d24;
    border-radius: 4px 4px 2px 2px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 9px),
        repeating-linear-gradient(90deg, #f1b24b 0 13px, #d88c31 13px 16px);
}

.import-process-route__ship span::after {
    content: "";
    position: absolute;
    bottom: 20px;
    left: 8px;
    width: 18px;
    height: 24px;
    border: 3px solid #2f80a8;
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
    background:
        linear-gradient(#dff2f5 0 8px, #ffffff 8px);
    box-shadow: inset 0 -5px 0 rgba(47, 128, 168, 0.18);
}

.import-process-route__container {
    display: none;
    position: absolute;
    bottom: 35px;
    left: calc(var(--route-progress) + 20px);
    width: 26px;
    height: 15px;
    border: 2px solid #b16d24;
    border-radius: 3px;
    background: repeating-linear-gradient(90deg, #f1b24b 0 5px, #d88c31 5px 8px);
    transform: translateX(-50%);
}

.import-process-route--boarding {
    background: linear-gradient(180deg, #fffdf8 0%, #f7fbfc 100%);
}

.import-process-route--boarding .import-process-route__line::before {
    background: linear-gradient(90deg, #c9852b 0 18%, #cfdde0 18% 100%);
}

.import-process-route--boarding .import-process-route__line::after {
    right: auto;
    bottom: calc(var(--route-waterline) - 8px);
    left: 0;
    width: 82px;
    height: 15px;
    border-radius: 4px;
    background: repeating-linear-gradient(90deg, #c8d3d6 0 9px, #aebdc1 9px 11px);
}

.import-process-route--boarding .import-process-route__dock {
    display: block;
    position: absolute;
    bottom: calc(var(--route-waterline) + 1px);
    left: 28px;
    width: 44px;
    height: 28px;
}

.import-process-route--boarding .import-process-route__dock::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 4px;
    width: 4px;
    height: 28px;
    border-radius: 999px;
    background: #9a6322;
    box-shadow: 22px 0 0 #9a6322;
}

.import-process-route--boarding .import-process-route__dock::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 4px;
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: #9a6322;
    transform: rotate(-18deg);
    transform-origin: left center;
}

.import-process-route--boarding .import-process-route__ship {
    display: none;
}

.import-process-route--boarding .import-process-route__container {
    display: block;
    bottom: calc(var(--route-waterline) + 11px);
    left: 50px;
    transform: none;
}

.import-process-route--boarding .import-process-route__delay {
    bottom: calc(var(--route-waterline) + 46px);
    left: 88px;
    transform: none;
}

.import-process-route--pending .import-process-route__ship,
.import-process-route--pending .import-process-route__container,
.import-process-route--unscheduled .import-process-route__ship,
.import-process-route--unscheduled .import-process-route__container {
    opacity: 0.45;
}

.import-process__dates {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.import-process-date-form {
    display: grid;
    gap: 12px;
}

.import-process-date {
    display: grid;
    gap: 6px;
    min-height: 76px;
    padding: 12px;
    border: 1px solid #dfe8eb;
    border-left: 4px solid #bfd1d6;
    border-radius: 10px;
    background: #ffffff;
}

.import-process-date span {
    color: #6f9fa6;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.import-process-date strong {
    color: #18323a;
    font-size: 1rem;
    font-weight: 900;
}

.import-process-date.is-filled {
    border-left-color: #4e9b67;
    background: #f8fcfa;
}

.import-process-date.is-delayed {
    border-color: #efc6cd;
    border-left-color: #b64255;
    background: #fff7f8;
}

.import-process-date.is-empty {
    background: #fbfcfd;
}

.import-process-date.is-empty strong {
    color: #9aa8ad;
}

.import-process-date input {
    width: 100%;
    min-height: 38px;
    padding: 0 9px;
    border: 1px solid #cfe0e5;
    border-radius: 8px;
    background: #ffffff;
    color: #18323a;
    font: inherit;
    font-weight: 900;
    outline: none;
}

.import-process-date input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(111, 159, 166, 0.14);
}

.import-process-date-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.import-process-date-form__status {
    min-height: 20px;
    color: #60737a;
    font-size: 0.86rem;
    font-weight: 800;
}

.import-process-date-form__status.is-success {
    color: #3f8157;
}

.import-process-date-form__status.is-error {
    color: #b64255;
}

.import-process-date-form__button.is-saving::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.58);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: productSaveSpin 0.75s linear infinite;
}

.import-process__delay-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.import-process__delay-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #efc6cd;
    border-radius: 999px;
    background: #fff7f8;
    color: #b64255;
    font-size: 0.8rem;
    font-weight: 900;
}

.import-process__delay-badges b {
    margin-left: 4px;
    color: #8e2e3f;
}

.import-process__info {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.import-process__info div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #dfe8eb;
    border-radius: 10px;
    background: #f8fbfc;
}

.import-process__info dt {
    color: #6f9fa6;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.import-process__info dd {
    overflow: hidden;
    margin: 0;
    color: #18323a;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-process__product-pending {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px dashed #d7a45d;
    border-radius: 10px;
    background: #fff8ec;
}

.import-process__product-pending strong {
    color: #9a6322;
    font-weight: 900;
}

.import-process__product-pending span {
    color: #6f7c83;
    font-weight: 800;
}

.routine-card--compact .import-processes__summary,
.routine-card--preview .import-processes__summary,
.routine-card--player .import-processes__summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.routine-card--compact .import-process summary,
.routine-card--preview .import-process summary {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(82px, auto));
}

.routine-card--player .import-process summary {
    grid-template-columns:
        minmax(230px, 0.85fr)
        minmax(320px, 1.15fr)
        minmax(84px, 0.24fr)
        minmax(128px, 0.34fr)
        minmax(168px, 0.45fr);
    gap: 12px 18px;
    min-height: 86px;
    padding: 13px 20px;
}

.routine-card--compact .import-process__info,
.routine-card--preview .import-process__info,
.routine-card--player .import-process__info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.routine-card--compact .import-process__dates,
.routine-card--preview .import-process__dates,
.routine-card--player .import-process__dates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.routine-card--compact .import-process summary > span:nth-child(2),
.routine-card--compact .import-process summary > span:nth-child(4),
.routine-card--compact .import-process summary > span:nth-child(5),
.routine-card--preview .import-process summary > span:nth-child(2),
.routine-card--preview .import-process summary > span:nth-child(4),
.routine-card--preview .import-process summary > span:nth-child(5),
.routine-card--player .import-process summary > span:nth-child(2),
.routine-card--player .import-process summary > span:nth-child(4),
.routine-card--player .import-process summary > span:nth-child(5) {
    display: none;
}

.routine-card--player .import-processes {
    gap: 18px;
}

.routine-card--player .import-processes__list {
    gap: 10px;
}

.routine-card--player .import-process summary > span {
    min-height: 42px;
}

.routine-card--player .import-process summary > span:nth-child(3) {
    justify-items: start;
    text-align: left;
}

.routine-card--player .import-process summary > span:nth-child(6),
.routine-card--player .import-process summary > span:nth-child(7) {
    justify-items: end;
    text-align: right;
}

.routine-card--player .import-process summary strong {
    font-size: clamp(0.92rem, 1vw, 1.08rem);
}

.routine-card--player .import-process summary small {
    font-size: clamp(0.66rem, 0.72vw, 0.76rem);
}

.routine-card--player .import-process__status {
    min-height: 38px;
    align-self: center;
}

.product-detail dl,
.product-detail dl div {
    display: grid;
    gap: 6px;
}

.product-detail dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    gap: 14px;
}

.product-detail dl div {
    padding: 14px 16px;
    border: 1px solid #dfe8eb;
    border-radius: 10px;
    background: #f8fbfc;
}

.product-detail dd {
    margin: 0;
    color: #18323a;
    font-weight: 800;
}

.client-modal__panel {
    width: min(920px, 100%);
}

.client-detail {
    display: grid;
    gap: 18px;
}

.client-detail-loading {
    padding: 24px;
    border: 1px dashed #d5e4e7;
    border-radius: 14px;
    background: #f8fbfc;
    color: #6f7f86;
    font-weight: 800;
    text-align: center;
}

.client-detail-section {
    display: grid;
    gap: 14px;
}

.client-detail-section + .client-detail-section {
    padding-top: 4px;
}

.client-detail-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.client-detail-section__head h3 {
    margin: 0;
    color: #18323a;
    font-size: 1.04rem;
}

.client-detail-section__head span {
    color: #71838a;
    font-size: 0.82rem;
    font-weight: 900;
}

.client-detail-list {
    display: grid;
    gap: 10px;
}

.client-product-row,
.client-note-row,
.client-title-row {
    display: grid;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #dfe8eb;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(24, 50, 58, 0.06);
}

.client-product-row {
    grid-template-columns: minmax(110px, 0.28fr) minmax(0, 1fr);
}

.client-note-row {
    grid-template-columns: minmax(120px, 0.35fr) minmax(110px, 0.26fr) max-content max-content;
}

.client-title-row {
    grid-template-columns: minmax(210px, 0.9fr) minmax(300px, 1.15fr) minmax(250px, 0.9fr);
    align-items: stretch;
    border-left: 6px solid #c9d6da;
}

.client-title-row--open {
    border-left-color: #dfbd4c;
    background: #fffaf0;
}

.client-title-row--paid {
    border-left-color: #80c887;
    background: #f2fbf3;
}

.client-title-row--credit {
    border-left-color: #70afbd;
    background: #f1f9fb;
}

.client-row-code,
.client-row-value {
    color: #18323a;
    font-weight: 900;
}

.client-row-muted {
    display: block;
    color: #71838a;
    font-weight: 800;
}

.client-title-main,
.client-title-dates,
.client-title-values {
    display: grid;
    align-content: center;
    gap: 6px;
    min-width: 0;
}

.client-title-main small,
.client-title-dates small,
.client-title-values small {
    display: block;
    color: #71838a;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.client-title-dates {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 14px;
}

.client-title-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    text-align: right;
}

.client-title-dates strong,
.client-title-values strong {
    display: block;
    color: #18323a;
    font-weight: 900;
    white-space: nowrap;
}

.client-title-values strong {
    font-variant-numeric: tabular-nums;
}

.client-title-status {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #52656c;
    font-size: 0.75rem;
    font-weight: 900;
}

.client-note__pdf-link {
    margin-top: 0;
}

.address-modal__panel {
    width: min(1040px, 100%);
}

.address-detail {
    display: grid;
    gap: 16px;
}

.address-detail-loading {
    padding: 24px;
    border: 1px dashed #d5e4e7;
    border-radius: 14px;
    background: #f8fbfc;
    color: #6f7f86;
    font-weight: 800;
    text-align: center;
}

.address-detail-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.address-detail-summary article {
    padding: 13px 14px;
    border: 1px solid #dce9ec;
    border-radius: 13px;
    background: #f8fbfc;
}

.address-detail-summary span,
.address-piece-card span {
    display: block;
    color: #71838a;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.address-detail-summary strong {
    display: block;
    margin-top: 5px;
    color: #18323a;
    font-size: 1.12rem;
}

.address-tree {
    display: grid;
    gap: 10px;
}

.address-product {
    border: 1px solid #dce9ec;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

.address-product summary {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) max-content max-content max-content;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    color: #18323a;
    font-weight: 900;
    list-style: none;
}

.address-product summary::-webkit-details-marker {
    display: none;
}

.address-product summary::before {
    content: "+";
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: #eaf3f5;
    color: #6f9fa6;
}

.address-product[open] summary::before {
    content: "-";
}

.address-product summary span:first-child {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.address-product summary small {
    overflow: hidden;
    color: #6f7f86;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.address-piece-list {
    display: grid;
    gap: 10px;
    padding: 0 14px 14px;
}

.address-piece-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fbfc;
}

.address-piece-card strong {
    display: block;
    margin-top: 4px;
    color: #18323a;
    font-weight: 900;
}

.has-modal {
    overflow: hidden;
}

.system-card .routine-card--page {
    gap: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.system-card .routine-card--page .routine-card__header,
.system-card .routine-card--page .routine-card__notes {
    display: none;
}

.system-card .routine-card__footer {
    color: #9aa4ae;
    font-size: 0.84rem;
}

.system-card .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 14px;
}

.system-card .metric-card {
    padding: 14px 16px;
    border-radius: 8px;
    background: #f8fbfc;
}

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

.system-card .routine-custom--products .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.system-card .routine-custom--products .metric-card {
    min-height: 64px;
    padding: 10px 14px;
    border-radius: 12px;
}

.system-card .routine-custom--products .metric-card p {
    font-size: 0.78rem;
}

.system-card .routine-custom--products .metric-card strong {
    font-size: 1.12rem;
}

.system-card .table-scroll {
    border-color: #dfe6e8;
    border-radius: 5px;
}

.system-card .data-table {
    min-width: 760px;
    font-size: 0.95rem;
}

.system-card .data-table th,
.system-card .data-table td {
    padding: 10px 14px;
    border-bottom-color: #e4e9eb;
}

.system-card .data-table th {
    background: #eef2f6;
    color: #6f9fa6;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.system-card .data-table tbody tr:hover {
    background: #f8fbfc;
}

/* Saldo em estoque */
.stock-balance {
    display: grid;
    gap: 16px;
    color: #18323a;
}

.stock-balance__summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.stock-balance__summary article {
    padding: 14px 16px;
    border: 1px solid #dce9ec;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f8fbfc);
}

.stock-balance__summary span,
.stock-balance__search span {
    display: block;
    color: #74858c;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stock-balance__summary strong {
    display: block;
    margin-top: 7px;
    color: #18323a;
    font-size: clamp(1.08rem, 1.5vw, 1.55rem);
    line-height: 1.05;
}

.stock-balance__toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid #dce9ec;
    border-radius: 14px;
    background: #f8fbfc;
}

.stock-balance__toolbar p {
    margin: 0;
    color: #74858c;
    font-weight: 800;
}

.stock-balance__search {
    display: grid;
    gap: 7px;
    width: min(520px, 100%);
}

.stock-balance__search input {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #bfd4d9;
    border-radius: 12px;
    background: #ffffff;
    color: #18323a;
    font: inherit;
}

.stock-balance__search input:focus {
    outline: 3px solid rgba(111, 159, 166, 0.2);
    border-color: #6f9fa6;
}

.stock-balance__table-wrap {
    overflow: auto;
    border: 1px solid #dce9ec;
    border-radius: 14px;
}

.stock-balance-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.9rem;
}

.stock-balance-table th,
.stock-balance-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e5eef1;
    text-align: left;
    vertical-align: middle;
}

.stock-balance-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef5f7;
    color: #577680;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stock-balance-table tbody tr:hover {
    background: #f7fbfc;
}

.stock-balance-table__number {
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.stock-balance-products {
    overflow: hidden;
    border: 1px solid #dce9ec;
    border-radius: 16px;
    background: #ffffff;
}

.stock-balance-products__head,
.stock-balance-product summary {
    display: grid;
    grid-template-columns:
        minmax(260px, 2fr)
        minmax(72px, 0.45fr)
        minmax(120px, 0.75fr)
        minmax(100px, 0.65fr)
        minmax(120px, 0.8fr)
        minmax(125px, 0.85fr)
        minmax(125px, 0.85fr)
        minmax(82px, 0.55fr)
        minmax(76px, 0.5fr);
    gap: 12px;
    align-items: center;
}

.stock-balance-products__head {
    padding: 11px 16px;
    background: #eef5f7;
    color: #577680;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stock-balance-product {
    border-top: 1px solid #e5eef1;
}

.stock-balance-product:first-of-type {
    border-top: 0;
}

.stock-balance-product summary {
    position: relative;
    min-height: 74px;
    padding: 14px 46px 14px 16px;
    cursor: pointer;
    list-style: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.stock-balance-product summary::-webkit-details-marker {
    display: none;
}

.stock-balance-product summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 17px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #edf6f7;
    color: #6f9fa6;
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 23px;
    text-align: center;
    transform: translateY(-50%);
}

.stock-balance-product[open] summary {
    background: #f8fbfc;
    box-shadow: inset 4px 0 0 #6f9fa6;
}

.stock-balance-product[open] summary::after {
    content: "-";
}

.stock-balance-product summary > span {
    min-width: 0;
}

.stock-balance-product strong {
    color: #18323a;
    font-weight: 900;
}

.stock-balance-product small {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: #74858c;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
}

.stock-balance-product__main strong {
    display: block;
    font-size: 1.02rem;
}

.stock-balance-product__list {
    overflow: hidden;
    color: #40565d;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-balance-product__metric {
    text-align: right;
    white-space: nowrap;
}

.stock-balance-product__details {
    padding: 0 16px 16px;
    background: #fbfdfe;
}

.stock-balance__table-wrap--nested {
    border-radius: 12px;
    background: #ffffff;
}

.stock-balance-table--nested {
    min-width: 720px;
    font-size: 0.86rem;
}

.stock-balance-table--nested th {
    position: static;
}

.stock-balance__preview-note {
    margin: -4px 0 0;
    color: #74858c;
    font-weight: 800;
}

/* Notas fiscais */
.invoice-notes {
    display: grid;
    gap: 16px;
    color: #18323a;
}

.invoice-notes__filters {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid #dce9ec;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbfc, #eef7f8);
}

.invoice-notes__filters div,
.invoice-notes__filters label,
.invoice-notes__search {
    display: grid;
    gap: 7px;
}

.invoice-notes__filters span,
.invoice-notes__summary span,
.invoice-notes__search span {
    display: block;
    color: #74858c;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invoice-notes__filters strong {
    color: #18323a;
    font-size: 1.25rem;
    font-weight: 900;
}

.invoice-notes__filters select,
.invoice-notes__search input {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #bfd4d9;
    border-radius: 12px;
    background: #ffffff;
    color: #18323a;
    font: inherit;
}

.invoice-notes__filters select:focus,
.invoice-notes__search input:focus {
    outline: 3px solid rgba(111, 159, 166, 0.2);
    border-color: #6f9fa6;
}

.invoice-notes__summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.invoice-notes__summary article {
    padding: 14px 16px;
    border: 1px solid #dce9ec;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f8fbfc);
}

.invoice-notes__summary strong {
    display: block;
    margin-top: 7px;
    color: #18323a;
    font-size: clamp(1.08rem, 1.5vw, 1.55rem);
    line-height: 1.05;
}

.invoice-notes__toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid #dce9ec;
    border-radius: 14px;
    background: #f8fbfc;
}

.invoice-notes__toolbar p {
    margin: 0;
    color: #74858c;
    font-weight: 800;
}

.invoice-notes__search {
    width: min(520px, 100%);
}

.invoice-notes__table-wrap {
    overflow: auto;
    border: 1px solid #dce9ec;
    border-radius: 16px;
    background: #ffffff;
}

.invoice-notes-table {
    width: 100%;
    min-width: 1260px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.88rem;
}

.invoice-notes-table th,
.invoice-notes-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e5eef1;
    text-align: left;
    vertical-align: middle;
}

.invoice-notes-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef5f7;
    color: #577680;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.invoice-notes-table tbody tr:hover {
    background: #f7fbfc;
}

.invoice-notes-table__branch {
    display: inline-grid;
    min-width: 34px;
    min-height: 25px;
    place-items: center;
    border: 1px solid #cfe1e5;
    border-radius: 999px;
    background: #f8fbfc;
    color: #496e76;
    font-weight: 900;
}

.invoice-notes-table__number {
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.invoice-notes-list {
    display: grid;
    gap: 10px;
}

.invoice-notes-list__head,
.invoice-note summary {
    display: grid;
    grid-template-columns: 58px minmax(240px, 1.45fr) 74px minmax(135px, 0.75fr) 120px 112px 112px 92px;
    gap: 12px;
    align-items: center;
}

.invoice-notes-list__head {
    padding: 0 18px 4px;
    color: #74858c;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.invoice-note {
    overflow: hidden;
    border: 1px solid #dce9ec;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(24, 50, 58, 0.05);
}

.invoice-note[hidden] {
    display: none;
}

.invoice-note summary {
    min-height: 82px;
    padding: 15px 18px;
    cursor: pointer;
    list-style: none;
    transition: background 160ms ease;
}

.invoice-note summary::-webkit-details-marker {
    display: none;
}

.invoice-note summary:hover,
.invoice-note[open] summary {
    background: #f8fbfc;
}

.invoice-note__main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.invoice-note__main strong,
.invoice-note__cell strong {
    color: #18323a;
    font-weight: 900;
}

.invoice-note__main small,
.invoice-note__cell small {
    display: block;
    overflow: hidden;
    color: #74858c;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-note__cell {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.invoice-note__quantity {
    text-align: right;
}

.invoice-note__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.invoice-note__pdf-link {
    margin-top: 0;
}

.invoice-note__expand {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef5f7;
    color: #577680;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.invoice-note[open] .invoice-note__expand {
    background: #e1f1e7;
    color: #467d58;
}

.invoice-note__items {
    display: grid;
    gap: 12px;
    padding: 0 18px 18px;
    border-top: 1px solid #e5eef1;
    background: #fbfdfe;
}

.invoice-note__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    color: #74858c;
    font-size: 0.86rem;
    font-weight: 800;
}

.invoice-notes__table-wrap--nested {
    border-radius: 12px;
}

.invoice-notes-table--nested {
    min-width: 760px;
    font-size: 0.84rem;
}

.invoice-notes-table--nested th {
    position: static;
}

.invoice-notes__preview-note {
    margin: -4px 0 0;
    color: #74858c;
    font-weight: 800;
}

/* Vendas por grupo */
.sales-group {
    display: grid;
    gap: 16px;
    color: #18323a;
}

.sales-group__summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.sales-group__summary article {
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid #dce9ec;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f5fafb 100%);
    box-shadow: 0 14px 30px rgba(24, 50, 58, 0.06);
}

.sales-group__summary span,
.sales-group__search span {
    display: block;
    color: #71848b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sales-group__summary strong {
    display: block;
    min-width: 0;
    margin-top: 8px;
    overflow: hidden;
    color: #18323a;
    font-size: clamp(1.2rem, 2vw, 1.9rem);
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sales-group__summary small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #7d8b91;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sales-group__summary-trend--up {
    color: #3f9f5b;
}

.sales-group__summary-trend--down {
    color: #c95b55;
}

.sales-group__summary-trend--flat {
    color: #b48627;
}

.sales-group__toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #dce9ec;
    border-radius: 18px;
    background: #fbfdfe;
}

.sales-group__toolbar p {
    margin: 0;
    color: #74858c;
    font-weight: 800;
}

.sales-group__search {
    display: grid;
    width: min(520px, 100%);
    gap: 7px;
}

.sales-group__search input {
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid #cfe0e5;
    border-radius: 13px;
    background: #ffffff;
    color: #18323a;
    font: inherit;
    outline: none;
}

.sales-group__search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(111, 159, 166, 0.14);
}

.sales-group__table-wrap {
    overflow: auto;
    border: 1px solid #dce9ec;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(24, 50, 58, 0.07);
}

.sales-group-table {
    width: 100%;
    min-width: 860px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

.sales-group-table th,
.sales-group-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #e3edf0;
    vertical-align: middle;
}

.sales-group-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef5f7;
    color: #51676f;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
}

.sales-group-table th:not(:first-child),
.sales-group-table td:not(:first-child) {
    text-align: right;
}

.sales-group-table tbody tr:nth-child(even) {
    background: #fbfdfe;
}

.sales-group-table tbody tr:hover {
    background: #f2f8fa;
}

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

.sales-group-table__group {
    min-width: 280px;
}

.sales-group-table__group strong {
    display: block;
    color: #18323a;
    font-weight: 900;
}

.sales-group-table__group small {
    display: block;
    margin-top: 4px;
    color: #7d8b91;
    font-weight: 800;
}

.sales-group-table__number {
    min-width: 150px;
}

.sales-group-trend {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: #18323a;
    font-weight: 900;
    white-space: nowrap;
}

.sales-group-trend span {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    line-height: 1;
}

.sales-group-trend--up span {
    background: #65bd73;
}

.sales-group-trend--down span {
    background: #d96a62;
}

.sales-group-trend--flat span {
    background: #e2a84d;
}

.sales-group-bar {
    display: block;
    height: 6px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #ecf3f5;
}

.sales-group-bar::before {
    content: "";
    display: block;
    width: var(--bar, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7bc5d1, #6f9fa6);
}

.sales-group-table__variation {
    color: #71848b;
    font-weight: 900;
    white-space: nowrap;
}

.sales-group-table__variation--up {
    color: #3f9f5b;
}

.sales-group-table__variation--down {
    color: #c95b55;
}

.sales-group-table__variation--flat {
    color: #b48627;
}

.sales-group__preview-note {
    margin: 0;
    color: #74858c;
    font-weight: 800;
}

.routine-card--player .sales-group {
    gap: 14px;
}

.routine-card--player .sales-group__summary article {
    padding: 12px 14px;
}

.routine-card--player .sales-group__summary strong {
    font-size: clamp(1rem, 1.5vw, 1.45rem);
}

.routine-card--player .sales-group__table-wrap {
    overflow: hidden;
}

.routine-card--player .sales-group-table {
    min-width: 0;
    font-size: clamp(0.72rem, 0.9vw, 0.88rem);
}

.routine-card--player .sales-group-table th,
.routine-card--player .sales-group-table td {
    padding: 10px 12px;
}

.routine-card--player .sales-group-table__group {
    min-width: 220px;
}

.routine-card--player .sales-group-table__group small {
    display: none;
}

/* Administracao */
.admin-page {
    display: grid;
    gap: 22px;
}

.user-maintenance-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.user-directory {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.user-directory__head,
.user-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.user-directory__head strong {
    color: var(--text);
    font-size: 1.08rem;
}

.user-directory__search {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #d6e3e7;
    border-radius: 10px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    outline: none;
}

.user-directory__search:focus {
    border-color: #9fc2c9;
    box-shadow: 0 0 0 4px rgba(111, 159, 166, 0.12);
}

.user-list,
.user-detail-stack {
    display: grid;
    gap: 10px;
}

.user-list {
    max-height: calc(100vh - 240px);
    overflow: auto;
    padding-right: 2px;
}

.user-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    width: 100%;
    padding: 13px;
    border: 1px solid #dfe8eb;
    border-radius: 12px;
    background: #ffffff;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.user-list-item:hover,
.user-list-item.is-active {
    border-color: #9fc2c9;
    background: #f3f8f9;
}

.user-list-item > span:first-child,
.user-list-item__meta,
.user-detail-head > div:first-child,
.user-facts {
    display: grid;
    gap: 5px;
}

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

.user-list-item small,
.user-detail-head span,
.user-facts {
    color: var(--muted);
    font-size: 0.84rem;
}

.user-list-item__meta {
    justify-items: end;
    text-align: right;
}

.user-detail-panel {
    min-width: 0;
}

.user-detail-panel[hidden] {
    display: none;
}

.user-detail-head h2 {
    margin: 0;
}

.user-detail-head__badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-action-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.user-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px 14px;
    border: 1px solid #dfe8eb;
    border-radius: 12px;
    background: #f8fbfc;
    font-weight: 700;
}

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

.routine-directory__stats span {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #dfe8eb;
    border-radius: 12px;
    background: #f8fbfc;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.routine-directory__stats b {
    display: block;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1;
}

.routine-detail-panel[hidden] {
    display: none;
}

.routine-detail-head h2 {
    margin: 0;
}

.routine-detail-head .role-pill--neutral {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.routine-list-item__meta {
    max-width: 170px;
}

.routine-list-item__meta small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-list,
.permission-grid {
    display: grid;
    gap: 16px;
}

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

.admin-user-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(24, 50, 58, 0.06);
}

.admin-user-card__head,
.admin-user-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.admin-user-card__head div {
    display: grid;
    gap: 4px;
}

.admin-user-card__head strong {
    color: var(--text);
    font-size: 1.08rem;
}

.admin-user-card__head span,
.admin-user-card__footer,
.muted-text {
    color: var(--muted);
}

.admin-user-card__footer {
    font-size: 0.9rem;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef6f7;
    color: #496e76;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.role-pill--admin {
    background: #e7f0f2;
    color: #0b5060;
}

.role-pill--internal,
.role-pill--success {
    background: #e8f6ef;
    color: #23745d;
}

.role-pill--representative {
    background: #fff5dc;
    color: #8a6420;
}

.role-pill--danger {
    background: #fff0f2;
    color: #b64255;
}

.role-pill--warning {
    background: #fff5dc;
    color: #8a6420;
}

.role-pill--neutral {
    background: #eef3f4;
    color: #496e76;
}

.permission-card {
    display: grid;
    align-content: start;
    gap: 14px;
}

.permission-card h2,
.permission-card p {
    margin-bottom: 0;
}

.permission-card .feature-list {
    margin-top: 6px;
}

.permission-card .feature-list li {
    padding: 12px 14px;
}

.permission-page {
    display: grid;
    gap: 18px;
}

.permission-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.permission-summary article {
    display: grid;
    gap: 8px;
    min-height: 94px;
    padding: 16px;
    border: 1px solid #dfe8eb;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(24, 50, 58, 0.05);
}

.permission-summary span {
    color: #6f9fa6;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.permission-summary strong {
    color: #18323a;
    font-size: 1.72rem;
    font-weight: 900;
}

.permission-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.32fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.permission-profile-panel {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid #dfe8eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(24, 50, 58, 0.05);
}

.permission-profile-panel header {
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dfe8eb;
}

.permission-profile-panel header strong,
.permission-matrix__head strong {
    color: #18323a;
    font-size: 1.05rem;
    font-weight: 900;
}

.permission-profile-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #dfe8eb;
    border-radius: 12px;
    background: #f8fbfc;
}

.permission-profile-card strong {
    color: #18323a;
    font-size: 1rem;
    font-weight: 900;
}

.permission-profile-card p,
.permission-profile-card small {
    margin: 0;
    color: #60737a;
    font-size: 0.84rem;
}

.permission-profile-card small {
    font-weight: 800;
}

.permission-matrix {
    display: grid;
    gap: 12px;
}

.permission-matrix__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid #dfe8eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(24, 50, 58, 0.05);
}

.permission-matrix__head span {
    display: grid;
    gap: 4px;
}

.permission-matrix__head input {
    width: min(360px, 100%);
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #cfe0e5;
    border-radius: 8px;
    background: #ffffff;
    color: #18323a;
    outline: none;
}

.permission-matrix__head input:focus {
    border-color: #6f9fa6;
    box-shadow: 0 0 0 4px rgba(111, 159, 166, 0.14);
}

.permission-routine-list {
    display: grid;
    gap: 12px;
}

.permission-routine-card {
    display: grid;
    grid-template-columns: minmax(210px, 0.48fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 16px;
    border: 1px solid #dfe8eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(24, 50, 58, 0.05);
}

.permission-routine-card[hidden] {
    display: none;
}

.permission-routine-card__main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.permission-routine-card__main h2 {
    margin: 0;
    color: #18323a;
    font-size: 1.12rem;
    font-weight: 900;
}

.permission-routine-card__main p {
    overflow: hidden;
    margin: 0;
    color: #60737a;
    font-size: 0.86rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-routine-card__counts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    grid-column: 1 / 2;
}

.permission-routine-card__counts span {
    display: grid;
    gap: 3px;
    min-height: 64px;
    padding: 10px;
    border: 1px solid #dfe8eb;
    border-radius: 12px;
    background: #f8fbfc;
}

.permission-routine-card__counts small {
    color: #6f9fa6;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.permission-routine-card__counts strong {
    color: #18323a;
    font-size: 1.24rem;
    font-weight: 900;
}

.permission-routine-card__users {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
}

.permission-routine-card__users section {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.permission-routine-card__users h3 {
    margin: 0;
    color: #6f9fa6;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.permission-user-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.permission-user-chip,
.permission-empty-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-height: 34px;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #eef6f7;
    color: #496e76;
    font-size: 0.78rem;
    font-weight: 900;
}

.permission-user-chip {
    text-decoration: none;
}

.permission-user-chip:hover {
    border-color: #9cc2c8;
    background: #ffffff;
}

.permission-user-chip strong {
    overflow: hidden;
    max-width: 120px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-user-chip small {
    overflow: hidden;
    max-width: 105px;
    color: inherit;
    font-size: 0.72rem;
    opacity: 0.76;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-user-chip.is-blocked {
    opacity: 0.58;
}

.permission-empty-chip {
    background: #f1f5f6;
    color: #7b8d93;
}

.admin-history-table small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

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

.login-history-summary article {
    display: grid;
    gap: 8px;
    min-height: 96px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.login-history-summary span,
.login-history-toolbar .field span {
    color: #6f858c;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-history-summary strong {
    color: #18323a;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.login-history-card {
    display: grid;
    gap: 16px;
}

.login-history-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 300px);
    gap: 14px;
    align-items: end;
}

.login-history-toolbar .field {
    margin: 0;
}

.admin-history-table {
    min-width: 1180px;
}

.admin-history-table td {
    vertical-align: top;
}

.admin-history-table td strong {
    display: block;
}

.login-risk-list {
    display: grid;
    gap: 6px;
    min-width: 220px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.login-risk-list li {
    padding: 7px 9px;
    border: 1px solid rgba(216, 229, 232, 0.9);
    border-radius: 8px;
    background: #f8fbfc;
    color: #496e76;
    font-size: 0.82rem;
    font-weight: 700;
}

.login-agent-details {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.78rem;
}

.login-agent-details summary {
    cursor: pointer;
    color: #6f9fa6;
    font-weight: 800;
}

.login-agent-details span {
    display: block;
    max-width: 320px;
    margin-top: 6px;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.routine-access-box {
    display: grid;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px dashed var(--line);
    border-radius: 16px;
    background: #f8fbfc;
}

.routine-access-box legend {
    padding: 0 8px;
    color: var(--accent-strong);
    font-weight: 800;
}

.routine-access-box p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.routine-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.routine-permission-card {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 14px 16px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: #ffffff;
}

.routine-permission-card strong {
    color: var(--text);
    font-size: 0.92rem;
}

/* Dashboard resumo */
.dashboard-page {
    width: 100%;
}

.dashboard-card {
    overflow: hidden;
    width: 100%;
    padding: clamp(18px, 2vw, 28px);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(111, 159, 166, 0.1), transparent 34%),
        #ffffff;
    border: 1px solid #e4eef0;
    box-shadow: 0 18px 44px rgba(24, 50, 58, 0.07);
}

.dashboard-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.dashboard-head h1 {
    margin: 0;
    color: #496e76;
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.dashboard-head p {
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #e1ebee;
    border-radius: 999px;
    background: #f8fbfc;
    color: #82919a;
    font-size: 0.78rem;
    font-weight: 800;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.summary-card {
    --category-color: #496e76;
    --category-soft: rgba(255, 255, 255, 0.68);
    --category-ring: rgba(73, 110, 118, 0.18);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    min-height: 136px;
    padding: 16px;
    border-radius: 20px;
    color: #274851;
    border: 1px solid rgba(111, 159, 166, 0.18);
    box-shadow: 0 10px 22px rgba(24, 50, 58, 0.06);
    overflow: hidden;
}

.summary-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.64), transparent 55%),
        radial-gradient(circle at 92% 100%, rgba(255, 255, 255, 0.62), transparent 26%);
}

.summary-card::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 16px;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--category-color);
    opacity: 0.3;
}

.summary-card__accent {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 1;
    width: 6px;
    background: var(--category-color);
    opacity: 0.36;
}

.summary-card__content {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    min-width: 0;
}

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

.summary-card__icon {
    position: relative;
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border: 1px solid var(--category-ring);
    border-radius: 12px;
    background: var(--category-soft);
    color: var(--category-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.summary-card__icon::before,
.summary-card__icon::after,
.summary-card__icon i,
.summary-card__icon i::before,
.summary-card__icon i::after {
    content: "";
    position: absolute;
    display: block;
}

.summary-card__icon--orders::before {
    width: 16px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 5px;
}

.summary-card__icon--orders::after {
    top: 8px;
    width: 10px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
}

.summary-card__icon--orders i {
    top: 17px;
    left: 13px;
    width: 10px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 5px 0 currentColor;
    opacity: 0.72;
}

.summary-card__icon--invoice::before {
    width: 17px;
    height: 22px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.summary-card__icon--invoice::after {
    top: 8px;
    right: 10px;
    width: 7px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    border-top-right-radius: 3px;
}

.summary-card__icon--invoice i {
    top: 16px;
    left: 12px;
    width: 12px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 5px 0 currentColor;
    opacity: 0.72;
}

.summary-card__icon--shipping::before {
    top: 15px;
    left: 7px;
    width: 17px;
    height: 10px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.summary-card__icon--shipping::after {
    top: 18px;
    right: 7px;
    width: 8px;
    height: 7px;
    border: 2px solid currentColor;
    border-left: 0;
    border-radius: 0 4px 3px 0;
}

.summary-card__icon--shipping i {
    bottom: 7px;
    left: 11px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 13px 0 0 currentColor;
}

.summary-card__icon--stock::before,
.summary-card__icon--stock::after,
.summary-card__icon--stock i {
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.36);
}

.summary-card__icon--stock::before {
    top: 9px;
    left: 8px;
}

.summary-card__icon--stock::after {
    top: 9px;
    right: 8px;
}

.summary-card__icon--stock i {
    top: 19px;
    left: 50%;
    width: 17px;
    transform: translateX(-50%);
}

.summary-card h2 {
    max-width: 100%;
    margin: 0;
    color: rgba(24, 50, 58, 0.78);
    font-size: clamp(0.98rem, 1.05vw, 1.2rem);
    font-weight: 900;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.summary-card strong {
    display: block;
    max-width: 100%;
    margin-top: 12px;
    font-size: clamp(2.25rem, 3.6vw, 4rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
}

.summary-card--stock-breakdown {
    min-height: 156px;
}

.summary-card--stock-breakdown .summary-card__content {
    align-content: start;
}

.summary-card--stock-breakdown .summary-card__content > strong {
    font-size: clamp(2.15rem, 3.2vw, 3.45rem);
}

.summary-card__stock-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 12px;
}

.summary-card__stock-breakdown span {
    display: grid;
    gap: 2px;
    min-width: 0;
    min-height: 38px;
    padding: 6px 8px;
    border: 1px solid rgba(24, 50, 58, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.62);
}

.summary-card__stock-breakdown b {
    overflow: hidden;
    color: #496e76;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.summary-card__stock-breakdown em {
    overflow: hidden;
    color: #18323a;
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-card__branches {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(24, 50, 58, 0.08);
}

.summary-card--with-branches {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(76px, 92px);
    align-items: center;
    gap: 14px;
    min-height: 124px;
}

.summary-card--with-branches .summary-card__branches {
    grid-template-columns: 1fr;
    align-self: stretch;
    align-content: center;
    gap: 8px;
    width: auto;
    min-width: 0;
    margin-top: 0;
    padding-top: 0;
    padding-left: 12px;
    border-top: 0;
    border-left: 1px solid rgba(24, 50, 58, 0.08);
}

.summary-card--with-branches .summary-card__branches span {
    min-height: 34px;
    padding: 5px 8px;
}

.summary-card__branches span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid rgba(24, 50, 58, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.62);
    color: rgba(24, 50, 58, 0.74);
    font-size: 0.82rem;
    font-weight: 800;
}

.summary-card__branches b {
    color: #496e76;
    font-weight: 900;
}

.summary-card__branches em {
    color: #18323a;
    font-style: normal;
    font-weight: 900;
}

.summary-card--cyan {
    background: linear-gradient(135deg, #f2fbfc, #d6f0f5);
}

.summary-card--green {
    background: linear-gradient(135deg, #f4fbf3, #dcefdc);
}

.summary-card--yellow {
    background: linear-gradient(135deg, #fffae7, #f8ebb1);
}

.summary-card--red {
    background: linear-gradient(135deg, #fff3f4, #f4ccd3);
}

.summary-card--group-orders {
    --category-color: #2f69b1;
    --category-soft: #eaf3ff;
    --category-ring: rgba(47, 105, 177, 0.2);
}

.summary-card--group-invoices {
    --category-color: #7c559b;
    --category-soft: #f4edf9;
    --category-ring: rgba(124, 85, 155, 0.22);
}

.summary-card--group-shipping {
    --category-color: #ad6b1f;
    --category-soft: #fff1dc;
    --category-ring: rgba(173, 107, 31, 0.24);
}

.summary-card--group-stock {
    --category-color: #26775f;
    --category-soft: #e9f7f0;
    --category-ring: rgba(38, 119, 95, 0.22);
}

.summary-card--red .summary-card__accent {
    background: linear-gradient(180deg, var(--category-color), #bf495c);
}

.summary-card--green .summary-card__accent {
    background: linear-gradient(180deg, var(--category-color), #429a57);
}

.summary-card--yellow .summary-card__accent {
    background: linear-gradient(180deg, var(--category-color), #c4971f);
}

.summary-card--clickable {
    color: #274851;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.summary-card--clickable:hover,
.summary-card--clickable:focus {
    outline: 0;
    border-color: rgba(74, 120, 129, 0.38);
    box-shadow: 0 16px 30px rgba(24, 50, 58, 0.12);
    transform: translateY(-2px);
}

.dashboard-orders-modal__panel {
    width: min(1180px, 100%);
}

.dashboard-orders-detail {
    display: grid;
    gap: 14px;
}

.dashboard-orders-detail__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-orders-detail__summary--wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-orders-detail__summary article {
    padding: 12px 14px;
    border: 1px solid #dce9ec;
    border-radius: 13px;
    background: #f8fbfc;
}

.dashboard-orders-detail__summary span {
    display: block;
    color: #71838a;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-orders-detail__summary strong {
    display: block;
    margin-top: 5px;
    color: #18323a;
    font-size: 1.08rem;
}

.dashboard-orders-detail__updated {
    margin: -4px 0 0;
    color: #71838a;
    font-size: 0.82rem;
    font-weight: 800;
}

.dashboard-orders-list {
    display: grid;
    gap: 10px;
}

.dashboard-order {
    overflow: hidden;
    border: 1px solid #dce9ec;
    border-radius: 15px;
    background: #ffffff;
}

.dashboard-order summary {
    display: grid;
    grid-template-columns: 54px minmax(220px, 1.3fr) minmax(190px, 1fr) 92px 96px 28px;
    gap: 12px;
    align-items: center;
    padding: 13px 16px;
    cursor: pointer;
    list-style: none;
}

.dashboard-order summary::-webkit-details-marker {
    display: none;
}

.dashboard-order summary::after {
    content: "+";
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    justify-self: end;
    border-radius: 999px;
    background: #eef6f7;
    color: #6f9fa6;
    font-weight: 900;
}

.dashboard-order[open] summary {
    background: #f8fbfc;
}

.dashboard-order[open] summary::after {
    content: "-";
}

.dashboard-order__branch {
    display: inline-grid;
    min-width: 42px;
    min-height: 30px;
    place-items: center;
    border: 2px solid currentColor;
    border-radius: 999px;
    background: #ffffff;
    font-size: 0.95rem;
    font-weight: 900;
}

.dashboard-order__branch--sp {
    color: #1d4dcb;
}

.dashboard-order__branch--sc {
    color: #4ba64e;
}

.dashboard-order__main {
    min-width: 0;
}

.dashboard-order__main strong {
    display: block;
    color: #18323a;
    font-size: 1.05rem;
    font-weight: 900;
}

.dashboard-order__main small {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: #687982;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-order__status,
.dashboard-order__date,
.dashboard-order__qty {
    color: #18323a;
    font-weight: 900;
}

.dashboard-order__status {
    overflow: hidden;
    color: #496e76;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-order__body {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
    background: #fbfdfe;
}

.dashboard-order__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-order__meta span {
    padding: 6px 9px;
    border: 1px solid #e0ebee;
    border-radius: 999px;
    background: #ffffff;
    color: #687982;
    font-size: 0.82rem;
    font-weight: 800;
}

.dashboard-order__meta b {
    color: #18323a;
}

.dashboard-order__notes {
    border-color: #f0dfb6 !important;
    background: #fff9e8 !important;
}

.dashboard-order__items-wrap {
    overflow: auto;
    border: 1px solid #dce9ec;
    border-radius: 12px;
}

.dashboard-order__items {
    width: 100%;
    min-width: 840px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.86rem;
}

.dashboard-stock-addressing__table {
    min-width: 980px;
}

.dashboard-order__items th,
.dashboard-order__items td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5eef1;
    text-align: left;
    vertical-align: top;
}

.dashboard-order__items th {
    background: #eef5f7;
    color: #577680;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.routine-card--compact .summary-grid,
.routine-card--preview .summary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

.routine-card--compact .summary-card,
.routine-card--preview .summary-card {
    min-height: 92px;
    padding: 16px;
}

.routine-card--compact .summary-card h2,
.routine-card--preview .summary-card h2 {
    font-size: 0.98rem;
}

.routine-card--compact .summary-card__icon,
.routine-card--preview .summary-card__icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 10px;
}

.routine-card--compact .summary-card strong,
.routine-card--preview .summary-card strong {
    font-size: 2rem;
}

.routine-card--compact .summary-card__branches,
.routine-card--preview .summary-card__branches {
    gap: 5px;
    margin-top: 8px;
}

.routine-card--compact .summary-card--with-branches,
.routine-card--preview .summary-card--with-branches {
    grid-template-columns: minmax(0, 1fr);
}

.routine-card--compact .summary-card--with-branches .summary-card__branches,
.routine-card--preview .summary-card--with-branches .summary-card__branches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
    padding-top: 8px;
    padding-left: 0;
    border-top: 1px solid rgba(24, 50, 58, 0.08);
    border-left: 0;
}

.routine-card--compact .summary-card__branches span,
.routine-card--preview .summary-card__branches span {
    min-height: 22px;
    padding: 2px 8px;
    font-size: 0.74rem;
}

.routine-card--compact .summary-card__stock-breakdown,
.routine-card--preview .summary-card__stock-breakdown {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 8px;
}

.routine-card--compact .summary-card__stock-breakdown span,
.routine-card--preview .summary-card__stock-breakdown span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
    padding: 3px 8px;
}

.routine-card--compact .summary-card__stock-breakdown b,
.routine-card--preview .summary-card__stock-breakdown b,
.routine-card--compact .summary-card__stock-breakdown em,
.routine-card--preview .summary-card__stock-breakdown em {
    font-size: 0.68rem;
}

.routine-card--player .summary-card {
    min-height: 18vh;
}

.routine-card--player .summary-card--with-branches {
    min-height: 16vh;
}

/* Monitor de pedidos */
.monitor-orders {
    display: grid;
    gap: 16px;
    color: #17252a;
}

.monitor-orders__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 2px 14px;
    border-bottom: 1px solid #d9e3e6;
}

.monitor-orders__top img {
    width: clamp(116px, 11vw, 170px);
    max-height: 68px;
}

.monitor-orders__title {
    text-align: right;
}

.monitor-orders__title h2 {
    margin: 0;
    color: #18323a;
    font-size: clamp(1.55rem, 2.7vw, 2.9rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
}

.monitor-orders__title strong {
    display: block;
    margin-top: 6px;
    color: #6f7f86;
    font-family: var(--font-mono);
    font-size: clamp(0.96rem, 1.55vw, 1.55rem);
    font-weight: 900;
    line-height: 1;
}

.monitor-orders__table-wrap {
    overflow: auto;
    border: 1px solid #d8e3e6;
    border-radius: 14px;
    background: #ffffff;
}

.monitor-orders-table {
    width: 100%;
    min-width: 1500px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: clamp(0.72rem, 0.78vw, 0.9rem);
    font-weight: 650;
    line-height: 1.25;
}

.monitor-orders-table th,
.monitor-orders-table td {
    padding: 10px 9px;
    border-bottom: 1px solid rgba(35, 52, 58, 0.12);
    border-right: 1px solid rgba(35, 52, 58, 0.1);
    vertical-align: middle;
}

.monitor-orders-table th:last-child,
.monitor-orders-table td:last-child {
    border-right: 0;
}

.monitor-orders-table th {
    background: #f2f5f6;
    color: #42565d;
    font-size: 0.78em;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
}

.monitor-orders-table th:nth-child(1) {
    width: 8%;
}

.monitor-orders-table th:nth-child(2),
.monitor-orders-table th:nth-child(3) {
    width: 4%;
}

.monitor-orders-table th:nth-child(4) {
    width: 18%;
}

.monitor-orders-table th:nth-child(5) {
    width: 30%;
}

.monitor-orders-table th:nth-child(6) {
    width: 7%;
}

.monitor-orders-table th:nth-child(7) {
    width: 15%;
}

.monitor-orders-table th:nth-child(8),
.monitor-orders-table th:nth-child(9) {
    width: 7%;
}

.monitor-orders-row--late {
    background: #fff0ed;
}

.monitor-orders-row--ok {
    background: #eff9e6;
}

.monitor-orders-row--warning {
    background: #fff8da;
}

.monitor-orders-row--blocked {
    background: #f4edff;
}

.monitor-orders-row--neutral {
    background: #ffffff;
}

.monitor-orders-row:hover {
    filter: saturate(1.04);
}

.monitor-orders__pedido,
.monitor-orders__center,
.monitor-orders__quantity,
.monitor-orders__date {
    text-align: center;
}

.monitor-orders__pedido {
    text-align: center;
}

.monitor-orders__pedido > span:not(.monitor-orders__branch) {
    display: block;
    margin-top: 7px;
}

.monitor-orders__pdf-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    color: #d04d46;
    transition: color 160ms ease, transform 160ms ease;
}

.monitor-orders__pdf-link:hover,
.monitor-orders__pdf-link:focus-visible {
    outline: 0;
    color: #b73731;
    transform: translateY(-1px);
}

.monitor-orders__pdf-icon {
    position: relative;
    display: inline-grid;
    width: 28px;
    height: 34px;
    place-items: end center;
    padding-bottom: 5px;
    border: 2px solid currentColor;
    border-radius: 5px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(24, 50, 58, 0.12);
}

.monitor-orders__pdf-icon::before {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    border-bottom-left-radius: 3px;
    background:
        linear-gradient(135deg, transparent 0 48%, currentColor 49% 52%, #ffffff 53%);
}

.monitor-orders__pdf-icon span {
    display: inline-flex;
    align-items: center;
    min-height: 13px;
    padding: 0 3px;
    border-radius: 3px;
    background: currentColor;
    color: #ffffff;
    font-size: 0.46rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1;
}

.monitor-orders__branch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid currentColor;
    font-size: clamp(1rem, 1.25vw, 1.3rem);
    font-weight: 900;
    line-height: 1;
}

.monitor-orders__branch--green {
    color: #36a436;
}

.monitor-orders__branch--blue {
    color: #061ee0;
}

.monitor-orders__quantity {
    white-space: pre-line;
}

.monitor-orders__quantity strong {
    display: block;
    line-height: 1.15;
}

.monitor-orders__status {
    text-align: left;
}

.monitor-orders__icons {
    display: inline-flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 7px;
}

.monitor-orders__mini-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 28px;
    min-height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ffffff;
    color: #4c8b38;
    font-size: 0.76rem;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(35, 52, 58, 0.08);
}

.monitor-orders__mini-icon--finance {
    color: #9a6a12;
}

.monitor-orders__mini-icon--route {
    color: #7d5caa;
}

.monitor-orders__mini-icon--stock {
    color: #0f6072;
}

.monitor-orders__date {
    font-weight: 900;
}

.monitor-orders__preview-note {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.routine-card--compact .monitor-orders__top,
.routine-card--preview .monitor-orders__top {
    align-items: flex-start;
    flex-direction: column;
}

.routine-card--compact .monitor-orders__title,
.routine-card--preview .monitor-orders__title {
    text-align: left;
}

.routine-card--compact .monitor-orders__title h2,
.routine-card--preview .monitor-orders__title h2 {
    font-size: 1.55rem;
}

.routine-card--compact .monitor-orders__title strong,
.routine-card--preview .monitor-orders__title strong {
    font-size: 1.05rem;
}

.routine-card--player .monitor-orders__table-wrap {
    max-height: calc(100vh - 330px);
}

/* Monitor de entregas */
.delivery-monitor {
    display: grid;
    gap: 16px;
    color: #17252a;
}

.delivery-monitor__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 2px 14px;
    border-bottom: 1px solid #d9e3e6;
}

.delivery-monitor__top img {
    width: clamp(116px, 11vw, 170px);
    max-height: 68px;
}

.delivery-monitor__top div {
    text-align: right;
}

.delivery-monitor__top h2 {
    margin: 0;
    color: #18323a;
    font-size: clamp(1.55rem, 2.7vw, 2.9rem);
    font-weight: 900;
    line-height: 1;
}

.delivery-monitor__top strong {
    display: block;
    margin-top: 6px;
    color: #6f7f86;
    font-family: var(--font-mono);
    font-size: clamp(0.96rem, 1.55vw, 1.55rem);
    font-weight: 900;
    line-height: 1;
}

.delivery-monitor__summary,
.delivery-monitor__branch-row,
.delivery-monitor__actions {
    display: grid;
    gap: 12px;
}

.delivery-monitor__summary {
    grid-template-columns: repeat(3, minmax(130px, 0.75fr)) minmax(260px, 1.5fr);
}

.delivery-monitor__branch-row {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.delivery-monitor__actions {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.delivery-monitor__actions span {
    color: #61737a;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.delivery-monitor__metric,
.delivery-monitor__punctuality,
.delivery-monitor__branch-row article,
.delivery-monitor__query {
    border: 1px solid #d8e3e6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(24, 50, 58, 0.08);
}

.delivery-monitor__metric,
.delivery-monitor__punctuality,
.delivery-monitor__branch-row article {
    padding: 15px 16px;
}

.delivery-monitor__metric {
    min-height: 106px;
    border-left: 6px solid currentColor;
}

.delivery-monitor__metric span,
.delivery-monitor__punctuality span,
.delivery-monitor__branch-row span,
.delivery-monitor__query span {
    display: block;
    color: #61737a;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.delivery-monitor__metric strong {
    display: block;
    margin-top: 10px;
    color: #18323a;
    font-size: clamp(2.1rem, 4vw, 4.2rem);
    font-weight: 950;
    line-height: 0.95;
}

.delivery-monitor__metric--ok {
    color: #2f9a61;
}

.delivery-monitor__metric--pending {
    color: #b58015;
}

.delivery-monitor__metric--late {
    color: #ca4e55;
}

.delivery-monitor__punctuality strong {
    display: block;
    margin-top: 8px;
    color: #18323a;
    font-size: clamp(1.9rem, 3.1vw, 3.4rem);
    font-weight: 950;
    line-height: 1;
}

.delivery-monitor__punctuality small,
.delivery-monitor__branch-row small {
    display: block;
    margin-top: 8px;
    color: #61737a;
    font-weight: 800;
}

.delivery-monitor__bar {
    height: 12px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f3;
}

.delivery-monitor__bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f9a61, #82bd54);
}

.delivery-monitor__branch-row strong {
    display: block;
    margin-top: 8px;
    color: #18323a;
    font-size: 1.35rem;
    font-weight: 950;
}

.delivery-monitor__table-wrap {
    overflow: auto;
    border: 1px solid #d8e3e6;
    border-radius: 8px;
    background: #ffffff;
}

.delivery-monitor-table {
    width: 100%;
    min-width: 1400px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: clamp(0.74rem, 0.82vw, 0.95rem);
    font-weight: 700;
    line-height: 1.25;
}

.delivery-monitor-table th,
.delivery-monitor-table td {
    padding: 10px 9px;
    border-bottom: 1px solid rgba(35, 52, 58, 0.12);
    border-right: 1px solid rgba(35, 52, 58, 0.1);
    vertical-align: middle;
}

.delivery-monitor-table th:last-child,
.delivery-monitor-table td:last-child {
    border-right: 0;
}

.delivery-monitor-table th {
    background: #f2f5f6;
    color: #42565d;
    font-size: 0.76em;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
}

.delivery-monitor-table th:nth-child(1) {
    width: 7%;
}

.delivery-monitor-table th:nth-child(2) {
    width: 7%;
}

.delivery-monitor-table th:nth-child(3) {
    width: 5%;
}

.delivery-monitor-table th:nth-child(4) {
    width: 25%;
}

.delivery-monitor-table th:nth-child(5) {
    width: 5%;
}

.delivery-monitor-table th:nth-child(6),
.delivery-monitor-table th:nth-child(7),
.delivery-monitor-table th:nth-child(9),
.delivery-monitor-table th:nth-child(10),
.delivery-monitor-table th:nth-child(11) {
    width: 8%;
}

.delivery-monitor-table th:nth-child(8) {
    width: 12%;
}

.delivery-monitor-table th:nth-child(12) {
    width: 14%;
}

.delivery-monitor-row--ok {
    background: #eff9e6;
}

.delivery-monitor-row--pending {
    background: #fff8da;
}

.delivery-monitor-row--late {
    background: #fff0ed;
}

.delivery-monitor__branch,
.delivery-monitor__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 950;
    line-height: 1;
}

.delivery-monitor__branch {
    min-width: 46px;
    color: #146d86;
    box-shadow: inset 0 0 0 1px rgba(20, 109, 134, 0.28);
}

.delivery-monitor__status--ok {
    color: #2f9a61;
}

.delivery-monitor__status--pending {
    color: #9a6a12;
}

.delivery-monitor__status--late {
    color: #ca4e55;
}

.delivery-monitor-table__note {
    font-family: var(--font-mono);
    font-weight: 950;
}

.delivery-monitor__query {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
}

.delivery-monitor__query strong {
    display: grid;
    gap: 4px;
    color: #18323a;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-word;
}

.delivery-monitor__edit-form {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    gap: 6px;
    align-items: center;
}

.delivery-monitor__edit-form input {
    min-width: 0;
    height: 34px;
    border: 1px solid #cfdcdf;
    border-radius: 8px;
    background: #ffffff;
    color: #18323a;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
}

.delivery-monitor__edit-form .button {
    min-height: 34px;
    white-space: nowrap;
}

.delivery-monitor__preview-note {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.routine-card--compact .delivery-monitor__top,
.routine-card--preview .delivery-monitor__top {
    align-items: flex-start;
    flex-direction: column;
}

.routine-card--compact .delivery-monitor__top div,
.routine-card--preview .delivery-monitor__top div {
    text-align: left;
}

.routine-card--compact .delivery-monitor__summary,
.routine-card--preview .delivery-monitor__summary {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.routine-card--compact .delivery-monitor__punctuality,
.routine-card--preview .delivery-monitor__punctuality {
    grid-column: 1 / -1;
}

.routine-card--player .delivery-monitor__table-wrap {
    max-height: calc(100vh - 430px);
}

/* Inventario */
.inventory-panel {
    display: grid;
    gap: 22px;
}

.inventory-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef8f9, #ffffff);
    border: 1px solid #d7e8eb;
}

.inventory-hero h2 {
    margin: 0;
    color: #18323a;
    font-size: clamp(1.5rem, 2.4vw, 2.6rem);
}

.inventory-hero span {
    display: block;
    margin-top: 8px;
    color: #72858d;
    font-weight: 800;
}

.inventory-hero strong {
    display: grid;
    place-items: center;
    min-width: 110px;
    min-height: 90px;
    padding: 14px 22px;
    border-radius: 18px;
    background: #6f9fa6;
    color: #ffffff;
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    line-height: 1;
    box-shadow: 0 16px 34px rgba(24, 50, 58, 0.16);
}

.inventory-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.inventory-stats article {
    padding: 15px 16px;
    border: 1px solid #dce9ec;
    border-radius: 14px;
    background: #ffffff;
}

.inventory-stats span {
    display: block;
    color: #74858c;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inventory-stats strong {
    display: block;
    margin-top: 6px;
    color: #18323a;
    font-size: 1.28rem;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.inventory-address-card {
    display: grid;
    gap: 8px;
    min-height: 138px;
    align-content: center;
    justify-items: center;
    padding: 18px;
    border: 1px solid rgba(24, 50, 58, 0.06);
    border-radius: 16px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.62), transparent 44%),
        linear-gradient(145deg, #eef8f9, #d9eef2);
    color: #18323a;
    text-align: center;
    box-shadow: 0 14px 26px rgba(24, 50, 58, 0.09);
}

button.inventory-address-card {
    width: 100%;
    appearance: none;
    cursor: pointer;
    font: inherit;
}

.inventory-address-card--clickable {
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.inventory-address-card--clickable:hover,
.inventory-address-card--clickable:focus-visible {
    outline: 0;
    border-color: #6f9fa6;
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(24, 50, 58, 0.14);
}

.inventory-address-card span {
    color: #6f9fa6;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.inventory-address-card strong {
    color: #18323a;
    font-size: clamp(1.9rem, 3.2vw, 3.15rem);
    line-height: 1;
}

.inventory-address-card small {
    color: #72858d;
    font-weight: 800;
}

.inventory-preview-note {
    margin: -6px 0 0;
    color: #74858c;
    font-weight: 800;
}

.routine-card--compact .inventory-panel,
.routine-card--preview .inventory-panel {
    gap: 12px;
}

.routine-card--compact .inventory-hero,
.routine-card--preview .inventory-hero {
    padding: 14px;
}

.routine-card--compact .inventory-hero h2,
.routine-card--preview .inventory-hero h2 {
    font-size: 1.15rem;
}

.routine-card--compact .inventory-hero strong,
.routine-card--preview .inventory-hero strong {
    min-width: 64px;
    min-height: 54px;
    font-size: 2rem;
}

.routine-card--compact .inventory-grid,
.routine-card--preview .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.routine-card--compact .inventory-stats,
.routine-card--preview .inventory-stats {
    display: none;
}

.routine-card--compact .inventory-address-card,
.routine-card--preview .inventory-address-card {
    min-height: 76px;
    padding: 12px;
    border-radius: 10px;
}

.routine-card--compact .inventory-address-card strong,
.routine-card--preview .inventory-address-card strong {
    font-size: 1.45rem;
}

.routine-card--compact .inventory-address-card small,
.routine-card--preview .inventory-address-card small,
.routine-card--compact .inventory-hero span,
.routine-card--preview .inventory-hero span {
    display: none;
}

.routine-card--player .inventory-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.routine-card--player .inventory-address-card {
    min-height: 18vh;
}

/* Estoque por endereco */
.warehouse-map {
    display: grid;
    gap: 18px;
    color: #18323a;
}

.warehouse-summary,
.warehouse-specials,
.warehouse-streets,
.warehouse-legend {
    display: grid;
    gap: 14px;
}

.warehouse-summary {
    grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.65fr) minmax(220px, 0.9fr) minmax(220px, 0.9fr);
    align-items: stretch;
    gap: 12px;
}

.warehouse-summary article {
    display: grid;
    align-content: center;
    min-height: 82px;
    padding: 14px 18px;
    border: 1px solid #dce9ec;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(24, 50, 58, 0.06);
}

.warehouse-summary span,
.warehouse-special-card > p,
.warehouse-service-lane > p,
.warehouse-service-stack span {
    color: #74858c;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.warehouse-summary strong {
    display: block;
    margin-top: 6px;
    color: #18323a;
    font-size: clamp(1.18rem, 1.8vw, 1.65rem);
    line-height: 1;
}

.warehouse-summary .is-alert {
    border-color: #f3b6a4;
    background: #fff4ef;
    box-shadow: 0 10px 22px rgba(194, 81, 47, 0.08);
}

.warehouse-summary .is-alert strong {
    color: #c2512f;
}

.warehouse-specials {
    grid-template-columns: minmax(180px, 0.7fr) minmax(320px, 1.3fr);
}

.warehouse-special-card,
.warehouse-service-lane,
.warehouse-street {
    border: 1px solid #dce9ec;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(24, 50, 58, 0.08);
}

.warehouse-special-card {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 16px;
}

.warehouse-side-room {
    grid-column: 1 / -1;
}

.warehouse-side-room__header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.warehouse-side-room__header > div {
    margin-right: auto;
}

.warehouse-side-room__header p {
    margin: 0 0 4px;
    color: #74858c;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.warehouse-side-room__header small {
    color: #7a8b92;
    font-weight: 700;
}

.warehouse-side-room__header > span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf4f6;
    color: #587078;
    font-size: 0.82rem;
    font-weight: 900;
}

.warehouse-side-room__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 10px;
}

.warehouse-side-room .stock-address {
    min-height: 74px;
}

.warehouse-special-card > small,
.warehouse-service-stack > div > small {
    color: #7a8b92;
    font-weight: 700;
}

.warehouse-layout {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: stretch;
}

.warehouse-service-lane {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(111, 159, 166, 0.08), rgba(255, 255, 255, 0)),
        #ffffff;
}

.warehouse-service-lane h2 {
    margin: -8px 0 0;
    color: #18323a;
    font-size: 1.28rem;
}

.warehouse-service-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.warehouse-service-stack > div {
    display: grid;
    gap: 9px;
    padding: 13px;
    border: 1px dashed #cbdde1;
    border-radius: 14px;
    background: #f8fbfc;
}

.warehouse-streets {
    gap: 18px;
    padding: 18px;
    border: 1px solid #dce9ec;
    border-radius: 20px;
    background:
        linear-gradient(90deg, rgba(111, 159, 166, 0.08) 0 2px, transparent 2px 100%) 0 0 / 56px 100%,
        #f5f7f8;
}

.warehouse-street-pair {
    grid-template-columns: 1fr;
}

.warehouse-street {
    overflow: hidden;
}

.warehouse-street header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: #7fa8ae;
    color: #ffffff;
}

.warehouse-street header strong {
    margin-right: auto;
    font-size: 1.05rem;
}

.warehouse-street header span {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.86rem;
    font-weight: 800;
}

.warehouse-street-matrix {
    display: grid;
    gap: clamp(5px, 0.45vw, 8px);
    min-width: 0;
    overflow: hidden;
    padding: clamp(10px, 0.9vw, 14px);
}

.warehouse-street-columns,
.warehouse-street-level-row {
    display: grid;
    grid-template-columns: 34px repeat(var(--warehouse-columns), minmax(0, 1fr));
    gap: clamp(5px, 0.45vw, 8px);
    min-width: 0;
}

.warehouse-street-columns--flat,
.warehouse-street-level-row--flat {
    grid-template-columns: repeat(var(--warehouse-columns), minmax(0, 1fr));
}

.warehouse-street-columns {
    align-items: center;
    color: #6f7f86;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-align: center;
}

.warehouse-street-columns strong,
.warehouse-street-level-label {
    display: grid;
    min-height: 28px;
    place-items: center;
    border-radius: 10px;
    background: #edf4f6;
}

.warehouse-street-level-row {
    align-items: stretch;
}

.warehouse-street-level-label {
    color: #37535b;
    font-size: 0.92rem;
    line-height: 1;
}

.warehouse-empty-street {
    padding: 18px;
    color: #7a8b92;
    font-weight: 800;
}

.stock-address {
    display: grid;
    gap: 3px;
    min-width: 0;
    min-height: clamp(66px, 5.4vw, 82px);
    align-content: center;
    justify-items: center;
    padding: 8px 5px;
    border: 1px solid rgba(24, 50, 58, 0.06);
    border-radius: 11px;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 8px 14px rgba(24, 50, 58, 0.07);
}

button.stock-address {
    width: 100%;
    appearance: none;
    cursor: pointer;
    font: inherit;
}

.stock-address--clickable {
    transition: filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.stock-address--clickable:hover,
.stock-address--clickable:focus-visible {
    outline: 0;
    filter: saturate(1.08);
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(24, 50, 58, 0.13);
}

.stock-address strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(0.76rem, 0.78vw, 1.02rem);
    line-height: 1;
}

.stock-address span,
.stock-address small {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(0.62rem, 0.62vw, 0.76rem);
    font-weight: 900;
    line-height: 1.1;
}

.stock-address__stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-wrap: wrap;
    width: 100%;
}

.stock-address__stats small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.stock-address--free .stock-address__stats small,
.stock-address--underused .stock-address__stats small {
    background: rgba(255, 255, 255, 0.34);
}

.stock-address--free {
    background: #9bd89e;
    color: #1f5a35;
}

.stock-address--busy {
    background: #f1d46f;
    color: #5a4612;
}

.stock-address--underused {
    background: #f1d46f;
    color: #5a4612;
}

.stock-address--full {
    background: #df7770;
}

.stock-address--info {
    background: #7ab8c7;
}

.stock-address--muted {
    background: #dfe8eb;
    color: #61747c;
    box-shadow: none;
}

.stock-address--danger {
    background: #d9655f;
}

.warehouse-legend {
    grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
    justify-content: end;
    color: #6f7f86;
    font-size: 0.84rem;
    font-weight: 800;
}

.warehouse-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.warehouse-legend i {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.legend-free {
    background: #9bd89e;
}

.legend-busy,
.legend-underused {
    background: #f1d46f;
}

.legend-full {
    background: #df7770;
}

.legend-info {
    background: #7ab8c7;
}

.legend-danger {
    background: #d9655f;
}

.routine-card--compact .warehouse-summary,
.routine-card--preview .warehouse-summary,
.routine-card--compact .warehouse-specials,
.routine-card--preview .warehouse-specials,
.routine-card--compact .warehouse-layout,
.routine-card--preview .warehouse-layout {
    grid-template-columns: 1fr;
}

.routine-card--compact .warehouse-streets,
.routine-card--preview .warehouse-streets {
    max-height: 380px;
    overflow: auto;
}

.routine-card--player .warehouse-street-matrix {
    gap: 10px;
}

.routine-card--player .warehouse-street-columns,
.routine-card--player .warehouse-street-level-row {
    grid-template-columns: 40px repeat(var(--warehouse-columns), minmax(0, 1fr));
}

.routine-card--player .warehouse-street-columns--flat,
.routine-card--player .warehouse-street-level-row--flat {
    grid-template-columns: repeat(var(--warehouse-columns), minmax(0, 1fr));
}

/* Loading com fio */
.fiber-loader[hidden] {
    display: none;
}

.fiber-loader {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.7);
    opacity: 0;
    transition: opacity 180ms ease;
    backdrop-filter: blur(5px);
}

.fiber-loader.is-visible {
    opacity: 1;
}

.fiber-loader--routine-delay .fiber-loader__card {
    transform: scale(1.02);
}

.fiber-loader__card {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-width: 260px;
    padding: 28px;
    border: 1px solid #d9e7ea;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(24, 50, 58, 0.18);
    color: #18323a;
    text-align: center;
}

.fiber-loader__card strong {
    color: #6f9fa6;
    font-size: 1.1rem;
}

.fiber-loader__card p {
    margin: 0;
    color: #788890;
}

.thread-spool {
    --thread: #6f9fa6;
    --thread-dark: #4c8d96;
    --thread-soft: #d6ebee;
    position: relative;
    width: 118px;
    height: 96px;
    color: var(--thread);
}

.thread-spool::before,
.thread-spool::after {
    content: "";
    position: absolute;
}

.thread-spool::before {
    left: 38px;
    top: 10px;
    width: 44px;
    height: 72px;
    border: 1px solid rgba(15, 96, 114, 0.12);
    border-radius: 10px 10px 15px 15px;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.34) 0 2px,
            rgba(111, 159, 166, 0.42) 2px 6px,
            rgba(76, 141, 150, 0.66) 6px 9px
        ),
        linear-gradient(90deg, var(--thread-soft), var(--thread) 48%, var(--thread-dark));
    box-shadow:
        inset 8px 0 14px rgba(255, 255, 255, 0.34),
        inset -8px 0 14px rgba(15, 96, 114, 0.18),
        0 14px 24px rgba(24, 50, 58, 0.16);
    clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
    animation: textileBobbin 1200ms ease-in-out infinite;
}

.thread-spool::after {
    left: 11px;
    top: 24px;
    width: 92px;
    height: 42px;
    border: 5px solid transparent;
    border-top-color: var(--thread);
    border-right-color: var(--thread);
    border-radius: 54px 54px 44px 12px;
    opacity: 0.72;
    transform: rotate(-8deg);
    transform-origin: 72% 50%;
    animation: threadLoop 960ms ease-in-out infinite alternate;
}

.thread-spool span {
    position: absolute;
    display: block;
}

.thread-spool span:nth-child(1) {
    left: 18px;
    top: 8px;
    width: 50px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--thread), var(--thread-dark));
    transform: rotate(50deg);
    transform-origin: right center;
    animation: threadTension 720ms ease-in-out infinite alternate;
}

.thread-spool span:nth-child(2) {
    left: 24px;
    bottom: 6px;
    width: 72px;
    height: 10px;
    border-radius: 999px;
    background: radial-gradient(ellipse at center, rgba(24, 50, 58, 0.2), transparent 68%);
}

.thread-spool span:nth-child(3) {
    left: 2px;
    top: 39px;
    width: 48px;
    height: 22px;
    border-top: 4px solid var(--thread);
    border-radius: 50%;
    opacity: 0.58;
    transform: rotate(-13deg);
    animation: threadFloat 860ms ease-in-out infinite alternate;
}

@keyframes textileBobbin {
    0%,
    100% {
        transform: translateY(0) scaleX(1);
    }

    50% {
        transform: translateY(2px) scaleX(0.98);
    }
}

@keyframes threadLoop {
    from {
        transform: rotate(-10deg) translateX(-2px);
        opacity: 0.58;
    }

    to {
        transform: rotate(-4deg) translateX(4px);
        opacity: 0.84;
    }
}

@keyframes threadTension {
    from {
        transform: rotate(50deg) scaleX(0.82);
        opacity: 0.58;
    }

    to {
        transform: rotate(50deg) scaleX(1.12);
        opacity: 1;
    }
}

@keyframes threadFloat {
    from {
        transform: rotate(-13deg) translateX(-2px);
    }

    to {
        transform: rotate(-7deg) translateX(6px);
    }
}

/* Login */
.app-shell--guest {
    min-height: 100vh;
    background: #6f9fa6;
}

.app-shell--guest .auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 48px 20px;
}

.flash-stack--auth {
    position: fixed;
    top: 22px;
    left: 50%;
    z-index: 10;
    width: min(calc(100% - 40px), 760px);
    transform: translateX(-50%);
}

.auth-grid--login {
    display: block;
    width: min(100%, 520px);
    min-height: auto;
}

.panel-login {
    width: 100%;
    padding: 44px 56px 36px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 44px rgba(24, 50, 58, 0.14);
}

.panel-login .login-brand {
    width: 112px;
    margin: 0 auto 24px;
    border-radius: 0;
    background: transparent;
}

.panel-login h1 {
    margin-bottom: 30px;
    color: #6f9fa6;
    font-size: 1.62rem;
    font-weight: 400;
    text-align: center;
}

.panel-login .stack-form {
    gap: 20px;
}

.panel-login .field {
    gap: 8px;
}

.panel-login .field span {
    color: #2e3545;
    font-size: 1.05rem;
    font-weight: 700;
}

.panel-login .field input {
    min-height: 52px;
    border-radius: 6px;
    border-color: #d3d9de;
    font-size: 1.02rem;
}

.login-options {
    display: grid;
    gap: 10px;
}

.panel-login .checkbox-field {
    gap: 10px;
    color: #333b4c;
}

.panel-login .checkbox-field input {
    width: 18px;
    height: 18px;
}

.panel-login .checkbox-field span {
    font-size: 1rem;
    font-weight: 600;
}

.panel-login .button-primary {
    min-height: 54px;
    border-radius: 6px;
    background: #6f9fa6;
    border-color: #6f9fa6;
    font-size: 1.08rem;
    font-weight: 700;
}

.login-footer {
    margin: 28px 0 0;
    color: #747b8b;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
}

.theme-toggle--guest {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 12;
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.86);
    color: #496e76;
    box-shadow: 0 12px 24px rgba(24, 50, 58, 0.12);
}

/* Tema escuro */
html[data-theme="dark"] .app-shell:not(.app-shell--guest),
html[data-theme="dark"] .app-layout,
html[data-theme="dark"] .workspace {
    background: #111816;
}

html[data-theme="dark"] .app-shell--guest {
    background:
        radial-gradient(circle at top left, rgba(124, 182, 191, 0.16), transparent 34%),
        #15211f;
}

html[data-theme="dark"] .system-topbar {
    background: #223c3d;
    color: #edf7f5;
}

html[data-theme="dark"] .system-brand__mark,
html[data-theme="dark"] .system-topbar .button-ghost {
    background: #f6fbfa;
    border-color: #f6fbfa;
    color: #315f64;
}

html[data-theme="dark"] .panel-login .login-brand {
    width: 154px;
    padding: 10px 14px;
    border: 1px solid rgba(167, 210, 215, 0.22);
    border-radius: 8px;
    background: #f6fbfa;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .player-brand img {
    padding: 10px 14px;
    border: 1px solid rgba(167, 210, 215, 0.22);
    background: #f6fbfa;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .system-card,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .routine-card,
html[data-theme="dark"] .selection-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .panel-login,
html[data-theme="dark"] .product-modal__panel,
html[data-theme="dark"] .dashboard-order,
html[data-theme="dark"] .invoice-note,
html[data-theme="dark"] .stock-balance-product,
html[data-theme="dark"] .import-process__modal-card,
html[data-theme="dark"] .user-list-item {
    border-color: #2b3d3a;
    background: #17221f;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .dashboard-card {
    background:
        radial-gradient(circle at top right, rgba(124, 182, 191, 0.12), transparent 34%),
        #17221f;
}

html[data-theme="dark"] .sidebar {
    border-right-color: #273835;
}

html[data-theme="dark"] .side-link,
html[data-theme="dark"] .routine-menu-link,
html[data-theme="dark"] .dashboard-head h1,
html[data-theme="dark"] .table-page-head h1,
html[data-theme="dark"] .panel-login .field span,
html[data-theme="dark"] .panel-login .checkbox-field,
html[data-theme="dark"] .product-detail__card strong,
html[data-theme="dark"] .dashboard-order__main strong,
html[data-theme="dark"] .dashboard-order__status,
html[data-theme="dark"] .dashboard-order__date,
html[data-theme="dark"] .dashboard-order__qty,
html[data-theme="dark"] .user-directory__head strong,
html[data-theme="dark"] .user-list-item strong,
html[data-theme="dark"] .user-detail-head h2,
html[data-theme="dark"] .routine-directory__stats b {
    color: #e7f0ee;
}

html[data-theme="dark"] .system-greeting,
html[data-theme="dark"] .logout-link {
    color: #f7fbfa;
}

html[data-theme="dark"] .side-section h2,
html[data-theme="dark"] .side-link:hover,
html[data-theme="dark"] .side-link.is-active,
html[data-theme="dark"] .routine-menu-link:hover,
html[data-theme="dark"] .routine-menu-link.is-active,
html[data-theme="dark"] .panel-login h1 {
    color: #a7d2d7;
}

html[data-theme="dark"] .side-divider,
html[data-theme="dark"] .dashboard-head p,
html[data-theme="dark"] .flash,
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .dashboard-order__items th,
html[data-theme="dark"] .dashboard-order__items td {
    border-color: #2b3d3a;
}

html[data-theme="dark"] .flash,
html[data-theme="dark"] .dashboard-head p,
html[data-theme="dark"] .product-description-card,
html[data-theme="dark"] .dashboard-orders-detail__summary article,
html[data-theme="dark"] .dashboard-order[open] summary,
html[data-theme="dark"] .dashboard-order__body,
html[data-theme="dark"] .dashboard-order__meta span,
html[data-theme="dark"] .dashboard-order__items th,
html[data-theme="dark"] .dashboard-order__items,
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .user-list-item,
html[data-theme="dark"] .routine-directory__stats span,
html[data-theme="dark"] .routine-access-box,
html[data-theme="dark"] .user-facts,
html[data-theme="dark"] .panel-login .field input {
    background: #1d2a27;
    color: #e7f0ee;
}

html[data-theme="dark"] .user-list-item:hover,
html[data-theme="dark"] .user-list-item.is-active {
    border-color: rgba(167, 210, 215, 0.38);
    background: #243633;
}

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .table-search,
html[data-theme="dark"] .table-limit,
html[data-theme="dark"] .user-directory__search,
html[data-theme="dark"] .import-processes__toolbar input,
html[data-theme="dark"] .invoice-notes__search input,
html[data-theme="dark"] .stock-balance__search input {
    border-color: #334844;
    background: #1d2a27;
    color: #e7f0ee;
}

html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder,
html[data-theme="dark"] .table-search::placeholder,
html[data-theme="dark"] .import-processes__toolbar input::placeholder,
html[data-theme="dark"] .stock-balance__search input::placeholder,
html[data-theme="dark"] .invoice-notes__search input::placeholder {
    color: #7f9692;
}

html[data-theme="dark"] .button-ghost,
html[data-theme="dark"] .button-secondary {
    border-color: #334844;
    background: #1d2a27;
    color: #b6d9dc;
}

html[data-theme="dark"] .role-pill {
    background: #253633;
    color: #d8e9e6;
}

html[data-theme="dark"] .role-pill--success {
    background: rgba(121, 198, 159, 0.16);
    color: #9dd9b8;
}

html[data-theme="dark"] .role-pill--warning,
html[data-theme="dark"] .role-pill--representative {
    background: rgba(230, 176, 121, 0.16);
    color: #f1c78f;
}

html[data-theme="dark"] .role-pill--danger {
    background: rgba(221, 112, 130, 0.16);
    color: #eca0af;
}

html[data-theme="dark"] .permission-summary article,
html[data-theme="dark"] .permission-profile-panel,
html[data-theme="dark"] .permission-profile-card,
html[data-theme="dark"] .permission-matrix__head,
html[data-theme="dark"] .permission-routine-card,
html[data-theme="dark"] .permission-routine-card__counts span {
    border-color: #2b3d3a;
    background: #17221f;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .permission-profile-card,
html[data-theme="dark"] .permission-routine-card__counts span {
    background: #1d2a27;
    box-shadow: none;
}

html[data-theme="dark"] .permission-profile-panel header {
    border-color: #2b3d3a;
}

html[data-theme="dark"] .permission-summary strong,
html[data-theme="dark"] .permission-profile-panel header strong,
html[data-theme="dark"] .permission-profile-card strong,
html[data-theme="dark"] .permission-matrix__head strong,
html[data-theme="dark"] .permission-routine-card__main h2,
html[data-theme="dark"] .permission-routine-card__counts strong {
    color: #edf7f5;
}

html[data-theme="dark"] .permission-summary span,
html[data-theme="dark"] .permission-routine-card__users h3,
html[data-theme="dark"] .permission-routine-card__counts small {
    color: #a7d2d7;
}

html[data-theme="dark"] .permission-profile-card p,
html[data-theme="dark"] .permission-profile-card small,
html[data-theme="dark"] .permission-routine-card__main p {
    color: #aebfbc;
}

html[data-theme="dark"] .permission-matrix__head input {
    border-color: #334844;
    background: #1d2a27;
    color: #e7f0ee;
}

html[data-theme="dark"] .permission-matrix__head input::placeholder {
    color: #7f9692;
}

html[data-theme="dark"] .permission-user-chip,
html[data-theme="dark"] .permission-empty-chip {
    background: #253633;
    color: #d8e9e6;
}

html[data-theme="dark"] .permission-user-chip:hover {
    border-color: rgba(167, 210, 215, 0.46);
    background: #243633;
}

html[data-theme="dark"] .permission-empty-chip {
    color: #9aacaa;
}

html[data-theme="dark"] .system-topbar .button-ghost {
    border-color: rgba(237, 247, 245, 0.28);
    background: rgba(237, 247, 245, 0.12);
    color: #edf7f5;
}

html[data-theme="dark"] .system-card .metric-card,
html[data-theme="dark"] .system-card .routine-custom--products .metric-card,
html[data-theme="dark"] .product-filter-panel,
html[data-theme="dark"] .product-detail__card,
html[data-theme="dark"] .product-detail dl div,
html[data-theme="dark"] .product-edit-form__body,
html[data-theme="dark"] .product-checkbox-field,
html[data-theme="dark"] .import-processes__summary article,
html[data-theme="dark"] .import-process-date,
html[data-theme="dark"] .import-process__info div {
    border-color: #2b3d3a;
    background: #1d2a27;
    color: #e7f0ee;
}

html[data-theme="dark"] .metric-card p,
html[data-theme="dark"] .system-card .metric-card span,
html[data-theme="dark"] .product-detail__card span,
html[data-theme="dark"] .product-detail__descriptions > h3,
html[data-theme="dark"] .product-description-card h3,
html[data-theme="dark"] .product-detail dt,
html[data-theme="dark"] .product-edit-form__head h3,
html[data-theme="dark"] .product-edit-field span,
html[data-theme="dark"] .product-checkbox-field span,
html[data-theme="dark"] .import-processes__summary span,
html[data-theme="dark"] .import-process-date span,
html[data-theme="dark"] .import-process__info dt,
html[data-theme="dark"] .dashboard-orders-detail__summary span {
    color: #9fc6c9;
}

html[data-theme="dark"] .system-card .metric-card strong,
html[data-theme="dark"] .product-code-stack strong,
html[data-theme="dark"] .product-modal__panel h2,
html[data-theme="dark"] .product-detail__card strong,
html[data-theme="dark"] .product-description-card p,
html[data-theme="dark"] .product-detail dd,
html[data-theme="dark"] .product-edit-field textarea,
html[data-theme="dark"] .import-processes__summary strong,
html[data-theme="dark"] .import-process summary strong,
html[data-theme="dark"] .import-process__main small,
html[data-theme="dark"] .import-process__modal-head strong,
html[data-theme="dark"] .import-process-date strong,
html[data-theme="dark"] .import-process-date input,
html[data-theme="dark"] .import-process__info dd,
html[data-theme="dark"] .dashboard-orders-detail__summary strong,
html[data-theme="dark"] .dashboard-order__meta b {
    color: #f1f7f5;
}

html[data-theme="dark"] .table-page-head p,
html[data-theme="dark"] .product-edit-form__head p,
html[data-theme="dark"] .product-save-status,
html[data-theme="dark"] .import-process summary small,
html[data-theme="dark"] .import-process__modal-head em,
html[data-theme="dark"] .import-process-date-form__status,
html[data-theme="dark"] .import-process__product-pending span,
html[data-theme="dark"] .dashboard-orders-detail__updated,
html[data-theme="dark"] .dashboard-order__main small,
html[data-theme="dark"] .dashboard-order__meta span {
    color: #aebfbc;
}

html[data-theme="dark"] .product-edit-field textarea,
html[data-theme="dark"] .import-process-date input {
    border-color: #334844;
    background: #121c19;
}

html[data-theme="dark"] .product-import-badge--yes,
html[data-theme="dark"] .product-import-badge--no {
    background: rgba(231, 240, 238, 0.1);
    color: #c8d7d5;
}

html[data-theme="dark"] .product-flag--yes,
html[data-theme="dark"] .import-process__status--ok {
    background: rgba(121, 198, 159, 0.16);
    color: #a7e0bd;
}

html[data-theme="dark"] .product-flag--no {
    background: rgba(230, 176, 121, 0.14);
    color: #efc7a3;
}

html[data-theme="dark"] .data-table tr[data-product-code]:focus,
html[data-theme="dark"] .data-table tr[data-product-code]:hover,
html[data-theme="dark"] .data-table tr[data-client-id]:focus,
html[data-theme="dark"] .data-table tr[data-client-id]:hover,
html[data-theme="dark"] .import-process summary:hover,
html[data-theme="dark"] .import-process[open] summary,
html[data-theme="dark"] .import-processes--page .import-process[open] > summary,
html[data-theme="dark"] .dashboard-order[open] summary {
    background: #243633;
}

html[data-theme="dark"] .import-process-map {
    border-color: #2b3d3a;
    background: #17221f;
}

html[data-theme="dark"] .import-world-map {
    border-color: #2b3d3a;
    background: #17221f;
}

html[data-theme="dark"] .import-world-map__head,
html[data-theme="dark"] .import-world-map__canvas,
html[data-theme="dark"] .import-world-map__voyage {
    border-color: #2b3d3a;
    background: #1d2a27;
    color: #e7f0ee;
}

html[data-theme="dark"] .import-world-map__canvas {
    background:
        repeating-linear-gradient(0deg, rgba(124, 182, 191, 0.08) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(90deg, rgba(124, 182, 191, 0.06) 0 1px, transparent 1px 52px),
        radial-gradient(ellipse at 30% 28%, rgba(124, 182, 191, 0.12), transparent 42%),
        linear-gradient(135deg, #14231f 0%, #1d2a27 54%, #16231f 100%);
}

html[data-theme="dark"] .import-world-map__canvas::before {
    border-color: rgba(124, 182, 191, 0.16);
    background:
        linear-gradient(90deg, transparent 49.8%, rgba(124, 182, 191, 0.11) 50%, transparent 50.2%),
        linear-gradient(0deg, transparent 49.8%, rgba(124, 182, 191, 0.11) 50%, transparent 50.2%);
}

html[data-theme="dark"] .import-world-map__canvas::after {
    border-color: rgba(124, 182, 191, 0.24);
    background:
        linear-gradient(45deg, transparent 44%, rgba(167, 210, 215, 0.22) 45%, rgba(167, 210, 215, 0.22) 55%, transparent 56%),
        linear-gradient(-45deg, transparent 44%, rgba(167, 210, 215, 0.12) 45%, rgba(167, 210, 215, 0.12) 55%, transparent 56%);
}

html[data-theme="dark"] .import-world-map__head small,
html[data-theme="dark"] .import-world-map__head em,
html[data-theme="dark"] .import-world-map__voyage small,
html[data-theme="dark"] .import-world-map__voyage-dates b {
    color: #a7c6c7;
}

html[data-theme="dark"] .import-world-map__head strong,
html[data-theme="dark"] .import-world-map__voyage-top strong,
html[data-theme="dark"] .import-world-map__ship strong {
    color: #edf7f5;
}

html[data-theme="dark"] .import-world-map__continent {
    fill: none;
    stroke: rgba(167, 210, 215, 0.12);
}

html[data-theme="dark"] .import-world-map__continent--small {
    fill: none;
}

html[data-theme="dark"] .import-world-map__route-line {
    stroke: rgba(124, 182, 191, 0.44);
}

html[data-theme="dark"] .import-world-map__route-line--lower {
    stroke: rgba(230, 176, 121, 0.24);
}

html[data-theme="dark"] .import-world-map__port,
html[data-theme="dark"] .import-world-map__ship {
    border-color: #314844;
    background: #223330;
    color: #e7f0ee;
    box-shadow: none;
}

html[data-theme="dark"] .import-world-map__ship:hover,
html[data-theme="dark"] .import-world-map__ship:focus-visible,
html[data-theme="dark"] .import-world-map__voyage:hover,
html[data-theme="dark"] .import-world-map__voyage:focus-visible {
    border-color: rgba(167, 210, 215, 0.46);
    background: #243633;
}

html[data-theme="dark"] .import-world-map__ship.is-delayed,
html[data-theme="dark"] .import-world-map__voyage.is-delayed {
    border-color: rgba(236, 160, 175, 0.42);
    background: rgba(221, 112, 130, 0.12);
}

html[data-theme="dark"] .import-world-map__ship em {
    color: #a7d2d7;
}

html[data-theme="dark"] .import-world-map__ship.is-delayed em {
    color: #eca0af;
}

html[data-theme="dark"] .import-world-map__voyage-top em {
    color: #a7d2d7;
}

html[data-theme="dark"] .import-world-map__voyage.is-delayed .import-world-map__voyage-top em {
    color: #eca0af;
}

html[data-theme="dark"] .import-world-map__progress {
    background: #13201d;
}

html[data-theme="dark"] .import-process-map__head,
html[data-theme="dark"] .import-process-map__stage-grid {
    border-color: #2b3d3a;
    background:
        linear-gradient(180deg, rgba(29, 42, 39, 0.96), rgba(20, 31, 28, 0.98)),
        repeating-linear-gradient(0deg, rgba(124, 182, 191, 0.06) 0 2px, transparent 2px 22px);
}

html[data-theme="dark"] .import-process-map__head small,
html[data-theme="dark"] .import-process-map__legend,
html[data-theme="dark"] .import-process-map__stage header span {
    color: #a7c6c7;
}

html[data-theme="dark"] .import-process-map__stage-title em {
    color: #88a7a8;
}

html[data-theme="dark"] .import-process-map__head strong,
html[data-theme="dark"] .import-process-map__stage header strong,
html[data-theme="dark"] .import-process-map__marker strong {
    color: #edf7f5;
}

html[data-theme="dark"] .import-process-map__stage {
    border-right-color: #2b3d3a;
}

html[data-theme="dark"] .import-process-map__stage header strong {
    background: #223330;
}

html[data-theme="dark"] .import-process-map__stage p,
html[data-theme="dark"] .import-process-map__marker small {
    color: #9aacaa;
}

html[data-theme="dark"] .import-process-map__marker {
    border-color: #314844;
    background: #1d2a27;
    box-shadow: none;
}

html[data-theme="dark"] .import-process-map__marker:hover {
    border-color: rgba(167, 210, 215, 0.46);
    background: #243633;
}

html[data-theme="dark"] .import-process-map__marker-quantity {
    background: rgba(167, 210, 215, 0.14);
    color: #cfe7e7;
}

html[data-theme="dark"] .import-process,
html[data-theme="dark"] .dashboard-order {
    border-color: #2b3d3a;
    background: #17221f;
}

html[data-theme="dark"] .import-processes--page .import-process[open] .import-process__modal-card,
html[data-theme="dark"] .dashboard-orders-modal__panel {
    border-color: #2b3d3a;
    background: #17221f;
}

html[data-theme="dark"] .product-modal__backdrop,
html[data-theme="dark"] .import-processes--page .import-process[open] .import-process__modal-backdrop {
    background: rgba(5, 10, 9, 0.66);
}

html[data-theme="dark"] .product-modal__close,
html[data-theme="dark"] .import-processes--page .import-process__modal-close,
html[data-theme="dark"] .dashboard-order summary::after {
    background: #e8f2f0;
    color: #315f64;
}

html[data-theme="dark"] .import-process-route,
html[data-theme="dark"] .import-process-route--boarding,
html[data-theme="dark"] .dashboard-order__body,
html[data-theme="dark"] .dashboard-orders-detail__summary article,
html[data-theme="dark"] .dashboard-order__items,
html[data-theme="dark"] .dashboard-order__items th,
html[data-theme="dark"] .dashboard-order__meta span {
    border-color: #2b3d3a;
    background: #13201d;
}

html[data-theme="dark"] .import-process-route__places strong,
html[data-theme="dark"] .import-process-route__dates b {
    color: #f1f7f5;
}

html[data-theme="dark"] .import-process-route__dates,
html[data-theme="dark"] .import-process-route__places small {
    color: #9fc6c9;
}

html[data-theme="dark"] .import-process-date.is-filled {
    background: rgba(121, 198, 159, 0.08);
}

html[data-theme="dark"] .import-process-date.is-empty {
    background: #16231f;
}

html[data-theme="dark"] .import-process-date.is-delayed,
html[data-theme="dark"] .import-process__delay-badges span {
    border-color: rgba(236, 160, 175, 0.42);
    background: rgba(221, 112, 130, 0.12);
    color: #eca0af;
}

html[data-theme="dark"] .import-process__delay-badges b {
    color: #ffd1da;
}

html[data-theme="dark"] .import-process__product-pending,
html[data-theme="dark"] .dashboard-order__notes {
    border-color: rgba(230, 176, 121, 0.42) !important;
    background: rgba(230, 176, 121, 0.1) !important;
}

html[data-theme="dark"] .import-process__product-pending strong {
    color: #f1c78f;
}

html[data-theme="dark"] .import-process__status--warning,
html[data-theme="dark"] .import-process__status--pending {
    background: rgba(230, 176, 121, 0.16);
    color: #f1c78f;
}

html[data-theme="dark"] .import-process__status--danger {
    background: rgba(221, 112, 130, 0.16);
    color: #eca0af;
}

html[data-theme="dark"] .import-process__status--transit {
    background: rgba(124, 182, 191, 0.16);
    color: #a7d2d7;
}

html[data-theme="dark"] .import-process__status--neutral {
    background: rgba(231, 240, 238, 0.1);
    color: #c8d7d5;
}

html[data-theme="dark"] .theme-toggle--guest {
    border-color: rgba(167, 210, 215, 0.24);
    background: rgba(23, 34, 31, 0.86);
    color: #dcefed;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .summary-card {
    border-color: rgba(196, 224, 220, 0.12);
    color: #edf7f5;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .summary-card::before {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 58%),
        radial-gradient(circle at 92% 100%, rgba(255, 255, 255, 0.08), transparent 28%);
}

html[data-theme="dark"] .summary-card h2,
html[data-theme="dark"] .summary-card__branches b {
    color: rgba(237, 247, 245, 0.82);
}

html[data-theme="dark"] .summary-card strong,
html[data-theme="dark"] .summary-card__branches em {
    color: #f7fbfa;
}

html[data-theme="dark"] .summary-card__stock-breakdown b {
    color: rgba(237, 247, 245, 0.7);
}

html[data-theme="dark"] .summary-card__stock-breakdown em {
    color: #f7fbfa;
}

html[data-theme="dark"] .summary-card__branches {
    border-color: rgba(231, 240, 238, 0.1);
}

html[data-theme="dark"] .summary-card__branches span,
html[data-theme="dark"] .summary-card__stock-breakdown span,
html[data-theme="dark"] .summary-card__icon {
    border-color: rgba(231, 240, 238, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #dbecea;
}

html[data-theme="dark"] .summary-card--cyan {
    background: linear-gradient(135deg, #17282b, #1f3839);
}

html[data-theme="dark"] .summary-card--green {
    background: linear-gradient(135deg, #18271f, #20392d);
}

html[data-theme="dark"] .summary-card--yellow {
    background: linear-gradient(135deg, #2a2517, #3d341b);
}

html[data-theme="dark"] .summary-card--red {
    background: linear-gradient(135deg, #2d1b20, #45232c);
}

html[data-theme="dark"] .fiber-loader {
    background: rgba(10, 16, 15, 0.68);
}

html[data-theme="dark"] .fiber-loader__card {
    border-color: #2b3d3a;
    background: #17221f;
    color: #e7f0ee;
}

html[data-theme="dark"] .fiber-loader__card strong {
    color: #a7d2d7;
}

html[data-theme="dark"] .thread-spool {
    --thread: #a7d2d7;
    --thread-dark: #7cb6bf;
    --thread-soft: #294447;
}

html[data-theme="dark"] .login-history-summary article,
html[data-theme="dark"] .login-risk-list li {
    border-color: #2b3d3a;
    background: #1d2a27;
    color: #d8e9e6;
}

html[data-theme="dark"] .login-history-summary strong,
html[data-theme="dark"] .admin-history-table td strong {
    color: #e7f0ee;
}

html[data-theme="dark"] .login-history-summary span,
html[data-theme="dark"] .login-history-toolbar .field span,
html[data-theme="dark"] .login-agent-details summary {
    color: #a7d2d7;
}

html[data-theme="dark"] .empty-data,
html[data-theme="dark"] .pdf-placeholder {
    border-color: #2b3d3a;
    background: #17221f;
    color: #e7f0ee;
}

html[data-theme="dark"] .empty-data::before {
    background: linear-gradient(145deg, #213a38, #2b3327);
    box-shadow: inset 0 0 0 1px rgba(167, 210, 215, 0.18);
}

html[data-theme="dark"] .empty-data p {
    color: #aebfbc;
}

html[data-theme="dark"] .stock-balance,
html[data-theme="dark"] .invoice-notes,
html[data-theme="dark"] .delivery-monitor,
html[data-theme="dark"] .sales-group,
html[data-theme="dark"] .monitor-orders,
html[data-theme="dark"] .inventory-panel,
html[data-theme="dark"] .warehouse-map {
    color: #e7f0ee;
}

html[data-theme="dark"] .stock-balance__summary article,
html[data-theme="dark"] .stock-balance__toolbar,
html[data-theme="dark"] .stock-balance__table-wrap,
html[data-theme="dark"] .stock-balance-products,
html[data-theme="dark"] .invoice-notes__filters,
html[data-theme="dark"] .invoice-notes__summary article,
html[data-theme="dark"] .invoice-notes__toolbar,
html[data-theme="dark"] .invoice-notes__table-wrap,
html[data-theme="dark"] .invoice-note,
html[data-theme="dark"] .delivery-monitor__metric,
html[data-theme="dark"] .delivery-monitor__punctuality,
html[data-theme="dark"] .delivery-monitor__branch-row article,
html[data-theme="dark"] .delivery-monitor__query,
html[data-theme="dark"] .delivery-monitor__table-wrap,
html[data-theme="dark"] .sales-group__summary article,
html[data-theme="dark"] .sales-group__toolbar,
html[data-theme="dark"] .sales-group__table-wrap,
html[data-theme="dark"] .monitor-orders__table-wrap,
html[data-theme="dark"] .inventory-hero,
html[data-theme="dark"] .inventory-stats article,
html[data-theme="dark"] .inventory-address-card,
html[data-theme="dark"] .warehouse-summary article,
html[data-theme="dark"] .warehouse-special-card,
html[data-theme="dark"] .warehouse-service-lane,
html[data-theme="dark"] .warehouse-service-stack > div,
html[data-theme="dark"] .warehouse-streets,
html[data-theme="dark"] .warehouse-street,
html[data-theme="dark"] .address-detail-summary article,
html[data-theme="dark"] .address-product,
html[data-theme="dark"] .address-piece-card,
html[data-theme="dark"] .address-detail-loading {
    border-color: #2b3d3a;
    background: #17221f;
    color: #e7f0ee;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .stock-balance__summary article,
html[data-theme="dark"] .invoice-notes__summary article,
html[data-theme="dark"] .delivery-monitor__metric,
html[data-theme="dark"] .delivery-monitor__punctuality,
html[data-theme="dark"] .delivery-monitor__branch-row article,
html[data-theme="dark"] .sales-group__summary article,
html[data-theme="dark"] .inventory-hero,
html[data-theme="dark"] .inventory-address-card,
html[data-theme="dark"] .warehouse-summary article {
    background:
        radial-gradient(circle at top right, rgba(124, 182, 191, 0.08), transparent 42%),
        #1d2a27;
}

html[data-theme="dark"] .stock-balance__toolbar,
html[data-theme="dark"] .invoice-notes__filters,
html[data-theme="dark"] .invoice-notes__toolbar,
html[data-theme="dark"] .sales-group__toolbar {
    background: #1d2a27;
    box-shadow: none;
}

html[data-theme="dark"] .stock-balance__summary span,
html[data-theme="dark"] .stock-balance__search span,
html[data-theme="dark"] .stock-balance__toolbar p,
html[data-theme="dark"] .stock-balance-product small,
html[data-theme="dark"] .stock-balance__preview-note,
html[data-theme="dark"] .invoice-notes__filters span,
html[data-theme="dark"] .invoice-notes__summary span,
html[data-theme="dark"] .invoice-notes__search span,
html[data-theme="dark"] .invoice-notes__toolbar p,
html[data-theme="dark"] .invoice-note__main small,
html[data-theme="dark"] .invoice-note__cell small,
html[data-theme="dark"] .invoice-note__meta,
html[data-theme="dark"] .invoice-notes__preview-note,
html[data-theme="dark"] .delivery-monitor__actions span,
html[data-theme="dark"] .delivery-monitor__metric span,
html[data-theme="dark"] .delivery-monitor__punctuality span,
html[data-theme="dark"] .delivery-monitor__punctuality small,
html[data-theme="dark"] .delivery-monitor__branch-row span,
html[data-theme="dark"] .delivery-monitor__branch-row small,
html[data-theme="dark"] .delivery-monitor__query span,
html[data-theme="dark"] .delivery-monitor__preview-note,
html[data-theme="dark"] .sales-group__summary span,
html[data-theme="dark"] .sales-group__summary small,
html[data-theme="dark"] .sales-group__search span,
html[data-theme="dark"] .sales-group__toolbar p,
html[data-theme="dark"] .sales-group-table__group small,
html[data-theme="dark"] .sales-group__preview-note,
html[data-theme="dark"] .inventory-hero span,
html[data-theme="dark"] .inventory-stats span,
html[data-theme="dark"] .inventory-address-card span,
html[data-theme="dark"] .inventory-address-card small,
html[data-theme="dark"] .inventory-preview-note,
html[data-theme="dark"] .warehouse-summary span,
html[data-theme="dark"] .warehouse-special-card > p,
html[data-theme="dark"] .warehouse-service-lane > p,
html[data-theme="dark"] .warehouse-service-stack span,
html[data-theme="dark"] .warehouse-side-room__header p,
html[data-theme="dark"] .warehouse-side-room__header small,
html[data-theme="dark"] .warehouse-special-card > small,
html[data-theme="dark"] .warehouse-service-stack > div > small,
html[data-theme="dark"] .warehouse-empty-street,
html[data-theme="dark"] .warehouse-legend,
html[data-theme="dark"] .address-detail-summary span,
html[data-theme="dark"] .address-piece-card span,
html[data-theme="dark"] .address-product summary small,
html[data-theme="dark"] .address-detail-loading {
    color: #aebfbc;
}

html[data-theme="dark"] .stock-balance__summary strong,
html[data-theme="dark"] .stock-balance-product strong,
html[data-theme="dark"] .stock-balance-product__list,
html[data-theme="dark"] .invoice-notes__filters strong,
html[data-theme="dark"] .invoice-notes__summary strong,
html[data-theme="dark"] .invoice-note__main strong,
html[data-theme="dark"] .invoice-note__cell strong,
html[data-theme="dark"] .delivery-monitor__metric strong,
html[data-theme="dark"] .delivery-monitor__punctuality strong,
html[data-theme="dark"] .delivery-monitor__branch-row strong,
html[data-theme="dark"] .delivery-monitor__query strong,
html[data-theme="dark"] .sales-group__summary strong,
html[data-theme="dark"] .sales-group-table__group strong,
html[data-theme="dark"] .sales-group-trend,
html[data-theme="dark"] .inventory-hero h2,
html[data-theme="dark"] .inventory-stats strong,
html[data-theme="dark"] .inventory-address-card strong,
html[data-theme="dark"] .warehouse-summary strong,
html[data-theme="dark"] .warehouse-service-lane h2,
html[data-theme="dark"] .warehouse-street-level-label,
html[data-theme="dark"] .address-detail-summary strong,
html[data-theme="dark"] .address-product summary,
html[data-theme="dark"] .address-piece-card strong,
html[data-theme="dark"] .monitor-orders__title h2,
html[data-theme="dark"] .monitor-orders-table td {
    color: #f1f7f5;
}

html[data-theme="dark"] .stock-balance-table,
html[data-theme="dark"] .invoice-notes-table,
html[data-theme="dark"] .delivery-monitor-table,
html[data-theme="dark"] .sales-group-table,
html[data-theme="dark"] .monitor-orders-table {
    background: #17221f;
    color: #e7f0ee;
}

html[data-theme="dark"] .stock-balance-table th,
html[data-theme="dark"] .stock-balance-table td,
html[data-theme="dark"] .stock-balance-product,
html[data-theme="dark"] .invoice-notes-table th,
html[data-theme="dark"] .invoice-notes-table td,
html[data-theme="dark"] .invoice-note__items,
html[data-theme="dark"] .delivery-monitor__top,
html[data-theme="dark"] .delivery-monitor-table th,
html[data-theme="dark"] .delivery-monitor-table td,
html[data-theme="dark"] .sales-group-table th,
html[data-theme="dark"] .sales-group-table td,
html[data-theme="dark"] .monitor-orders__top,
html[data-theme="dark"] .monitor-orders-table th,
html[data-theme="dark"] .monitor-orders-table td {
    border-color: #2b3d3a;
}

html[data-theme="dark"] .stock-balance-table th,
html[data-theme="dark"] .stock-balance-products__head,
html[data-theme="dark"] .invoice-notes-table th,
html[data-theme="dark"] .invoice-notes-list__head,
html[data-theme="dark"] .delivery-monitor-table th,
html[data-theme="dark"] .sales-group-table th,
html[data-theme="dark"] .monitor-orders-table th {
    background: #20302d;
    color: #a7d2d7;
}

html[data-theme="dark"] .stock-balance-table tbody tr:hover,
html[data-theme="dark"] .stock-balance-product[open] summary,
html[data-theme="dark"] .invoice-notes-table tbody tr:hover,
html[data-theme="dark"] .invoice-note summary:hover,
html[data-theme="dark"] .invoice-note[open] summary,
html[data-theme="dark"] .delivery-monitor-table tbody tr:hover,
html[data-theme="dark"] .sales-group-table tbody tr:hover {
    background: #243633;
}

html[data-theme="dark"] .sales-group-table tbody tr:nth-child(even),
html[data-theme="dark"] .stock-balance-product__details,
html[data-theme="dark"] .stock-balance__table-wrap--nested,
html[data-theme="dark"] .invoice-note__items,
html[data-theme="dark"] .invoice-notes__table-wrap--nested {
    background: #13201d;
}

html[data-theme="dark"] .stock-balance__search input,
html[data-theme="dark"] .invoice-notes__filters select,
html[data-theme="dark"] .invoice-notes__search input,
html[data-theme="dark"] .delivery-monitor__edit-form input,
html[data-theme="dark"] .sales-group__search input {
    border-color: #334844;
    background: #121c19;
    color: #e7f0ee;
}

html[data-theme="dark"] .stock-balance__search input::placeholder,
html[data-theme="dark"] .invoice-notes__search input::placeholder,
html[data-theme="dark"] .sales-group__search input::placeholder {
    color: #7f9692;
}

html[data-theme="dark"] .invoice-notes-table__branch,
html[data-theme="dark"] .invoice-note__expand,
html[data-theme="dark"] .delivery-monitor__branch,
html[data-theme="dark"] .delivery-monitor__status,
html[data-theme="dark"] .stock-balance-product summary::after,
html[data-theme="dark"] .address-product summary::before,
html[data-theme="dark"] .monitor-orders__branch,
html[data-theme="dark"] .monitor-orders__mini-icon {
    border-color: #334844;
    background: #223330;
    color: #a7d2d7;
    box-shadow: none;
}

html[data-theme="dark"] .invoice-note[open] .invoice-note__expand {
    background: rgba(121, 198, 159, 0.16);
    color: #a7e0bd;
}

html[data-theme="dark"] .monitor-orders__title strong {
    color: #aebfbc;
}

html[data-theme="dark"] .delivery-monitor__top h2 {
    color: #f1f7f5;
}

html[data-theme="dark"] .delivery-monitor__top strong {
    color: #aebfbc;
}

html[data-theme="dark"] .delivery-monitor__bar {
    background: #243633;
}

html[data-theme="dark"] .delivery-monitor-row--late {
    background: rgba(221, 112, 130, 0.12);
}

html[data-theme="dark"] .delivery-monitor-row--ok {
    background: rgba(121, 198, 159, 0.1);
}

html[data-theme="dark"] .delivery-monitor-row--pending {
    background: rgba(230, 176, 121, 0.12);
}

html[data-theme="dark"] .delivery-monitor__status--ok {
    color: #8bdc91;
}

html[data-theme="dark"] .delivery-monitor__status--pending {
    color: #f1c78f;
}

html[data-theme="dark"] .delivery-monitor__status--late {
    color: #ee9ca4;
}

html[data-theme="dark"] .monitor-orders-row--late {
    background: rgba(221, 112, 130, 0.12);
}

html[data-theme="dark"] .monitor-orders-row--ok {
    background: rgba(121, 198, 159, 0.1);
}

html[data-theme="dark"] .monitor-orders-row--warning {
    background: rgba(230, 176, 121, 0.12);
}

html[data-theme="dark"] .monitor-orders-row--blocked {
    background: rgba(143, 119, 188, 0.14);
}

html[data-theme="dark"] .monitor-orders-row--neutral {
    background: #17221f;
}

html[data-theme="dark"] .monitor-orders-row:hover {
    background-color: #243633;
}

html[data-theme="dark"] .monitor-orders__pdf-icon {
    background: #1d2a27;
    box-shadow: none;
}

html[data-theme="dark"] .monitor-orders__pdf-icon::before {
    background:
        linear-gradient(135deg, transparent 0 48%, currentColor 49% 52%, #1d2a27 53%);
}

html[data-theme="dark"] .monitor-orders__branch--green {
    color: #8bdc91;
}

html[data-theme="dark"] .monitor-orders__branch--blue {
    color: #9fb7ff;
}

html[data-theme="dark"] .monitor-orders__mini-icon--finance {
    color: #f1c78f;
}

html[data-theme="dark"] .monitor-orders__mini-icon--route {
    color: #c9b7f1;
}

html[data-theme="dark"] .monitor-orders__mini-icon--stock {
    color: #a7d2d7;
}

html[data-theme="dark"] .sales-group-bar {
    background: #243633;
}

html[data-theme="dark"] .sales-group__summary-trend--up,
html[data-theme="dark"] .sales-group-table__variation--up {
    color: #8bdc91;
}

html[data-theme="dark"] .sales-group__summary-trend--down,
html[data-theme="dark"] .sales-group-table__variation--down {
    color: #eca0af;
}

html[data-theme="dark"] .sales-group__summary-trend--flat,
html[data-theme="dark"] .sales-group-table__variation--flat {
    color: #f1c78f;
}

html[data-theme="dark"] .inventory-hero strong {
    background: #5d929a;
    color: #f7fbfa;
    box-shadow: none;
}

html[data-theme="dark"] .inventory-address-card {
    background:
        radial-gradient(circle at top right, rgba(167, 210, 215, 0.1), transparent 44%),
        linear-gradient(145deg, #1d2a27, #17221f);
}

html[data-theme="dark"] .inventory-address-card--clickable:hover,
html[data-theme="dark"] .inventory-address-card--clickable:focus-visible {
    border-color: rgba(167, 210, 215, 0.46);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .warehouse-summary .is-alert {
    border-color: rgba(236, 160, 175, 0.42);
    background: rgba(221, 112, 130, 0.12);
}

html[data-theme="dark"] .warehouse-summary .is-alert strong {
    color: #eca0af;
}

html[data-theme="dark"] .warehouse-service-lane {
    background:
        linear-gradient(180deg, rgba(124, 182, 191, 0.07), rgba(18, 28, 25, 0)),
        #17221f;
}

html[data-theme="dark"] .warehouse-service-stack > div {
    background: #13201d;
}

html[data-theme="dark"] .warehouse-streets {
    background:
        linear-gradient(90deg, rgba(124, 182, 191, 0.07) 0 2px, transparent 2px 100%) 0 0 / 56px 100%,
        #13201d;
}

html[data-theme="dark"] .warehouse-street header {
    background: #456d74;
    color: #f7fbfa;
}

html[data-theme="dark"] .warehouse-street header span {
    color: rgba(247, 251, 250, 0.82);
}

html[data-theme="dark"] .warehouse-street-columns {
    color: #aebfbc;
}

html[data-theme="dark"] .warehouse-street-columns strong,
html[data-theme="dark"] .warehouse-street-level-label,
html[data-theme="dark"] .warehouse-side-room__header > span {
    background: #20302d;
    color: #d8e9e6;
}

html[data-theme="dark"] .stock-address {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

html[data-theme="dark"] .stock-address--free {
    background: #68aa78;
    color: #0f2e1e;
}

html[data-theme="dark"] .stock-address--busy,
html[data-theme="dark"] .stock-address--underused {
    background: #b99343;
    color: #211808;
}

html[data-theme="dark"] .stock-address--full {
    background: #b85f66;
    color: #fff5f6;
}

html[data-theme="dark"] .stock-address--info {
    background: #629daa;
    color: #f3fbfc;
}

html[data-theme="dark"] .stock-address--muted {
    background: #283633;
    color: #aebfbc;
}

html[data-theme="dark"] .stock-address--danger {
    background: #b95d62;
    color: #fff5f6;
}

html[data-theme="dark"] .stock-address__stats small {
    background: rgba(255, 255, 255, 0.16);
}

html[data-theme="dark"] .stock-address--free .stock-address__stats small,
html[data-theme="dark"] .stock-address--underused .stock-address__stats small,
html[data-theme="dark"] .stock-address--muted .stock-address__stats small {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 980px) {
    .app-shell.mobile-menu-open {
        overflow: hidden;
    }

    .system-topbar {
        height: auto;
        min-height: 64px;
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 14px;
    }

    .system-brand {
        flex: 1;
        min-width: 0;
        gap: 10px;
        font-size: 1.04rem;
    }

    .system-brand strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .system-brand__mark {
        width: 112px;
        height: 42px;
        padding: 6px 10px;
        flex-shrink: 0;
    }

    .system-brand__mark img {
        width: 100%;
        max-height: 32px;
    }

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 38px;
        padding: 0 12px;
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.18);
        color: #ffffff;
        cursor: pointer;
        font-weight: 800;
    }

    .mobile-menu-button span,
    .mobile-menu-button span::before,
    .mobile-menu-button span::after {
        display: block;
        width: 16px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

    .mobile-menu-button span {
        position: relative;
    }

    .mobile-menu-button span::before,
    .mobile-menu-button span::after {
        content: "";
        position: absolute;
        left: 0;
    }

    .mobile-menu-button span::before {
        top: -5px;
    }

    .mobile-menu-button span::after {
        top: 5px;
    }

    .topbar-actions {
        order: 3;
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        padding-top: 9px;
        border-top: 1px solid rgba(255, 255, 255, 0.22);
        font-size: 0.86rem;
    }

    .system-greeting {
        min-width: 0;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .button-small {
        min-height: 34px;
        padding: 0 10px;
        font-size: 0.84rem;
    }

    .logout-link {
        font-size: 0.86rem;
    }

    .app-layout {
        display: block;
        min-height: calc(100vh - 112px);
    }

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

    .login-history-toolbar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 42;
        width: min(86vw, 330px);
        height: 100dvh;
        padding: 22px 20px 34px;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    .app-shell--routine-focus .sidebar {
        inset: 0 auto 0 0;
        height: 100dvh;
    }

    .side-nav {
        display: grid;
        gap: 0;
        overflow: visible;
    }

    .side-divider {
        display: block;
        margin: 18px 0;
    }

    .side-section {
        min-width: 0;
        margin-bottom: 18px;
    }

    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        display: block;
        border: 0;
        background: rgba(24, 50, 58, 0.36);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    .app-shell--routine-focus .mobile-menu-backdrop {
        inset: 0;
    }

    .app-shell.mobile-menu-open .sidebar {
        transform: translateX(0);
    }

    .app-shell.mobile-menu-open .mobile-menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .workspace {
        padding: 20px 14px 42px;
    }

    .table-page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .monitor-orders__top {
        align-items: flex-start;
        flex-direction: column;
    }

    .monitor-orders__title {
        text-align: left;
    }

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

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

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

    .permission-layout,
    .permission-routine-card,
    .permission-routine-card__users {
        grid-template-columns: 1fr;
    }

    .permission-profile-panel {
        position: static;
    }

    .permission-matrix__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .permission-matrix__head input {
        width: 100%;
    }

    .table-actions {
        justify-content: flex-start;
    }

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

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

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

    .product-detail__summary,
    .product-detail__descriptions > div,
    .product-detail dl,
    .import-processes__summary,
    .import-process summary,
    .import-process__modal-head,
    .import-process-route__places,
    .import-process-route__dates,
    .import-process__dates,
    .import-process__info {
        grid-template-columns: 1fr;
    }

    .import-processes--page .import-process[open] .import-process__modal-card {
        width: min(100vw - 20px, 760px);
        max-height: calc(100vh - 20px);
        padding: 18px;
    }

    .import-world-map__body {
        grid-template-columns: 1fr;
    }

    .import-world-map__voyages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }

    .import-process__modal-head {
        align-items: start;
    }

    .import-process__modal-head .import-process__status,
    .import-process__modal-close {
        justify-self: start;
    }

    .import-processes__toolbar input {
        width: 100%;
    }

    .invoice-notes-list__head {
        display: none;
    }

    .invoice-note summary {
        grid-template-columns: 46px minmax(0, 1fr) minmax(86px, auto);
        gap: 10px 12px;
    }

    .invoice-note__cell {
        grid-column: 2 / -1;
    }

    .invoice-note__quantity {
        text-align: left;
    }

    .invoice-note__actions {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
    }

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

    .stock-balance__toolbar,
    .product-filter-panel,
    .sales-group__toolbar,
    .invoice-notes__filters,
    .invoice-notes__toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-order summary {
        grid-template-columns: 46px minmax(0, 1fr) 28px;
    }

    .dashboard-order__status,
    .dashboard-order__date,
    .dashboard-order__qty {
        grid-column: 2 / 3;
    }

    .dashboard-orders-detail__summary,
    .dashboard-orders-detail__summary--wide {
        grid-template-columns: 1fr;
    }

    .stock-balance-products__head {
        display: none;
    }

    .stock-balance-product summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 16px;
        padding-right: 48px;
    }

    .stock-balance-product__main {
        grid-column: 1 / -1;
    }

    .stock-balance-product__metric {
        text-align: left;
    }

    .client-title-row {
        grid-template-columns: 1fr;
    }

    .client-title-values {
        text-align: left;
    }

    .warehouse-summary,
    .warehouse-specials,
    .warehouse-layout {
        grid-template-columns: 1fr;
    }

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

    .warehouse-streets {
        padding: 12px;
    }
}

@media (max-width: 720px) {
    .topbar-actions {
        align-items: center;
        flex-direction: row;
    }

    .system-greeting {
        max-width: 42vw;
    }

    .admin-user-card__head,
    .admin-user-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .user-directory {
        position: static;
    }

    .user-list {
        max-height: none;
    }

    .user-list-item,
    .user-facts {
        grid-template-columns: 1fr;
    }

    .user-list-item__meta,
    .user-detail-head__badges {
        justify-items: start;
        justify-content: flex-start;
        text-align: left;
    }

    .user-detail-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-action-row,
    .user-action-row .button {
        width: 100%;
    }

    .system-card {
        padding: 16px;
        border-radius: 14px;
    }

    .import-world-map__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .import-world-map__head em {
        text-align: left;
    }

    .import-world-map__canvas {
        min-height: 250px;
    }

    .import-world-map__ship {
        grid-template-columns: 30px auto;
        min-width: 108px;
        padding: 6px 8px;
    }

    .import-world-map__voyages {
        grid-template-columns: 1fr;
    }

    .dashboard-card {
        padding: 16px;
        border-radius: 16px;
    }

    .summary-card--with-branches {
        grid-template-columns: minmax(0, 1fr);
    }

    .summary-card--with-branches .summary-card__branches {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 12px;
        padding-top: 10px;
        padding-left: 0;
        border-top: 1px solid rgba(24, 50, 58, 0.08);
        border-left: 0;
    }

    .dashboard-orders-modal__panel {
        padding: 22px 16px;
    }

    .sales-group__summary {
        grid-template-columns: 1fr;
    }

    .sales-group-table {
        min-width: 760px;
    }

    .invoice-notes__summary {
        grid-template-columns: 1fr;
    }

    .invoice-note summary {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .invoice-note__actions,
    .invoice-note__cell {
        grid-column: 1 / -1;
    }

    .invoice-note__actions {
        justify-content: flex-start;
    }

    .invoice-note__meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-detail-section__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-detail dl,
    .client-product-row,
    .client-note-row,
    .client-title-row {
        grid-template-columns: 1fr;
    }

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

    .product-save-row {
        align-items: stretch;
        flex-direction: column;
    }

    .product-save-row .button {
        width: 100%;
    }

    .client-title-dates,
    .client-title-values {
        grid-template-columns: 1fr;
    }

    .client-note__pdf-link {
        justify-content: flex-start;
    }

    .dashboard-head h1 {
        font-size: 1.38rem;
    }

    .dashboard-head p {
        font-size: 0.78rem;
    }

    .monitor-orders__top img {
        width: 128px;
    }

    .monitor-orders__title h2 {
        font-size: 1.8rem;
    }

    .monitor-orders__title strong {
        font-size: 1.18rem;
    }

    .system-card .metric-grid {
        grid-template-columns: 1fr;
    }

    .system-card .routine-custom--products .metric-grid {
        grid-template-columns: 1fr;
    }

    .stock-balance__summary {
        grid-template-columns: 1fr;
    }

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

    .stock-balance-product__list {
        white-space: normal;
    }

    .inventory-stats {
        grid-template-columns: 1fr;
    }

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

    .summary-card {
        min-height: 142px;
        padding: 22px 18px;
    }

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

    .permission-summary,
    .permission-routine-card__counts {
        grid-template-columns: 1fr;
    }

    .summary-card h2 {
        font-size: 1rem;
    }

    .summary-card strong {
        margin-top: 12px;
        font-size: clamp(2.1rem, 12vw, 3.1rem);
    }

    .table-search,
    .table-limit,
    .table-actions .button {
        width: 100%;
    }

    .panel-login {
        padding: 34px 22px 32px;
    }

    .panel-login h1 {
        margin-bottom: 24px;
        font-size: 1.4rem;
    }

    .panel-login .field span {
        font-size: 0.98rem;
    }

    .panel-login .field input,
    .panel-login .button-primary {
        min-height: 50px;
    }
}
