:root {
    --bg: #f2f2f3;
    --ink: #212121;
    --muted: rgba(33, 33, 33, .62);
    --line: rgba(33, 33, 33, .14);
    --nav: #212121;
    --primary: #f8d856;
    --surface: #ffffff;
}

body.theme-dark {
    --bg: #151515;
    --ink: #f2f2f3;
    --muted: rgba(242, 242, 243, .68);
    --line: rgba(248, 216, 86, .2);
    --nav: #0f0f0f;
    --surface: #212121;
}

html {
    font-size: var(--app-font-size, 16px);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--app-font-family, "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    font-size: var(--app-font-size, 16px);
}

button,
input,
optgroup,
select,
textarea,
.btn,
.form-control,
.form-select,
.table,
.dropdown-menu,
.modal {
    font-family: inherit;
}

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

h1 {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    margin-bottom: 0;
}

h2 {
    font-size: 1rem;
    margin-bottom: 0;
}

.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 260px minmax(0, 1fr);
    transition: grid-template-columns .22s ease;
}

.app-shell.menu-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.25rem;
    background: var(--nav);
    color: #ffffff;
    overflow: hidden;
    transition: opacity .2s ease, padding .2s ease;
}

.app-shell.menu-collapsed .sidebar {
    padding-right: .8rem;
    padding-left: .8rem;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.app-shell.menu-collapsed .brand-row {
    justify-content: center;
}

.brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .75rem;
}

.brand-logo-link {
    min-width: 0;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: min(155px, 100%);
    max-height: 60px;
    object-fit: contain;
}

.app-shell.menu-collapsed .brand {
    justify-content: center;
}

.app-shell.menu-collapsed .brand-logo {
    display: none;
}

.app-shell.menu-collapsed .brand div,
.app-shell.menu-collapsed .sidebar .nav-link span,
.app-shell.menu-collapsed .nav-group-chevron,
.app-shell.menu-collapsed .nav-action span,
.app-shell.menu-collapsed .sidebar-copyright {
    display: none;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: var(--primary);
    color: var(--nav);
    font-weight: 800;
    font-size: 1.25rem;
}

.brand small {
    display: block;
    color: rgba(255, 255, 255, .68);
}

.sidebar .nav {
    gap: .25rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, .76);
}

.sidebar button.nav-link {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.app-shell.menu-collapsed .sidebar .nav-link,
.app-shell.menu-collapsed .nav-action {
    justify-content: center;
    padding-right: .5rem;
    padding-left: .5rem;
}

.sidebar .nav-link i {
    width: 1.15rem;
    text-align: center;
}

.nav-group-chevron {
    margin-left: auto;
    font-size: .78rem;
    transition: transform .18s ease;
}

.nav-group-toggle[aria-expanded="true"] .nav-group-chevron {
    transform: rotate(180deg);
}

.nav-submenu {
    display: grid;
    gap: .25rem;
    padding-left: 1rem;
}

.nav-submenu .nav-link {
    font-size: .92rem;
}

.app-shell.menu-collapsed .nav-submenu {
    display: none;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background: var(--primary);
    color: var(--ink);
}

.sidebar-control {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    background: transparent;
    color: #ffffff;
    padding: 0;
}

.sidebar-control:hover {
    border-color: #f8d856;
    color: #f8d856;
}

.content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    padding: 1.5rem;
}

#pageContent {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.topbar-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .85rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: .25rem;
}

.language-switch a {
    display: inline-flex;
    min-width: 38px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}

.language-switch a.active,
.language-switch a:hover {
    background: #f8d856;
    color: #212121;
}

.login-language {
    justify-self: end;
}

