/* RiverLog interface palette: navy, royal blue and river cyan. */
:root{--riverlog-navy:#072550;--riverlog-blue:#0875ee;--riverlog-cyan:#00afe9;--green:#0875ee;--border:#dce7f4;--muted:#687d97;accent-color:#0875ee}html{background:#eef5fc;color-scheme:light}body:not(.riverlog-login){color:#183652}.studio-layout{--green:#0875ee;--border:#dce7f4;--muted:#687d97;background:radial-gradient(ellipse at 0 0,#dbeeff,transparent 50%),radial-gradient(ellipse at 100% 0,#e5f5ff,transparent 45%),#eef5fc}.studio-layout .topnav,.studio-layout .profile-link{background:#edf4fd;border-color:#dce7f4}.studio-layout .rail-link.selected,.studio-layout .catalog.is-current>summary{background:#0875ee;color:white;box-shadow:0 4px 12px #0875ee26}.studio-layout .rail-link.selected:hover{background:#075bc7}.studio-layout .metric-icon{background:#e4f0ff;color:#0875ee}.studio-layout .bar{background:#0875ee}.studio-layout .bar.out{background:#00afe9}.studio-layout .chart-legend i:not(.out){background:#0875ee}.studio-layout .chart-legend .out{background:#00afe9}input[type=checkbox],input[type=radio]{accent-color:#0875ee}.pagination-links .page-current{background:#0875ee;color:#fff}.spend-track>span{background:linear-gradient(90deg,#0875ee,#00afe9)}.spend-share{color:#075cbf}.stock-level.green{background:#e8f6ee;color:#167348}.order-card.done{border-top-color:#269060!important}.purchase-state.low{background:#e8f6ee;color:#167348}.returned-packaging td{background:#fff6d5!important;color:#7b6015!important}.return-badge{background:#ffebac!important;color:#725511!important}
html[data-theme=dark]{--green:#79baff;--border:#294560;--muted:#a6bad1;--primary:#176dd2;--secondary:#153353;--accent:#dbefff;--body-fg:#dfebf8;--body-bg:#0b1727;--body-quiet-color:#a6bad1;--header-bg:#112b47;--link-fg:#79baff;--link-hover-color:#b7ddff;--button-bg:#176dd2;--button-hover-bg:#2886eb;--default-button-bg:#176dd2;--object-tools-bg:#176dd2;background:#0b1727;color-scheme:dark}html[data-theme=dark] .studio-layout{background:radial-gradient(ellipse at 0 0,#102f50,transparent 55%),radial-gradient(ellipse at 100% 0,#12304a,transparent 45%),#0b1727!important}html[data-theme=dark] .studio-layout .rail-link.selected,html[data-theme=dark] .studio-layout .catalog.is-current>summary{background:#176dd2!important;color:white!important}html[data-theme=dark] .stock-level.green{background:#173d32!important;color:#91dfb4!important}html[data-theme=dark] .purchase-state.low{background:#173d32!important;color:#91dfb4!important}html[data-theme=dark] .spend-share{color:#79baff}html[data-theme=dark] .returned-packaging td{background:#483e1c!important;color:#ffe7a5!important}html[data-theme=dark] .return-badge{background:#695623!important;color:#ffe7a5!important}html[data-theme=dark] .riverlog-login .login-session-notice{background:#17375c;color:#bdddff}html[data-theme=dark] .riverlog-login .whatsapp-contact{background:#123a2b;color:#9ce7ba;border-color:#45a878}

.purchase-kpis .card:nth-child(1){border-top:2px solid #0875ee}.purchase-kpis .card:nth-child(2){border-top:2px solid #00afe9}.purchase-kpis .card:nth-child(3){border-top:2px solid #315b8b}.purchase-kpis .card:nth-child(4){border-top:2px solid #84bdf1}.studio-admin .module caption,.studio-admin .module h2{background:#e3efff;color:#174d8b}.studio-admin .module caption a{color:#174d8b!important}html[data-theme=dark] .studio-admin .module caption,html[data-theme=dark] .studio-admin .module h2{background:#1b3858!important;color:#dfedff!important}html[data-theme=dark] .studio-admin .module caption a{color:#dfedff!important}html[data-theme=dark] .studio-admin table td,html[data-theme=dark] .studio-admin table th{background:transparent!important;color:#d4e5fa!important}html[data-theme=dark] .studio-admin tbody tr:nth-child(odd){background:#11263e!important}html[data-theme=dark] .studio-admin tbody tr:nth-child(even){background:#18314e!important}html[data-theme=dark] .studio-admin #content-related,html[data-theme=dark] .studio-admin #content-related .module{background:#142a43!important}html[data-theme=dark] .studio-admin #content-related h2{color:#d4e5fa!important}html[data-theme=dark] .studio-admin #nav-sidebar .current-model{background:#1d4770!important}

.studio-layout .stats .card:nth-child(3) .metric-icon{background:#dff7ff;color:#0786b1}html[data-theme=dark] .studio-layout .stats .card:nth-child(3) .metric-icon{background:#153e55!important;color:#72d8f6!important}

/* Tenant identity has its own quiet context strip, separate from the ERP brand. */
.tenant-context-bar{display:flex;justify-content:flex-end;margin:12px 26px -8px 111px;min-height:48px}.tenant-identity{display:inline-flex;align-items:center;gap:11px;max-width:min(380px,100%);padding:7px 15px 7px 8px;background:#ffffffd9;border:1px solid #dce7f4;border-radius:16px;box-shadow:0 3px 12px #09255005;color:#183652}.tenant-company-logo{display:block;width:42px;height:36px;object-fit:contain;flex:none;border-radius:7px;background:#fff;padding:2px}.tenant-company-initial{width:36px;height:36px;display:grid;place-items:center;flex:none;border-radius:10px;background:#e6f1ff;color:#1762b5;font-size:18px;font-weight:750}.tenant-company-text{min-width:0;display:flex;flex-direction:column;gap:3px}.tenant-company-text small{color:#6b819d;font-size:9px;text-transform:uppercase;letter-spacing:1px;line-height:1}.tenant-company-text strong{display:block;font-size:13px;line-height:1.3;font-weight:700;max-width:290px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.studio-admin #header .tenant-identity{margin-left:20px;color:#183652}.studio-admin #header .tenant-company-text strong{color:#183652}.studio-admin #header .tenant-company-text small{color:#6b819d}html[data-theme=dark] .tenant-identity{background:#142a43;border-color:#294560;color:#e2efff}html[data-theme=dark] .tenant-company-text small{color:#9cb9da!important}html[data-theme=dark] .tenant-company-initial{background:#1b3c63;color:#91c9ff}html[data-theme=dark] .studio-admin #header .tenant-company-text strong{color:#e2efff}@media(max-width:760px){.tenant-context-bar{margin:10px 16px -5px 85px}.tenant-identity{border-radius:13px;padding:6px 11px 6px 6px;gap:8px;max-width:100%}.tenant-company-logo{width:36px;height:30px}.tenant-company-text strong{font-size:12px;max-width:230px}.studio-admin #header .tenant-identity{margin-left:0}.tenant-company-text small{font-size:8px}}@media(max-width:650px){.tenant-context-bar{margin:10px 14px 0;justify-content:flex-start}.tenant-company-text strong{max-width:calc(100vw - 130px)}}

.account-identity{display:grid;gap:4px;min-width:0}.profile-account .tenant-identity{border:0;box-shadow:none;background:transparent;padding:0 5px;gap:7px;max-width:190px;min-height:25px;border-radius:0}.profile-account .tenant-company-logo{width:31px;height:25px;border-radius:5px;padding:1px}.profile-account .tenant-company-initial{width:25px;height:25px;border-radius:7px;font-size:12px}.profile-account .tenant-company-text strong{font-size:11px;max-width:145px}.studio-admin #header .account-identity .tenant-identity{margin:0}.account-identity .profile-link{width:fit-content}.studio-layout .account-identity .profile-link{padding:2px 8px 2px 3px}.studio-layout .account-identity .user-avatar{width:30px;height:30px;min-width:30px}.profile-account .tenant-company-text{gap:0}@media(max-width:650px){.profile-account .tenant-identity{max-width:145px;padding:0}.profile-account .tenant-company-text strong{max-width:100px;font-size:10px}.studio-layout .profile-account .account-identity .account-name{display:none}.account-identity{justify-items:center}}

.profile-account .account-identity{display:flex;align-items:center;gap:12px}.profile-account .account-identity .tenant-identity{padding:0 12px 0 0;border-right:1px solid #d6e3f2;max-width:160px;min-height:36px;flex:none}.profile-account .account-identity .tenant-company-logo{width:34px;height:30px}.profile-account .account-identity .tenant-company-text strong{max-width:105px}.profile-account .account-identity .profile-link{flex:none}html[data-theme=dark] .profile-account .account-identity .tenant-identity{border-right-color:#35516e}@media(min-width:1001px) and (max-width:1400px){.studio-layout .topbar{gap:12px;padding-left:16px;padding-right:16px}.studio-layout .topnav>a,.studio-layout .topnav summary{padding:11px 10px;font-size:11px}.studio-layout .profile-account{gap:8px}.studio-layout .profile-account .account-name{max-width:105px}.profile-account .account-identity{gap:9px}.profile-account .account-identity .tenant-identity{padding-right:9px;gap:6px;max-width:132px}.profile-account .account-identity .tenant-company-text strong{max-width:82px}.profile-account .account-identity .tenant-company-logo{width:29px;height:27px}}@media(max-width:650px){.profile-account .account-identity{display:flex;gap:8px}.profile-account .account-identity .tenant-identity{max-width:140px;padding-right:8px}.profile-account .account-identity .tenant-company-text strong{max-width:86px}.profile-account .account-identity .tenant-company-logo{width:28px;height:26px}}

/* Nested catalogue sections must not inherit a selected top-level menu style. */
.studio-layout .topnav .catalog-menu .catalog-branch>summary{display:flex;align-items:center;justify-content:space-between;width:100%;white-space:normal;background:transparent!important;color:#183652!important;box-shadow:none!important;border-radius:10px!important;padding:12px!important}.studio-layout .topnav .catalog-menu .catalog-branch>summary:hover,.studio-layout .topnav .catalog-menu .catalog-branch[open]>summary{background:#e9f3ff!important;color:#075cbf!important}.studio-layout .catalog-branch>div{border-left-color:#d4e5f8}.studio-layout .catalog-branch>div>a{white-space:normal;line-height:1.4}html[data-theme=dark] .studio-layout .topnav .catalog-menu .catalog-branch>summary{color:#d4e8ff!important;background:transparent!important}html[data-theme=dark] .studio-layout .topnav .catalog-menu .catalog-branch>summary:hover,html[data-theme=dark] .studio-layout .topnav .catalog-menu .catalog-branch[open]>summary{background:#20466c!important;color:#e5f3ff!important}html[data-theme=dark] .studio-layout .catalog-branch>div{border-left-color:#355a80}

.access-feedback-dialog{max-width:440px;width:calc(100% - 40px);border:1px solid #f0c9cd;border-radius:24px;padding:28px;background:#fff;color:#183652;box-shadow:0 22px 80px #09255030;text-align:center}.access-feedback-dialog::backdrop{background:#071b354d;backdrop-filter:blur(3px)}.access-feedback-dialog h2{font-size:21px;margin:14px 0 10px}.access-feedback-dialog p{font-size:15px;line-height:1.6;margin:0 0 22px;color:#ad2935!important}.access-feedback-icon{display:grid;place-items:center;width:46px;height:46px;margin:auto;border-radius:50%;background:#fff0f1;color:#b72c3b;font-size:28px;font-weight:700}.access-feedback-dialog button{min-width:130px;background:#0875ee;color:white;border-radius:12px;padding:12px 22px}html[data-theme=dark] .access-feedback-dialog{background:#142a43!important;border-color:#804654!important;color:#e2efff!important}html[data-theme=dark] .access-feedback-dialog p{color:#ffb2bb!important}html[data-theme=dark] .access-feedback-icon{background:#4e2936;color:#ffb2bb}

/* Operation priority remains distinct in both themes. */
.studio-layout .order-card.order-priority{background:#fff0f0!important;border:2px solid #dc3545!important;box-shadow:0 5px 18px #dc354520!important}
.priority-badge{display:inline-flex;align-items:center;background:#bb2032;color:#fff!important;border-radius:8px;padding:6px 10px;font-size:11px;font-weight:800;letter-spacing:.5px;margin-bottom:10px}
.studio-layout .order-card .dispatch-guide-button{display:block;text-align:center;margin-bottom:12px;background:#0875ee;color:#fff;border:1px solid #0875ee;font-size:12px;white-space:normal}
html[data-theme="dark"] .studio-layout .order-card.order-priority{background:#451d29!important;border-color:#ff6978!important}

/* Readable Django admin field errors and secondary save actions. */
html[data-theme="dark"] body ul.errorlist{background:#482331!important;color:#ffd6de!important;border:1px solid #9d4d5b;border-radius:8px;padding:9px 12px!important}
html[data-theme="dark"] body ul.errorlist li{color:#ffd6de!important;background:transparent!important}
body #content .submit-row input[type="submit"]:not(.default){background:#e4eefb;color:#153b65;border:1px solid #bfd2eb}
html[data-theme="dark"] body #content .submit-row input[type="submit"]:not(.default){background:#294b70!important;color:#f0f6ff!important;border-color:#4d7198!important}

/* Keep chart bars and legend on the same palette in both themes. */
.studio-layout .chart-legend i.returns,.studio-layout .bar.returns{background:#a06ee8}.studio-layout .chart-legend i.loss,.studio-layout .bar.loss{background:#db5366}

.studio-layout .pending-goods-tag,html[data-theme=dark] .studio-layout .pending-goods-tag{background:#fff1c8!important;color:#78550d!important;white-space:normal}.pending-goods-tag:before{content:"◷ ";}

/* Pending inbound receipts: highlight the entire row without a badge. */
.studio-layout #romaneios .receipt-pending-row>td{background:#ffedd5!important;color:#7c350a!important;border-bottom:0!important}
.studio-layout #romaneios .receipt-pending-row>td:first-child{font-weight:800}
html[data-theme=dark] .studio-layout #romaneios .receipt-pending-row>td{background:#663814!important;color:#ffdfb4!important;border-bottom:0!important}

.receipt-pending-note{display:block;margin-top:5px;font-size:11px;font-weight:600;white-space:nowrap}
