/* NOTA STUDIO • UI/UX Redesign v1
   Presentation only: do not modify report/print geometries.
   Original styles.css remains intact for instant rollback. */
:root {
  --bg:#f3f6fb;
  --panel:#ffffff;
  --ink:#14253f;
  --muted:#738099;
  --line:#e3e9f2;
  --accent:#2767ec;
  --accent2:#1550cf;
  --warn:#fff7e6;
  --danger:#bd343a;
  --shadow:0 10px 30px rgba(34,57,93,.055);
  --ui-navy:#101b31;
  --ui-navy2:#192945;
  --ui-cyan:#42cad7;
  --ui-ring:0 0 0 4px rgba(47,111,235,.13);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body {
  margin:0;
  min-height:100vh;
  overflow-x:hidden;
  font-family:Inter,"Segoe UI Variable","Segoe UI",system-ui,-apple-system,sans-serif;
  background:radial-gradient(ellipse 640px 440px at 95% -12%,rgba(166,200,251,.22),transparent 80%),
             linear-gradient(160deg,#f6f9fe 0%,#f3f6fb 57%,#f7f9fd 100%);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}
body.platform-ninestars{--accent:#087eaf;--accent2:#075d85;--ui-cyan:#5ad3d8}
button,input,select,textarea{font-family:inherit}
button{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:none;box-shadow:var(--ui-ring);border-color:var(--accent)}
.hidden{display:none!important}

/* App header */
.topbar {
  height:92px;
  display:grid;
  grid-template-columns:minmax(230px,1fr) auto minmax(355px,1fr);
  align-items:center;
  gap:24px;
  padding:14px clamp(22px,2.4vw,42px);
  background:rgba(255,255,255,.96);
  border-bottom:1px solid #e6ebf3;
  box-shadow:0 2px 12px rgba(26,45,79,.03);
  position:sticky;
  top:0;
  z-index:60;
  backdrop-filter:blur(16px);
}
.topbar-title{justify-self:start;display:flex;flex-direction:column;gap:3px;white-space:normal;min-width:0}
.topbar-title .eyebrow{font-size:10px;letter-spacing:2.1px;font-weight:850;color:#7d8ba3;line-height:1.35}
.topbar-title strong{font-size:22px;line-height:1.2;font-weight:850;letter-spacing:-.85px;color:#142441}
.brand-center{justify-self:center;display:flex;align-items:center;justify-content:center}
.brand-center img{width:151px;max-height:60px;object-fit:contain;display:block}
.brand-center.ninestars img{width:164px;max-height:54px}
.auction-switch{justify-self:end;display:flex;align-items:center;gap:11px}
.auction-switch label{font-size:10px;font-weight:850;letter-spacing:1.1px;white-space:nowrap;color:#76859c}
.auction-switch select{max-width:235px;min-width:170px}
.mobile-menu-button{display:none}
#installAppBtn{display:none}
#installAppBtn.visible{display:inline-flex}

/* Layout and navigation */
.layout{display:grid;grid-template-columns:263px minmax(0,1fr);min-height:calc(100vh - 92px);align-items:start}
.sidebar {
  align-self:stretch;
  position:sticky;
  top:92px;
  height:calc(100dvh - 92px);
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:rgba(155,179,216,.25) transparent;
  background:linear-gradient(172deg,#14223b 0%,#101b30 57%,#101a2e 100%);
  box-shadow:inset -1px 0 0 rgba(255,255,255,.035);
  padding:26px 15px 24px;
  gap:6px;
  display:flex;
  flex-direction:column;
  min-width:0;
}
.sidebar-intro{display:flex;align-items:center;gap:12px;padding:6px 11px 20px;margin-bottom:9px;border-bottom:1px solid rgba(255,255,255,.08)}
.sidebar-mark{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;font-size:18px;font-weight:900;color:#fff;letter-spacing:-1px;background:linear-gradient(135deg,#326cf2,#2ab8c8);box-shadow:0 7px 17px rgba(39,103,236,.25)}
.sidebar-intro strong{display:block;color:#fff;font-weight:850;letter-spacing:-.3px;font-size:14px}
.sidebar-intro small{display:block;color:#91a5bf;font-size:11px;letter-spacing:.35px;margin-top:2px}
.sidebar-heading{font-size:10px;line-height:1.4;color:#7592b5;letter-spacing:1.55px;font-weight:850;padding:14px 15px 7px;text-transform:uppercase}
.sidebar .nav{
  display:flex;
  gap:13px;
  align-items:center;
  justify-content:flex-start;
  text-align:left;
  min-height:46px;
  padding:12px 14px;
  border:1px solid transparent;
  border-radius:12px;
  color:#a9bdd6;
  font-size:13px;
  font-weight:650;
  letter-spacing:.02px;
  white-space:normal;
  background:transparent;
  transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease;
}
.sidebar .nav svg{width:19px;height:19px;flex:0 0 19px;stroke:currentColor;stroke-width:1.85;fill:none;stroke-linecap:round;stroke-linejoin:round;opacity:.95}
.sidebar .nav:hover{background:rgba(94,138,195,.14);color:#fff;transform:translateX(2px)}
.sidebar .nav.active{
  background:linear-gradient(110deg,#2564e4 0%,#285cc4 100%);
  border-color:rgba(125,178,255,.19);
  box-shadow:0 6px 16px rgba(12,45,117,.27);
  color:#fff;
  font-weight:760;
}
.sidebar .nav.active::after{content:"";width:5px;height:5px;margin-left:auto;flex:0 0 5px;border-radius:50%;background:#a7e8ef;box-shadow:0 0 0 4px rgba(167,232,239,.11)}
.sidebar-foot{margin-top:auto;padding:24px 14px 5px;color:#7890af;font-size:11px;line-height:1.65}
.sidebar-foot span{display:block;color:#d7e5f6;font-weight:750;font-size:12px}
.sidebar-foot small{font-size:10px}
.nav-backdrop{display:none}

/* Page hierarchy and hero */
.content{min-width:0;width:100%;padding:clamp(22px,2.6vw,39px);padding-bottom:54px}
.content-eyebrow{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 19px;font-size:12px}
.page-path{display:flex;gap:9px;align-items:center;color:#96a2b4;font-weight:600}
.page-path strong{color:#60708c;font-weight:780}
.page-path .path-dot{width:6px;height:6px;border-radius:50%;background:#c3cbd6}
.live-indicator{display:inline-flex;align-items:center;gap:8px;color:#3c6f67;font-weight:700;font-size:11px}
.live-indicator i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#29af83;box-shadow:0 0 0 4px rgba(41,175,131,.1)}
.tab{display:none;animation:page-appear .24s ease-out}
.tab.active{display:block}
@keyframes page-appear{from{opacity:.55;transform:translateY(5px)}to{opacity:1;transform:none}}
.dashboard-hero{
  border:1px solid rgba(148,179,244,.26);
  border-radius:22px;
  background:radial-gradient(circle at 84% 20%,rgba(36,185,208,.22),transparent 24%),
             radial-gradient(circle at 91% 80%,rgba(83,122,255,.24),transparent 35%),
             linear-gradient(116deg,#172f5f 0%,#1d4283 60%,#264c94 100%);
  min-height:190px;
  margin-bottom:24px;
  padding:30px clamp(24px,3.2vw,44px);
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  box-shadow:0 18px 35px rgba(23,57,117,.12);
}
.dashboard-hero::after{content:"";position:absolute;right:-95px;top:-140px;width:410px;height:410px;border:1px solid rgba(255,255,255,.16);border-radius:50%;box-shadow:0 0 0 45px rgba(255,255,255,.035),0 0 0 105px rgba(255,255,255,.025);pointer-events:none}
.hero-copy{max-width:640px;position:relative;z-index:1}
.hero-eyebrow{color:#87dfe9;font-size:10px;font-weight:850;letter-spacing:1.8px}
.dashboard-hero h1{font-size:clamp(24px,2.4vw,34px);letter-spacing:-1.2px;line-height:1.2;color:white;font-weight:850;margin:11px 0 10px}
.dashboard-hero p{font-size:13px;line-height:1.75;max-width:530px;color:#d0def4;margin:0}
.hero-badge{margin-top:17px;display:inline-flex;align-items:center;gap:8px;border-radius:999px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.18);padding:6px 11px;font-size:11px;font-weight:700;color:#ebf7ff}
.hero-badge i{background:#58dcb2;width:7px;height:7px;border-radius:50%}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 20px}
.section-head h2{font-size:clamp(22px,2.1vw,27px);font-weight:840;letter-spacing:-.9px;margin:0;line-height:1.2;color:#152942}
.section-head p{margin-top:7px;color:#7b89a0}
.section-head .btn{flex:0 0 auto}

/* Surfaces */
.card,.metric,.summary-card{
  background:#fff;
  border:1px solid #e4eaf3;
  box-shadow:0 8px 26px rgba(32,54,94,.045);
  border-radius:17px;
}
.card{padding:clamp(17px,1.65vw,25px);margin-bottom:19px}
.card h3{margin:0 0 16px;color:#1d324d;font-size:15px;font-weight:820;letter-spacing:-.25px}
.cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:21px}
.metric{min-height:136px;padding:22px 19px;position:relative;overflow:hidden;transition:transform .2s,box-shadow .2s}
.metric:hover{transform:translateY(-3px);box-shadow:0 14px 32px rgba(35,64,111,.09)}
.metric::before{content:"";position:absolute;width:110px;height:110px;border-radius:50%;top:-64px;right:-47px;background:#e5edff}
.metric:nth-child(2)::before{background:#e7f7f6}
.metric:nth-child(3)::before{background:#eaf2ff}
.metric:nth-child(4)::before{background:#fff1e6}
.metric::after{content:"";position:absolute;left:19px;top:0;width:43px;height:3px;border-radius:0 0 6px 6px;background:var(--accent)}
.metric:nth-child(2)::after{background:#16b4a6}
.metric:nth-child(3)::after{background:#6898ea}
.metric:nth-child(4)::after{background:#e4aa67}
.metric small{font-size:10px;letter-spacing:1.05px;font-weight:850;color:#76869d;line-height:1.7}
.metric strong{font-size:clamp(19px,2.1vw,29px);letter-spacing:-.95px;color:#182b48;font-weight:870;margin-top:17px;line-height:1.2;overflow-wrap:anywhere}
.flow{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:stretch;gap:12px}
.flow span{display:flex;align-items:center;min-height:76px;border:1px solid #e2eafa;background:linear-gradient(180deg,#f5f8ff,#eef4ff);border-radius:13px;padding:14px 15px;color:#3b5681;font-size:12px;line-height:1.55;font-weight:760}
.flow b{display:none}

/* Controls */
.btn,.settings-menu-btn{
  min-height:41px;
  padding:10px 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:11px;
  border:1px solid transparent;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  letter-spacing:.05px;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
  cursor:pointer;
}
.btn:hover:not(:disabled),.settings-menu-btn:hover:not(:disabled){transform:translateY(-1px)}
.btn:active:not(:disabled){transform:translateY(0)}
.btn.primary{background:linear-gradient(135deg,#276bed,#1d56d5);color:#fff;box-shadow:0 6px 16px rgba(31,90,218,.18)}
.btn.primary:hover{background:linear-gradient(135deg,#3577fa,#1e5ee8);box-shadow:0 8px 20px rgba(31,90,218,.23)}
.btn.ghost{background:#fff;border-color:#d9e3f0;color:#355076;box-shadow:0 3px 10px rgba(22,49,85,.025)}
.btn.ghost:hover{background:#f6f9ff;border-color:#b9cde8}
.btn.danger{background:#fff8f8;color:#be4a4f;border-color:#f5d4d4}
.btn.small{min-height:32px;padding:6px 9px;font-size:11px;border-radius:8px}
.btn:disabled{opacity:.46;cursor:not-allowed}
input:not([type=checkbox]):not([type=radio]),select,textarea{
  background:#fff;
  color:#273b58;
  border:1px solid #dbe4f0;
  border-radius:10px;
  padding:10px 13px;
  min-height:41px;
  outline:0;
  font-size:13px;
  transition:border-color .16s,box-shadow .16s;
}
input:not([type=checkbox]):not([type=radio]):hover,select:hover,textarea:hover{border-color:#b9cae4}
input:focus,select:focus,textarea:focus{border-color:#81aaf2;box-shadow:var(--ui-ring)}
select{max-width:100%;padding-right:32px}
textarea{min-height:200px;line-height:1.7;resize:vertical;width:100%}
label{color:#586d8c}
.status{background:#edf5ff;color:#1c5584;border:1px solid #c9dff8;border-radius:11px;padding:13px 16px;margin-bottom:16px;font-weight:670}
.status.error{background:#fff1f2;color:#a43740;border-color:#f7cdd1}
.warning{background:#fff9eb;color:#855b20;border:1px solid #f5dfac;border-radius:12px;padding:14px 17px;margin-bottom:16px}
.muted{color:#7b89a0;font-size:12px}
.upload-card{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.upload-card input{min-width:min(370px,100%)}
.upload-card input[type=file]{background:#f7faff;border:1px dashed #b8cae6;padding:14px;min-height:52px}

/* Tables and compact records */
.table-wrap{border:1px solid #e1e8f3;border-radius:15px;background:#fff;overflow:auto;max-height:67vh;box-shadow:0 5px 19px rgba(23,51,98,.025)}
.table-wrap.small{max-height:520px}
table{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
th,td{padding:12px 13px;border-bottom:1px solid #eef1f6;text-align:left}
th{top:0;z-index:2;background:#f0f5fc;color:#59708f;font-size:10px;letter-spacing:.55px;text-transform:uppercase;font-weight:850}
tr:hover td{background:#f6f9ff}
tr:last-child td{border-bottom:0}
.num{text-align:right}
.fee-input,.bon-input{min-width:100px;width:110px;padding:8px 9px!important;text-align:right}
.bad{color:#cc4049;font-weight:800}
.good{color:#15976a;font-weight:800}
.summary-grid{grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:16px;grid-auto-rows:1fr}
.summary-card{overflow:hidden;display:flex;flex-direction:column;height:100%}
.summary-card h3{background:#f2f6fd;color:#204772;padding:16px 18px;font-size:13px;font-weight:850;margin:0;border-bottom:1px solid #e3eaf5}
.summary-row{padding:11px 16px;gap:14px;border-bottom-color:#eff2f7;font-size:12px}
.summary-total{padding:13px 16px;background:#eaf2ff;color:#214f92}
.master-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.inline-form{grid-template-columns:90px minmax(0,1fr) minmax(0,1fr) auto auto;gap:9px}
.mapping-actions{display:flex;flex-wrap:wrap;gap:6px}
.platform-badge{border-radius:999px;padding:5px 10px;color:#1b60a4;border-color:#cfe2ff;background:#eaf4ff;font-size:10px}
.settings-menu{gap:9px;margin:0 0 18px}
.settings-menu-btn{background:#fff;border-color:#e0e8f3;color:#6b7e9a;padding:12px 18px}
.settings-menu-btn.active{background:#eaf1ff;border-color:#c8d9fa;color:#235aca;box-shadow:none}
.settings-card{display:flex;align-items:end;gap:13px;flex-wrap:wrap}
.settings-card label{font-size:12px;font-weight:760}
.storage{color:#7d8da1;font-weight:600;margin-left:auto}
.settings-pagination{color:#6f809c}
.nota-toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap}
.nota-toolbar label{font-size:12px;color:#5b7090;font-weight:780;gap:7px}
.nota-toolbar select{min-width:190px}
.nota-preview-wrap{max-width:100%;min-height:350px;border-radius:19px;border:1px dashed #d8e2f1;background:linear-gradient(45deg,#eff4fa 25%,transparent 25%,transparent 75%,#eff4fa 75%),linear-gradient(45deg,#eff4fa 25%,transparent 25%,transparent 75%,#eff4fa 75%);background-position:0 0,14px 14px;background-size:28px 28px;background-color:#f9fbfd;padding:26px 18px 34px;margin-top:14px;overflow-x:auto;justify-content:center;align-items:flex-start}
.note-page,.template2-preview-shell{flex-shrink:0}
.template2-preview-shell{box-shadow:0 18px 42px rgba(39,52,72,.2);border-radius:4px}
dialog{border:1px solid #e0e8f2;border-radius:19px;padding:26px;box-shadow:0 24px 75px rgba(9,23,48,.27);max-width:calc(100vw - 22px);background:#fff}
dialog::backdrop{background:rgba(11,23,46,.57);backdrop-filter:blur(4px)}
.dialog-form{min-width:min(390px,calc(100vw - 72px));gap:14px}
.dialog-form h3{font-size:23px;color:#1b3252;letter-spacing:-.6px;margin-bottom:4px}
.dialog-form label{font-size:12px;color:#586d8d;font-weight:770;gap:7px}
.dialog-actions{border-top:1px solid #edf1f7;padding-top:17px}
.workspace-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;color:#9ca8bc;font-size:11px;margin:32px 0 0;padding:15px 2px;border-top:1px solid #e3e9f2}
.offline-toast{position:fixed;bottom:22px;right:22px;z-index:120;background:#213653;color:#fff;border:1px solid rgba(255,255,255,.1);border-radius:12px;box-shadow:0 15px 35px rgba(6,23,53,.25);padding:13px 18px;font-size:12px;font-weight:700;max-width:calc(100vw - 44px)}
@media(max-width:1280px){
  .topbar{grid-template-columns:minmax(190px,1fr) auto minmax(315px,1fr);gap:12px;padding-inline:24px}
  .layout{grid-template-columns:238px minmax(0,1fr)}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .flow{grid-template-columns:repeat(3,minmax(0,1fr))}
  .master-grid{grid-template-columns:1fr}
}
@media(max-width:930px){
  .topbar{grid-template-columns:minmax(160px,1fr) auto minmax(200px,1fr);gap:8px;padding-inline:16px}
  .topbar-title strong{font-size:18px}
  .topbar-title .eyebrow{font-size:9px;letter-spacing:1.25px}
  .brand-center img{width:115px}
  .auction-switch{gap:6px}
  .auction-switch label{display:none}
  .auction-switch select{min-width:128px;max-width:184px}
  .layout{grid-template-columns:210px minmax(0,1fr)}
  .sidebar{padding-inline:10px}
  .content{padding:23px}
  .inline-form{grid-template-columns:1fr 1fr}
}
@media(max-width:760px){
  .topbar{
    height:auto;min-height:80px;max-width:100vw;
    display:grid;grid-template-columns:40px minmax(0,1fr) auto;
    align-items:center;gap:8px 12px;
    padding:13px 15px 14px;
    position:sticky;top:0;z-index:60;
  }
  .mobile-menu-button{display:grid;place-items:center;width:40px;height:40px;border:1px solid #dce5f2;border-radius:11px;background:#f8faff;color:#29476b;cursor:pointer}
  .mobile-menu-button svg{width:21px;height:21px}
  .topbar-title{justify-self:start}
  .topbar-title strong{font-size:18px}
  .topbar-title .eyebrow{font-size:9px;letter-spacing:1.2px}
  .brand-center{justify-self:end}
  .brand-center img{width:92px;max-height:40px}
  .brand-center.ninestars img{width:106px;max-height:38px}
  .auction-switch{grid-column:1/-1;width:100%;justify-self:stretch;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;margin-top:4px}
  .auction-switch label{display:block;font-size:10px;letter-spacing:.5px}
  .auction-switch select{min-width:0;max-width:none;width:100%}
  .auction-switch .btn{padding:8px 12px;min-height:40px}
  .layout{display:block;min-height:calc(100dvh - 132px)}
  .sidebar{
    position:fixed;z-index:81;top:0;bottom:0;left:0;
    width:min(298px,84vw);height:100dvh;
    display:flex;flex-direction:column;gap:6px;align-items:stretch;
    padding:24px 14px 25px;overflow-y:auto;
    transform:translateX(-110%);transition:transform .25s ease;box-shadow:14px 0 40px rgba(7,20,42,.18);
  }
  .sidebar .nav{width:100%;white-space:normal;min-height:44px}
  body.nav-open .sidebar{transform:translateX(0)}
  body.nav-open{overflow:hidden}
  .nav-backdrop{display:block;position:fixed;inset:0;z-index:80;opacity:0;visibility:hidden;background:rgba(10,22,42,.57);transition:opacity .24s,visibility .24s}
  body.nav-open .nav-backdrop{opacity:1;visibility:visible}
  .content{padding:23px 16px 38px}
  .content-eyebrow{margin-bottom:15px}
  .live-indicator{font-size:10px}
  .section-head{align-items:flex-start;gap:12px;flex-wrap:wrap}
  .section-head h2{font-size:23px}
  .dashboard-hero{min-height:185px;padding:27px 23px;border-radius:18px}
  .dashboard-hero h1{font-size:24px}
  .dashboard-hero p{font-size:12px}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .metric{min-height:122px;padding:19px 15px}
  .metric strong{font-size:21px}
  .metric small{font-size:9px}
  .flow{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .flow span{min-height:68px;font-size:11px}
  .card{border-radius:15px;padding:17px}
  .master-grid{grid-template-columns:1fr}
  .summary-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
  .upload-card input[type=file]{width:100%;min-width:0}
  .nota-preview-wrap{justify-content:flex-start;padding:18px 12px;overflow-x:auto}
  .nota-toolbar label{flex:1 1 190px}
  .nota-toolbar select{min-width:0;width:100%}
  .settings-menu{justify-content:flex-start}
  .settings-card .storage{margin-left:0;width:100%}
}
@media(max-width:410px){
  .topbar-title strong{font-size:16px}
  .brand-center img{width:79px}
  .cards{grid-template-columns:1fr}
  .metric{min-height:102px}
  .metric strong{font-size:24px;margin-top:9px}
  .section-head .btn{width:100%}
  .flow{grid-template-columns:1fr}
  .flow span{min-height:44px}
  .inline-form{grid-template-columns:1fr}
  .nota-toolbar .btn{flex:1 1 calc(50% - 6px)}
  .dashboard-hero h1{font-size:22px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:0s!important;transition-duration:0s!important;scroll-behavior:auto!important}
}
@media print{
  .mobile-menu-button,.nav-backdrop,.workspace-footer,.content-eyebrow,.offline-toast{display:none!important}
  .nota-preview-wrap{background:none;border:0;padding:0}
}

/* Nota Studio V2: store switcher + separate auction listing */
/* Remove duplicate desktop masthead entirely; mobile keeps only menu. */
@media (min-width:761px){
  body .topbar{display:none!important}
  body .layout{min-height:100dvh}
  body .sidebar{top:0;height:100dvh}
}
.sidebar-intro.sidebar-store-brand{
  display:flex;flex-direction:column;align-items:flex-start;gap:10px;
  border-bottom:1px solid rgba(255,255,255,.1);
  padding:13px 10px 23px;margin-bottom:8px;min-width:0;
}
.sidebar-store-brand .brand-center,
.sidebar-store-brand .brand-center.ninestars{
  width:100%;min-height:69px;display:flex;
  align-items:center;justify-content:center;
  background:#fff;border:1px solid rgba(225,234,247,.7);
  border-radius:15px;padding:12px 8px;box-shadow:0 9px 17px rgba(2,11,23,.14)
}
.sidebar-store-brand .brand-center img{
  display:block!important;width:172px;max-width:100%;height:auto;
  max-height:56px;object-fit:contain;
}
.sidebar-store-brand .brand-center.ninestars img{width:188px;max-height:52px}
.sidebar-store-brand small{
  font-size:10px;font-weight:850;letter-spacing:1.8px;
  text-transform:uppercase;color:#8fa6c8;padding-left:5px
}
/* Move controls under breadcrumb into the workspace content. */
.workspace-actions{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  flex-wrap:wrap;background:#fff;
  padding:16px 21px;border:1px solid #e1e8f2;border-radius:17px;
  box-shadow:0 7px 24px rgba(22,51,94,.045);margin-bottom:22px;
}
.workspace-actions-main{display:flex;align-items:center;gap:18px;flex-wrap:wrap;min-width:0}
.store-select{display:flex;align-items:center;gap:12px;font-size:10px;letter-spacing:1.1px;font-weight:850;color:#7082a0;white-space:nowrap}
.store-select #platformSelect{min-width:184px;max-width:235px;background:#f6f9ff;border-color:#cfdbef;color:#183b73;font-size:13px;font-weight:780;letter-spacing:0}
.auction-current{display:flex;flex-direction:column;gap:3px;padding-left:18px;border-left:1px solid #e5ebf5}
.auction-current span{font-size:9px;letter-spacing:1.1px;font-weight:850;color:#8a9ab0}
.auction-current strong{color:#264576;font-size:13px;letter-spacing:-.1px}
.workspace-actions-buttons{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.workspace-actions-buttons .btn{min-height:40px}
.workspace-actions #installAppBtn:not(.visible){display:none}
.mobile-workspace-label{display:none}
.hero-badge{min-width:115px;justify-content:center}
.auction-list-card{padding:21px}
.auction-list-top{display:flex;justify-content:space-between;align-items:end;gap:15px;margin-bottom:21px;flex-wrap:wrap}
.auction-list-search{display:flex;flex-direction:column;gap:7px;font-weight:800;font-size:12px;color:#4f6687}
.auction-list-search input{width:min(360px,calc(100vw - 90px));min-height:45px}
.auction-list-count{font-size:12px;color:#7387a1;font-weight:650}
.auction-list-table-wrap{max-height:none}
.auction-list-table th,.auction-list-table td{padding:15px 16px}
.auction-list-table td:first-child strong{font-size:13px;color:#244673}
.auction-list-table .btn.small{min-width:116px}
.auction-list-active td{background:#f4f8ff}
.auction-active-tag,.auction-inactive-tag{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;font-size:10px;font-weight:850}
.auction-active-tag{color:#12694a;background:#e4f7ef;border:1px solid #b5e4cb}
.auction-inactive-tag{color:#62738c;background:#f0f3f8;border:1px solid #e0e6ef}
.auction-list-empty{text-align:center!important;font-size:13px;color:#7889a0;padding:28px 16px!important}
.auction-list-pages{padding-top:21px}
.sidebar-heading{margin-top:0}
@media(max-width:1000px) and (min-width:761px){
  .workspace-actions{padding:15px;gap:12px}
  .store-select #platformSelect{min-width:145px}
  .workspace-actions-main{gap:12px}
}
@media(max-width:760px){
  .topbar{
    display:flex!important;flex-direction:row!important;align-items:center;
    gap:12px;height:64px!important;min-height:64px;
    padding:11px 16px!important
  }
  .mobile-workspace-label{
    display:block;color:#183352;font-size:13px;font-weight:850;
    letter-spacing:1.45px
  }
  .content{padding-top:17px}
  .workspace-actions{padding:15px;gap:14px;margin-bottom:17px;border-radius:14px}
  .workspace-actions-main{width:100%;justify-content:space-between;gap:12px}
  .store-select{flex:1 1 180px;justify-content:space-between;gap:9px}
  .store-select #platformSelect{min-width:135px;max-width:100%;width:auto}
  .auction-current{flex:1 1 115px;padding-left:11px}
  .workspace-actions-buttons{width:100%;justify-content:flex-end}
  .auction-list-card{padding:14px}
  .auction-list-top{align-items:stretch}
  .auction-list-search{width:100%}
  .auction-list-search input{width:100%}
  .auction-list-table-wrap{max-width:100%;overflow-x:auto}
  .auction-list-table{min-width:650px}
  .sidebar-intro.sidebar-store-brand{padding:10px 8px 21px}
}
@media(max-width:430px){
  .store-select{flex:1 1 100%;justify-content:space-between}
  .store-select #platformSelect{width:calc(100% - 102px)}
  .auction-current{border-left:0;border-top:1px solid #edf1f7;padding:12px 0 0;flex:1 1 100%}
  .workspace-actions-buttons{justify-content:flex-start}
  .workspace-actions-buttons .btn{flex:1 1 auto}
  .auction-list-pages{justify-content:center}
}

/* ============================================================
   V3 Mobile UX • centered store logo, bottom navigation,
   sticky NAMA in horizontal Rekap Totalan.
   All accounting, PDF and print templates are untouched.
   ============================================================ */

/* Keep the mobile bottom bar off desktop entirely. */
.mobile-bottom-nav,.mobile-store-logo,.mobile-header-balance{display:none}

/* Freeze name as the table scrolls horizontally, not the entire page.
   Isolate horizontal scrolling to the recap table. */
#tab-recap{min-width:0;max-width:100%}
#tab-recap > .table-wrap{
  position:relative;max-width:100%;width:100%;
  overflow-x:auto;overflow-y:auto;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}
#recapTable{
  width:max-content;min-width:100%;
  border-collapse:separate;border-spacing:0;
  table-layout:auto;
}
#recapTable th,#recapTable td{box-sizing:border-box}
#recapTable thead th{
  position:sticky;top:0;z-index:5;
  background:#f0f5fc;
}
#recapTable th:first-child,
#recapTable td:first-child{
  position:sticky;left:0;
  min-width:160px;width:177px;max-width:177px;
  box-shadow:2px 0 0 #d9e4f2,6px 0 12px -7px rgba(23,50,83,.34);
  text-align:left!important;
}
#recapTable thead th:first-child{
  z-index:9;background:#e8f0fc;
  color:#25456f;
}
#recapTable tbody td:first-child{
  z-index:4;background:#fff;
  white-space:normal;
  overflow-wrap:anywhere;
  font-weight:770;
  line-height:1.35;
}
#recapTable tbody tr:nth-child(even) td:first-child{background:#fbfcff}
#recapTable tbody tr:hover td:first-child{background:#f2f7ff}
#recapTable .bon-input{min-width:104px;width:118px;max-width:none}

/* Avoid page-wide horizontal overflow: each table owns its scroll. */
@media screen and (max-width:760px){
  html,body{width:100%;max-width:100%;overflow-x:clip}
  .layout,.content,.tab,.section-head,.card,.table-wrap,
  .master-grid,.settings-panel,.summary-grid,.workspace-actions{
    min-width:0;max-width:100%;
  }
  .content{width:100%;overflow-x:clip;
    padding-bottom:calc(108px + env(safe-area-inset-bottom,0px))}
  .table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .master-grid > *{min-width:0}
  .settings-card{flex-wrap:wrap;max-width:100%}
  .workspace-actions-main,.workspace-actions-buttons{max-width:100%}
  .workspace-actions select,.workspace-actions input{max-width:100%}
  #tab-recap>.table-wrap{max-height:68dvh}
  #recapTable th:first-child,#recapTable td:first-child{
    min-width:128px;width:145px;max-width:145px;
    padding-left:10px;padding-right:8px;
  }
  #recapTable tbody td:first-child b{white-space:normal;overflow-wrap:anywhere}
  #recapTable th,#recapTable td{padding-top:13px;padding-bottom:13px}
  #tab-recap .section-head .btn{max-width:100%}
  #tab-master .inline-form>*{min-width:0;max-width:100%}
  #tab-nota .nota-toolbar>*{min-width:0}
  #tab-nota .nota-toolbar select{width:100%}
  #tab-nota .nota-preview-wrap{max-width:100%;overflow-x:auto}
  #tab-settings .settings-menu{flex-wrap:wrap}

  /* Actual center is relative to the viewport, not the menu button.
     Sidebar logo on desktop stays exactly where it was. */
  .topbar{
    position:sticky!important;top:0;
    height:66px!important;min-height:66px!important;
    width:100%;max-width:100%;
    display:flex!important;align-items:center!important;
    justify-content:space-between!important;
    padding:10px 16px!important;
    z-index:60;
  }
  .topbar .mobile-menu-button{flex:0 0 42px;position:relative;z-index:2}
  .mobile-header-balance{display:block;width:42px;flex:0 0 42px;height:1px}
  .mobile-workspace-label{display:none!important}
  .mobile-store-logo{
    display:flex;align-items:center;justify-content:center;
    position:absolute;left:50%;top:50%;
    transform:translate(-50%,-50%);
    width:min(178px,calc(100% - 122px));
    height:52px;
    overflow:hidden;pointer-events:none;
  }
  .mobile-store-logo img{
    display:block;width:100%;height:44px;
    object-fit:contain;object-position:center;
  }
  .mobile-store-logo .mobile-logo-ninestars{display:none}
  body.platform-ninestars .mobile-store-logo .mobile-logo-bstore{display:none}
  body.platform-ninestars .mobile-store-logo .mobile-logo-ninestars{display:block}

  /* Always visible, finger-friendly bottom navigation. */
  .mobile-bottom-nav{
    position:fixed;bottom:0;left:0;right:0;
    z-index:70;
    display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
    gap:2px;
    width:100%;
    padding:7px 9px calc(8px + env(safe-area-inset-bottom,0px));
    background:rgba(255,255,255,.98);
    border-top:1px solid #dce6f4;
    box-shadow:0 -8px 28px rgba(18,42,82,.11);
    backdrop-filter:blur(14px);
  }
  .bottom-nav-item{
    background:transparent;border:0;
    min-width:0;min-height:53px;
    border-radius:12px;
    display:flex;flex-direction:column;
    align-items:center;justify-content:center;
    gap:4px;
    padding:5px 2px 4px;
    color:#7890ae;
    font-size:10px;font-weight:760;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  .bottom-nav-item svg{
    width:21px;height:21px;flex:0 0 21px;
    stroke:currentColor;stroke-width:1.9;
    fill:none;stroke-linecap:round;stroke-linejoin:round;
  }
  .bottom-nav-item span{display:block;font-size:10px;line-height:1.15;white-space:nowrap}
  .bottom-nav-item.is-active{
    color:#195bc7;background:#eef4ff;font-weight:850;
  }
  .bottom-nav-item.is-active svg{stroke-width:2.25}
  .bottom-nav-item:focus-visible{
    outline:2px solid #276bed;outline-offset:-1px
  }

  /* PWA toast & dialogs clear the bottom navigation. */
  .offline-toast{bottom:calc(87px + env(safe-area-inset-bottom,0px))}
  dialog{max-height:calc(100dvh - 94px);overflow-y:auto}
  dialog::backdrop{background:rgba(8,23,43,.5)}
  .nav-backdrop{z-index:80}
  .sidebar{z-index:81}
  .note-page,.template2-preview-shell{flex-shrink:0}
}
@media screen and (max-width:375px){
  .mobile-store-logo{width:min(149px,calc(100% - 113px));height:46px}
  .mobile-store-logo img{height:38px}
  .topbar{padding-left:12px!important;padding-right:12px!important}
  .mobile-bottom-nav{padding-left:5px;padding-right:5px;gap:1px}
  .bottom-nav-item span{font-size:9px}
  #recapTable th:first-child,#recapTable td:first-child{
    min-width:112px;width:127px;max-width:127px
  }
}
@media print{
  .mobile-bottom-nav,.mobile-store-logo,.mobile-header-balance{display:none!important}
  #recapTable th:first-child,#recapTable td:first-child{
    position:static!important;box-shadow:none!important
  }
}

/* ===============================================================
   Nota Studio V4 - Only mobile actions and sticky recap refinement.
   Desktop name scrolls with the rest; mobile name stays pinned.
   No API, math, data, PDF or business logic modifications.
   =============================================================== */

/* Tablet & desktop: no horizontal freeze for NAMA. Keep header
   sticking at top vertically, like the other table headings. */
@media screen and (min-width:761px){
  #tab-recap #recapTable thead th:first-child{
    left:auto!important;
    box-shadow:none!important;
    z-index:5;
  }
  #tab-recap #recapTable tbody td:first-child{
    position:static!important;
    left:auto!important;
    box-shadow:none!important;
  }
}

/* Phones: exactly one row of actions in Master Karyawan. */
@media screen and (max-width:760px){
  #tab-master #mappingTable th:last-child,
  #tab-master #mappingTable td.mapping-actions{
    min-width:115px;
    width:115px;
    white-space:nowrap;
  }
  /* Preserve the table's column grid; buttons stay inline. */
  #tab-master #mappingTable td.mapping-actions{
    display:table-cell!important;
    vertical-align:middle;
    padding:7px 6px!important;
    text-align:center!important;
  }
  #tab-master #mappingTable td.mapping-actions .btn{
    display:inline-flex!important;
    flex:0 0 auto;
    min-width:0!important;
    min-height:32px;
    width:auto!important;
    padding:5px 7px!important;
    margin:0!important;
    font-size:11px!important;
    border-radius:8px;
    line-height:1.15;
    vertical-align:middle;
    white-space:nowrap;
  }
  #tab-master #mappingTable td.mapping-actions .edit-map{
    margin-right:4px!important;
  }
  #tab-master #mappingTable{
    width:max-content;
    min-width:100%;
  }
  /* NAMA remains horizontally frozen only on phone widths. */
  #tab-recap #recapTable th:first-child,
  #tab-recap #recapTable td:first-child{
    position:sticky;
    left:0;
  }
}