.login-screen-language {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.topbar-actions .btn,
.nav-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.sidebar-footer {
    display: grid;
    gap: .55rem;
}

.sidebar-copyright {
    display: block;
    color: rgba(255, 255, 255, .48);
    font-size: .72rem;
    line-height: 1.35;
    text-align: center;
}

.section-kicker {
    margin-bottom: .25rem;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sync-button {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 42px;
    white-space: nowrap;
}

.sync-dot {
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
    background: #212121;
}

body.theme-dark .sync-dot {
    background: #f8d856;
}

.btn-primary {
    --bs-btn-bg: #f8d856;
    --bs-btn-border-color: #f8d856;
    --bs-btn-color: #212121;
    --bs-btn-hover-bg: #212121;
    --bs-btn-hover-border-color: #212121;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: #212121;
    --bs-btn-active-border-color: #212121;
    --bs-btn-active-color: #ffffff;
    --bs-btn-disabled-bg: #f8d856;
    --bs-btn-disabled-border-color: #f8d856;
    --bs-btn-disabled-color: #212121;
}

.btn-dark {
    --bs-btn-bg: #212121;
    --bs-btn-border-color: #212121;
    --bs-btn-hover-bg: #f8d856;
    --bs-btn-hover-border-color: #f8d856;
    --bs-btn-hover-color: #212121;
}

.btn-outline-dark,
.btn-outline-secondary,
.btn-outline-primary {
    --bs-btn-color: #212121;
    --bs-btn-border-color: #212121;
    --bs-btn-hover-bg: #212121;
    --bs-btn-hover-border-color: #212121;
    --bs-btn-hover-color: #ffffff;
}

body.theme-dark .btn-outline-dark,
body.theme-dark .btn-outline-secondary,
body.theme-dark .btn-outline-primary {
    --bs-btn-color: #f2f2f3;
    --bs-btn-border-color: rgba(242, 242, 243, .36);
    --bs-btn-hover-bg: #f8d856;
    --bs-btn-hover-border-color: #f8d856;
    --bs-btn-hover-color: #212121;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #f8d856;
    box-shadow: 0 0 0 .2rem rgba(248, 216, 86, .28);
}

.form-check-input:checked {
    background-color: #212121;
    border-color: #212121;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .dt-input {
    border-color: rgba(242, 242, 243, .18);
    background-color: #151515;
    color: #f2f2f3;
}

body.theme-dark .form-control::placeholder {
    color: rgba(242, 242, 243, .48);
}

.logs-table,
.settings-table,
.settings-tabs-panel table,
.settings-tabs-panel .table-responsive,
.dt-container,
.dt-scroll,
.dt-scroll-head,
.dt-scroll-body,
.dt-scroll-headInner,
.dt-scroll-headInner table,
.dt-scroll-body table {
    width: 100% !important;
}

.page-link {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
}

.active > .page-link,
.page-link.active {
    border-color: #212121;
    background: #212121;
    color: #ffffff;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.metric-card,
.panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

body.theme-dark .table {
    --bs-table-bg: #212121;
    --bs-table-color: #f2f2f3;
    --bs-table-border-color: rgba(248, 216, 86, .18);
    --bs-table-hover-bg: rgba(248, 216, 86, .1);
    --bs-table-hover-color: #ffffff;
}

.metric-card {
    padding: 1rem;
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: .85rem;
}

.metric-card strong {
    display: block;
    margin-top: .5rem;
    font-size: 1.45rem;
}

.metric-card strong.metric-card-subtle-value {
    font-size: 1rem;
    line-height: 1.35;
}

.skidata-kiosk-metrics {
    margin-bottom: 1.25rem;
}

.script-run-output {
    margin-top: 1rem;
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    padding: 1rem;
    white-space: pre-wrap;
}

.metric-card.warning strong {
    color: var(--ink);
}

.panel {
    overflow: hidden;
    padding: 1rem;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.compact-select {
    max-width: 180px;
}

.chart-frame {
    height: 310px;
}

.chart-frame canvas {
    width: 100%;
    height: 100%;
}

.status {
    display: inline-flex;
    align-items: center;
    min-width: 74px;
    justify-content: center;
    border-radius: 999px;
    padding: .25rem .55rem;
    font-size: .78rem;
    font-weight: 700;
}

.status.ok {
    background: #f8d856;
    color: #212121;
}

.status.pending {
    background: #f2f2f3;
    color: #212121;
    outline: 1px solid rgba(33, 33, 33, .18);
}

body.theme-dark .status.pending {
    background: #151515;
    color: #f2f2f3;
}

.filter-bar,
.imap-grid,
.settings-grid {
    display: grid;
    gap: 1.25rem;
}

.user-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    place-items: center;
    background: rgba(242, 242, 243, .62);
    backdrop-filter: blur(2px);
}

.page-loader.active {
    display: grid;
}

.page-loader-box {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .85rem 1rem;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 16px 50px rgba(0, 0, 0, .16);
}

.loader-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(33, 33, 33, .18);
    border-top-color: #f8d856;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

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

.modal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.modal-subtitle {
    margin-bottom: .75rem;
    font-size: .95rem;
    font-weight: 800;
}

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

.role-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .25rem .55rem;
    background: #212121;
    color: #ffffff;
    font-size: .78rem;
    font-weight: 700;
}

.hint {
    color: var(--muted);
    font-size: .9rem;
}

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

.permission-card {
    display: flex;
    min-height: 116px;
    gap: .7rem;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .9rem;
    background: var(--surface);
    cursor: pointer;
}

.permission-card:has(.permission-toggle:checked) {
    border-color: #212121;
    background: #f8d856;
}

.permission-card strong,
.permission-card small {
    display: block;
}

.permission-card small {
    margin-top: .3rem;
    color: rgba(33, 33, 33, .68);
    line-height: 1.35;
}

body.theme-dark .permission-card small {
    color: rgba(242, 242, 243, .68);
}

.filter-bar {
    grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
    background: var(--surface);
}

.product-filter-bar {
    grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
}

.skidata-filter-bar {
    grid-template-columns: repeat(2, minmax(150px, 1fr)) auto;
    margin-bottom: 1rem;
}

.skidata-filter-bar-eshop {
    grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
}

.skidata-filter-bar .btn {
    white-space: nowrap;
}

select + .select2-container {
    width: 100% !important;
    max-width: 100%;
}

.select2-dropdown {
    max-width: calc(100vw - 2rem);
}

.select2-container--default .select2-selection--single {
    display: flex;
    height: calc(1.5em + .75rem + 2px);
    min-height: calc(1.5em + .75rem + 2px);
    align-items: center;
    border-color: var(--line);
    border-radius: .375rem;
    background: var(--surface);
    color: var(--ink);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--ink);
    width: 100%;
    overflow: hidden;
    padding-left: .75rem;
    padding-right: 2rem;
    line-height: calc(1.5em + .75rem);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + .75rem + 2px);
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    height: calc(1.5em + .75rem);
    margin-right: 1.5rem;
}

