/* Drugstock · Clinical Teal — shared presentation theme */
:root{--ds-navy:#143a53;--ds-teal:#087f8c;--ds-blue:#2575cb;--ds-bg:#f2f7fa;--ds-line:#dfe9ee;--ds-text:#233f55;--ds-muted:#657e90;--ds-shadow:0 5px 22px #2449620b;--ds-raised:0 14px 35px #24496214}
html.ds-theme body{font-family:"Noto Sans Thai","Sarabun",Tahoma,sans-serif;color:var(--ds-text);background:radial-gradient(ellipse at 100% 0,#d9eff17a,transparent 40rem),linear-gradient(180deg,#f5f9fc,#eef4f8);-webkit-font-smoothing:antialiased;line-height:1.65}
html.ds-theme ::selection{background:#c5e9ee;color:#1a5364}
html.ds-theme :where(a,button,input,select,textarea):focus-visible{outline:3px solid #22a1b0;outline-offset:3px}
html.ds-theme :where(a,button){-webkit-tap-highlight-color:transparent}
html.ds-theme :is(.app-navbar,.dashboard-navbar,.navbar-dark){background:linear-gradient(110deg,#14364f,#185773 68%,#147c85)!important;box-shadow:0 4px 17px #153c5a16;border-bottom:1px solid #ffffff12}
html.ds-theme :is(.app-brand-icon,.dashboard-brand-icon){background:#ffffff13;border:1px solid #ffffff20;border-radius:14px;box-shadow:none}
html.ds-theme :is(.app-brand-text,.dashboard-brand-text) strong{font-size:17px;letter-spacing:-.2px}
html.ds-theme :is(.app-brand-text,.dashboard-brand-text) small{color:#c9dfe9}
html.ds-theme :is(.desktop-menu,.nav-menu-desktop) .nav-link{border-radius:10px;color:#d3e3ed;font-size:13px;padding:10px 13px}
html.ds-theme :is(.desktop-menu,.nav-menu-desktop) .nav-link:hover,html.ds-theme :is(.desktop-menu,.nav-menu-desktop) .nav-link.active{background:#ffffff14;color:#fff;box-shadow:inset 0 -2px 0 #71d5d5}
html.ds-theme :is(.user-avatar,.dashboard-user-avatar){background:#ffffff17;border:1px solid #ffffff21;box-shadow:none}
html.ds-theme :is(.main-offcanvas,.dashboard-offcanvas){background:#f8fbfe}
html.ds-theme :is(.main-offcanvas,.dashboard-offcanvas) .offcanvas-header{background:linear-gradient(110deg,#143a53,#167781);color:white;border-bottom:0}
html.ds-theme :is(.main-offcanvas,.dashboard-offcanvas) .list-group-item{border:1px solid #e2ecf2;background:#fff;border-radius:12px;margin-bottom:7px;color:#2e506a}
html.ds-theme :is(.main-offcanvas,.dashboard-offcanvas) .list-group-item.active{background:#e7f5f6;color:#087785;border-color:#bfdfe3}
/* Sidebar decoration never changes its positioning or collapse dimensions. */
html.ds-theme .sidebar{background:radial-gradient(ellipse at top left,#33809335,transparent 65%),linear-gradient(180deg,#143b50,#103344 70%,#102e3e)!important;border-right:1px solid #ffffff0a;box-shadow:4px 0 24px #15354a10}
html.ds-theme .sidebar-brand{border-bottom:1px solid #ffffff12}
html.ds-theme .sidebar .brand-logo{border:3px solid #ffffff28;box-shadow:0 6px 16px #00152125;border-radius:15px}
html.ds-theme .sidebar :is(.brand-subtitle,.sidebar-menu-title){color:#9fc3d1}
html.ds-theme .sidebar .brand-title{letter-spacing:-.3px;font-weight:700}
html.ds-theme .sidebar .nav-link{color:#c3dbe5;border:1px solid transparent;border-radius:11px;transition:background .2s,color .2s;border-radius:12px;font-size:13px}
html.ds-theme .sidebar .nav-link:hover{background:#ffffff0a;color:#fff;border-color:#ffffff10;transform:none}
html.ds-theme .sidebar .nav-link.active{background:linear-gradient(100deg,#2884a4,#1c687d);border:1px solid #8acfde25;color:#fff;box-shadow:0 5px 15px #001e3028}
html.ds-theme .sidebar .menu-icon{background:#ffffff09;border-radius:9px}
html.ds-theme .sidebar .sidebar-user{border-top-color:#ffffff12;background:#ffffff04}
html.ds-theme .sidebar .user-profile{background:#ffffff06;border:1px solid #ffffff0d;border-radius:12px}
html.ds-theme .sidebar :is(.user-details,.user-name){color:#e3eff4}
html.ds-theme .sidebar .logout-btn{background:#ffffff0a;border:1px solid #ffffff20;color:#d7eaf1;border-radius:11px}
html.ds-theme .sidebar .logout-btn:hover{background:#ffffff16}
html.ds-theme .sidebar-collapse-btn{background:#ffffff0c;border:1px solid #ffffff18;color:#d8edf4;border-radius:10px}
html.ds-theme .mobile-topbar{background:linear-gradient(105deg,#143a53,#147582);box-shadow:0 4px 14px #163c5020}
/* Hero panels and headline sizes */
html.ds-theme :is(.hero-card,.dashboard-hero,.warehouse-hero,.pbi-header,.page-header){background:radial-gradient(ellipse at 95% 0,#7cdad026,transparent 55%),linear-gradient(112deg,#183e59,#226381 60%,#16808b)!important;color:#fff;border:1px solid #ffffff15;border-radius:23px;box-shadow:0 12px 28px #174e6515}
html.ds-theme :is(.hero-card,.dashboard-hero,.warehouse-hero)::after{background:#b4eee315;border:1px solid #ffffff12;border-radius:50%;pointer-events:none}
html.ds-theme :is(.hero-card,.dashboard-hero,.warehouse-hero) :is(h1,.hero-title){font-size:clamp(23px,2.25vw,33px);font-weight:700;line-height:1.5;letter-spacing:-.025em;text-wrap:balance}
html.ds-theme :is(.hero-card,.dashboard-hero,.warehouse-hero) :is(p,.hero-subtitle){color:#d2e6ee;font-size:13px;line-height:1.9}
html.ds-theme :is(.hero-logo,.hero-icon,.hero-unit-icon){border-radius:16px;background:#ffffff12;border:1px solid #ffffff24;box-shadow:none}
html.ds-theme :is(.hero-unit,.unit-chip){border:1px solid #ffffff24;background:#ffffff0d;border-radius:14px;backdrop-filter:blur(10px)}
/* Consistent panels with semantic KPI colors */
html.ds-theme :is(.card,.dashboard-card,.dashboard-section,.kpi-card,.wh-card,.mobile-drug-card){border:1px solid var(--ds-line);background:#fff;border-radius:19px;box-shadow:var(--ds-shadow)}
html.ds-theme :is(.dashboard-card,.dashboard-section,.wh-card){overflow:hidden}
html.ds-theme :is(.kpi-card,.mobile-drug-card){transition:box-shadow .2s,transform .2s}
html.ds-theme .kpi-card:hover{transform:translateY(-3px);box-shadow:var(--ds-raised)}
html.ds-theme .kpi-card::after{opacity:.4}
html.ds-theme .kpi-value{font-size:clamp(28px,2.6vw,39px);line-height:1.4;color:#163d56;letter-spacing:-1px}
html.ds-theme .kpi-label{font-size:12px;font-weight:600;color:#59748a}
html.ds-theme :is(.kpi-icon,.section-icon,.card-icon){border-radius:13px;box-shadow:none}
html.ds-theme :is(.kpi-sub,.kpi-foot,.section-subtitle,.card-subtitle){color:#6c8395;line-height:1.7;font-size:12px}
html.ds-theme :is(.dashboard-card-header,.dashboard-section-header,.wh-card .card-header){background:linear-gradient(110deg,#fbfdff,#f2f8fb);border-bottom:1px solid #e2ecf2;padding:18px 21px}
html.ds-theme :is(.card-title,.section-title){color:#244b64;font-weight:700;font-size:16px;line-height:1.6}
html.ds-theme .wh-card .card-body{padding:22px}
html.ds-theme :is(.filter-panel,.stat-strip,.summary-box){background:#f1f7fb;border-color:#dbe8ef;border-radius:13px}
html.ds-theme .section-title-icon{background:#e5f3f7;color:#087c8e;border-radius:11px}
html.ds-theme .card:hover{transform:none;box-shadow:var(--ds-raised)}
/* Inputs retain existing widths and icon/password padding. */
html.ds-theme :is(.form-control,.form-select){background-color:#f9fcfe;border:1px solid #d8e5ed!important;border-radius:11px;color:#2b485e;box-shadow:0 1px 3px #1f455505;font-family:inherit;transition:border-color .2s,background .2s,box-shadow .2s}
html.ds-theme :is(.form-control,.form-select):focus{background-color:#fff;border-color:#75b8c5!important;box-shadow:0 0 0 3px #1b8fa713}
html.ds-theme .form-control::placeholder{color:#8396a5;opacity:1}
html.ds-theme .form-label{font-size:13px;color:#3e5e74;font-weight:600;line-height:1.8}
html.ds-theme :is(.form-control,.form-select):disabled,html.ds-theme .form-control[readonly]{background:#eef3f7;color:#728695}
html.ds-theme textarea.form-control{line-height:1.85;resize:vertical}
html.ds-theme :is(input[type="checkbox"],input[type="radio"]){accent-color:#0a8194}
html.ds-theme .form-check-input:checked{background-color:#0a8194;border-color:#0a8194}
html.ds-theme input[type="file"]::file-selector-button{background:#e7f2f8;color:#286787;border:0;padding:9px 14px;border-right:1px solid #dce9f0;font:inherit;cursor:pointer}
html.ds-theme .input-group>.form-control{border-radius:0}
html.ds-theme .input-group>.form-control:first-child{border-radius:11px 0 0 11px}
html.ds-theme .input-group>.form-control:last-child{border-radius:0 11px 11px 0}
/* Buttons respect Bootstrap state classes. */
html.ds-theme .btn{border-radius:10px;font-family:inherit;font-weight:600;line-height:1.55;transition:box-shadow .2s,background .2s,transform .2s}
html.ds-theme .btn-primary{--bs-btn-bg:#167d9c;--bs-btn-border-color:#167d9c;--bs-btn-hover-bg:#116882;--bs-btn-hover-border-color:#116882;--bs-btn-active-bg:#0f5b73;background-image:linear-gradient(110deg,#287cbb,#158d9a);box-shadow:0 4px 12px #1e789f1a}
html.ds-theme .btn-primary:hover{box-shadow:0 7px 18px #1e789f24}
html.ds-theme .btn-outline-primary{--bs-btn-color:#21739d;--bs-btn-border-color:#b1d3e2;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#217b9c;--bs-btn-hover-border-color:#217b9c}
html.ds-theme .btn-wh-primary{background:linear-gradient(110deg,#287cbb,#158d9a);color:#fff;box-shadow:0 5px 12px #257ea41a}
html.ds-theme .btn-wh-secondary{background:#edf4f9;color:#44667c;border:1px solid #dce8f0}
html.ds-theme :is(.btn-light,.btn-outline-secondary){border-color:#d8e4ec;background:#f6fafc;color:#48677d}
html.ds-theme :is(.btn-light,.btn-outline-secondary):hover{background:#e9f3f8;color:#295875}
html.ds-theme .badge{font-weight:600;letter-spacing:0;line-height:1.5;border-radius:7px}
html.ds-theme .alert{border-radius:13px;font-size:13px;line-height:1.8}
html.ds-theme .alert-warning{background:#fff8e8;border-color:#efddb2;color:#836224}
html.ds-theme .alert-danger{background:#fff0f0;border-color:#efcccc;color:#a84949}
html.ds-theme .alert-success{background:#edf9f2;border-color:#c7e6d5;color:#28745b}
/* Tables and mobile stock cards */
html.ds-theme :is(.table-responsive,.table-wrap){border-radius:13px;scrollbar-width:thin;scrollbar-color:#acc6d6 #f1f7fa;overscroll-behavior-x:contain}
html.ds-theme .table{--bs-table-color:#37566d;--bs-table-bg:#fff;--bs-table-border-color:#e4edf3;--bs-table-striped-bg:#f8fbfd;--bs-table-hover-bg:#edf6fa;box-shadow:none;font-size:13px;vertical-align:middle}
html.ds-theme :is(.table,.warehouse-table) thead th{background:#edf5f9!important;color:#416780!important;font-weight:600;font-size:12px;border-color:#d9e7ef;padding-top:13px;padding-bottom:13px;line-height:1.7}
html.ds-theme :is(.table,.warehouse-table) tbody td{color:#36536a;line-height:1.75;border-color:#e6eff4;padding-top:12px;padding-bottom:12px}
html.ds-theme .table tbody tr:nth-child(even){--bs-table-bg:#fafcfe}
html.ds-theme .table .text-danger{color:#bc4c4c!important}html.ds-theme .table .text-success{color:#258167!important}
html.ds-theme .drug-name{font-weight:600;color:#255873;line-height:1.7}
html.ds-theme :is(.unit-badge,.stock-badge,.lot-badge){border-radius:7px;font-size:11px;font-weight:600}
html.ds-theme .unit-badge{background:#e8f3fb;color:#3b7095}html.ds-theme .lot-badge{background:#f0eef9;color:#766395}
html.ds-theme .mobile-drug-card{border-left:3px solid #b4d8e4;padding:17px}
html.ds-theme .mobile-drug-card .drug-title{color:#23536a;font-weight:700;line-height:1.7}
html.ds-theme .mobile-info-item{background:#f5f9fc;border-radius:10px}html.ds-theme .mobile-info-item .label{color:#6c8597}
html.ds-theme .mobile-note{background:#f5f9fc;border-color:#e0eaf1}
html.ds-theme .pagination .page-link{color:#377897;background:#fff;border-color:#dce8ef;box-shadow:none}
html.ds-theme .pagination .page-item.active .page-link{color:#fff;background:#177e96;border-color:#177e96}
html.ds-theme .pagination .page-item.disabled .page-link{color:#8ba0af;background:#f4f8fb}
/* Login and OTP use the same visual system. */
html.ds-theme :is(body.login-page,body.otp-page){background:radial-gradient(ellipse at 5% 5%,#cfe7f380,transparent 40%),radial-gradient(ellipse at 95% 100%,#c5e6e380,transparent 45%),#f0f7fb}
html.ds-theme :is(.login-wrapper,.otp-wrapper){border:1px solid #ffffffd9;border-radius:26px;box-shadow:0 25px 75px #214c6717}
html.ds-theme :is(.login-visual,.otp-visual){background:radial-gradient(ellipse at 90% 5%,#6ad3c530,transparent 50%),linear-gradient(145deg,#143b54,#256785 60%,#18808b)}
html.ds-theme :is(.visual-title,.otp-visual-title){font-weight:700;line-height:1.5;letter-spacing:-.03em}
html.ds-theme :is(.visual-subtitle,.otp-visual-subtitle){color:#d0e5ed;line-height:1.9}
html.ds-theme :is(.visual-feature,.otp-step){background:#ffffff0c;border-color:#ffffff18;border-radius:14px}
html.ds-theme :is(.visual-logo,.otp-shield){border-radius:20px;box-shadow:0 9px 23px #001e3520}
html.ds-theme :is(.login-title,.otp-title){color:#1e4b65;font-weight:700;line-height:1.5;font-size:29px}
html.ds-theme :is(.login-subtitle,.otp-subtitle){color:#6a8192;line-height:1.8}
html.ds-theme .login-page .input-group{border-color:#d8e6ee;border-radius:12px;background:#f7fbfe;box-shadow:none}
html.ds-theme .login-page .input-group:focus-within{border-color:#75b8c5;box-shadow:0 0 0 3px #1b8fa713}
html.ds-theme .login-page .input-group .form-control{border:0!important;background:transparent;box-shadow:none}
html.ds-theme .login-page .input-group-text{background:transparent;color:#65889d;border:0}
html.ds-theme :is(.login-security-note,.otp-security-note){background:#f2f8fb;border-color:#e0edf2;color:#627f91;border-radius:12px}
html.ds-theme :is(.login-footer-text,.otp-footer){color:#6d889a}
html.ds-theme .otp-time-box{background:#fff8e9;border-color:#eddfba;border-radius:13px}
html.ds-theme .otp-input{border-color:#bdd9e5;border-radius:13px;color:#24637e;background:#f8fcfe}
html.ds-theme .otp-input:focus{border-color:#75b8c5;box-shadow:0 0 0 3px #1b8fa713}
html.ds-theme :is(.app-footer,.footer){border-color:#dce8ef;color:#688394}
@media(max-width:767.98px){
 html.ds-theme :is(.hero-card,.dashboard-hero,.warehouse-hero){border-radius:19px;padding:21px 17px}
 html.ds-theme :is(.hero-card,.dashboard-hero,.warehouse-hero) :is(h1,.hero-title){font-size:23px}
 html.ds-theme :is(.card,.dashboard-card,.dashboard-section,.kpi-card,.wh-card){border-radius:16px}
 html.ds-theme :is(.dashboard-card-header,.dashboard-section-header,.wh-card .card-header){padding:15px 16px}
 html.ds-theme .wh-card .card-body{padding:17px}
 html.ds-theme :is(.form-control,.form-select){font-size:16px}
 html.ds-theme :is(.login-title,.otp-title){font-size:25px}
 html.ds-theme :is(.login-wrapper,.otp-wrapper){border-radius:21px}
 html.ds-theme .kpi-value{font-size:29px}
 html.ds-theme .mobile-drug-card .drug-title{overflow-wrap:anywhere}
 html.ds-theme .table{font-size:12px}
}
@media(prefers-reduced-motion:reduce){html.ds-theme *,html.ds-theme *::before,html.ds-theme *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{html.ds-theme body{background:#fff;color:#000}html.ds-theme :is(.card,.dashboard-card,.dashboard-section,.wh-card){box-shadow:none}html.ds-theme :is(.table,.warehouse-table) thead th{background:#eee!important;color:#000!important}}
