:root {
    --bg: #08131f;
    --surface: #102235;
    --surface-soft: #16324d;
    --stroke: rgba(255,255,255,0.08);
    --text: #edf4ff;
    --muted: #8fa9c4;
    --accent: #f59e0b;
    --accent-2: #34d399;
    --danger: #fb7185;
}

body[data-theme="light"] {
    --bg: #eef4f8;
    --surface: #ffffff;
    --surface-soft: #eef3f8;
    --stroke: rgba(20, 34, 53, 0.10);
    --text: #142235;
    --muted: #62758a;
    --accent: #d97706;
    --accent-2: #0f9d78;
    --danger: #e11d48;
}

body[data-theme="brand"] {
    --bg: #ffca0a;
    --surface: #fff5cc;
    --surface-soft: #ffe680;
    --stroke: rgba(17, 17, 17, 0.12);
    --text: #101010;
    --muted: #564400;
    --accent: #101010;
    --accent-2: #2f2a18;
    --danger: #991b1b;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(52, 211, 153, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.14), transparent 25%),
        linear-gradient(160deg, #07111b 0%, #0b1724 45%, #13283e 100%);
    color: var(--text);
    font-family: "Segoe UI", sans-serif;
}

body[data-theme="light"] {
    background:
        radial-gradient(circle at top left, rgba(15, 157, 120, 0.10), transparent 30%),
        radial-gradient(circle at bottom right, rgba(217, 119, 6, 0.12), transparent 24%),
        linear-gradient(180deg, #f7fafc 0%, #edf3f8 46%, #e5edf5 100%);
}

body[data-theme="brand"] {
    background:
        radial-gradient(circle at top left, rgba(255, 230, 128, 0.45), transparent 30%),
        radial-gradient(circle at bottom right, rgba(255, 214, 10, 0.22), transparent 24%),
        linear-gradient(180deg, #ffd33d 0%, #ffca0a 48%, #f4c000 100%);
}

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

.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 290px;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--stroke);
    background: rgba(8, 19, 31, 0.86);
    backdrop-filter: blur(18px);
    transition: transform .25s ease, opacity .25s ease;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(143, 169, 196, 0.55) transparent;
}
body[data-theme="light"] .app-sidebar {
    background: rgba(255, 255, 255, 0.94);
    border-right-color: rgba(20, 34, 53, 0.08);
}
body[data-theme="brand"] .app-sidebar {
    background: rgba(16, 16, 16, 0.96);
    border-right-color: rgba(255, 202, 10, 0.28);
}
body[data-theme="brand"] .app-sidebar .brand-block h1 {
    color: #fff4c4;
}
body[data-theme="brand"] .app-sidebar .brand-block p,
body[data-theme="brand"] .app-sidebar .brand-kicker,
body[data-theme="brand"] .app-sidebar .sidebar-section-label,
body[data-theme="brand"] .app-sidebar .sidebar-footer,
body[data-theme="brand"] .app-sidebar small {
    color: #d8bb4a !important;
}
.app-sidebar::-webkit-scrollbar {
    width: 8px;
}
.app-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(143, 169, 196, 0.4);
    border-radius: 999px;
}
.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(143, 169, 196, 0.65);
}
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(3, 10, 18, 0.62);
    backdrop-filter: blur(2px);
    z-index: 40;
}
.brand-block h1 { font-size: 1.7rem; margin-bottom: 8px; }
.brand-block p, .brand-kicker, .page-subtitle, .text-secondary, small { color: var(--muted) !important; }
.brand-kicker { text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; }
.brand-block-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}
.brand-logo-full {
    width: min(100%, 240px);
    height: auto;
    object-fit: contain;
    border-radius: 0;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 16px;
    padding: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.22);
}
.nav-pills .nav-link {
    border: 1px solid var(--stroke);
    color: var(--text);
    background: rgba(255,255,255,0.02);
    border-radius: 14px;
    padding: 12px 16px;
}
body[data-theme="light"] .nav-pills .nav-link {
    background: rgba(20,34,53,0.03);
    color: #142235;
}
body[data-theme="brand"] .nav-pills .nav-link {
    background: rgba(255,202,10,0.08);
    color: #ffdc57;
    border-color: rgba(255,202,10,0.14);
}
.nav-pills .nav-link:hover, .nav-pills .nav-link.active {
    background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(52,211,153,0.16));
    border-color: rgba(245, 158, 11, 0.3);
}
body[data-theme="light"] .nav-pills .nav-link:hover,
body[data-theme="light"] .nav-pills .nav-link.active {
    background: linear-gradient(135deg, rgba(217,119,6,0.14), rgba(15,157,120,0.10));
    border-color: rgba(217, 119, 6, 0.24);
}
body[data-theme="brand"] .nav-pills .nav-link:hover,
body[data-theme="brand"] .nav-pills .nav-link.active {
    background: linear-gradient(135deg, rgba(255,202,10,0.28), rgba(255,230,128,0.18));
    border-color: rgba(255, 202, 10, 0.34);
    color: #fff4c4;
}
body[data-theme="light"] .btn-outline-light {
    color: #18324d;
    border-color: rgba(24, 50, 77, 0.22);
    background: rgba(255,255,255,0.92);
}
body[data-theme="light"] .btn-outline-light:hover,
body[data-theme="light"] .btn-outline-light:focus {
    color: #0f2236;
    border-color: rgba(24, 50, 77, 0.35);
    background: #e8f1fb;
}
body[data-theme="brand"] .btn-outline-light {
    color: #101010;
    border-color: rgba(16, 16, 16, 0.18);
    background: rgba(255, 244, 196, 0.9);
}
body[data-theme="brand"] .btn-outline-light:hover,
body[data-theme="brand"] .btn-outline-light:focus {
    color: #101010;
    border-color: rgba(16, 16, 16, 0.32);
    background: #fff8da;
}