body.theme-dark .select2-dropdown,
body.theme-dark .select2-container--default .select2-results__option {
    background: #212121;
    color: #f2f2f3;
}

body.theme-dark .select2-container--default .select2-search--dropdown .select2-search__field {
    border-color: rgba(242, 242, 243, .18);
    background: #151515;
    color: #f2f2f3;
}

.select2-results__option {
    overflow-wrap: anywhere;
}

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

.settings-tabs-panel {
    padding: 0;
}

.settings-tabs {
    gap: .25rem;
    padding: 1rem 1rem 0;
    border-bottom-color: var(--line);
}

.settings-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    color: var(--ink);
    font-weight: 700;
}

.settings-tabs .nav-link.active {
    border-color: #212121;
    background: #212121;
    color: #ffffff;
}

body.theme-dark .settings-tabs .nav-link.active {
    border-color: #f8d856;
    background: #f8d856;
    color: #212121;
}

.settings-tab-content {
    padding: 1.75rem;
}

.settings-tab-content .tab-pane {
    padding-top: .25rem;
}

.settings-test-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.panel-head.compact {
    align-items: center;
    margin-bottom: 1rem;
}

.test-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.test-steps {
    display: grid;
    gap: .75rem;
}

.test-step {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: .75rem;
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
}

.test-step i {
    font-size: 1.1rem;
}

.test-step.ok i {
    color: #1f8f4d;
}

.test-step.pending i {
    color: #8a6d00;
}

.test-step.failed i {
    color: #b42318;
}

.test-step span {
    display: block;
    color: var(--muted);
    font-size: .86rem;
}

.sync-log-box {
    display: block;
    height: 320px;
    max-height: 48vh;
    overflow: auto;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #111;
    color: #f2f2f3;
    font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
    font-size: .84rem;
    line-height: 1.45;
}

.sync-log-line {
    display: grid;
    grid-template-columns: 4.8rem 1rem minmax(0, 1fr);
    gap: .45rem;
    align-items: baseline;
    padding: .14rem 0;
    border: 0;
    background: transparent;
}

.sync-log-time {
    color: #9ca3af;
    white-space: nowrap;
}

.sync-log-status::before {
    content: "";
    display: inline-block;
    width: .52rem;
    height: .52rem;
    border-radius: 999px;
    background: #f8d856;
}

.sync-log-line.ok .sync-log-status::before {
    background: #3fb950;
}

.sync-log-line.failed .sync-log-status::before {
    background: #f85149;
}

.sync-log-message {
    min-width: 0;
    overflow-wrap: anywhere;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    max-width: 760px;
}

.report-select-column {
    width: 42px;
    text-align: center;
}

.report-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.report-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.report-preview-body {
    min-height: 72vh;
    padding: 0;
}

