/* ERP page frame in the uvtr-ops look: the header, the pill bar of the ten sections, and the white page panel (tokens in ops.css). */

/* header: logo and demo label on the left, controls on the right, the pill bar on its own centered row */
.fin-top{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;padding:14px 24px 6px}
.fin-top .brand{flex:none}
.fin-top .brand-name{font-size:18px}
.tn-right{position:relative;margin-left:auto;display:flex;align-items:center;gap:8px;flex:none}
.pillrow{order:3;flex:1 1 100%;display:flex;justify-content:center;min-width:0;padding:4px 0 6px}
.pillrow .pillnav{max-width:100%}
.demo-chip{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 14px;border-radius:999px;background:var(--cobalt-25);border:1px solid var(--cobalt-50);color:var(--cobalt-dk);font-size:12px;font-weight:500;white-space:nowrap;flex:none}
html[data-theme="dark"] .demo-chip{background:#131A2E;border-color:#22305A;color:var(--cobalt-dk-fg)}
.ent-sel{gap:10px;padding:0 10px 0 12px;color:var(--ink);flex:none;box-shadow:var(--sh1);border-radius:999px;height:36px}
.ent-sel select{border:0;background:transparent;font:inherit;font-weight:500;font-size:13px;color:var(--ink);appearance:none;-webkit-appearance:none;padding-right:6px;max-width:190px;cursor:pointer}
.ent-sel select:focus{outline:none}
.ent-sel:focus-within{border-color:var(--cobalt);box-shadow:0 0 0 4px rgba(1,86,247,.12)}
html[data-theme="dark"] .ent-sel select option{background:#161A26;color:#fff}
.cnt-badge{position:absolute;top:-5px;right:-5px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:var(--red-badge);color:#fff;font-size:11px;font-weight:600;line-height:20px;text-align:center;box-shadow:0 0 0 2px #fff}
html[data-theme="dark"] .cnt-badge{box-shadow:0 0 0 2px #161A26}
.ask-ai{border-color:var(--cobalt-50);background:var(--cobalt-25);color:var(--cobalt-dk)}
html[data-theme="dark"] .ask-ai{background:#131A2E;border-color:#22305A;color:var(--cobalt-dk-fg)}
.lang-seg button{min-width:34px;padding:0 10px}
.search-pop{width:min(520px,92vw)}
.search-pop kbd{white-space:nowrap;flex:none}

/* the page panel: groups of the section as chips, then its pages as underline tabs */
.secnav{display:flex;flex-direction:column;gap:14px;margin-bottom:-6px}
.grp-nav{display:flex;flex-wrap:wrap;gap:8px}
.grp{display:inline-flex;align-items:center;height:36px;padding:0 16px;border-radius:999px;background:var(--field);border:1px solid var(--border);color:var(--ink);font-size:13px;font-weight:500;text-decoration:none;white-space:nowrap}
.grp:hover{background:#EDF1F7}
html[data-theme="dark"] .grp{background:#1B2030}
html[data-theme="dark"] .grp:hover{background:#232A3E}
.grp.on,.grp.on:hover{background:var(--ink);border-color:var(--ink);color:#fff}
html[data-theme="dark"] .grp.on,html[data-theme="dark"] .grp.on:hover{background:#343B52;border-color:#343B52}

/* narrower screens: the demo label shrinks, the pill bar scrolls sideways and phones keep the handoff's own layout */
@media (max-width:1100px){.demo-chip .dc-t{display:none}.demo-chip{padding:0 10px}}
@media (max-width:760px){
  .fin-top{padding:12px 14px 6px}
  .fin-top .brand-name,.ent-sel select{display:none}
  .ent-sel{padding:0 12px}
  .ask-ai,.demo-chip{display:none}
}
@media (max-width:600px){
  .pillrow .pillnav{overflow-x:auto;justify-content:flex-start}
}


.sample-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media (max-width:520px){.sample-grid{grid-template-columns:minmax(0,1fr)}}
.sample-role{display:flex;flex-direction:column;gap:2px;text-align:left;padding:12px 14px;border-radius:14px;border:1px solid var(--border2);background:var(--white);color:var(--body)}
html[data-theme="dark"] .sample-role{background:#161A26}
.sample-role b{color:var(--ink);font-size:13px}
.sample-role span{font-size:11.5px;color:var(--muted)}
.sample-role:hover{border-color:var(--cobalt)}


@media print{.topnav,.side,.side-backdrop,.toasts,.secnav,.page-head .r,.ptabs .tools,.no-print{display:none!important}.app.has-side{display:block!important}.panel{border:0;box-shadow:none;margin:0;padding:0}}
/* printing one document from a panel (journal voucher, report): only that panel is printed */
@media print{
  body.print-overlay{overflow:visible!important}
  body.print-overlay>#root,body.print-overlay .backdrop,body.print-overlay .mhead .icon-btn,body.print-overlay .mfoot{display:none!important}
  body.print-overlay .modal{position:static!important;transform:none!important;width:auto!important;max-width:none!important;max-height:none!important;box-shadow:none!important;border:0!important;animation:none!important}
  body.print-overlay .mform{overflow:visible!important;max-height:none!important}
}

/* the UVTR InfoTech Ltd. logo in the header and on the sign-in page */
.brand-logo{display:inline-flex;align-items:center}
.bl-word{height:30px;width:auto;display:block}
.bl-dark{display:none}
html[data-theme="dark"] .bl-light{display:none}
html[data-theme="dark"] .bl-dark{display:block}
.bl-mark{display:none;height:34px;width:auto}
.auth-brand .bl-word{height:34px}
@media (max-width:600px){.fin-top .bl-word{display:none!important}.fin-top .bl-mark{display:block}}

/* the sidebar (PRD 3.2): one collapsible group for each module, with its groups and pages */
.app.has-side{display:grid;grid-template-columns:272px minmax(0,1fr);align-items:start}
.main-col{min-width:0;display:flex;flex-direction:column;min-height:100vh}
.side{position:sticky;top:0;height:100vh;overflow-y:auto;display:flex;flex-direction:column;gap:14px;padding:18px 14px 24px;background:var(--white);border-right:1px solid var(--border);scrollbar-width:thin}
html[data-theme="dark"] .side{background:#161A26}
.side-top{display:flex;align-items:center;justify-content:space-between;padding:2px 6px 4px}
.side-x{display:none}
.side-search{display:flex;align-items:center;gap:8px;height:34px;padding:0 12px;border:1px solid var(--border);border-radius:12px;background:var(--field);color:var(--muted)}
html[data-theme="dark"] .side-search{background:#1B2030}
.side-search input{flex:1;min-width:0;border:0;background:transparent;font:inherit;font-size:13px;color:var(--ink);outline:none}
.side-nav{display:flex;flex-direction:column;gap:2px}
.sd-head{display:flex;align-items:center;gap:12px;width:100%;min-height:34px;padding:6px 12px;line-height:1.3;border:0;border-radius:12px;background:transparent;color:var(--ink);font:inherit;font-size:13px;font-weight:500;text-align:left;text-decoration:none;cursor:pointer}
.sd-head>span{flex:1;min-width:0}
.sd-head:hover{background:var(--field)}
html[data-theme="dark"] .sd-head:hover{background:#1B2030}
.sd-head.on{color:var(--cobalt)}
html[data-theme="dark"] .sd-head.on{color:var(--cobalt-fg)}
.sd-link.on{background:var(--cobalt-50);color:var(--cobalt-dk)}
html[data-theme="dark"] .sd-link.on{background:#131A2E;color:var(--cobalt-dk-fg)}
button.sd-head>svg:last-child{transition:transform .15s}
.sd-sec.open>button.sd-head>svg:last-child{transform:rotate(180deg)}
.sd-body{display:none;flex-direction:column;gap:1px;padding:2px 0 8px 12px;margin-left:21px;border-left:1px solid var(--border)}
.sd-sec.open>.sd-body{display:flex}
.sd-grp{padding:10px 12px 4px;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.sd-item{display:block;padding:8px 12px;border-radius:10px;font-size:12.5px;font-weight:500;color:var(--body);text-decoration:none}
.sd-item:hover{background:var(--field);color:var(--ink)}
html[data-theme="dark"] .sd-item:hover{background:#1B2030}
.sd-item.on{background:var(--cobalt-50);color:var(--cobalt-dk);font-weight:600}
html[data-theme="dark"] .sd-item.on{background:#131A2E;color:var(--cobalt-dk-fg)}
.side-backdrop,.side-toggle,.top-brand{display:none}
@media (max-width:1100px){
  .app.has-side{display:flex;flex-direction:column;align-items:stretch}
  .side{position:fixed;left:0;top:0;bottom:0;width:min(300px,86vw);height:auto;z-index:50;transform:translateX(-102%);transition:transform .2s;box-shadow:var(--sh2)}
  .side.show{transform:none}
  .side-x{display:inline-flex}
  .side-backdrop.show{display:block;position:fixed;inset:0;background:rgba(13,15,24,.32);z-index:45}
  .side-toggle,.top-brand{display:inline-flex}
}

/* with the sidebar beside it the header stays on one line; the demo label gives way first */
@media (min-width:1101px){.fin-top{flex-wrap:nowrap}.demo-chip{flex:0 1 auto;min-width:0}.demo-chip .dc-t{overflow:hidden;text-overflow:ellipsis}}

/* the sidebar headings: the product overview's categories */
.sd-cat{padding:16px 12px 6px;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.sd-catbox:first-child .sd-cat{padding-top:4px}

/* the Inbox: list, conversation and customer panel side by side, stacked on tablets */
.ib-grid{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:14px;align-items:start}
.ib-conv{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,300px);gap:14px;align-items:start}
@media (max-width:1100px){.ib-grid,.ib-conv{grid-template-columns:minmax(0,1fr)}}
/* the agent status sits in the header on wide screens and in the Inbox toolbar on tablets */
.hdr-tool-alt{display:none}
@media (max-width:1100px){.hdr-tool{display:none}.hdr-tool-alt{display:inline-flex}}

/* ---------- after ERPGo: menu button that hides the sidebar, and the breadcrumb ---------- */
.fin-top .side-toggle{display:inline-flex;flex:none}
.app.has-side.side-off{grid-template-columns:minmax(0,1fr)}
.app.has-side.side-off>.side{display:none}
@media (min-width:1101px){.app.side-off .top-brand{display:inline-flex}}
.crumbs{display:flex;align-items:center;gap:6px;min-width:0;flex:0 1 auto;font-size:13px;font-weight:500;color:var(--body);white-space:nowrap;overflow:hidden}
.crumbs a{color:var(--body);text-decoration:none}
.crumbs a:hover{color:var(--cobalt);text-decoration:underline}
.crumbs svg{flex:none;color:var(--muted)}
.crumbs span[aria-current]{color:var(--ink);font-weight:600;overflow:hidden;text-overflow:ellipsis}
@media (max-width:760px){.crumbs{display:none}}
.main-col>.crumbs{padding:2px 28px 12px 30px;overflow:visible;flex-wrap:wrap;white-space:normal}

/* ---------- phone quick menu (Platform PRD 15.1): a short bottom bar; the sidebar still slides in from Menu ---------- */
.mob-nav{display:none}
@media (max-width:760px){
  .mob-nav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:40;justify-content:space-around;align-items:stretch;background:var(--white);border-top:1px solid var(--border2);padding:6px 4px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -6px 18px rgba(13,15,24,.06)}
  .mob-nav a,.mob-nav button{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:11px;font-weight:500;text-decoration:none;padding:4px 2px;cursor:pointer}
  .main-col{padding-bottom:72px}
}
/* the UVTR logo stays at the top while the sidebar menu scrolls under it */
.side-top{position:sticky;top:-18px;z-index:3;background:var(--white);margin:-18px -14px 0;padding:20px 20px 8px}
/* the menu search stays under the logo while the sidebar scrolls */
.side-search{position:sticky;top:40px;z-index:3;box-shadow:0 -14px 0 0 var(--white),0 10px 0 0 var(--white)}