.app-main { flex: 1; }
#app-fragment {
    transition: opacity .18s ease, transform .18s ease;
}
#app-fragment.fragment-is-loading {
    opacity: .25;
    transform: translateY(8px);
}
#app-fragment.fragment-enter {
    animation: fragmentEnter .22s ease;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px 0;
}
.topbar-header-row {
    display: contents;
}
.topbar-mobile-controls {
    display: contents;
}
.topbar-title-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.topbar-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.mobile-menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.05);
}
body[data-theme="light"] .mobile-menu-toggle {
    background: rgba(20,34,53,0.04);
}
body[data-theme="brand"] .mobile-menu-toggle,
body[data-theme="brand"] .mobile-admin-toggle {
    background: rgba(255, 245, 204, 0.92);
    border-color: rgba(16, 16, 16, 0.14);
}
.mobile-admin-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.05);
}
body[data-theme="light"] .mobile-admin-toggle {
    background: rgba(20,34,53,0.04);
}
.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}
.mobile-admin-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}
.mobile-admin-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text);
    fill: currentColor;
}
.page-title { margin: 0; font-size: 2rem; }
.topbar-actions { display: flex; gap: 16px; align-items: center; }
.topbar-actions-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(3, 10, 18, 0.52);
    backdrop-filter: blur(2px);
    z-index: 45;
}
.topbar-channel-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.channel-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.05);
    min-width: 156px;
}
body[data-theme="light"] .channel-status-chip,
body[data-theme="light"] .topbar-store-label,
body[data-theme="light"] .user-chip {
    background: rgba(255,255,255,0.88);
}
body[data-theme="brand"] .channel-status-chip,
body[data-theme="brand"] .topbar-store-label,
body[data-theme="brand"] .user-chip {
    background: rgba(255, 244, 196, 0.9);
}
.channel-status-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.channel-status-copy strong {
    font-size: .82rem;
    letter-spacing: .04em;
}
.channel-status-copy span {
    font-size: .8rem;
    color: var(--muted);
    text-transform: capitalize;
}
.channel-status-aberta {
    border-color: rgba(52, 211, 153, 0.28);
}
.channel-status-fechada,
.channel-status-fechada_sistema,
.channel-status-pausada {
    border-color: rgba(245, 158, 11, 0.28);
}
.channel-status-bloqueada,
.channel-status-desconectada,
.channel-status-erro {
    border-color: rgba(251, 113, 133, 0.28);
}
.channel-status-switch {
    width: 48px;
    height: 28px;
    border: 0;
    padding: 3px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.35);
    position: relative;
    transition: background .2s ease, opacity .2s ease;
}
.channel-status-switch span {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform .2s ease;
}
.channel-status-switch.is-on {
    background: rgba(52, 211, 153, 0.62);
}
.channel-status-switch.is-on span {
    transform: translateX(20px);
}
.channel-status-switch.is-loading {
    opacity: .6;
}
.channel-status-switch.is-cooldown,
.channel-status-switch:disabled {
    opacity: .45;
    cursor: not-allowed;
    filter: grayscale(.1);
}
.topbar-store-switch {
    min-width: 220px;
}
.topbar-store-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.04);
}
.topbar-store-label span {
    color: var(--muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.topbar-store-label .form-select {
    min-width: 180px;
    background-color: #f8fbff;
    color: #142235;
    border-color: rgba(20, 34, 53, 0.14);
}
.topbar-store-label .form-select:focus {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 0 .2rem rgba(245, 158, 11, 0.12);
}
.topbar-store-label .form-select option,
.form-select option {
    background: #ffffff;
    color: #142235;
}
.user-chip {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--stroke);
    padding: 10px 14px;
    border-radius: 14px;
}

.panel-card, .metric-card, .report-card, .auth-card, .kanban-card {
    border: 1px solid var(--stroke);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(16,34,53,0.94), rgba(9,20,33,0.96));
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.34);
}
body[data-theme="light"] .panel-card,
body[data-theme="light"] .metric-card,
body[data-theme="light"] .report-card,
body[data-theme="light"] .auth-card,
body[data-theme="light"] .kanban-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,249,252,0.98));
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
}
body[data-theme="brand"] .panel-card,
body[data-theme="brand"] .metric-card,
body[data-theme="brand"] .report-card,
body[data-theme="brand"] .auth-card,
body[data-theme="brand"] .kanban-card {
    background: linear-gradient(180deg, rgba(255,249,224,0.96), rgba(255,241,181,0.98));
    box-shadow: 0 20px 48px rgba(16, 16, 16, 0.14);
}
.panel-card { padding: 24px; }
.metric-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.metric-card span { color: var(--muted); }
.metric-card strong { font-size: 2rem; }

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.status-pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.18);
    color: #fff1c4;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-pill-success {
    background: rgba(16, 185, 129, 0.16);
    color: #d1fae5;
    border-color: rgba(16, 185, 129, 0.3);
}
.status-pill-info {
    background: rgba(59, 130, 246, 0.16);
    color: #dbeafe;
    border-color: rgba(59, 130, 246, 0.3);
}
.status-pill-warning {
    background: rgba(245, 158, 11, 0.18);
    color: #fff1c4;
    border-color: rgba(245, 158, 11, 0.3);
}
.status-pill-danger {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.3);
}
.status-pill-neutral {
    background: rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.26);
}
.status-pill-dark {
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    border-color: rgba(15, 23, 42, 0.86);
}
body[data-theme="light"] .status-pill {
    background: rgba(217, 119, 6, 0.12);
    color: #9a3412;
    border-color: rgba(217, 119, 6, 0.22);
}
body[data-theme="light"] .status-pill-success {
    background: rgba(16, 185, 129, 0.14);
    color: #166534;
    border-color: rgba(22, 101, 52, 0.18);
}
body[data-theme="light"] .status-pill-info {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    border-color: rgba(29, 78, 216, 0.18);
}
body[data-theme="light"] .status-pill-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
    border-color: rgba(146, 64, 14, 0.18);
}
body[data-theme="light"] .status-pill-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
    border-color: rgba(153, 27, 27, 0.18);
}
body[data-theme="light"] .status-pill-neutral {
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    border-color: rgba(71, 85, 105, 0.16);
}
body[data-theme="light"] .status-pill-dark {
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    border-color: rgba(15, 23, 42, 0.9);
}
body[data-theme="brand"] .status-pill {
    background: rgba(16, 16, 16, 0.12);
    color: #101010;
    border-color: rgba(16, 16, 16, 0.2);
}
.table-responsive .status-pill-success {
    background: rgba(16, 185, 129, 0.14);
    color: #166534;
    border-color: rgba(22, 101, 52, 0.16);
}
.table-responsive .status-pill-info {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
    border-color: rgba(29, 78, 216, 0.16);
}
.table-responsive .status-pill {
    background: rgba(16, 185, 129, 0.14);
    color: #166534;
    border-color: rgba(22, 101, 52, 0.16);
    font-weight: 600;
}
.table-responsive .status-pill-warning {
    background: rgba(245, 158, 11, 0.16);
    color: #92400e;
    border-color: rgba(146, 64, 14, 0.18);
}
.table-responsive .status-pill-danger {
    background: rgba(239, 68, 68, 0.14);
    color: #991b1b;
    border-color: rgba(153, 27, 27, 0.18);
}
.table-responsive .status-pill-neutral {
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
    border-color: rgba(71, 85, 105, 0.16);
}
.table-responsive .status-pill-dark {
    background: rgba(15, 23, 42, 0.86);
    color: #f8fafc;
    border-color: rgba(15, 23, 42, 0.86);
}
.table { color: var(--text); }
.table-responsive {
    background: #f8fbff;
    border-radius: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 100, 124, 0.45) transparent;
}
.table-responsive::-webkit-scrollbar {
    height: 10px;
}
.table-responsive::-webkit-scrollbar-track {
    background: rgba(20, 34, 53, 0.06);
    border-radius: 999px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(79, 100, 124, 0.45);
    border-radius: 999px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 100, 124, 0.65);
}
.table {
    margin-bottom: 0;
    color: #142235;
}
.table thead th {
    color: #4f647c;
    border-color: rgba(20, 34, 53, 0.08);
    background: #edf4fb;
    font-weight: 600;
}
.table td {
    color: #142235;
    border-color: rgba(20, 34, 53, 0.08);
    background: #f8fbff !important;
}
.table tbody tr:hover td {
    background: #eef6ff !important;
}
.table .text-secondary,
.table td .text-secondary,
.table td small {
    color: #64748b !important;
}
.table-responsive .btn-outline-light,
.table-responsive .btn-outline-secondary {
    color: #18324d;
    border-color: rgba(24, 50, 77, 0.22);
    background: #ffffff;
}
.table-responsive .btn-outline-light:hover,
.table-responsive .btn-outline-light:focus,
.table-responsive .btn-outline-secondary:hover,
.table-responsive .btn-outline-secondary:focus {
    color: #0f2236;
    border-color: rgba(24, 50, 77, 0.35);
    background: #e8f1fb;
}
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 4px 0;
    flex-wrap: wrap;
}
.pagination-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}
.pagination-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pagination-per-page {
    margin: 0;
}
.pagination-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .88rem;
}
.pagination-label .form-select {
    min-width: 82px;
    width: auto;
}
.pagination-page {
    min-width: max-content;
}