.report-preview-body iframe {
    display: block;
    width: 100%;
    min-height: 72vh;
    border: 0;
    background: #f2f2f3;
}

.skidata-order-detail {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .75rem;
    background: var(--bg);
}

.skidata-order-detail-toggle {
    width: 34px;
    height: 34px;
    padding: 0;
}

.skidata-item-name {
    align-items: center;
    display: inline-flex;
    gap: .45rem;
}

.skidata-item-name .bi {
    color: var(--muted);
    font-size: 1rem;
}

.skidata-customer-cell {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.skidata-customer-table th {
    width: 180px;
    color: var(--muted);
    font-weight: 600;
}

.skidata-customer-sms-form {
    margin: 0;
}

.skidata-customer-sms-form .modal-body {
    display: grid;
    gap: .75rem;
}

.skidata-phone-sms-link {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.skidata-json-actions {
    display: inline-flex;
    gap: .35rem;
    justify-content: flex-end;
}

.skidata-raw-json {
    min-height: 60vh;
    margin: 0;
    padding: 1rem;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #111;
    color: #f2f2f3;
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: .86rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.skidata-raw-json-note {
    margin: 0 0 .75rem;
    color: var(--muted);
    font-size: .78rem;
}

.skidata-attributes-table {
    min-width: 900px;
}

.skidata-attributes-table td {
    vertical-align: top;
    word-break: break-word;
}

.skidata-attributes-table code {
    white-space: normal;
}

.skidata-attribute-path-row td {
    padding-top: .9rem;
    padding-bottom: .25rem;
    border-bottom: 0;
    color: var(--muted);
    font-size: .78rem;
}

.skidata-attribute-path-row + tr td {
    padding-top: .25rem;
}

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

.mobile-summary {
    display: none;
}

.mobile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding: .8rem 0;
}

.mobile-row span {
    display: block;
    color: var(--muted);
    font-size: .86rem;
}

.login-page {
    min-height: 100vh;
    background: #f2f2f3;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 58fr) minmax(380px, 42fr);
    background: #212121;
}

.login-visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #212121;
}

.login-visual::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(28vw, 460px);
    background: linear-gradient(90deg, rgba(242, 242, 243, 0) 0%, rgba(242, 242, 243, .22) 36%, rgba(242, 242, 243, .72) 76%, #f2f2f3 100%);
    content: "";
    pointer-events: none;
}

.login-visual img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    object-fit: cover;
    object-position: left center;
}

.login-side {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: #f2f2f3;
}

.login-panel {
    display: grid;
    gap: 2rem;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    border-radius: 8px;
    padding: 2rem;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
}

.login-copyright {
    margin: 1rem 0 0;
    color: rgba(33, 33, 33, .48);
    font-size: .78rem;
    text-align: center;
}

.login-form {
    display: grid;
    gap: 1rem;
}

.debug-reset-link {
    justify-self: center;
    color: #212121;
    font-size: .86rem;
    font-weight: 700;
}

.debug-reset-link:hover {
    color: #000000;
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field .form-control {
    padding-right: 3.75rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: .75rem;
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    transform: translateY(-50%);
    z-index: 2;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #f2f2f3;
}

.password-toggle svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.password-toggle .eye-closed,
.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
        background: #212121;
    }

    .login-visual {
        display: none;
    }

    .login-side {
        min-height: 100vh;
        background: #212121;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-shell.menu-collapsed {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .sidebar {
        position: sticky;
        height: 100vh;
    }

    .app-shell:not(.menu-collapsed) {
        grid-template-columns: 220px minmax(0, 1fr);
    }

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

    .metric-grid,
    .settings-grid,
    .imap-grid,
    .permission-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .product-filter-bar,
    .skidata-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .login-screen-language {
        top: .75rem;
        right: .75rem;
    }

    .login-side {
        min-height: 100vh;
        padding: 1rem;
    }

    .login-panel {
        padding: 1.25rem;
    }

    .content {
        padding: 1rem;
    }

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

    .topbar-title,
    .topbar-actions {
        align-items: stretch;
    }

    .topbar-actions {
        flex-direction: column;
    }

    .metric-grid,
    .settings-grid,
    .imap-grid,
    .permission-grid,
    .filter-bar,
    .sidebar .nav {
        grid-template-columns: 1fr;
    }

    .desktop-only {
        display: none;
    }

    .mobile-summary {
        display: block;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: .2rem 1rem;
        background: #ffffff;
    }

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