:root{
    color-scheme:light;
    --brand-navy:#0a2b4f;
    --brand-blue:#174a84;
    --brand-red:#c9161d;
    --brand-bg:#f3f7fb;
    --brand-surface:#ffffff;
    --brand-surface-soft:rgba(255,255,255,.92);
    --brand-border:#dce7f2;
    --brand-text:#1f2937;
    --brand-muted:#64748b;
    --brand-success:#198754;
    --brand-warning:#f59e0b;
    --brand-danger:#dc3545;
    --shadow-lg:0 28px 72px rgba(10,43,79,.14);
    --shadow-md:0 12px 28px rgba(15,23,42,.07);
    --shadow-sm:0 10px 24px rgba(15,23,42,.05);
    --radius-xl:34px;
    --radius-lg:22px;
    --radius-md:16px;
    --app-bg:
        radial-gradient(circle at top right, rgba(23,74,132,.14), transparent 26%),
        radial-gradient(circle at bottom left, rgba(201,22,29,.07), transparent 18%),
        linear-gradient(180deg,#f8fbff 0%,#eff5fb 100%);
    --main-shell-bg:
        radial-gradient(circle at top right, rgba(23,74,132,.12), transparent 22%),
        linear-gradient(180deg,#f7fbff 0%,#eef4fb 100%);
    --sidebar-bg:linear-gradient(180deg, #081b33 0%, #0d2947 52%, #12385f 100%);
    --topbar-bg:linear-gradient(180deg, #081b33 0%, #0d2947 52%, #12385f 100%);
    --shell-border-inverse:rgba(255,255,255,.08);
    --shell-border-inverse-strong:rgba(255,255,255,.12);
    --shell-overlay:rgba(255,255,255,.08);
    --shell-overlay-soft:rgba(255,255,255,.04);
    --shell-overlay-strong:rgba(255,255,255,.12);
    --panel-surface:#ffffff;
    --panel-surface-soft:rgba(255,255,255,.92);
    --panel-surface-muted:#f8fbff;
    --panel-surface-subtle:#eef5fb;
    --panel-border:rgba(220,231,242,.96);
    --control-bg:#ffffff;
    --control-bg-soft:#f8fbff;
    --control-border:#dce7f2;
    --control-border-strong:#bfd1e5;
    --backdrop-color:rgba(8,24,43,.54);
    --theme-toggle-bg:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
    --theme-toggle-border:rgba(255,255,255,.12);
    --theme-toggle-shadow:inset 0 1px 0 rgba(255,255,255,.06);
    --theme-toggle-icon-bg:rgba(255,255,255,.12);
    --theme-toggle-icon-color:#ffd166;
    --theme-toggle-text:#ffffff;
    --theme-toggle-muted:rgba(255,255,255,.74);
    --chart-text:#64748b;
    --chart-text-strong:#475569;
    --chart-grid:rgba(148,163,184,.12);
    --chart-grid-soft:rgba(148,163,184,.08);
    --chart-point-border:#ffffff;
}

:root[data-theme="dark"]{
    color-scheme:dark;
    --brand-navy:#e5edf7;
    --brand-blue:#93c5fd;
    --brand-blue-2:#2563eb;
    --brand-light:#0f1724;
    --brand-red:#ff9aa2;
    --brand-bg:#0a1019;
    --brand-surface:#111926;
    --brand-surface-soft:rgba(17,25,38,.92);
    --brand-border:#263244;
    --brand-text:#e5edf7;
    --brand-muted:#95a7bd;
    --brand-success:#7ce2aa;
    --brand-warning:#f7c872;
    --brand-danger:#ff8d94;
    --shadow-lg:0 32px 80px rgba(2,6,23,.45);
    --shadow-md:0 18px 40px rgba(2,6,23,.28);
    --shadow-sm:0 12px 28px rgba(2,6,23,.24);
    --app-bg:
        radial-gradient(circle at top right, rgba(37,99,235,.18), transparent 26%),
        radial-gradient(circle at bottom left, rgba(201,22,29,.10), transparent 18%),
        linear-gradient(180deg,#040810 0%,#0a1019 100%);
    --main-shell-bg:
        radial-gradient(circle at top right, rgba(37,99,235,.14), transparent 22%),
        linear-gradient(180deg,#08111d 0%,#0b1320 100%);
    --sidebar-bg:linear-gradient(180deg, #040811 0%, #09111d 52%, #112239 100%);
    --topbar-bg:linear-gradient(180deg, #040811 0%, #09111d 52%, #112239 100%);
    --shell-border-inverse:rgba(148,163,184,.12);
    --shell-border-inverse-strong:rgba(148,163,184,.18);
    --shell-overlay:rgba(255,255,255,.06);
    --shell-overlay-soft:rgba(255,255,255,.03);
    --shell-overlay-strong:rgba(255,255,255,.10);
    --panel-surface:#111926;
    --panel-surface-soft:rgba(17,25,38,.92);
    --panel-surface-muted:#0f1724;
    --panel-surface-subtle:#152133;
    --panel-border:rgba(38,50,68,.96);
    --control-bg:#0f1724;
    --control-bg-soft:#121d2c;
    --control-border:#334155;
    --control-border-strong:#47617c;
    --backdrop-color:rgba(2,6,23,.74);
    --theme-toggle-bg:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    --theme-toggle-border:rgba(148,163,184,.18);
    --theme-toggle-shadow:inset 0 1px 0 rgba(255,255,255,.04);
    --theme-toggle-icon-bg:rgba(255,255,255,.08);
    --theme-toggle-icon-color:#ffd166;
    --theme-toggle-text:#e5edf7;
    --theme-toggle-muted:#9fb2ca;
    --chart-text:#9fb2ca;
    --chart-text-strong:#d7e3f4;
    --chart-grid:rgba(148,163,184,.18);
    --chart-grid-soft:rgba(148,163,184,.10);
    --chart-point-border:#0f1724;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
    margin:0;
    color:var(--brand-text);
    font-family:"Segoe UI",Tahoma,Arial,sans-serif;
    background:var(--app-bg);
}
a{text-decoration:none;color:inherit}
img{max-width:100%}

.portal-app-layout{
    display:grid;
    grid-template-columns:280px minmax(0,1fr);
    min-height:100vh;
}
.portal-main-shell{
    min-width:0;
    background:var(--main-shell-bg);
    overflow-x:clip;
}
.portal-sidebar{
    position:sticky;
    top:0;
    height:100vh;
    padding:18px 14px;
    background:var(--sidebar-bg);
    color:#fff;
    border-right:1px solid var(--shell-border-inverse);
    overflow-y:auto;
}
.portal-sidebar-brand{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    padding:8px 8px 18px;
    margin-bottom:18px;
    border-bottom:1px solid var(--shell-border-inverse-strong);
}
.portal-sidebar-brand-main{
    display:grid;
    gap:10px;
    min-width:0;
}
.portal-sidebar-logo{
    width:100%;
    max-width:168px;
    height:56px;
    object-fit:contain;
    object-position:left center;
    filter:drop-shadow(0 10px 18px rgba(8,24,43,.18));
}
.portal-sidebar-brand-copy{
    display:grid;
    gap:2px;
}
.portal-sidebar-title{
    font-size:1rem;
    font-weight:900;
    letter-spacing:-.02em;
}
.portal-sidebar-sub{
    color:rgba(255,255,255,.70);
    font-size:.8rem;
    line-height:1.4;
}
.portal-sidebar-mobile-toggle{
    display:none;
    width:42px;
    height:42px;
    border-radius:14px;
    border:1px solid var(--shell-border-inverse-strong);
    background:var(--shell-overlay);
    color:#fff;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
}
.portal-sidebar-mobile-toggle .material-symbols-outlined{
    font-size:22px;
}
.portal-sidebar-nav{
    display:grid;
    gap:12px;
}
.portal-sidebar-home{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:48px;
    padding:12px 14px;
    border-radius:18px;
    background:#fff;
    color:var(--brand-navy);
    box-shadow:0 12px 24px rgba(8,24,43,.18);
    font-size:.94rem;
    font-weight:900;
    text-decoration:none !important;
}
.portal-sidebar-home.active{
    outline:2px solid rgba(23,74,132,.18);
}
.portal-sidebar-section{
    border-radius:18px;
    background:var(--shell-overlay-soft);
    border:1px solid var(--shell-border-inverse);
    overflow:hidden;
}
.portal-sidebar-section.is-empty{
    opacity:.86;
}
.portal-sidebar-section.is-open{
    background:var(--shell-overlay);
}
.portal-sidebar-section-summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:50px;
    width:100%;
    padding:12px 14px;
    border:0;
    background:transparent;
    color:#fff;
    font-size:.92rem;
    font-weight:900;
    text-align:left;
    cursor:pointer;
}
.portal-sidebar-section-title{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}
.portal-sidebar-section-icon{
    width:20px;
    height:20px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:rgba(255,255,255,.88);
    font-size:20px;
    flex:0 0 auto;
}
.portal-sidebar-section-count{
    min-width:28px;
    height:28px;
    border-radius:999px;
    padding:0 8px;
    background:var(--shell-overlay);
    border:1px solid var(--shell-border-inverse-strong);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:.76rem;
    font-weight:900;
}
.portal-sidebar-section-links{
    display:none;
    gap:6px;
    padding:0 10px 10px;
}
.portal-sidebar-section.is-open .portal-sidebar-section-links{
    display:grid;
}
.portal-sidebar-link{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:40px;
    padding:9px 12px;
    border-radius:14px;
    color:rgba(255,255,255,.90);
    font-size:.88rem;
    font-weight:800;
    transition:.18s ease;
    text-decoration:none !important;
}
.portal-sidebar-link:hover{
    background:var(--shell-overlay);
    color:#fff;
    text-decoration:none !important;
}
.portal-sidebar-link.active{
    background:#fff;
    color:var(--brand-navy);
    box-shadow:0 12px 24px rgba(8,24,43,.18);
    text-decoration:none !important;
}
.portal-sidebar-link:focus,
.portal-sidebar-link:visited,
.portal-sidebar-home:hover,
.portal-sidebar-home:focus,
.portal-sidebar-home:visited{
    text-decoration:none !important;
}
.portal-sidebar-link-danger{
    color:#ffd9dc;
}
.portal-sidebar-footer{
    margin-top:18px;
    padding-top:18px;
    border-top:1px solid var(--shell-border-inverse-strong);
}

.portal-topbar{
    display:grid;
    gap:8px;
    margin-bottom:16px;
    margin:-24px -24px 18px -24px;
    padding:16px 24px;
    background:var(--topbar-bg);
    border-bottom:1px solid var(--shell-border-inverse);
    box-shadow:0 14px 24px rgba(8,24,43,.18);
    position:sticky;
    top:0;
    z-index:20;
}
.portal-topbar-market{
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:max-content;
    align-items:stretch;
    justify-content:start;
    gap:12px;
    margin-top:0;
    min-width:0;
    overflow-x:auto;
    overflow-y:hidden;
    padding-bottom:2px;
    scrollbar-width:none;
}
.portal-topbar-market::-webkit-scrollbar{
    display:none;
}
.portal-market-pill{
    min-height:58px;
    height:auto;
    min-width:0;
    padding:7px 12px 8px;
    border-radius:14px;
    background:linear-gradient(180deg, var(--shell-overlay), var(--shell-overlay-soft));
    border:1px solid var(--shell-border-inverse);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
    display:grid;
    gap:4px;
    align-content:center;
    position:relative;
    overflow:hidden;
}
.portal-market-pill::before{
    content:'';
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:3px;
    background:var(--market-accent);
}
.portal-market-pill-head{
    display:flex;
    align-items:center;
    gap:6px;
}
.portal-market-pill-icon{
    width:18px;
    height:18px;
    border-radius:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:transparent;
    color:var(--market-accent);
    font-size:16px;
}
.portal-market-pill-label{
    color:var(--market-accent);
    font-size:.64rem;
    font-weight:900;
    letter-spacing:.06em;
    text-transform:uppercase;
}
.portal-market-pill-value{
    color:var(--market-accent);
    font-size:.96rem;
    font-weight:900;
    line-height:1.2;
    white-space:nowrap;
}
.portal-market-pill-value-secondary{
    color:var(--market-accent);
}
.portal-market-pill-unit{
    color:rgba(255,255,255,.68);
    font-size:.68rem;
    font-weight:800;
}
.portal-market-pill-stack{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:nowrap;
}
.portal-market-pill-dual{
    display:grid;
    gap:2px;
}
.portal-market-pill-dual-label{
    color:rgba(255,255,255,.70);
    font-size:.58rem;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.05em;
    white-space:nowrap;
}
.portal-market-pill-currency{
    --market-accent:#78beff;
    min-width:146px;
}
.portal-market-pill-metal{
    --market-accent:#ffbf5a;
    min-width:318px;
}
.portal-market-pill-date{
    --market-accent:#57d9aa;
    min-width:288px;
}
.portal-market-pill-time{
    --market-accent:#d6a6ff;
    min-width:158px;
}
.portal-market-pill-metal .portal-market-pill-value{
    font-size:.9rem;
}
.portal-market-pill-metal .portal-market-pill-dual-label{
    font-size:.56rem;
}
.portal-topbar-main{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
}
.portal-topbar-side{
    display:flex;
    align-items:flex-start;
    justify-content:flex-end;
    flex:0 0 auto;
    width:auto;
    min-width:0;
}
.portal-profile-menu{
    position:relative;
    width:284px;
    flex:0 0 284px;
    min-width:0;
}
.portal-topbar-brand{
    display:grid;
    grid-template-columns:minmax(240px, 330px) minmax(0, 1fr);
    align-items:end;
    gap:28px;
    padding:0;
    min-width:0;
}
.portal-topbar-heading{
    min-width:0;
}
.portal-topbar-kicker{
    color:rgba(255,255,255,.68);
    font-size:.72rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.portal-topbar-title{
    margin:4px 0 2px;
    color:#fff;
    font-size:1.72rem;
    line-height:1.02;
    letter-spacing:-.04em;
}
.portal-topbar-sub{
    color:rgba(255,255,255,.82);
    font-size:.86rem;
    line-height:1.45;
}
.portal-profile-card{
    display:grid;
    grid-template-columns:48px minmax(0,1fr) 34px;
    align-items:center;
    gap:12px;
    padding:12px 14px;
    width:100%;
    border:1px solid var(--shell-border-inverse-strong);
    border-radius:18px;
    background:linear-gradient(180deg, var(--shell-overlay), var(--shell-overlay-soft));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.portal-profile-trigger{
    cursor:pointer;
    text-align:left;
    transition:transform .18s ease, border-color .18s ease, background .18s ease;
}
.portal-profile-trigger:hover{
    transform:translateY(-1px);
    border-color:var(--shell-border-inverse-strong);
}
.portal-profile-trigger:focus-visible{
    outline:2px solid rgba(120,190,255,.42);
    outline-offset:3px;
}
.portal-profile-avatar{
    width:48px;
    height:48px;
    border-radius:15px;
    background:linear-gradient(180deg,#174a84,#0a2b4f);
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:.98rem;
    font-weight:900;
    box-shadow:0 10px 20px rgba(10,43,79,.16);
}
.portal-profile-main{
    min-width:0;
    display:grid;
    align-content:center;
}
.portal-profile-name{
    color:#fff;
    font-size:.94rem;
    font-weight:900;
}
.portal-profile-role{
    margin-top:2px;
    color:#cfe2ff;
    font-size:.74rem;
    font-weight:900;
}
.portal-profile-email{
    margin-top:4px;
    color:rgba(255,255,255,.74);
    font-size:.7rem;
    line-height:1.45;
    word-break:break-word;
}
.portal-profile-caret{
    width:34px;
    height:34px;
    border-radius:12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.06);
    color:rgba(255,255,255,.82);
    font-size:20px;
    transition:transform .18s ease, background .18s ease;
}
.portal-profile-menu.is-open .portal-profile-caret{
    transform:rotate(180deg);
    background:rgba(255,255,255,.10);
}
.portal-profile-dropdown{
    position:absolute;
    top:calc(100% + 10px);
    right:0;
    z-index:25;
    width:100%;
    display:grid;
    gap:10px;
    padding:12px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:18px;
    background:linear-gradient(180deg, rgba(8,19,33,.98), rgba(12,25,43,.96));
    box-shadow:0 18px 34px rgba(3,10,24,.28);
    backdrop-filter:blur(18px);
}
.portal-profile-dropdown[hidden]{
    display:none;
}
.portal-profile-dropdown-copy{
    display:grid;
    gap:2px;
    padding:2px 2px 0;
}
.portal-profile-dropdown-title{
    color:rgba(255,255,255,.58);
    font-size:.58rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.portal-profile-dropdown-sub{
    color:#fff;
    font-size:.8rem;
    font-weight:800;
    line-height:1.35;
}
.portal-theme-toggle{
    display:flex;
    align-items:center;
    gap:12px;
    width:176px;
    flex:0 0 176px;
    min-height:44px;
    padding:8px 12px;
    border-radius:16px;
    border:1px solid var(--theme-toggle-border);
    background:var(--theme-toggle-bg);
    box-shadow:var(--theme-toggle-shadow);
    color:var(--theme-toggle-text);
    text-align:left;
    cursor:pointer;
    transition:transform .18s ease, border-color .18s ease, background .18s ease;
}
.portal-theme-toggle:hover{
    transform:translateY(-1px);
    border-color:var(--shell-border-inverse-strong);
}
.portal-theme-toggle:focus-visible{
    outline:2px solid rgba(120,190,255,.42);
    outline-offset:3px;
}
.portal-theme-toggle-icon{
    width:28px;
    height:28px;
    border-radius:10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:var(--theme-toggle-icon-bg);
    color:var(--theme-toggle-icon-color);
    flex:0 0 auto;
    font-size:17px;
}
.portal-theme-toggle-copy{
    display:grid;
    gap:2px;
    min-width:0;
}
.portal-theme-toggle-title{
    color:var(--theme-toggle-muted);
    font-size:.58rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.portal-theme-toggle-state{
    color:var(--theme-toggle-text);
    font-size:.8rem;
    font-weight:900;
    line-height:1.35;
}
.portal-theme-toggle-menu{
    width:100%;
    flex:1 1 auto;
}
.portal-profile-menu-link{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:44px;
    padding:10px 12px;
    border-radius:16px;
    border:1px solid rgba(255,255,255,.10);
    background:rgba(255,255,255,.04);
    color:#fff;
    text-decoration:none;
    font-size:.84rem;
    font-weight:900;
    transition:transform .18s ease, border-color .18s ease, background .18s ease;
}
.portal-profile-menu-link:hover{
    transform:translateY(-1px);
    border-color:rgba(255,255,255,.16);
    background:rgba(255,255,255,.08);
}
.portal-profile-menu-link .material-symbols-outlined{
    font-size:20px;
}

@media (max-width:1280px){
    .portal-topbar-main{
        display:grid;
        grid-template-columns:1fr;
        gap:16px;
    }
    .portal-topbar-market{
        grid-auto-flow:row;
        grid-template-columns:repeat(3,minmax(0,1fr));
        grid-auto-columns:auto;
        overflow:visible;
        padding-bottom:0;
    }
    .portal-market-pill-metal{
        grid-column:span 2;
        min-width:0;
    }
    .portal-topbar-side{
        width:100%;
        justify-content:flex-start;
    }
    .portal-profile-menu{
        width:min(100%, 320px);
        flex:0 0 auto;
    }
    .portal-profile-card{
        width:100%;
    }
}

.portal-metric-grid{
    display:grid;
    grid-template-columns:repeat(7,minmax(0,1fr));
    gap:14px;
    margin-bottom:18px;
}
.portal-metric-card{
    background:rgba(255,255,255,.92);
    border:1px solid rgba(220,231,242,.96);
    border-radius:24px;
    box-shadow:var(--shadow-sm);
    padding:18px;
    min-height:126px;
    position:relative;
    overflow:hidden;
}
.portal-metric-card::before{
    content:'';
    position:absolute;
    inset:0 auto 0 0;
    width:4px;
    background:var(--metric-accent, #174a84);
}
.portal-metric-head{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:12px;
}
.portal-metric-icon{
    width:42px;
    height:42px;
    border-radius:14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:var(--metric-bg, rgba(23,74,132,.12));
    color:var(--metric-accent, #174a84);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.55);
}
.portal-metric-icon .material-symbols-outlined{
    font-size:22px;
}
.portal-metric-label{
    color:var(--brand-muted);
    font-size:.78rem;
    font-weight:900;
    text-transform:uppercase;
}
.portal-metric-value{
    display:block;
    color:var(--brand-navy);
    font-size:1.45rem;
    line-height:1.08;
    font-weight:900;
    letter-spacing:-.03em;
}
.portal-metric-foot{
    display:block;
    margin-top:10px;
    color:var(--brand-muted);
    font-size:.84rem;
    line-height:1.45;
}
.portal-metric-subfoot{
    display:block;
    margin-top:6px;
    color:var(--metric-accent, #174a84);
    font-size:.78rem;
    line-height:1.35;
    font-weight:800;
}
.portal-metric-card-sales-month{--metric-accent:#174a84;--metric-bg:rgba(23,74,132,.14)}
.portal-metric-card-sales-year{--metric-accent:#2563eb;--metric-bg:rgba(37,99,235,.14)}
.portal-metric-card-purchases-month{--metric-accent:#f59e0b;--metric-bg:rgba(245,158,11,.15)}
.portal-metric-card-purchases-year{--metric-accent:#d97706;--metric-bg:rgba(217,119,6,.15)}
.portal-metric-card-receivable{--metric-accent:#198754;--metric-bg:rgba(25,135,84,.14)}
.portal-metric-card-payable{--metric-accent:#c9161d;--metric-bg:rgba(201,22,29,.14)}
.portal-metric-card-payments-week{--metric-accent:#4f46e5;--metric-bg:rgba(79,70,229,.14)}
.portal-metric-card-checks-week{--metric-accent:#0f766e;--metric-bg:rgba(15,118,110,.14)}
.portal-metric-card-collection-week{--metric-accent:#15803d;--metric-bg:rgba(21,128,61,.14)}
.portal-metric-card-collection-overdue{--metric-accent:#d97706;--metric-bg:rgba(217,119,6,.14)}
.portal-metric-card-payable-weekly{--metric-accent:#b45309;--metric-bg:rgba(180,83,9,.14)}
.portal-metric-card-payable-due{--metric-accent:#be123c;--metric-bg:rgba(190,18,60,.14)}
.portal-metric-card-production-day{--metric-accent:#0f766e;--metric-bg:rgba(15,118,110,.14)}
.portal-metric-card-production-month{--metric-accent:#0891b2;--metric-bg:rgba(8,145,178,.14)}
.portal-metric-card-shipment-day{--metric-accent:#7c3aed;--metric-bg:rgba(124,58,237,.14)}
.portal-metric-card-shipment-month{--metric-accent:#475569;--metric-bg:rgba(71,85,105,.14)}

.portal-ops-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}
.portal-ops-card{
    background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,251,255,.98));
    border:1px solid var(--brand-border);
    border-radius:24px;
    box-shadow:var(--shadow-sm);
    padding:18px;
    min-height:340px;
    display:flex;
    flex-direction:column;
    gap:14px;
    cursor:pointer;
}
.portal-ops-card-received{
    background:
        radial-gradient(circle at top right, rgba(15,118,110,.08), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f7fcfb 100%);
}
.portal-ops-card-given{
    background:
        radial-gradient(circle at top left, rgba(79,70,229,.08), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f8f8ff 100%);
}
.portal-ops-card-payments{
    background:
        radial-gradient(circle at top right, rgba(180,83,9,.08), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #fff9f2 100%);
}
.portal-ops-card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}
.portal-ops-card-title{
    margin:0;
    color:var(--brand-navy);
    font-size:1rem;
    font-weight:900;
}
.portal-ops-card-sub{
    margin:6px 0 0;
    color:var(--brand-muted);
    font-size:.8rem;
    line-height:1.45;
}
.portal-ops-card-badge{
    display:inline-flex;
    align-items:center;
    min-height:34px;
    padding:0 12px;
    border-radius:999px;
    background:#eef5fb;
    border:1px solid var(--brand-border);
    color:var(--brand-blue);
    font-size:.78rem;
    font-weight:900;
    white-space:nowrap;
}
.portal-ops-card-summary{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
    padding:0 2px;
}
.portal-ops-card-total{
    color:var(--brand-navy);
    font-size:1.32rem;
    line-height:1.1;
    font-weight:900;
    letter-spacing:-.03em;
}
.portal-ops-card-note{
    color:var(--brand-muted);
    font-size:.78rem;
    line-height:1.35;
    text-align:right;
}
.portal-ops-list{
    display:flex;
    flex-direction:column;
    gap:10px;
    min-height:0;
    flex:1 1 auto;
}
.portal-ops-item{
    border:1px solid rgba(220,231,242,.92);
    border-radius:18px;
    padding:10px 12px;
    background:rgba(255,255,255,.92);
    box-shadow:0 8px 16px rgba(15,23,42,.04);
}
.portal-ops-item-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    min-width:0;
}
.portal-ops-item-left{
    min-width:0;
}
.portal-ops-item-main{
    color:var(--brand-navy);
    font-size:.84rem;
    font-weight:900;
    line-height:1.22;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.portal-ops-item-subline{
    margin-top:3px;
    display:flex;
    align-items:center;
    gap:5px;
    min-width:0;
}
.portal-ops-item-mini{
    color:var(--brand-muted);
    font-size:.66rem;
    line-height:1.08;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    min-width:0;
}
.portal-ops-item-sep{
    color:#b9c6d8;
    font-size:.62rem;
    flex:0 0 auto;
}
.portal-ops-item-amount{
    color:var(--brand-navy);
    font-size:.86rem;
    font-weight:900;
    text-align:right;
    white-space:nowrap;
}
.portal-ops-item-right{
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
}
.portal-ops-badge{
    display:inline-flex;
    align-items:center;
    min-height:24px;
    padding:0 8px;
    border-radius:999px;
    font-size:.66rem;
    font-weight:900;
    white-space:nowrap;
}
.portal-ops-badge-danger{
    background:rgba(220,53,69,.12);
    color:#b91c1c;
}
.portal-ops-badge-warning{
    background:rgba(245,158,11,.16);
    color:#a16207;
}
.portal-ops-badge-info{
    background:rgba(37,99,235,.12);
    color:#1d4ed8;
}
.portal-ops-empty,
.portal-ops-more{
    color:var(--brand-muted);
    font-size:.8rem;
    line-height:1.45;
}
.portal-ops-more{
    padding:2px 4px 0;
    font-weight:800;
}
.portal-ops-open{
    min-height:42px;
    border-radius:14px;
    border:1px solid var(--brand-border);
    background:#f6faff;
    color:var(--brand-blue);
    font-size:.84rem;
    font-weight:900;
    cursor:pointer;
}
.portal-ops-open{
    display:none !important;
}
.portal-ops-open:hover{
    background:#eef5ff;
}
.portal-modal-open{
    overflow:hidden;
}
.portal-ops-modal-backdrop{
    position:fixed;
    inset:0;
    z-index:1200;
    background:rgba(8,24,43,.54);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}
.portal-ops-modal-backdrop[hidden]{
    display:none !important;
}
.portal-ops-modal{
    width:min(920px, 100%);
    max-height:min(82vh, 880px);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    gap:16px;
    background:#fff;
    border-radius:24px;
    border:1px solid var(--brand-border);
    box-shadow:0 28px 72px rgba(8,24,43,.28);
    padding:20px;
}
.portal-ops-modal-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
}
.portal-ops-modal-title{
    margin:0;
    color:var(--brand-navy);
    font-size:1.2rem;
    font-weight:900;
}
.portal-ops-modal-sub{
    margin:6px 0 0;
    color:var(--brand-muted);
    font-size:.84rem;
    line-height:1.45;
}
.portal-ops-modal-close{
    min-height:40px;
    padding:0 14px;
    border-radius:14px;
    border:1px solid var(--brand-border);
    background:#f8fbff;
    color:var(--brand-navy);
    font-size:.84rem;
    font-weight:900;
    cursor:pointer;
}
.portal-ops-modal-list{
    overflow:auto;
    display:flex;
    flex-direction:column;
    gap:10px;
    padding-right:4px;
}

.portal-section-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:flex-start;
    margin-bottom:16px;
}
.portal-section-head > :first-child{
    min-width:0;
}
.portal-section-badge{
    display:inline-flex;
    align-items:center;
    min-height:36px;
    padding:0 12px;
    border-radius:999px;
    background:#eef5fb;
    border:1px solid var(--brand-border);
    color:var(--brand-blue);
    font-size:.82rem;
    font-weight:900;
    white-space:nowrap;
}
.portal-chart-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}
.portal-chart-card{
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,251,255,.98));
    border:1px solid var(--brand-border);
    border-radius:24px;
    box-shadow:var(--shadow-sm);
    padding:18px;
    min-height:320px;
    height:auto;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    min-width:0;
}
.portal-chart-card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:12px;
    min-width:0;
}
.portal-chart-toolbar{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    justify-content:flex-end;
    min-width:0;
}
.portal-chart-title-group{
    min-width:0;
}
.portal-chart-card-wide{
    grid-column:1 / -1;
}
.portal-chart-card-customer{
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.06), transparent 26%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    min-height:430px;
}
.portal-chart-card-supplier{
    background:
        radial-gradient(circle at top right, rgba(245,158,11,.08), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
    min-height:430px;
}
.portal-chart-card-machine{
    background:
        radial-gradient(circle at top right, rgba(15,118,110,.07), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.portal-chart-card-downtime{
    background:
        radial-gradient(circle at top left, rgba(245,158,11,.10), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #fffaf2 100%);
}
.portal-chart-card-secondary{
    height:280px;
}
.portal-chart-title{
    color:var(--brand-navy);
    font-size:1rem;
    font-weight:900;
    margin-bottom:12px;
}
.portal-chart-card-head .portal-chart-title{
    margin-bottom:0;
}
.portal-chart-sub{
    margin-top:4px;
    color:var(--brand-muted);
    font-size:.8rem;
    line-height:1.4;
}
.portal-chart-filter{
    display:inline-flex;
    align-items:center;
    gap:10px;
    min-height:42px;
    padding:0 12px;
    border-radius:14px;
    border:1px solid var(--brand-border);
    background:#fff;
    color:var(--brand-muted);
    font-size:.82rem;
    font-weight:900;
    box-shadow:var(--shadow-sm);
    white-space:nowrap;
}
.portal-chart-filter select{
    min-width:86px;
    min-height:34px;
    padding:0 10px;
    border:1px solid var(--brand-border);
    border-radius:10px;
    background:#f8fbff;
    color:var(--brand-navy);
    font-weight:900;
}
.portal-chart-pager{
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:42px;
    padding:0 8px;
    border-radius:14px;
    border:1px solid var(--brand-border);
    background:#fff;
    box-shadow:var(--shadow-sm);
}
.portal-chart-pager-btn{
    width:28px;
    height:28px;
    border:0;
    border-radius:10px;
    background:#edf4ff;
    color:var(--brand-blue);
    font-size:1rem;
    font-weight:900;
    cursor:pointer;
}
.portal-chart-pager-btn:disabled{
    opacity:.45;
    cursor:default;
}
.portal-chart-pager-info{
    min-width:64px;
    text-align:center;
    color:var(--brand-muted);
    font-size:.8rem;
    font-weight:900;
}
.portal-chart-frame{
    position:relative;
    width:100%;
    flex:0 0 auto;
    overflow:hidden;
}
.portal-chart-frame-scroll{
    overflow-x:auto;
    overflow-y:hidden;
    padding-bottom:8px;
}
.portal-chart-frame-scroll-y{
    overflow-y:auto;
    overflow-x:hidden;
    padding-right:4px;
}
.portal-chart-frame-scroll canvas{
    display:block;
}
.portal-chart-frame-scroll-y canvas{
    display:block;
}
.portal-chart-card canvas,
.portal-chart-frame canvas{
    width:100% !important;
    height:100% !important;
    max-height:100% !important;
    min-height:100% !important;
}
.portal-analysis-extra{
    margin-top:16px;
    border:1px solid var(--brand-border);
    border-radius:24px;
    background:#f8fbff;
    overflow:hidden;
}
.portal-analysis-extra-summary{
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:60px;
    padding:0 18px;
    cursor:pointer;
    color:var(--brand-navy);
    font-size:.92rem;
    font-weight:900;
}
.portal-analysis-extra-summary::marker{
    content:'';
}
.portal-analysis-extra-summary::-webkit-details-marker{
    display:none;
}
.portal-analysis-extra-summary .material-symbols-outlined{
    transition:transform .18s ease;
    color:var(--brand-muted);
}
.portal-analysis-extra[open] .portal-analysis-extra-summary .material-symbols-outlined{
    transform:rotate(180deg);
}
.portal-chart-grid-secondary{
    padding:0 18px 18px;
}

.permission-hero{
    background:
        radial-gradient(circle at top right, rgba(23,74,132,.08), transparent 22%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.permission-message{
    padding:14px 16px;
    border-radius:16px;
    font-size:.92rem;
    font-weight:800;
}
.permission-message-success{
    background:rgba(25,135,84,.10);
    color:#146c43;
    border:1px solid rgba(25,135,84,.18);
}
.permission-message-error{
    background:rgba(201,22,29,.10);
    color:#9f1239;
    border:1px solid rgba(201,22,29,.18);
}
.permission-user-picker{
    display:flex;
    align-items:flex-end;
    gap:14px;
    flex-wrap:wrap;
}
.permission-summary-grid{
    display:grid;
    grid-template-columns:minmax(0, 1.25fr) minmax(280px, .9fr);
    gap:16px;
}
.permission-summary-card,
.permission-settings-card{
    border:1px solid var(--brand-border);
    border-radius:22px;
    background:#fff;
    box-shadow:var(--shadow-sm);
    padding:18px;
}
.permission-summary-card{
    display:flex;
    align-items:center;
    gap:16px;
}
.permission-summary-avatar{
    width:64px;
    height:64px;
    border-radius:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(180deg, #1d4f89 0%, #0f2e55 100%);
    color:#fff;
    font-size:1.2rem;
    font-weight:900;
}
.permission-summary-title{
    color:var(--brand-navy);
    font-size:1.15rem;
    font-weight:900;
}
.permission-summary-sub{
    margin-top:4px;
    color:var(--brand-muted);
    font-size:.86rem;
}
.permission-settings-card{
    display:grid;
    gap:14px;
    align-content:start;
}
.permission-field{
    display:grid;
    gap:8px;
}
.permission-field > span{
    color:var(--brand-muted);
    font-size:.82rem;
    font-weight:900;
    text-transform:uppercase;
}
.permission-select{
    min-height:46px;
    padding:0 14px;
    border:1px solid var(--brand-border);
    border-radius:14px;
    background:#fff;
    color:var(--brand-navy);
    font-weight:800;
    box-shadow:var(--shadow-sm);
}
.permission-select-sm{
    min-height:40px;
    min-width:110px;
    padding:0 12px;
    box-shadow:none;
}
.permission-checkbox{
    display:flex;
    align-items:center;
    gap:10px;
    color:var(--brand-navy);
    font-weight:800;
}
.permission-checkbox input{
    width:18px;
    height:18px;
}
.permission-switch{
    display:inline-flex;
    align-items:center;
    gap:10px;
    color:var(--brand-navy);
    font-weight:800;
    cursor:pointer;
    user-select:none;
}
.permission-switch-input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}
.permission-switch-slider{
    position:relative;
    width:52px;
    height:30px;
    border-radius:999px;
    background:rgba(71,85,105,.22);
    border:1px solid rgba(71,85,105,.18);
    transition:.18s ease;
    box-shadow:inset 0 2px 6px rgba(15,23,42,.08);
}
.permission-switch-slider::after{
    content:'';
    position:absolute;
    top:3px;
    left:3px;
    width:22px;
    height:22px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 4px 10px rgba(15,23,42,.18);
    transition:.18s ease;
}
.permission-switch-input:checked + .permission-switch-slider{
    background:linear-gradient(180deg, #174a84 0%, #0f2e55 100%);
    border-color:#0f2e55;
}
.permission-switch-input:checked + .permission-switch-slider::after{
    transform:translateX(22px);
}
.permission-switch-input:focus-visible + .permission-switch-slider{
    outline:2px solid rgba(37,99,235,.26);
    outline-offset:2px;
}
.permission-switch-label{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:74px;
    padding:6px 10px;
    border-radius:999px;
    border:1px solid rgba(71,85,105,.14);
    background:rgba(71,85,105,.08);
    color:#475569;
    font-size:.8rem;
    font-weight:900;
    transition:.18s ease;
}
.permission-switch-visibility .permission-switch-input:checked + .permission-switch-slider{
    background:linear-gradient(180deg, #1ba96b 0%, #137f4f 100%);
    border-color:#106a42;
    box-shadow:0 10px 18px rgba(22,163,74,.16);
}
.permission-switch-visibility .permission-switch-input:checked ~ .permission-switch-label{
    color:#146c43;
    background:rgba(25,135,84,.12);
    border-color:rgba(25,135,84,.18);
}
.permission-switch-maintenance .permission-switch-input:checked + .permission-switch-slider{
    background:linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    border-color:#b45309;
    box-shadow:0 10px 18px rgba(245,158,11,.18);
}
.permission-switch-maintenance .permission-switch-input:checked ~ .permission-switch-label{
    color:#b45309;
    background:rgba(245,158,11,.14);
    border-color:rgba(217,119,6,.24);
}
.permission-switch-maintenance .permission-switch-input:not(:checked) ~ .permission-switch-label{
    color:#0f5f8a;
    background:rgba(14,165,233,.08);
    border-color:rgba(14,165,233,.18);
}
.permission-table-wrap{
    border:1px solid var(--brand-border);
    border-radius:20px;
    overflow:auto;
    background:#fff;
    box-shadow:var(--shadow-sm);
}
.permission-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    min-width:980px;
}
.permission-table thead th{
    position:sticky;
    top:0;
    background:#123862;
    color:#fff;
    font-size:.78rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.03em;
    padding:14px 16px;
    white-space:nowrap;
}
.permission-table tbody td{
    padding:14px 16px;
    border-top:1px solid rgba(220,231,242,.92);
    vertical-align:top;
}
.permission-module-title{
    color:var(--brand-navy);
    font-size:.96rem;
    font-weight:900;
}
.permission-module-path{
    margin-top:4px;
    color:#2563eb;
    font-size:.76rem;
    font-weight:800;
    word-break:break-all;
}
.permission-module-desc{
    margin-top:6px;
    color:var(--brand-muted);
    font-size:.82rem;
    line-height:1.45;
}
.permission-badge-stack{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.permission-badge{
    display:inline-flex;
    align-items:center;
    min-height:28px;
    padding:0 10px;
    border-radius:999px;
    font-size:.76rem;
    font-weight:900;
    border:1px solid transparent;
}
.permission-badge-success{
    color:#146c43;
    background:rgba(25,135,84,.12);
    border-color:rgba(25,135,84,.18);
}
.permission-badge-info{
    color:#1d4ed8;
    background:rgba(37,99,235,.12);
    border-color:rgba(37,99,235,.18);
}
.permission-badge-danger{
    color:#b42318;
    background:rgba(220,53,69,.10);
    border-color:rgba(220,53,69,.16);
}
.permission-badge-muted{
    color:#475569;
    background:rgba(71,85,105,.10);
    border-color:rgba(71,85,105,.14);
}
.portal-log-user-meta{
    margin-top:8px;
}
.permission-save-row{
    display:flex;
    justify-content:flex-end;
}
.hr-card-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:14px;
}
.hr-mini-card{
    padding:16px 18px;
    border:1px solid var(--brand-border);
    border-radius:20px;
    background:#fff;
    box-shadow:var(--shadow-sm);
}
.hr-mini-label{
    display:block;
    color:var(--brand-muted);
    font-size:.78rem;
    font-weight:900;
    text-transform:uppercase;
}
.hr-mini-value{
    display:block;
    margin-top:8px;
    color:var(--brand-navy);
    font-size:1.5rem;
    font-weight:900;
}
.hr-form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}
.hr-form-grid-3{
    grid-template-columns:repeat(3,minmax(0,1fr));
}
.hr-field-full{
    grid-column:1 / -1;
}
.hr-textarea{
    min-height:108px;
    padding:12px 14px;
    resize:vertical;
}
.hr-table-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.hr-inline-form{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
}
.hr-puantaj-filter-grid{
    display:grid;
    grid-template-columns:180px 180px minmax(260px, 1fr);
    gap:14px;
}
.hr-puantaj-wrap{
    overflow:auto;
    border:1px solid var(--brand-border);
    border-radius:22px;
    background:#fff;
    box-shadow:var(--shadow-sm);
}
.hr-puantaj-table{
    width:max-content;
    min-width:100%;
    border-collapse:separate;
    border-spacing:0;
}
.hr-puantaj-table thead th{
    position:sticky;
    top:0;
    z-index:2;
    padding:10px 8px;
    min-width:56px;
    background:#173b67;
    color:#fff;
    border-right:1px solid rgba(255,255,255,.08);
    border-bottom:1px solid #0e2747;
    font-size:.74rem;
    font-weight:900;
    text-align:center;
    white-space:nowrap;
}
.hr-puantaj-table thead th.is-saturday{
    background:#6f8d2b;
}
.hr-puantaj-table thead th.is-sunday{
    background:#b91c1c;
}
.hr-puantaj-table tbody td{
    padding:8px 8px;
    border-right:1px solid #e6edf6;
    border-bottom:1px solid #edf3f9;
    font-size:.8rem;
    text-align:center;
    background:#fff;
    white-space:nowrap;
}
.hr-puantaj-table .sticky-col{
    position:sticky;
    background:#fff;
    z-index:1;
}
.hr-puantaj-table thead .sticky-col{
    z-index:3;
}
.hr-puantaj-table .sticky-col-1{
    left:0;
    min-width:64px;
}
.hr-puantaj-table .sticky-col-2{
    left:64px;
    min-width:240px;
    text-align:left;
}
.hr-puantaj-table .sticky-col-3{
    left:304px;
    min-width:180px;
    text-align:left;
}
.hr-puantaj-table .sticky-col-4{
    left:484px;
    min-width:190px;
    text-align:left;
}
.hr-puantaj-name{
    color:var(--brand-navy);
    font-weight:900;
}
.hr-puantaj-code{
    margin-top:2px;
    color:var(--brand-muted);
    font-size:.74rem;
    font-weight:800;
}
.hr-puantaj-cell{
    min-width:56px;
    font-weight:800;
}
.hr-puantaj-cell.is-worked{
    color:#163a67;
    background:#f8fbff;
}
.hr-puantaj-cell.is-neutral{
    color:#475569;
    background:#fff;
}
.hr-puantaj-cell.is-deduction{
    color:#b91c1c;
    background:#ffe5e5;
}
.hr-puantaj-cell.is-report{
    color:#8a6d00;
    background:#fff7c2;
}
.hr-puantaj-cell.is-school{
    color:#174a84;
    background:#dbeafe;
}
.hr-puantaj-cell.is-passive{
    color:#6b21a8;
    background:#f3e8ff;
}
.hr-puantaj-cell.is-missing{
    color:#9f1239;
    background:#fff1f2;
}
.hr-puantaj-cell.is-empty{
    color:#94a3b8;
}
.hr-puantaj-cell.is-saturday{
    background:#eef7dd;
}
.hr-puantaj-cell.is-sunday{
    background:#ffe5e5;
}
.hr-puantaj-total{
    background:#f8fbff !important;
    color:var(--brand-navy);
    font-weight:900;
}
.hr-puantaj-empty{
    padding:18px;
    text-align:center;
    color:var(--brand-muted);
    font-weight:800;
}
.hr-bulk-shift-grid{
    display:grid;
    grid-template-columns:1.25fr 1fr 1fr;
    gap:16px;
}
.hr-bulk-shift-panel{
    border:1px solid var(--brand-border);
    border-radius:20px;
    background:#fff;
    box-shadow:var(--shadow-sm);
    padding:16px;
}
.hr-bulk-shift-title{
    margin:0 0 12px;
    font-size:1rem;
    font-weight:900;
    color:var(--brand-navy);
}
.hr-bulk-shift-list,
.hr-bulk-shift-target{
    display:grid;
    gap:10px;
}
.hr-bulk-person-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border:1px solid rgba(15,23,42,.08);
    border-radius:16px;
    padding:12px 14px;
    background:#fff;
}
.hr-bulk-person-card.is-day{
    background:#f8fbff;
    border-color:#cfe0ff;
}
.hr-bulk-person-card.is-night{
    background:#f5f8ff;
    border-color:#c9d8ff;
}
.hr-bulk-person-main{
    min-width:0;
}
.hr-bulk-person-name{
    font-size:.95rem;
    font-weight:900;
    color:var(--brand-navy);
}
.hr-bulk-person-meta{
    margin-top:4px;
    font-size:.78rem;
    font-weight:800;
    color:var(--brand-muted);
}
.hr-bulk-person-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.hr-bulk-person-btn{
    min-height:36px;
    padding:0 12px;
}
.hr-bulk-person-btn.is-active{
    border-color:var(--brand-navy);
    background:rgba(24,61,108,.08);
    color:var(--brand-navy);
}
.hr-bulk-shift-chip-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:16px;
    padding:12px 14px;
    background:#fff;
}
.hr-bulk-shift-chip-name{
    font-size:.92rem;
    font-weight:900;
    color:var(--brand-navy);
}
.hr-bulk-shift-chip-meta{
    margin-top:4px;
    font-size:.78rem;
    font-weight:800;
    color:var(--brand-muted);
}
.hr-bulk-shift-empty{
    border:1px dashed rgba(100,116,139,.35);
    border-radius:16px;
    padding:18px;
    text-align:center;
    color:var(--brand-muted);
    font-weight:800;
    background:#f8fafc;
}
.hr-shift-plan-table thead th{
    min-width:140px;
}
.hr-shift-plan-table tbody td{
    vertical-align:top;
}
.hr-shift-cell{
    min-width:140px;
    background:#fff;
}
.hr-shift-week-form{
    display:grid;
    gap:8px;
    min-width:170px;
    margin-top:0;
}
.hr-shift-week-buttons{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    min-width:260px;
}
.hr-shift-week-btn{
    width:100%;
    justify-content:center;
    min-height:38px;
}
.hr-shift-cell.is-day{
    background:#f8fbff;
}
.hr-shift-cell.is-night{
    background:#f3f7ff;
}
.hr-shift-cell.is-flex{
    background:#f0fdfa;
}
.hr-shift-cell.is-leave{
    background:#fff7ed;
}
.hr-shift-cell.is-off{
    background:#faf5ff;
}
.hr-shift-cell-form{
    margin:0;
}
.hr-shift-select{
    min-width:100%;
}
.hr-shift-chip{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:34px;
    height:28px;
    margin-top:8px;
    border-radius:999px;
    font-size:.74rem;
    font-weight:900;
    border:1px solid rgba(15,23,42,.08);
}
.hr-shift-chip-is-day{
    color:#174a84;
    background:#dbeafe;
}
.hr-shift-chip-is-night{
    color:#1d4ed8;
    background:#dbeafe;
}
.hr-shift-chip-is-flex{
    color:#0f766e;
    background:#ccfbf1;
}
.hr-shift-chip-is-leave{
    color:#92400e;
    background:#fef3c7;
}
.hr-shift-chip-is-off{
    color:#7c3aed;
    background:#ede9fe;
}
.hr-shift-chip-is-empty{
    color:#64748b;
    background:#f8fafc;
}
.hr-shift-hours{
    margin-top:6px;
    color:var(--brand-muted);
    font-size:.72rem;
    font-weight:800;
    line-height:1.25;
}
.hr-shift-inline-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:28px;
    height:28px;
    border-radius:999px;
    font-size:.72rem;
    font-weight:900;
    border:1px solid rgba(15,23,42,.08);
    margin-bottom:6px;
}
.hr-shift-inline-gunduz{
    color:#174a84;
    background:#dbeafe;
}
.hr-shift-inline-gece{
    color:#1d4ed8;
    background:#dbeafe;
}
.hr-shift-inline-esnek{
    color:#0f766e;
    background:#ccfbf1;
}
.hr-shift-inline-izin{
    color:#92400e;
    background:#fef3c7;
}
.hr-shift-inline-tatil{
    color:#7c3aed;
    background:#ede9fe;
}
.hr-shift-inline-none{
    color:#64748b;
    background:#f8fafc;
}
@media (max-width: 1500px){
    .hr-bulk-shift-grid{
        grid-template-columns:1fr;
    }
    .hr-shift-week-buttons{
        grid-template-columns:1fr;
        min-width:180px;
    }
}
.process-kpi-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
}
.process-card-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}
.process-card,
.process-terminal-card{
    border:1px solid var(--brand-border);
    border-radius:22px;
    background:#fff;
    box-shadow:var(--shadow-sm);
    padding:18px;
}
.process-card-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
}
.process-card-title{
    color:var(--brand-navy);
    font-size:1.05rem;
    font-weight:900;
}
.process-card-sub{
    margin-top:6px;
    color:var(--brand-muted);
    font-size:.84rem;
}
.process-meta-grid{
    margin-top:14px;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
}
.process-meta-grid div{
    padding:10px 12px;
    border-radius:14px;
    background:rgba(244,248,252,.96);
    border:1px solid rgba(220,231,242,.9);
}
.process-meta-grid strong{
    display:block;
    color:var(--brand-muted);
    font-size:.72rem;
    font-weight:900;
    text-transform:uppercase;
}
.process-meta-grid span{
    display:block;
    margin-top:6px;
    color:var(--brand-navy);
    font-size:.9rem;
    font-weight:800;
}
.process-operation-form{
    margin-top:16px;
    display:grid;
    gap:14px;
}
.process-operation-list{
    display:grid;
    gap:10px;
}
.process-operation-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) 240px;
    gap:12px;
    align-items:center;
    padding:12px 14px;
    border-radius:16px;
    border:1px solid rgba(220,231,242,.92);
    background:rgba(251,253,255,.98);
}
.process-operation-check{
    display:flex;
    align-items:center;
    gap:12px;
    color:var(--brand-navy);
    font-size:.95rem;
    font-weight:900;
}
.process-operation-check input{
    width:18px;
    height:18px;
}
.process-inline-hint{
    grid-column:1 / -1;
    color:var(--brand-muted);
    font-size:.8rem;
    font-weight:700;
}
.process-card-actions{
    display:flex;
    justify-content:flex-end;
}
.process-empty-state,
.process-empty-mini,
.process-empty-row{
    color:var(--brand-muted);
    font-size:.92rem;
}
.process-empty-state{
    padding:18px;
    border-radius:18px;
    border:1px dashed rgba(148,163,184,.5);
    background:rgba(250,252,255,.94);
}
.process-empty-mini{
    margin-top:16px;
    padding:14px 16px;
    border-radius:16px;
    background:rgba(245,248,252,.95);
}
.process-empty-row{
    text-align:center;
}
.process-badge-progress{
    color:#1d4ed8;
    background:rgba(37,99,235,.12);
    border-color:rgba(37,99,235,.18);
}
.process-terminal-hero{
    background:
        radial-gradient(circle at top right, rgba(33,150,243,.10), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}
.process-terminal-mode{
    margin-top:4px;
    color:var(--brand-navy);
    font-size:.9rem;
    font-weight:800;
}
.process-terminal-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}
.process-terminal-card{
    display:grid;
    gap:16px;
}
.process-terminal-body{
    display:grid;
    gap:12px;
}
.process-terminal-main{
    display:grid;
    gap:4px;
}
.process-terminal-main strong{
    color:var(--brand-navy);
    font-size:1.05rem;
    font-weight:900;
}
.process-terminal-main span,
.process-terminal-meta{
    color:var(--brand-muted);
    font-size:.88rem;
    font-weight:700;
}
.process-terminal-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.process-terminal-actions form{
    flex:1 1 180px;
}
.process-terminal-button{
    width:100%;
    min-height:56px;
    justify-content:center;
    font-size:1rem;
}
.worker-body{
    margin:0;
    min-height:100vh;
    background:linear-gradient(180deg,#eef5fc 0%,#f7faff 100%);
}
.worker-auth-shell,
.worker-shell{
    width:min(100%,960px);
    margin:0 auto;
    padding:28px 16px 42px;
    box-sizing:border-box;
}
.worker-auth-card{
    background:#fff;
    border:1px solid rgba(23,74,132,.10);
    border-radius:28px;
    box-shadow:0 20px 50px rgba(16,44,84,.12);
    padding:28px;
}
.worker-auth-brand{
    display:grid;
    grid-template-columns:88px minmax(0,1fr);
    align-items:center;
    gap:18px;
    margin-bottom:18px;
}
.worker-auth-brand img{
    width:88px;
    height:88px;
    object-fit:contain;
    border-radius:20px;
    background:#f5f8fc;
    padding:10px;
    box-sizing:border-box;
}
.worker-auth-kicker{
    font-size:.78rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:var(--brand-accent);
}
.worker-auth-brand h1{
    margin:4px 0 8px;
    font-size:2rem;
    line-height:1.1;
    color:var(--brand-navy);
}
.worker-auth-brand p{
    margin:0;
    color:var(--brand-muted);
}
.worker-auth-form{
    display:grid;
    gap:14px;
}
.worker-auth-submit{
    justify-self:flex-start;
}
.worker-head-card{
    background:linear-gradient(135deg,#173b67 0%,#102c54 100%);
    color:#fff;
}
.worker-head-card .portal-section-title,
.worker-head-card .portal-section-sub{
    color:#fff;
}
.worker-page-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}
.worker-page-head h1{
    margin:4px 0 8px;
    font-size:2rem;
    color:#fff;
}
.worker-page-head p{
    margin:0;
    color:rgba(255,255,255,.82);
}
.worker-filter-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr)) auto;
    gap:14px;
    align-items:end;
}
.worker-filter-wide{
    grid-column:span 2;
}
.worker-empty-state{
    text-align:center;
    padding:24px;
}

.portal-series-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:14px;
}
.portal-series-search{
    min-width:280px;
    max-width:360px;
    width:100%;
    min-height:44px;
    padding:0 14px;
    border:1px solid var(--brand-border);
    border-radius:14px;
    background:#fff;
    color:var(--brand-navy);
    box-shadow:var(--shadow-sm);
}
.portal-series-toolbar-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}
.portal-series-limit{
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:44px;
    padding:0 12px;
    border-radius:14px;
    border:1px solid var(--brand-border);
    background:#fff;
    color:var(--brand-muted);
    font-size:.86rem;
    font-weight:800;
    box-shadow:var(--shadow-sm);
}
.portal-series-limit input{
    width:76px;
    min-height:34px;
    padding:0 8px;
    border:1px solid var(--brand-border);
    border-radius:10px;
    text-align:center;
    font-weight:900;
    color:var(--brand-navy);
}
.portal-action-btn{
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:44px;
    padding:0 14px;
    border-radius:14px;
    border:1px solid transparent;
    font-size:.86rem;
    font-weight:900;
    cursor:pointer;
    transition:.18s ease;
}
.portal-action-btn .material-symbols-outlined{
    font-size:18px;
}
.portal-action-btn-light{
    background:#fff;
    color:var(--brand-navy);
    border-color:var(--brand-border);
}
.portal-action-btn-success{
    background:#eaf8ef;
    color:#166534;
    border-color:#cce7d4;
}
.portal-action-btn-primary{
    background:#edf4ff;
    color:#174a84;
    border-color:#cddcf1;
}
.portal-series-kpi-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    margin-bottom:14px;
}
.portal-series-kpi-card{
    background:#fff;
    border:1px solid var(--brand-border);
    border-radius:18px;
    box-shadow:var(--shadow-sm);
    padding:16px;
}
.portal-series-kpi-label{
    display:block;
    color:var(--brand-muted);
    font-size:.82rem;
    font-weight:800;
    margin-bottom:6px;
}
.portal-series-kpi-value{
    display:block;
    color:var(--brand-navy);
    font-size:1.3rem;
    font-weight:900;
}
.portal-series-table-wrap{
    max-height:60vh;
    overflow:auto;
    border:1px solid var(--brand-border);
    border-radius:20px;
    background:#fff;
    box-shadow:var(--shadow-sm);
    max-width:100%;
    -webkit-overflow-scrolling:touch;
}
.portal-series-table{
    width:100%;
    border-collapse:collapse;
}
.portal-series-table thead th{
    position:sticky;
    top:0;
    z-index:1;
    background:#0a2b4f;
    color:#fff;
    padding:14px 12px;
    font-size:.82rem;
    font-weight:900;
    text-align:left;
    white-space:nowrap;
}
.portal-series-table tbody td{
    padding:13px 12px;
    border-bottom:1px solid #e7eef7;
    vertical-align:middle;
    background:#fff;
}
.portal-series-empty{
    padding:24px 12px !important;
    text-align:center;
    color:var(--brand-muted);
}
.portal-series-machine{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:.35rem .6rem;
    border-radius:999px;
    font-weight:800;
}
.portal-series-dot{
    width:9px;
    height:9px;
    border-radius:50%;
    display:inline-block;
}

.portal-featured-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}
.portal-featured-card{
    background:#fff;
    border:1px solid var(--brand-border);
    border-radius:22px;
    box-shadow:var(--shadow-sm);
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:10px;
    min-height:144px;
}
.portal-featured-pill{
    display:inline-flex;
    align-items:center;
    padding:.4rem .72rem;
    border-radius:999px;
    font-size:.76rem;
    font-weight:900;
    width:fit-content;
}
.portal-featured-title{
    color:var(--brand-navy);
    font-size:1rem;
    line-height:1.35;
}
.portal-featured-sub{
    color:var(--brand-muted);
    font-size:.86rem;
    line-height:1.5;
}

.portal-division-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}
.portal-division-card{
    background:#fff;
    border:1px solid var(--brand-border);
    border-radius:26px;
    box-shadow:0 12px 26px rgba(15,23,42,.06);
    padding:20px;
}
.portal-division-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:flex-start;
    margin-bottom:14px;
}
.portal-division-title-wrap{
    display:flex;
    gap:12px;
    align-items:flex-start;
    min-width:0;
}
.portal-division-icon{
    width:48px;
    height:48px;
    border-radius:16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    box-shadow:0 12px 24px rgba(15,23,42,.12);
    flex:0 0 auto;
}
.portal-division-title{
    margin:0;
    color:var(--brand-navy);
    font-size:1.04rem;
    font-weight:900;
}
.portal-division-desc{
    margin-top:4px;
    color:var(--brand-muted);
    font-size:.88rem;
    line-height:1.5;
}
.portal-division-count{
    white-space:nowrap;
    color:var(--brand-muted);
    font-size:.84rem;
    font-weight:900;
}
.portal-division-links{
    display:grid;
    gap:10px;
}
.portal-division-link{
    display:block;
    padding:14px 15px;
    border:1px solid #e8eef6;
    border-radius:18px;
    background:#fbfdff;
    transition:.18s ease;
}
.portal-division-link:hover{
    border-color:#c8d8ea;
    background:#fff;
    box-shadow:0 10px 20px rgba(15,23,42,.05);
}
.portal-division-link-title{
    color:var(--brand-navy);
    font-size:.95rem;
    font-weight:900;
}
.portal-division-link-sub{
    margin-top:4px;
    color:var(--brand-muted);
    font-size:.84rem;
    line-height:1.45;
}
.portal-division-zero{
    min-height:72px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px dashed #dbe6f2;
    border-radius:18px;
    color:var(--brand-muted);
    font-size:.86rem;
    font-weight:800;
}

.portal-inline-actions{
    display:flex;
    align-items:flex-end;
    gap:12px;
    flex-wrap:wrap;
}

.portal-log-summary-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
}

.portal-log-summary-card{
    padding:18px 20px;
    border:1px solid #d9e5f2;
    border-radius:18px;
    background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%);
    box-shadow:0 10px 24px rgba(28,54,94,.06);
}

.portal-log-summary-label{
    color:#60728a;
    font-size:.78rem;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
}

.portal-log-summary-value{
    margin-top:10px;
    color:#12355b;
    font-size:1.7rem;
    font-weight:800;
    line-height:1;
}

.portal-log-details{
    min-width:220px;
}

.portal-log-details summary{
    cursor:pointer;
    color:#2451a6;
    font-weight:700;
}

.portal-log-detail-body{
    margin-top:10px;
    padding:12px;
    border:1px solid #d9e5f2;
    border-radius:12px;
    background:#f8fbff;
}

.portal-log-detail-body pre{
    margin:0;
    white-space:pre-wrap;
    word-break:break-word;
    font-size:.76rem;
    line-height:1.45;
    color:#324861;
}
.portal-log-action{
    display:grid;
    gap:8px;
    justify-items:start;
}
.portal-log-action-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:28px;
    padding:0 12px;
    border-radius:999px;
    color:#fff;
    font-size:.74rem;
    font-weight:900;
    letter-spacing:.01em;
    white-space:nowrap;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.18), 0 8px 18px rgba(15,23,42,.12);
}
.portal-log-action-badge-success{
    background:linear-gradient(180deg,#2ccf6d 0%, #16a34a 100%);
}
.portal-log-action-badge-warning{
    background:linear-gradient(180deg,#fbbf24 0%, #f59e0b 100%);
    color:#1f2937;
}
.portal-log-action-badge-danger{
    background:linear-gradient(180deg,#fb7185 0%, #e11d48 100%);
}
.portal-log-action-badge-info{
    background:linear-gradient(180deg,#4da3ff 0%, #2563eb 100%);
}
.portal-log-action-badge-accent{
    background:linear-gradient(180deg,#a78bfa 0%, #7c3aed 100%);
}
.portal-log-action-badge-muted{
    background:linear-gradient(180deg,#64748b 0%, #475569 100%);
}
.portal-log-action-code{
    color:#4b5f77;
    font-size:.77rem;
    font-weight:800;
    line-height:1.35;
    word-break:break-word;
}
.portal-log-open-btn{
    min-height:34px;
    padding:0 12px;
    border-radius:999px;
    border:1px solid rgba(37,99,235,.18);
    background:rgba(37,99,235,.10);
    color:#2451a6;
    font-size:.76rem;
    font-weight:900;
    cursor:pointer;
}
.portal-log-open-btn:hover{
    background:rgba(37,99,235,.16);
    border-color:rgba(37,99,235,.26);
}
.portal-log-row-clickable{
    cursor:pointer;
}
.portal-log-row-clickable:focus-visible{
    outline:2px solid rgba(37,99,235,.28);
    outline-offset:-2px;
}
.portal-log-row-clickable:hover td{
    background:#f8fbff;
}
.portal-log-modal{
    width:min(1040px, 100%);
}
.portal-log-modal-list{
    gap:14px;
}
.portal-log-modal-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}
.portal-log-modal-card,
.portal-log-modal-panel{
    border:1px solid #d9e5f2;
    border-radius:16px;
    background:#f8fbff;
    padding:14px 15px;
}
.portal-log-modal-label{
    color:#60728a;
    font-size:.74rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.portal-log-modal-value{
    margin-top:8px;
    color:#12355b;
    font-size:.92rem;
    font-weight:800;
    line-height:1.5;
    word-break:break-word;
}
.portal-log-modal-pre{
    margin:8px 0 0;
    padding:0;
    background:transparent;
    border:0;
    color:#324861;
    font-size:.78rem;
    line-height:1.55;
    white-space:pre-wrap;
    word-break:break-word;
}
.portal-log-inline-details{
    margin-top:8px;
}
.portal-log-inline-details summary{
    cursor:pointer;
    width:fit-content;
    list-style:none;
    color:#2451a6;
    font-size:.74rem;
    font-weight:900;
    letter-spacing:.01em;
    padding:.3rem .62rem;
    border-radius:999px;
    background:rgba(37,99,235,.10);
    border:1px solid rgba(37,99,235,.16);
}
.portal-log-inline-details summary::-webkit-details-marker{
    display:none;
}
.portal-log-inline-body{
    margin-top:8px;
    padding:10px 12px;
    border-radius:12px;
    border:1px solid #d9e5f2;
    background:#f8fbff;
    color:#51657d;
    font-size:.76rem;
    line-height:1.5;
    word-break:break-word;
}

.portal-logo{
    display:block;
    width:min(440px, 100%);
    height:188px;
    margin:0 auto 32px;
    object-fit:contain;
    padding:18px 28px;
    border-radius:28px;
    background:
        radial-gradient(circle at 18% 24%, rgba(88,166,255,.18), transparent 28%),
        linear-gradient(180deg, rgba(20,63,105,.96), rgba(11,37,68,.94));
    border:1px solid rgba(120,174,229,.34);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 18px 36px rgba(4,18,35,.24);
    filter:drop-shadow(0 10px 20px rgba(0,0,0,.16));
}
.portal-eyebrow{
    margin-top:18px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:.45rem .82rem;
    border-radius:999px;
    background:rgba(255,255,255,.12);
    font-size:.8rem;
    font-weight:900;
}
.portal-btn,
.portal-btn-inline{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:46px;
    padding:0 16px;
    border-radius:14px;
    border:1px solid transparent;
    font-weight:900;
    cursor:pointer;
    transition:.18s ease;
}
.portal-btn:hover,
.portal-btn-inline:hover{transform:translateY(-1px)}
.portal-btn-primary{background:#fff;color:var(--brand-navy)}
.portal-btn-dark{background:linear-gradient(180deg,#174a84,#0a2b4f);color:#fff;box-shadow:0 12px 24px rgba(10,43,79,.16)}
.portal-btn-outline{background:transparent;color:#fff;border-color:rgba(255,255,255,.26)}
.portal-btn-light{background:#fff;color:var(--brand-blue);border-color:#d7e2ef}
.portal-btn-danger{background:#fff3f3;color:var(--brand-red);border-color:#f2c9cc}

.portal-auth-page,
.portal-center-page{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:24px;
}
.portal-auth-shell{
    width:min(1180px, 100%);
    background:#fff;
    border:1px solid var(--brand-border);
    border-radius:var(--radius-xl);
    overflow:hidden;
    box-shadow:var(--shadow-lg);
    display:grid;
    grid-template-columns:1.15fr .85fr;
}
.portal-auth-hero,
.landing-admin-hero{
    position:relative;
    overflow:hidden;
    padding:36px;
    background:
        radial-gradient(circle at 12% 20%, rgba(255,255,255,.14), transparent 24%),
        radial-gradient(circle at 88% 82%, rgba(201,22,29,.22), transparent 22%),
        linear-gradient(140deg, #0b223f 0%, #12385f 46%, #1c5d9a 100%);
    color:#fff;
}
.portal-auth-hero::after,
.landing-admin-hero::after,
.portal-hero::after,
.landing-hero::after{
    content:'';
    position:absolute;
    right:-90px;
    bottom:-90px;
    width:280px;
    height:280px;
    border-radius:50%;
    background:rgba(255,255,255,.06);
}
.portal-auth-title{
    margin:16px 0 10px;
    font-size:2.15rem;
    line-height:1.04;
    letter-spacing:-.04em;
}
.portal-auth-text,
.landing-admin-text{
    margin:0;
    max-width:700px;
    color:rgba(255,255,255,.82);
    line-height:1.68;
}
.portal-pill-list{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:20px;
}
.portal-pill{
    display:inline-flex;
    align-items:center;
    padding:.48rem .82rem;
    border-radius:999px;
    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.12);
    font-size:.82rem;
    font-weight:800;
    color:#fff;
}
.portal-auth-panel{
    padding:36px;
    background:linear-gradient(180deg,#ffffff 0%,#f9fbfe 100%);
}
.portal-panel-title{
    margin:0 0 8px;
    color:var(--brand-navy);
    font-size:1.75rem;
    font-weight:900;
    letter-spacing:-.03em;
}
.portal-panel-sub{
    margin:0 0 20px;
    color:var(--brand-muted);
    line-height:1.6;
    font-size:.95rem;
}
.portal-alert{
    margin-bottom:14px;
    padding:13px 14px;
    border-radius:var(--radius-md);
    border:1px solid #f0c9cc;
    background:#fff5f5;
    color:#991b1b;
    font-weight:700;
    line-height:1.5;
}
.portal-alert-success{
    margin-bottom:14px;
    padding:13px 14px;
    border-radius:var(--radius-md);
    border:1px solid #b9ebcd;
    background:#ecfdf3;
    color:#166534;
    font-weight:700;
    line-height:1.5;
}
.portal-field{margin-bottom:14px}
.portal-label{
    display:block;
    margin-bottom:7px;
    color:#44556c;
    font-size:.8rem;
    font-weight:900;
    text-transform:uppercase;
}
.portal-input,
.portal-textarea,
.portal-select{
    width:100%;
    min-height:52px;
    border-radius:16px;
    border:1px solid #d7e2ef;
    padding:12px 14px;
    font:inherit;
    color:var(--brand-text);
    background:#fff;
}
.portal-input:focus,
.portal-textarea:focus,
.portal-select:focus{
    outline:none;
    border-color:#8fb1d6;
    box-shadow:0 0 0 4px rgba(23,74,132,.08);
}
.portal-textarea{min-height:180px;resize:vertical}
.portal-submit{
    width:100%;
    min-height:54px;
    border:0;
    border-radius:16px;
    background:linear-gradient(180deg,#174a84,#0a2b4f);
    color:#fff;
    font-size:1rem;
    font-weight:900;
    cursor:pointer;
    box-shadow:0 12px 24px rgba(10,43,79,.16);
}
.portal-meta{
    margin-top:18px;
    padding-top:18px;
    border-top:1px solid #e7eef6;
    display:grid;
    gap:10px;
}
.portal-meta-row{
    display:flex;
    justify-content:space-between;
    gap:14px;
    color:#52637a;
    font-size:.9rem;
}
.portal-meta-row strong{color:var(--brand-navy);font-weight:900}
.portal-link-row{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:18px;
}

.portal-page-shell,
.landing-shell{
    max-width:none;
    margin:0;
    padding:24px 24px 40px;
    min-width:0;
    overflow-x:clip;
}
.portal-page-shell > .app-wrap,
.portal-page-shell > .app-shell,
.portal-page-shell > .pay-shell,
.portal-page-shell > .page,
.portal-page-shell > .container,
.portal-page-shell > .container-fluid,
.portal-page-shell .app-wrap,
.portal-page-shell .app-shell,
.portal-page-shell .pay-shell,
.portal-page-shell .page{
    width:100%;
    max-width:none !important;
    margin:0 !important;
    padding-left:0 !important;
    padding-right:0 !important;
}
.portal-hero{
    background:
        radial-gradient(circle at 12% 20%, rgba(255,255,255,.14), transparent 24%),
        radial-gradient(circle at 88% 82%, rgba(201,22,29,.22), transparent 22%),
        linear-gradient(140deg, #0b223f 0%, #12385f 46%, #1c5d9a 100%);
    color:#fff;
    border-radius:var(--radius-xl);
    box-shadow:var(--shadow-lg);
    padding:26px 28px;
    display:grid;
    grid-template-columns:1.15fr .85fr;
    gap:18px;
    margin-bottom:18px;
    overflow:hidden;
    position:relative;
}
.portal-hero-main,
.portal-hero-side{position:relative;z-index:1}
.portal-hero-title{
    margin:14px 0 10px;
    font-size:2.3rem;
    line-height:1.03;
    letter-spacing:-.04em;
}
.portal-hero-sub{
    max-width:820px;
    color:rgba(255,255,255,.82);
    line-height:1.65;
}
.portal-hero-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:18px;
}
.portal-hero-side{
    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.14);
    border-radius:var(--radius-lg);
    padding:18px;
    backdrop-filter:blur(10px);
}
.portal-identity-title{
    font-size:1rem;
    font-weight:900;
    margin-bottom:10px;
}
.portal-identity-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}
.portal-identity-card{
    border-radius:18px;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.12);
    padding:14px;
}
.portal-identity-label{
    display:block;
    color:rgba(255,255,255,.74);
    font-size:.76rem;
    font-weight:900;
    text-transform:uppercase;
    margin-bottom:6px;
}
.portal-identity-value{
    display:block;
    color:#fff;
    font-size:1.12rem;
    font-weight:900;
    line-height:1.35;
    word-break:break-word;
}
.portal-section,
.landing-section,
.landing-admin-content{
    background:var(--brand-surface-soft);
    border:1px solid rgba(220,231,242,.96);
    border-radius:var(--radius-xl);
    box-shadow:var(--shadow-md);
    padding:22px;
    min-width:0;
}
.portal-section + .portal-section{margin-top:18px}
.portal-section-title,
.landing-section-title{
    margin:0 0 6px;
    color:var(--brand-navy);
    font-size:1.22rem;
    font-weight:900;
}

.stock-packaging-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  align-items:start;
}

.stock-packaging-card{
  border:1px solid #d7e2ef;
  border-radius:16px;
  background:#fff;
  padding:14px;
}

.stock-packaging-switch{
  min-height:44px;
  display:flex;
  align-items:center;
  gap:10px;
}

.stock-packaging-switch .form-check-input{
  margin-top:0;
}

.stock-packaging-media{
  grid-column:span 2;
}

@media (max-width: 1199px){
  .stock-packaging-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .stock-packaging-media{
    grid-column:span 2;
  }
}

@media (max-width: 767px){
  .stock-packaging-grid{
    grid-template-columns:1fr;
  }

  .stock-packaging-media{
    grid-column:span 1;
  }
}
.portal-section-sub,
.landing-section-sub{
    margin:0 0 16px;
    color:var(--brand-muted);
    font-size:.94rem;
    line-height:1.55;
}
.portal-quick-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}
.portal-quick-card{
    background:#fff;
    border:1px solid var(--brand-border);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-sm);
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:10px;
    min-height:154px;
}
.portal-quick-pill{
    display:inline-flex;
    align-items:center;
    padding:.4rem .72rem;
    border-radius:999px;
    font-size:.78rem;
    font-weight:900;
    width:fit-content;
}
.portal-quick-title{
    font-size:1.05rem;
    font-weight:900;
    color:var(--brand-navy);
}
.portal-quick-sub{
    font-size:.88rem;
    color:var(--brand-muted);
    line-height:1.5;
}
.portal-unit-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}
.portal-unit-card{
    background:#fff;
    border:1px solid var(--brand-border);
    border-radius:var(--radius-xl);
    box-shadow:0 12px 26px rgba(15,23,42,.06);
    padding:20px;
}
.portal-unit-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:flex-start;
    margin-bottom:12px;
}
.portal-unit-left{
    display:flex;
    gap:12px;
    align-items:flex-start;
}
.portal-unit-icon{
    width:48px;
    height:48px;
    border-radius:16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    box-shadow:0 12px 24px rgba(15,23,42,.12);
}
.portal-unit-name{
    margin:0;
    color:var(--brand-navy);
    font-size:1.08rem;
    font-weight:900;
}
.portal-unit-desc{
    margin-top:4px;
    color:var(--brand-muted);
    font-size:.9rem;
    line-height:1.5;
}
.portal-unit-count{
    font-size:.86rem;
    font-weight:900;
    color:var(--brand-muted);
    white-space:nowrap;
}
.portal-module-list{display:grid;gap:10px}
.portal-module-item{
    display:block;
    padding:14px 15px;
    border:1px solid #e8eef6;
    border-radius:18px;
    background:#fbfdff;
    transition:.18s ease;
}
.portal-module-item:hover{
    border-color:#c8d8ea;
    background:#ffffff;
    box-shadow:0 10px 20px rgba(15,23,42,.05);
}
.portal-module-main{min-width:0}
.portal-module-title{
    font-size:.96rem;
    font-weight:900;
    color:var(--brand-navy);
}
.portal-module-desc{
    margin-top:4px;
    color:var(--brand-muted);
    font-size:.85rem;
    line-height:1.45;
}
.portal-empty{
    padding:20px;
    border:1px dashed #dbe6f2;
    border-radius:20px;
    background:#fbfdff;
    color:var(--brand-muted);
    font-weight:700;
    text-align:center;
}

.portal-center-card{
    width:min(720px,100%);
    background:var(--brand-surface-soft);
    border:1px solid var(--brand-border);
    border-radius:28px;
    box-shadow:var(--shadow-lg);
    padding:32px 28px;
    text-align:center;
}
.portal-center-title{
    margin:18px 0 10px;
    font-size:clamp(28px,4vw,42px);
    line-height:1.1;
    color:var(--brand-navy);
}
.portal-center-text{
    margin:0 auto;
    max-width:560px;
    color:var(--brand-muted);
    line-height:1.65;
    font-size:16px;
}
.portal-status{
    margin:24px auto 0;
    width:fit-content;
    padding:10px 14px;
    border-radius:14px;
    background:#fff;
    border:1px solid var(--brand-border);
    font-weight:800;
    color:var(--brand-navy);
}
.portal-actions{
    display:flex;
    justify-content:center;
    gap:12px;
    flex-wrap:wrap;
    margin-top:26px;
}
.portal-inline-header{
    margin-bottom:18px;
    padding:20px 22px;
    background:var(--brand-surface-soft);
    border:1px solid rgba(220,231,242,.96);
    border-radius:var(--radius-xl);
    box-shadow:var(--shadow-md);
}
.portal-inline-header-main{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;
}
.portal-inline-header-kicker{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:.38rem .72rem;
    border-radius:999px;
    background:rgba(23,74,132,.08);
    color:var(--brand-blue);
    font-size:.78rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.05em;
}
.portal-inline-header-title{
    margin:10px 0 6px;
    color:var(--brand-navy);
    font-size:1.55rem;
    font-weight:900;
    letter-spacing:-.03em;
}
.portal-inline-header-sub{
    color:var(--brand-muted);
    font-size:.92rem;
    line-height:1.55;
}
.portal-inline-header-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}
.portal-inline-nav{
    margin-top:16px;
    padding-top:16px;
    border-top:1px solid #e7eef6;
    display:grid;
    gap:12px;
}
.portal-inline-nav-group{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}
.portal-inline-nav-heading{
    min-width:148px;
    color:var(--brand-muted);
    font-size:.76rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.05em;
}
.portal-inline-nav-link{
    display:inline-flex;
    align-items:center;
    min-height:38px;
    padding:0 12px;
    border-radius:999px;
    background:#fff;
    border:1px solid var(--brand-border);
    color:var(--brand-text);
    font-size:.86rem;
    font-weight:800;
    transition:.18s ease;
}
.portal-inline-nav-link:hover{
    border-color:#bfd1e5;
    box-shadow:0 8px 18px rgba(15,23,42,.06);
}
.portal-inline-nav-link.active{
    background:linear-gradient(180deg,#174a84,#0a2b4f);
    border-color:#0a2b4f;
    color:#fff;
}
.portal-inline-nav-link-danger{
    color:var(--brand-red);
    border-color:#efc6c9;
    background:#fff6f6;
}

.landing-hero{
    background:
        radial-gradient(circle at 12% 20%, rgba(255,255,255,.14), transparent 24%),
        radial-gradient(circle at 88% 82%, rgba(201,22,29,.22), transparent 22%),
        linear-gradient(140deg, #0b223f 0%, #12385f 46%, #1c5d9a 100%);
    color:#fff;
    border-radius:var(--radius-xl);
    box-shadow:var(--shadow-lg);
    padding:28px;
    overflow:hidden;
    position:relative;
    margin-bottom:18px;
}
.landing-hero-grid{
    display:grid;
    grid-template-columns:1.1fr .9fr;
    gap:18px;
    align-items:start;
}
.landing-title{
    margin:16px 0 10px;
    font-size:2.4rem;
    line-height:1.03;
    letter-spacing:-.04em;
}
.landing-text{
    max-width:780px;
    color:rgba(255,255,255,.82);
    line-height:1.65;
}
.landing-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:18px;
}
.landing-card{
    background:rgba(255,255,255,.90);
    border:1px solid rgba(219,230,242,.95);
    border-radius:var(--radius-xl);
    box-shadow:var(--shadow-md);
    padding:22px;
    backdrop-filter:blur(10px);
}
.landing-form-title{
    margin:0 0 8px;
    color:var(--brand-navy);
    font-size:1.15rem;
    font-weight:900;
}
.landing-preview{
    margin-top:14px;
    padding:10px 12px;
    border-radius:14px;
    background:rgba(255,255,255,.14);
    display:inline-flex;
    font-size:.82rem;
    font-weight:900;
}
.landing-content-grid{display:grid;gap:16px}
.landing-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}
.landing-tile{
    background:#fff;
    border:1px solid var(--brand-border);
    border-radius:20px;
    padding:18px;
    box-shadow:0 10px 20px rgba(15,23,42,.04);
}
.landing-tile-title{
    margin:0 0 6px;
    color:var(--brand-navy);
    font-size:1rem;
    font-weight:900;
}
.landing-caption{
    color:#64748b;
    font-size:.88rem;
    line-height:1.55;
}
.landing-tile-text,
.landing-tile li{
    margin:0;
    color:#52637a;
    line-height:1.6;
}
.landing-tile ul{margin:0;padding-left:18px}
.landing-stat-value{
    display:block;
    color:var(--brand-navy);
    font-size:1.7rem;
    font-weight:900;
    margin-bottom:4px;
}
.landing-faq-item{
    border:1px solid var(--brand-border);
    border-radius:18px;
    padding:16px;
    background:#fff;
}
.landing-faq-item + .landing-faq-item{margin-top:10px}
.landing-faq-q{
    display:block;
    color:var(--brand-navy);
    font-size:1rem;
    font-weight:900;
    margin-bottom:6px;
}
.landing-summary-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}
.landing-summary-card{
    border:1px solid var(--brand-border);
    border-radius:18px;
    background:#fbfdff;
    padding:16px;
    box-shadow:var(--shadow-sm);
}
.landing-summary-label{
    display:block;
    color:#64748b;
    font-size:.78rem;
    font-weight:900;
    text-transform:uppercase;
    margin-bottom:6px;
}
.landing-summary-value{
    display:block;
    color:var(--brand-navy);
    font-size:1.55rem;
    font-weight:900;
}
.landing-footer{
    margin-top:20px;
    color:#64748b;
    font-size:.88rem;
    display:flex;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
}

.landing-admin-shell{
    max-width:1480px;
    margin:0 auto;
    padding:24px 18px 36px;
}
.landing-admin-hero{
    border-radius:var(--radius-xl);
    box-shadow:var(--shadow-lg);
    padding:24px 26px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    flex-wrap:wrap;
    margin-bottom:18px;
}
.landing-admin-main{display:flex;align-items:center;gap:18px;min-width:0}
.landing-admin-title{
    margin:0;
    font-size:2rem;
    font-weight:900;
    letter-spacing:-.03em;
}
.landing-admin-sub{
    margin-top:.4rem;
    color:rgba(255,255,255,.78);
    font-size:.95rem;
    line-height:1.55;
    max-width:760px;
}
.landing-admin-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.landing-stats-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px;
    margin-bottom:14px;
}
.landing-stat-card{
    background:#fff;
    border:1px solid var(--brand-border);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-sm);
    padding:16px 18px;
}
.landing-stat-label{
    display:block;
    color:var(--brand-muted);
    font-size:.76rem;
    font-weight:900;
    text-transform:uppercase;
    margin-bottom:.42rem;
}
.landing-stat-number{
    display:block;
    color:var(--brand-navy);
    font-size:1.65rem;
    font-weight:900;
}
.landing-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:.38rem .72rem;
    border-radius:999px;
    font-size:.78rem;
    font-weight:900;
}
.landing-badge.published{background:#eaf8ef;color:#166534}
.landing-badge.draft{background:#eef4fb;color:#345275}
.landing-admin-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:14px;
}
.landing-admin-toolbar-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}
.landing-admin-summary-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    margin-bottom:14px;
}
.landing-admin-summary-card{
    background:#fff;
    border:1px solid var(--brand-border);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-sm);
    padding:18px;
}
.landing-admin-summary-label{
    display:block;
    color:#64748b;
    font-size:.78rem;
    font-weight:900;
    text-transform:uppercase;
    margin-bottom:6px;
}
.landing-admin-summary-value{
    display:block;
    color:var(--brand-navy);
    font-size:1.7rem;
    font-weight:900;
}
.landing-admin-card-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}
.landing-admin-card{
    background:#fff;
    border:1px solid var(--brand-border);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-sm);
    padding:18px;
}
.landing-admin-card-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:10px;
}
.landing-admin-caption{
    color:#64748b;
    font-size:.88rem;
    margin-top:4px;
}
.landing-admin-stat-row{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-bottom:10px;
}
.landing-admin-stat-box{
    background:#f7fbff;
    border:1px solid #e1eaf5;
    border-radius:16px;
    padding:12px;
}
.landing-admin-linkbar{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
.landing-admin-field-grid{
    display:grid;
    grid-template-columns:repeat(12,minmax(0,1fr));
    gap:12px;
}
.landing-admin-field-col{grid-column:span 6}
.landing-admin-field-wide{grid-column:span 12}
.landing-admin-field-fixed{grid-column:span 3}
.landing-admin-checkbox-row{
    display:flex;
    align-items:center;
    gap:8px;
    min-height:52px;
    margin:0;
    color:var(--brand-navy);
    font-size:.92rem;
    font-weight:800;
    text-transform:none;
}
.landing-admin-checkbox-row input{
    width:auto;
    min-height:auto;
}
.landing-admin-inline-note{
    display:block;
    margin-top:6px;
    color:var(--brand-muted);
    font-size:.86rem;
    line-height:1.5;
}
.landing-admin-soft-card{
    background:#f8fbff;
    border:1px solid #e2ebf6;
    border-radius:18px;
    padding:18px;
}
.landing-admin-table{
    width:100%;
    border-collapse:collapse;
}
.landing-admin-table th,
.landing-admin-table td{
    padding:10px;
    border-bottom:1px solid #e8eef6;
    text-align:left;
    vertical-align:top;
}
.landing-admin-table th{
    color:#52637a;
    font-size:.8rem;
    font-weight:900;
    text-transform:uppercase;
}
.landing-admin-lead-list{
    display:grid;
    gap:10px;
}
.landing-admin-lead{
    border:1px solid #e6edf7;
    border-radius:16px;
    padding:12px;
    background:#fbfdff;
}
.landing-admin-lead-title{
    font-size:.95rem;
    font-weight:900;
    color:var(--brand-navy);
}
.landing-admin-lead-meta{
    margin-top:4px;
    color:#52637a;
    font-size:.88rem;
}
.landing-admin-lead-text{
    margin-top:8px;
    color:#334155;
    line-height:1.5;
}
.landing-admin-empty{
    color:var(--brand-muted);
    line-height:1.6;
}

.material-symbols-outlined{
    font-family:'Material Symbols Outlined';
    font-weight:normal;
    font-style:normal;
    font-size:22px;
    line-height:1;
    letter-spacing:normal;
    text-transform:none;
    display:inline-block;
    white-space:nowrap;
    word-wrap:normal;
    direction:ltr;
    -webkit-font-feature-settings:'liga';
    -webkit-font-smoothing:antialiased;
}

@media (max-width:900px){
    .portal-app-layout{grid-template-columns:1fr}
    .portal-sidebar{
        position:relative;
        height:auto;
        top:auto;
        padding:12px 14px;
    }
    .portal-sidebar-mobile-toggle{display:inline-flex}
    .portal-sidebar.is-collapsed .portal-sidebar-nav,
    .portal-sidebar.is-collapsed .portal-sidebar-footer{display:none}
    .portal-topbar{
        position:relative;
        top:auto;
    }
    .portal-topbar-market{gap:14px}
    .portal-market-pill-stack{gap:12px}
    .portal-topbar-main{grid-template-columns:1fr}
    .portal-topbar-side{
        display:flex;
        align-items:stretch;
        justify-content:flex-start;
        gap:10px;
        width:100%;
    }
    .portal-topbar-brand{grid-template-columns:1fr}
    .portal-chart-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .portal-metric-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
    .portal-ops-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .portal-section-head{
        flex-direction:column;
        align-items:flex-start;
    }
    .portal-section-badge{
        max-width:100%;
        white-space:normal;
        line-height:1.35;
        align-self:flex-start;
    }
    .portal-chart-card-head{
        flex-direction:column;
        align-items:flex-start;
    }
    .portal-chart-toolbar{
        width:100%;
        justify-content:flex-start;
    }
    .portal-chart-filter{
        max-width:100%;
        white-space:normal;
        flex-wrap:wrap;
    }
    .portal-chart-filter select{
        width:100%;
        min-width:0;
    }
    .portal-series-table{min-width:720px}
    .hr-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .hr-form-grid,
    .hr-form-grid-3{grid-template-columns:1fr}
    .process-card-grid,
    .process-terminal-grid{grid-template-columns:1fr}
    .process-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .process-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .process-operation-row{grid-template-columns:1fr}
    .worker-auth-brand{
        grid-template-columns:1fr;
    }
    .worker-page-head{
        flex-direction:column;
        align-items:flex-start;
    }
    .worker-filter-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .worker-filter-wide{
        grid-column:span 2;
    }
    .hr-puantaj-filter-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .hr-puantaj-filter-grid .hr-field-full{
        grid-column:span 2;
    }
    .portal-series-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .portal-featured-grid,
    .portal-division-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .portal-hero,
    .landing-hero,
    .portal-auth-shell{grid-template-columns:1fr}
    .portal-quick-grid,
    .portal-unit-grid,
    .landing-grid,
    .landing-stats-grid,
    .landing-summary-grid,
    .landing-admin-summary-grid,
    .landing-admin-card-grid,
    .landing-admin-stat-row{grid-template-columns:1fr}
    .permission-summary-grid{grid-template-columns:1fr}
    .permission-user-picker{align-items:stretch}
    .permission-user-picker .portal-action-btn{
        width:100%;
        justify-content:center;
    }
    .permission-save-row{justify-content:stretch}
    .permission-save-row .portal-action-btn{
        width:100%;
        justify-content:center;
    }
    .hr-puantaj-filter-grid{
        grid-template-columns:1fr;
    }
    .hr-puantaj-filter-grid .hr-field-full{
        grid-column:span 1;
    }
    .hr-puantaj-table .sticky-col-3{
        left:304px;
        min-width:150px;
    }
    .hr-puantaj-table .sticky-col-4{
        left:454px;
        min-width:170px;
    }
}
@media (max-width:700px){
    .portal-page-shell,
    .landing-shell,
    .landing-admin-shell{
        padding:16px;
        overflow-x:clip;
    }
    .portal-sidebar-brand{
        padding-bottom:12px;
        margin-bottom:12px;
    }
    .portal-sidebar-logo{
        max-width:132px;
        height:46px;
    }
    .portal-topbar{
        margin:-16px -16px 18px -16px;
        padding:14px 16px;
        position:relative;
        top:auto;
    }
    .portal-topbar-main{
        grid-template-columns:1fr;
        align-items:start;
        gap:12px;
    }
    .portal-topbar-side{
        display:flex;
        width:100%;
    }
    .portal-profile-menu{
        width:100%;
        max-width:none;
        flex:1 1 auto;
    }
    .portal-topbar-brand{
        grid-column:1 / -1;
        grid-template-columns:1fr;
        gap:12px;
    }
    .portal-topbar-market{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        align-items:stretch;
        gap:12px;
    }
    .hr-puantaj-table .sticky-col-2{
        min-width:200px;
    }
    .hr-puantaj-table .sticky-col-3{
        left:264px;
        min-width:136px;
    }
    .hr-puantaj-table .sticky-col-4{
        left:400px;
        min-width:160px;
    }
    .portal-market-pill{
        width:auto;
        min-width:0;
    }
    .portal-market-pill-metal{
        grid-column:1 / -1;
    }
    .portal-market-pill-stack{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:10px;
    }
    .portal-theme-toggle.portal-theme-toggle-menu{
        min-height:52px;
        width:100%;
        flex:1 1 auto;
    }
    .portal-profile-card{
        grid-template-columns:44px minmax(0,1fr) 30px;
        gap:10px;
        min-width:0;
    }
    .portal-profile-caret{
        width:30px;
        height:30px;
        border-radius:10px;
    }
    .portal-profile-avatar{
        width:44px;
        height:44px;
        border-radius:14px;
        font-size:.96rem;
    }
    .portal-profile-name{
        font-size:.94rem;
    }
    .portal-profile-role{
        margin-top:2px;
        font-size:.75rem;
    }
    .portal-profile-email{
        margin-top:4px;
        font-size:.72rem;
    }
    .portal-log-summary-grid{
        grid-template-columns:1fr 1fr;
    }
    .portal-metric-grid{grid-template-columns:1fr}
    .portal-ops-grid{grid-template-columns:1fr}
    .hr-card-grid{grid-template-columns:1fr}
    .process-kpi-grid,
    .process-card-grid,
    .process-terminal-grid,
    .portal-series-kpi-grid,
    .portal-chart-grid,
    .portal-division-grid{grid-template-columns:1fr}
    .process-meta-grid{grid-template-columns:1fr}
    .worker-auth-shell,
    .worker-shell{
        padding:16px 12px 28px;
    }
    .worker-auth-card{
        border-radius:22px;
        padding:22px 18px;
    }
    .worker-auth-brand img{
        width:72px;
        height:72px;
    }
    .worker-auth-brand h1,
    .worker-page-head h1{
        font-size:1.65rem;
    }
    .worker-filter-grid{
        grid-template-columns:1fr;
    }
    .worker-filter-wide{
        grid-column:auto;
    }
    .portal-chart-card-head{
        flex-direction:column;
        align-items:flex-start;
    }
    .portal-chart-toolbar{
        width:100%;
        justify-content:flex-start;
    }
    .portal-chart-filter{
        width:100%;
        justify-content:flex-start;
    }
    .portal-chart-filter select{
        width:100%;
        min-width:0;
    }
    .portal-series-search{
        min-width:0;
        max-width:none;
    }
    .portal-series-toolbar-actions{
        width:100%;
    }
    .portal-hero,
    .portal-section,
    .landing-hero,
    .landing-card,
    .landing-admin-content,
    .landing-admin-hero,
    .portal-auth-hero,
    .portal-auth-panel{padding:18px}
    .portal-hero-title,
    .landing-title,
    .portal-auth-title,
    .portal-topbar-title{font-size:1.9rem}
    .portal-series-table{min-width:640px}
    .portal-logo{
        width:min(300px, 100%);
        height:132px;
        margin:0 auto 22px;
        padding:14px 20px;
    }
    .portal-identity-grid{grid-template-columns:1fr}
    .portal-inline-nav-group{
        align-items:flex-start;
        flex-direction:column;
    }
    .portal-inline-nav-heading{
        min-width:0;
    }
.landing-admin-field-col,
.landing-admin-field-wide,
.landing-admin-field-fixed{grid-column:span 12}
}

@media (max-width:560px){
    .portal-log-summary-grid{
        grid-template-columns:1fr;
    }
}

.stock-upload-gallery{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:10px;
}

.stock-upload-card{
    width:96px;
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:6px;
    border:1px solid #d7e2ef;
    border-radius:12px;
    background:#fff;
    font-size:.74rem;
    color:#50627b;
}

.stock-upload-card img{
    width:100%;
    height:72px;
    display:block;
    object-fit:cover;
    border-radius:8px;
    background:#f6f9fd;
}

.stock-upload-card span{
    display:flex;
    align-items:center;
    gap:6px;
    line-height:1.2;
}

.stock-upload-card a{
    display:block;
    width:100%;
}

:root[data-theme="dark"] .portal-sidebar-home,
:root[data-theme="dark"] .portal-sidebar-link.active{
    background:rgba(229,237,247,.10);
    color:#f8fbff;
    box-shadow:none;
}

:root[data-theme="dark"] .portal-sidebar-home.active{
    outline:1px solid rgba(148,163,184,.22);
}

:root[data-theme="dark"] .portal-section,
:root[data-theme="dark"] .landing-section,
:root[data-theme="dark"] .landing-admin-content,
:root[data-theme="dark"] .portal-inline-header,
:root[data-theme="dark"] .portal-center-card,
:root[data-theme="dark"] .portal-auth-shell,
:root[data-theme="dark"] .portal-auth-panel,
:root[data-theme="dark"] .portal-analysis-extra,
:root[data-theme="dark"] .portal-metric-card,
:root[data-theme="dark"] .portal-ops-card,
:root[data-theme="dark"] .portal-ops-item,
:root[data-theme="dark"] .portal-chart-card,
:root[data-theme="dark"] .permission-summary-card,
:root[data-theme="dark"] .permission-settings-card,
:root[data-theme="dark"] .permission-table-wrap,
:root[data-theme="dark"] .portal-series-kpi-card,
:root[data-theme="dark"] .portal-series-table-wrap,
:root[data-theme="dark"] .portal-featured-card,
:root[data-theme="dark"] .portal-division-card,
:root[data-theme="dark"] .portal-log-summary-card,
:root[data-theme="dark"] .portal-quick-card,
:root[data-theme="dark"] .portal-unit-card,
:root[data-theme="dark"] .hr-mini-card,
:root[data-theme="dark"] .hr-bulk-person-card,
:root[data-theme="dark"] .hr-bulk-shift-chip-card,
:root[data-theme="dark"] .process-terminal-card,
:root[data-theme="dark"] .worker-auth-card,
:root[data-theme="dark"] .worker-head-card,
:root[data-theme="dark"] .stock-packaging-card,
:root[data-theme="dark"] .landing-card,
:root[data-theme="dark"] .landing-tile,
:root[data-theme="dark"] .landing-faq-item,
:root[data-theme="dark"] .landing-summary-card,
:root[data-theme="dark"] .landing-stat-card,
:root[data-theme="dark"] .landing-admin-summary-card,
:root[data-theme="dark"] .landing-admin-card,
:root[data-theme="dark"] .landing-admin-soft-card,
:root[data-theme="dark"] .stock-upload-card,
:root[data-theme="dark"] .portal-identity-card,
:root[data-theme="dark"] .portal-page-shell .surface,
:root[data-theme="dark"] .portal-page-shell .panel,
:root[data-theme="dark"] .portal-page-shell .record-card,
:root[data-theme="dark"] .portal-page-shell .chart-card,
:root[data-theme="dark"] .portal-page-shell .summary-card,
:root[data-theme="dark"] .portal-page-shell .table-shell,
:root[data-theme="dark"] .portal-page-shell .stat-card,
:root[data-theme="dark"] .portal-page-shell .support-hero-card,
:root[data-theme="dark"] .portal-page-shell .support-summary-card,
:root[data-theme="dark"] .portal-page-shell .support-summary-item,
:root[data-theme="dark"] .portal-page-shell .support-tool-card,
:root[data-theme="dark"] .portal-page-shell .support-chip,
:root[data-theme="dark"] .portal-page-shell .support-note,
:root[data-theme="dark"] .portal-page-shell .support-capture-status{
    background:var(--brand-surface-soft);
    border-color:var(--panel-border);
    box-shadow:var(--shadow-md);
}

:root[data-theme="dark"] .portal-chart-card-customer{
    background:
        radial-gradient(circle at top left, rgba(59,130,246,.16), transparent 26%),
        linear-gradient(180deg, rgba(17,25,38,.98), rgba(12,18,30,.98));
}

:root[data-theme="dark"] .portal-chart-card-supplier{
    background:
        radial-gradient(circle at top right, rgba(245,158,11,.16), transparent 24%),
        linear-gradient(180deg, rgba(17,25,38,.98), rgba(12,18,30,.98));
}

:root[data-theme="dark"] .portal-chart-card-machine{
    background:
        radial-gradient(circle at top right, rgba(15,118,110,.16), transparent 28%),
        linear-gradient(180deg, rgba(17,25,38,.98), rgba(12,18,30,.98));
}

:root[data-theme="dark"] .portal-chart-card-downtime{
    background:
        radial-gradient(circle at top left, rgba(245,158,11,.18), transparent 28%),
        linear-gradient(180deg, rgba(17,25,38,.98), rgba(12,18,30,.98));
}

:root[data-theme="dark"] .permission-hero{
    background:
        radial-gradient(circle at top right, rgba(59,130,246,.12), transparent 22%),
        linear-gradient(180deg, rgba(17,25,38,.98), rgba(12,18,30,.98));
}

:root[data-theme="dark"] .portal-page-shell .support-hero,
:root[data-theme="dark"] .portal-page-shell .hero{
    background:
        radial-gradient(circle at top right, rgba(59,130,246,.12), transparent 28%),
        linear-gradient(135deg, rgba(17,25,38,.98) 0%, rgba(12,18,30,.98) 100%);
}

:root[data-theme="dark"] .portal-chart-filter,
:root[data-theme="dark"] .portal-chart-pager,
:root[data-theme="dark"] .permission-select,
:root[data-theme="dark"] .portal-input,
:root[data-theme="dark"] .portal-textarea,
:root[data-theme="dark"] .portal-select,
:root[data-theme="dark"] .portal-ops-modal-close,
:root[data-theme="dark"] .portal-inline-nav-link,
:root[data-theme="dark"] .portal-btn-light,
:root[data-theme="dark"] .portal-action-btn-light,
:root[data-theme="dark"] .portal-page-shell .btn-outline-dark,
:root[data-theme="dark"] .portal-page-shell .btn-outline-light,
:root[data-theme="dark"] .portal-page-shell .btn-light,
:root[data-theme="dark"] .portal-page-shell .form-control,
:root[data-theme="dark"] .portal-page-shell .form-select,
:root[data-theme="dark"] .portal-page-shell .input-group-text,
:root[data-theme="dark"] .portal-page-shell .dropdown-menu,
:root[data-theme="dark"] .portal-page-shell .card,
:root[data-theme="dark"] .portal-page-shell .modal-content{
    background:var(--control-bg);
    color:var(--brand-text);
    border-color:var(--control-border);
}

:root[data-theme="dark"] .portal-chart-filter select,
:root[data-theme="dark"] .portal-series-limit input,
:root[data-theme="dark"] .portal-page-shell input:not([type="checkbox"]):not([type="radio"]),
:root[data-theme="dark"] .portal-page-shell textarea,
:root[data-theme="dark"] .portal-page-shell select{
    background:var(--control-bg-soft);
    color:var(--brand-text);
    border-color:var(--control-border);
}

:root[data-theme="dark"] .portal-action-btn-primary{
    background:rgba(37,99,235,.18);
    color:#9cc5ff;
    border-color:rgba(59,130,246,.32);
}

:root[data-theme="dark"] .portal-btn-primary{
    background:var(--control-bg);
    color:var(--brand-text);
    border-color:var(--control-border);
}

:root[data-theme="dark"] .portal-btn-dark{
    background:linear-gradient(180deg,#2563eb,#1d4ed8);
    color:#ffffff;
    box-shadow:0 12px 24px rgba(37,99,235,.18);
}

:root[data-theme="dark"] .portal-btn-outline{
    color:var(--brand-text);
    border-color:rgba(148,163,184,.26);
}

:root[data-theme="dark"] .portal-action-btn-success{
    background:rgba(22,101,52,.22);
    color:#9ce0b3;
    border-color:rgba(34,197,94,.24);
}

:root[data-theme="dark"] .portal-btn-danger,
:root[data-theme="dark"] .portal-inline-nav-link-danger{
    background:rgba(127,29,29,.22);
    color:#ffb4b4;
    border-color:rgba(248,113,113,.24);
}

:root[data-theme="dark"] .portal-inline-nav-link:hover,
:root[data-theme="dark"] .portal-action-btn-light:hover,
:root[data-theme="dark"] .portal-btn-light:hover,
:root[data-theme="dark"] .portal-page-shell .btn-outline-dark:hover,
:root[data-theme="dark"] .portal-page-shell .btn-outline-light:hover,
:root[data-theme="dark"] .portal-page-shell .btn-light:hover{
    background:var(--control-bg-soft);
    border-color:var(--control-border-strong);
    color:var(--brand-text);
}

:root[data-theme="dark"] .portal-status{
    background:var(--control-bg);
    color:var(--brand-text);
    border-color:var(--control-border);
}

:root[data-theme="dark"] .portal-input:focus,
:root[data-theme="dark"] .portal-textarea:focus,
:root[data-theme="dark"] .portal-select:focus,
:root[data-theme="dark"] .portal-page-shell .form-control:focus,
:root[data-theme="dark"] .portal-page-shell .form-select:focus{
    border-color:rgba(125,183,255,.52);
    box-shadow:0 0 0 4px rgba(37,99,235,.14);
}

:root[data-theme="dark"] .portal-section-title,
:root[data-theme="dark"] .landing-section-title,
:root[data-theme="dark"] .portal-ops-card-total,
:root[data-theme="dark"] .portal-ops-item-main,
:root[data-theme="dark"] .portal-ops-item-amount,
:root[data-theme="dark"] .portal-ops-modal-title,
:root[data-theme="dark"] .portal-chart-title,
:root[data-theme="dark"] .permission-summary-title,
:root[data-theme="dark"] .permission-checkbox,
:root[data-theme="dark"] .permission-switch,
:root[data-theme="dark"] .permission-switch-label,
:root[data-theme="dark"] .permission-module-title,
:root[data-theme="dark"] .portal-series-kpi-value,
:root[data-theme="dark"] .portal-featured-title,
:root[data-theme="dark"] .portal-division-title,
:root[data-theme="dark"] .portal-inline-header-title,
:root[data-theme="dark"] .landing-form-title,
:root[data-theme="dark"] .landing-tile-title,
:root[data-theme="dark"] .landing-stat-value,
:root[data-theme="dark"] .landing-summary-value,
:root[data-theme="dark"] .landing-admin-summary-value,
:root[data-theme="dark"] .portal-panel-title,
:root[data-theme="dark"] .portal-label,
:root[data-theme="dark"] .portal-page-shell .hero-title,
:root[data-theme="dark"] .portal-page-shell .stat-value,
:root[data-theme="dark"] .portal-page-shell .panel-title,
:root[data-theme="dark"] .portal-page-shell .support-hero-title,
:root[data-theme="dark"] .portal-page-shell .support-tool-title,
:root[data-theme="dark"] .portal-page-shell .support-summary-value{
    color:var(--brand-text);
}

:root[data-theme="dark"] .portal-section-sub,
:root[data-theme="dark"] .landing-section-sub,
:root[data-theme="dark"] .portal-ops-card-note,
:root[data-theme="dark"] .portal-ops-item-mini,
:root[data-theme="dark"] .portal-ops-modal-sub,
:root[data-theme="dark"] .portal-chart-sub,
:root[data-theme="dark"] .permission-summary-sub,
:root[data-theme="dark"] .permission-field > span,
:root[data-theme="dark"] .permission-module-desc,
:root[data-theme="dark"] .portal-featured-sub,
:root[data-theme="dark"] .portal-division-desc,
:root[data-theme="dark"] .portal-division-count,
:root[data-theme="dark"] .portal-inline-header-sub,
:root[data-theme="dark"] .portal-panel-sub,
:root[data-theme="dark"] .portal-meta-row,
:root[data-theme="dark"] .landing-caption,
:root[data-theme="dark"] .landing-tile-text,
:root[data-theme="dark"] .landing-tile li,
:root[data-theme="dark"] .landing-footer,
:root[data-theme="dark"] .landing-admin-caption,
:root[data-theme="dark"] .portal-page-shell .text-muted,
:root[data-theme="dark"] .portal-page-shell .small-help,
:root[data-theme="dark"] .portal-page-shell .sub,
:root[data-theme="dark"] .portal-page-shell .hero-sub,
:root[data-theme="dark"] .portal-page-shell .panel-sub,
:root[data-theme="dark"] .portal-page-shell .stat-label,
:root[data-theme="dark"] .portal-page-shell .stat-sub,
:root[data-theme="dark"] .portal-page-shell .support-hero-sub,
:root[data-theme="dark"] .portal-page-shell .support-tool-sub,
:root[data-theme="dark"] .portal-page-shell .support-summary-label,
:root[data-theme="dark"] .portal-page-shell .toolbar-meta,
:root[data-theme="dark"] .portal-page-shell .page-info,
:root[data-theme="dark"] .portal-page-shell .support-field label{
    color:var(--brand-muted) !important;
}

:root[data-theme="dark"] .portal-section-badge,
:root[data-theme="dark"] .portal-inline-header-kicker{
    background:rgba(59,130,246,.14);
    border-color:rgba(96,165,250,.18);
    color:#9cc5ff;
}

:root[data-theme="dark"] .permission-switch-slider{
    background:rgba(148,163,184,.22);
    border-color:rgba(148,163,184,.18);
    box-shadow:inset 0 2px 6px rgba(2,6,23,.34);
}

:root[data-theme="dark"] .permission-switch-slider::after{
    background:var(--brand-surface);
    box-shadow:0 4px 10px rgba(2,6,23,.26);
}

:root[data-theme="dark"] .permission-switch-label{
    background:rgba(148,163,184,.08);
    border-color:rgba(148,163,184,.18);
    color:#dbe4f0;
}

:root[data-theme="dark"] .permission-switch-visibility .permission-switch-input:checked + .permission-switch-slider{
    background:linear-gradient(180deg, #1fa76a 0%, #158251 100%);
    border-color:#106a42;
    box-shadow:0 10px 18px rgba(34,197,94,.16);
}

:root[data-theme="dark"] .permission-switch-visibility .permission-switch-input:checked ~ .permission-switch-label{
    color:#b7f7ce;
    background:rgba(22,163,74,.18);
    border-color:rgba(34,197,94,.26);
}

:root[data-theme="dark"] .permission-switch-maintenance .permission-switch-input:checked + .permission-switch-slider{
    background:linear-gradient(180deg, #f7b538 0%, #dd8a0d 100%);
    border-color:#b66a06;
    box-shadow:0 10px 18px rgba(245,158,11,.2);
}

:root[data-theme="dark"] .permission-switch-maintenance .permission-switch-input:checked ~ .permission-switch-label{
    color:#ffd28a;
    background:rgba(245,158,11,.18);
    border-color:rgba(245,158,11,.28);
}

:root[data-theme="dark"] .permission-switch-maintenance .permission-switch-input:not(:checked) ~ .permission-switch-label{
    color:#9edfff;
    background:rgba(14,165,233,.14);
    border-color:rgba(56,189,248,.24);
}

:root[data-theme="dark"] .portal-analysis-extra-summary,
:root[data-theme="dark"] .portal-chart-pager-info,
:root[data-theme="dark"] .portal-series-empty,
:root[data-theme="dark"] .portal-log-summary-label,
:root[data-theme="dark"] .portal-log-summary-sub,
:root[data-theme="dark"] .portal-page-shell .table,
:root[data-theme="dark"] .stock-upload-card,
:root[data-theme="dark"] .stock-upload-card span{
    color:var(--brand-muted);
}

:root[data-theme="dark"] .portal-log-summary-value,
:root[data-theme="dark"] .portal-page-shell .table tbody td,
:root[data-theme="dark"] .portal-page-shell .table tbody th{
    color:var(--brand-text);
}

:root[data-theme="dark"] .portal-log-action-code{
    color:#a9bbd3;
}

:root[data-theme="dark"] .portal-log-open-btn{
    color:#b9d6ff;
    background:rgba(37,99,235,.16);
    border-color:rgba(96,165,250,.22);
}

:root[data-theme="dark"] .portal-log-open-btn:hover{
    background:rgba(37,99,235,.22);
    border-color:rgba(96,165,250,.32);
}

:root[data-theme="dark"] .portal-log-row-clickable:hover td{
    background:rgba(28,42,64,.86);
}

:root[data-theme="dark"] .portal-log-row-clickable:focus-visible{
    outline-color:rgba(96,165,250,.34);
}

:root[data-theme="dark"] .portal-log-modal-card,
:root[data-theme="dark"] .portal-log-modal-panel{
    background:rgba(15,23,42,.46);
    border-color:rgba(148,163,184,.16);
}

:root[data-theme="dark"] .portal-log-modal-label{
    color:#8ea2bd;
}

:root[data-theme="dark"] .portal-log-modal-value,
:root[data-theme="dark"] .portal-log-modal-pre{
    color:#dbe7f7;
}

:root[data-theme="dark"] .portal-log-inline-details summary{
    color:#b9d6ff;
    background:rgba(37,99,235,.16);
    border-color:rgba(96,165,250,.22);
}

:root[data-theme="dark"] .portal-log-inline-body{
    background:rgba(15,23,42,.46);
    border-color:rgba(148,163,184,.16);
    color:#cbd8ea;
}

@media (max-width:1080px){
    .portal-log-modal-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width:700px){
    .portal-log-modal-grid{
        grid-template-columns:1fr;
    }
}

:root[data-theme="dark"] .permission-table thead th,
:root[data-theme="dark"] .portal-series-table thead th,
:root[data-theme="dark"] .portal-page-shell .table thead th{
    background:#162235;
    color:#ffffff;
    border-color:var(--control-border);
}

:root[data-theme="dark"] .permission-table tbody td,
:root[data-theme="dark"] .portal-series-table tbody td,
:root[data-theme="dark"] .portal-page-shell .table tbody td,
:root[data-theme="dark"] .portal-page-shell .table tbody th{
    border-color:var(--panel-border);
}

:root[data-theme="dark"] .portal-series-table tbody td{
    background:transparent;
}

:root[data-theme="dark"] .portal-page-shell .table{
    --bs-table-bg:transparent;
    --bs-table-color:var(--brand-text);
    --bs-table-border-color:var(--panel-border);
    --bs-table-striped-bg:rgba(148,163,184,.04);
}

:root[data-theme="dark"] .portal-analysis-extra,
:root[data-theme="dark"] .portal-chart-filter,
:root[data-theme="dark"] .portal-chart-pager,
:root[data-theme="dark"] .permission-table-wrap,
:root[data-theme="dark"] .portal-series-table-wrap{
    border-color:var(--panel-border);
}

:root[data-theme="dark"] .portal-analysis-extra{
    background:var(--panel-surface-muted);
}

:root[data-theme="dark"] .portal-inline-nav,
:root[data-theme="dark"] .portal-meta{
    border-top-color:var(--panel-border);
}

:root[data-theme="dark"] .portal-ops-item-sep{
    color:#6f86a2;
}

:root[data-theme="dark"] .portal-ops-modal-backdrop{
    background:var(--backdrop-color);
}

:root[data-theme="dark"] .portal-ops-modal{
    background:var(--brand-surface);
    border-color:var(--panel-border);
    box-shadow:var(--shadow-lg);
}