.simple-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}
.simple-list li {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--stroke);
}
.simple-list li:last-child { border-bottom: 0; }
.settings-kv {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.settings-kv > div,
.settings-permissions {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.03);
}
.settings-kv strong,
.settings-permissions strong {
    display: block;
}
.settings-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.settings-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.settings-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    font-size: .85rem;
}
.settings-subnav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.settings-subnav-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.settings-subnav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .04em;
    flex: 0 0 auto;
}
.settings-subnav-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.settings-subnav-copy strong {
    color: var(--text);
    font-size: .95rem;
    line-height: 1.2;
}
.settings-subnav-copy small {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.25;
}
.settings-subnav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 56px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.settings-subnav-link::after {
    content: "›";
    color: var(--muted);
    font-size: 1rem;
    transition: transform .18s ease, color .18s ease;
}
.settings-subnav-link:hover,
.settings-subnav-link:focus-visible {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.16);
}
.settings-subnav-link:hover::after,
.settings-subnav-link:focus-visible::after {
    color: var(--text);
    transform: translateX(2px);
}
.settings-subnav-link.is-active {
    background: linear-gradient(135deg, rgba(255,193,7,0.22), rgba(255,193,7,0.08));
    border-color: rgba(255,193,7,0.5);
    box-shadow: 0 0 0 1px rgba(255,193,7,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}
.settings-subnav-link.is-active::after {
    color: #f5c451;
}
.settings-subnav-link.is-active:hover,
.settings-subnav-link.is-active:focus-visible {
    background: linear-gradient(135deg, rgba(255,193,7,0.28), rgba(255,193,7,0.12));
}
.kanban-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.kanban-card { padding: 18px; }
.kanban-card h4 { margin: 12px 0 6px; }
.empty-state {
    padding: 32px;
    border: 1px dashed var(--stroke);
    border-radius: 18px;
    text-align: center;
}

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.auth-card-wrapper { width: min(1100px, 100%); }
.auth-card {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    overflow: hidden;
}
.auth-copy {
    padding: 48px;
    background: linear-gradient(145deg, rgba(245,158,11,0.18), rgba(52,211,153,0.12));
}
body[data-theme="light"] .auth-copy {
    background: linear-gradient(145deg, rgba(217,119,6,0.12), rgba(15,157,120,0.08));
}
body[data-theme="brand"] .auth-copy {
    background: linear-gradient(145deg, rgba(255,202,10,0.54), rgba(255,230,128,0.34));
}
.auth-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}
.auth-brand-logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
    border-radius: 24px;
    padding: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.24);
}
.auth-brand-logo-full {
    width: min(100%, 360px);
    height: auto;
    object-fit: contain;
    border-radius: 0;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
body[data-theme="light"] .auth-brand-logo,
body[data-theme="light"] .brand-logo {
    background: rgba(20,34,53,0.04);
    border-color: rgba(20,34,53,0.08);
}
body[data-theme="brand"] .auth-brand-logo,
body[data-theme="brand"] .brand-logo {
    background: rgba(16,16,16,0.08);
    border-color: rgba(16,16,16,0.12);
}
.auth-brand h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.15;
}
.auth-hero-title {
    margin: 0 0 12px;
    font-size: 2rem;
    line-height: 1.15;
}
.auth-copy p {
    max-width: 42ch;
    font-size: 1rem;
    line-height: 1.7;
}
.auth-form {
    padding: 48px;
    display: grid;
    gap: 16px;
}
.auth-badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 16px;
}
.report-card { padding: 22px; height: 100%; }
.sidebar-footer { color: var(--muted); font-size: .82rem; }
.sidebar-section-label {
    margin: 22px 0 10px;
    color: var(--muted);
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .12em;
}
.product-form-grid,
.product-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.form-span-2 {
    grid-column: span 2;
}
.store-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.store-checkbox {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.03);
}
body[data-theme="light"] .store-checkbox,
body[data-theme="light"] .toggle-chip,
body[data-theme="light"] .settings-permissions,
body[data-theme="light"] .settings-kv > div {
    background: rgba(20,34,53,0.02);
}
body[data-theme="light"] .settings-subnav-link {
    background: #ffffff;
    border-color: rgba(20,34,53,0.08);
    box-shadow: 0 10px 24px rgba(20,34,53,0.05);
}
body[data-theme="light"] .settings-subnav-link:hover,
body[data-theme="light"] .settings-subnav-link:focus-visible {
    background: #f8fafc;
    border-color: rgba(20,34,53,0.14);
    box-shadow: 0 14px 28px rgba(20,34,53,0.08);
}
body[data-theme="light"] .settings-subnav-link.is-active {
    background: linear-gradient(135deg, rgba(255,193,7,0.18), rgba(255,193,7,0.06));
    border-color: rgba(217,119,6,0.38);
}
body[data-theme="brand"] .store-checkbox,
body[data-theme="brand"] .toggle-chip,
body[data-theme="brand"] .settings-permissions,
body[data-theme="brand"] .settings-kv > div {
    background: rgba(255, 250, 232, 0.72);
}
body[data-theme="brand"] .settings-subnav-link {
    background: rgba(255,255,255,0.72);
    border-color: rgba(17,24,39,0.12);
    box-shadow: 0 12px 28px rgba(17,24,39,0.08);
}
body[data-theme="brand"] .settings-subnav-link:hover,
body[data-theme="brand"] .settings-subnav-link:focus-visible {
    background: rgba(255,255,255,0.92);
    border-color: rgba(17,24,39,0.2);
}
body[data-theme="brand"] .settings-subnav-link.is-active {
    background: linear-gradient(135deg, rgba(255,199,0,0.48), rgba(255,224,102,0.34));
    border-color: rgba(17,24,39,0.24);
}
body .settings-subnav-link::after {
    content: ">";
}
body .settings-subnav-link.is-active .settings-subnav-icon {
    background: rgba(255,193,7,0.18);
    border-color: rgba(255,193,7,0.34);
}
.store-checkbox input {
    margin-top: 4px;
}
.store-checkbox span {
    display: flex;
    flex-direction: column;
}
.store-checkbox.is-disabled {
    opacity: .6;
}
.channel-config-stack {
    display: grid;
    gap: 16px;
}
.split-action {
    display: inline-flex;
    align-items: stretch;
    position: relative;
}
.split-action > .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.split-action-menu {
    position: relative;
}
.split-action-menu[open] .split-action-dropdown {
    display: flex;
}
.split-action-toggle {
    list-style: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    min-width: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.split-action-toggle::-webkit-details-marker {
    display: none;
}
.split-action-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(16,34,53,0.98), rgba(9,20,33,0.98));
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.36);
    z-index: 20;
    flex-direction: column;
    gap: 4px;
}
.split-action-menu-up .split-action-dropdown {
    top: auto;
    bottom: calc(100% + 8px);
}
.split-action-menu-left .split-action-dropdown {
    right: calc(100% + 8px);
    left: auto;
}
.split-action-menu-row .split-action-dropdown {
    flex-direction: row;
    align-items: stretch;
    min-width: max-content;
    white-space: nowrap;
}
.split-action-menu-row .split-action-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
}
body[data-theme="light"] .split-action-dropdown {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,248,252,0.98));
}
body[data-theme="brand"] .split-action-dropdown {
    background: linear-gradient(180deg, rgba(255,249,224,0.98), rgba(255,238,166,0.98));
}
body[data-theme="light"] .split-action-item {
    color: #142235;
}
body[data-theme="brand"] .split-action-item {
    color: #101010;
}
.split-action-item {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
}
.split-action-dropdown form {
    margin: 0;
}
.split-action-menu-row .split-action-dropdown form + form {
    border-left: 1px solid rgba(143, 169, 196, 0.18);
    padding-left: 4px;
    margin-left: 4px;
}
body[data-theme="light"] .split-action-menu-row .split-action-dropdown form + form {
    border-left-color: rgba(20, 34, 53, 0.08);
}
body[data-theme="brand"] .split-action-menu-row .split-action-dropdown form + form {
    border-left-color: rgba(16, 16, 16, 0.12);
}
.split-action-dropdown button.split-action-item {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.split-action-menu-row .split-action-dropdown button.split-action-item {
    width: auto;
    text-align: center;
}
.split-action-item:hover {
    background: rgba(255,255,255,0.06);
}
.toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.04);
}
.product-empty-form-state {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.detail-stack {
    display: grid;
    gap: 8px;
}
.table-panel {
    padding: 18px;
    background: rgba(255,255,255,0.02);
}
.product-drawer-backdrop {
    display: none;
}
.product-mobile-drawer {
    position: relative;
    z-index: 2;
}
.product-drawer-handle {
    display: none;
}
.toast-container {
    z-index: 2147483000 !important;
    pointer-events: none;
}
.fallback-toast {
    min-width: 320px;
    max-width: min(92vw, 420px);
    margin-bottom: 10px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.32);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease;
    color: var(--text);
    backdrop-filter: none;
    pointer-events: auto;
    position: relative;
}
.fallback-toast-content {
    line-height: 1.45;
    font-weight: 600;
}
.fallback-toast-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.fallback-toast-actionable {
    cursor: pointer;
}
.fallback-toast-action,
.fallback-toast-dismiss {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    background: rgba(15, 23, 42, 0.92);
    color: inherit;
    font-size: 0.85rem;
    font-weight: 600;
}
.fallback-toast-dismiss {
    background: rgba(255, 255, 255, 0.18);
}
.fallback-toast-success {
    background: #0f9d78;
    border-color: #0b7f61;
    color: #f6fffc;
}
.fallback-toast-error {
    background: #be123c;
    border-color: #9f1239;
    color: #fff5f7;
}
.fallback-toast-order {
    background: #15324f;
    border-color: #224d75;
    color: #f5f9ff;
}
.fallback-toast-order .fallback-toast-action {
    background: #f59e0b;
    color: #101010;
}
.fallback-toast-order .fallback-toast-dismiss {
    background: rgba(255, 255, 255, 0.14);
    color: #f5f9ff;
}
.fallback-toast-success .fallback-toast-action {
    background: rgba(255, 255, 255, 0.16);
    color: #f6fffc;
}
.fallback-toast-success .fallback-toast-dismiss {
    background: rgba(255, 255, 255, 0.16);
    color: #f6fffc;
}
.fallback-toast-error .fallback-toast-action {
    background: rgba(255, 255, 255, 0.14);
    color: #fff5f7;
}
.fallback-toast-error .fallback-toast-dismiss {
    background: rgba(255, 255, 255, 0.14);
    color: #fff5f7;
}
.fallback-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.theme-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.theme-choice-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.04);
    cursor: pointer;
}
.theme-choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.theme-choice-card.is-selected {
    border-color: rgba(245, 158, 11, 0.36);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.12);
}
.theme-choice-preview {
    display: block;
    width: 100%;
    height: 86px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
}
.theme-choice-preview-dark {
    background:
        linear-gradient(180deg, rgba(8,19,31,0.96), rgba(16,34,53,0.96)),
        linear-gradient(135deg, rgba(245,158,11,0.18), rgba(52,211,153,0.18));
}
.theme-choice-preview-light {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,244,248,0.98)),
        linear-gradient(135deg, rgba(217,119,6,0.10), rgba(15,157,120,0.08));
}
.theme-choice-preview-brand {
    background:
        linear-gradient(180deg, rgba(255,210,61,0.98), rgba(255,202,10,0.98)),
        linear-gradient(135deg, rgba(16,16,16,0.12), rgba(255,244,196,0.12));
}
body[data-theme="light"] .theme-choice-card {
    background: rgba(20,34,53,0.02);
}
body[data-theme="brand"] .theme-choice-card {
    background: rgba(255, 248, 214, 0.7);
}
.import-report-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.04);
}
.import-report-summary {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}
.import-report-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}
.import-report-list li {
    align-items: flex-start;
}
.grocery-preview-card code {
    color: #ffe2a6;
}
.grocery-preview-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@keyframes fragmentEnter {
    from {
        opacity: .25;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991px) {
    body.sidebar-open,
    body.topbar-actions-open {
        overflow: hidden;
    }
    .app-shell { flex-direction: column; }
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(290px, 84vw);
        height: 100vh;
        z-index: 50;
        transform: translateX(-100%);
        opacity: 0;
        overscroll-behavior: contain;
    }
    body.sidebar-open .app-sidebar {
        transform: translateX(0);
        opacity: 1;
    }
    body.sidebar-open .sidebar-backdrop {
        display: block;
    }
    .mobile-menu-toggle,
    .mobile-admin-toggle {
        display: inline-flex;
    }
    .topbar {
        padding: 24px 18px 0;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .topbar-header-row {
        display: grid;
        width: 100%;
        gap: 12px;
    }
    .topbar-mobile-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }
    .topbar-title-group {
        min-width: 0;
        flex: 1;
    }
    .topbar-title-row {
        width: 100%;
    }
    .auth-card { grid-template-columns: 1fr; }
    .product-empty-form-state {
        display: none;
    }
    .theme-choice-grid {
        grid-template-columns: 1fr;
    }
    .topbar-actions {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 86vw);
        height: 100vh;
        padding: 22px 18px 28px;
        z-index: 50;
        transform: translateX(100%);
        opacity: 0;
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 14px;
        background: rgba(8, 19, 31, 0.96);
        backdrop-filter: blur(18px);
        border-left: 1px solid var(--stroke);
        transition: transform .25s ease, opacity .25s ease;
    }
    body[data-theme="light"] .topbar-actions {
        background: rgba(255, 255, 255, 0.98);
    }
    body[data-theme="brand"] .topbar-actions {
        background: rgba(255, 247, 214, 0.98);
    }
    body.topbar-actions-open .topbar-actions {
        transform: translateX(0);
        opacity: 1;
    }
    body.topbar-actions-open .topbar-actions-backdrop {
        display: block;
    }
    .topbar-channel-statuses {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .topbar-store-switch {
        width: 100%;
    }
    .topbar-store-label .form-select {
        min-width: 0;
        width: 100%;
    }
    .pagination-bar,
    .pagination-actions,
    .pagination-links {
        align-items: stretch;
    }
    .pagination-actions {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }
    .channel-status-chip,
    .user-chip {
        width: 100%;
    }
    .product-form-grid,
    .product-filter-grid {
        grid-template-columns: 1fr;
    }
    .settings-kv {
        grid-template-columns: 1fr;
    }
    .form-span-2 {
        grid-column: auto;
    }
    .product-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(3, 10, 18, 0.68);
        backdrop-filter: blur(4px);
    }
    .product-mobile-drawer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 80;
        margin: 0;
        max-height: 88vh;
        overflow-y: auto;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        animation: productDrawerIn .22s ease;
    }
    .product-drawer-handle {
        display: flex;
        justify-content: center;
        padding: 6px 0 2px;
    }
    .product-drawer-handle span {
        display: block;
        width: 54px;
        height: 6px;
        border-radius: 999px;
        background: rgba(237, 244, 255, 0.28);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    }
    #product-form-section {
        position: static;
    }
    #product-form-section .panel-head {
        position: static;
        padding-bottom: 12px;
        background: transparent;
        backdrop-filter: none;
    }
}

@keyframes productDrawerIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
