button, [role="button"], select, summary, input:not([type="checkbox"], [type="radio"]) { min-height: 2.25rem; }
      * { box-sizing: border-box; }
      :root{
        --bg:#eaeef3; --surface:#ffffff; --surface2:#f1f5f9; --ink:#16232e; --muted:#5b6d7d;
        --line:#d5dde5; --brand:#14508c; --brand-ink:#ffffff; --brand-soft:#e2ebf5;
        --accent:#d97706; --accent-soft:#fbf0da; --good:#177245; --good-soft:#e2f2e7;
        --bad:#c62f3b; --bad-soft:#fbe7e9; --warn:#9a6a06; --warn-soft:#faf0d7;
        --navy:#0e2a47; --navy-ink:#eaf2fa;
        --shadow:0 1px 2px rgba(16,42,67,.07),0 6px 18px rgba(16,42,67,.07);
        --radius:10px;
        --font-d:"Archivo","Hind Siliguri",system-ui,sans-serif;
      }
      @media (prefers-color-scheme: dark){
        :root{
          --bg:#0b1118; --surface:#131e29; --surface2:#1a2836; --ink:#e9eff5; --muted:#94a7b8;
          --line:#26374a; --brand:#4a90d9; --brand-ink:#08131f; --brand-soft:#1b3049;
          --accent:#f0a13c; --accent-soft:#3a2a10; --good:#4cc38a; --good-soft:#14301f;
          --bad:#ff8484; --bad-soft:#3a1d20; --warn:#f5c04e; --warn-soft:#38300f;
          --navy:#081827; --navy-ink:#eaf2fa;
          --shadow:0 1px 2px rgba(0,0,0,.45),0 6px 18px rgba(0,0,0,.35);
        }
      }
      html{ -webkit-text-size-adjust:100%; }
      body{ margin:0; background:var(--bg); color:var(--ink); font-family:"Hind Siliguri",system-ui,sans-serif; font-size:16px; line-height:1.55; }
      ::selection{ background:var(--accent); color:#231603; }
      a{ color:var(--brand); }
      h1,h2,h3{ line-height:1.3; margin:0; font-family:var(--font-d); }
      .en{ font-size:.78em; color:var(--muted); font-weight:500; letter-spacing:.02em; }

      /* DEMO banner */
      .demo-banner{ background:#f6a609; color:#26190a; padding:.5rem 1rem; display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; justify-content:center; text-align:center; font-weight:600; font-size:.95rem; position:relative; z-index:60; }
      .demo-banner .tag{ background:var(--navy); color:#ffc44d; border-radius:5px; padding:.05rem .5rem; font-weight:700; letter-spacing:.06em; }
      .demo-banner small{ font-weight:500; opacity:.85; }

      /* Header / top nav — deep navy band with blueprint grid + amber rule.
         The nav WRAPS to a second line when the 12 Admin items do not fit
         on one row (laptop ~1366px): earlier it was flex-wrap:nowrap with
         overflow-x:auto, so the last items (Store, Accounts, Expenses,
         Company Profile, Backup) sat hidden behind a horizontal scroll
         and Akmol could not see them. Nothing is ever cut off now. */
      header.topbar{ position:sticky; top:0; z-index:50; background-color:var(--navy); background-image:linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px); background-size:26px 26px; border-bottom:3px solid var(--accent); color:var(--navy-ink); }
      .topbar-in{ max-width:1440px; margin:0 auto; display:flex; align-items:center; gap:.55rem; padding:.45rem .8rem; flex-wrap:wrap; }
      @media (max-width:1340px){ .brand-txt{ display:none; } }
      @media (max-width:1200px){ nav.topnav{ flex:1 1 100%; order:4; } }
      @media (max-width:1020px){ .nav-btn .nv-en{ display:none; } .nav-btn{ padding:.4rem .45rem; } }
      .brand{ display:flex; align-items:center; gap:.5rem; flex:0 0 auto; order:3; }
      .brand-mark{ background:var(--accent); color:#231603; font-weight:800; font-family:var(--font-d); border-radius:7px; padding:.26rem .5rem; letter-spacing:.05em; font-size:.95rem; line-height:1.2; }
      .brand-txt{ line-height:1.15; }
      .brand-txt b{ font-size:.94rem; display:block; color:#fff; font-family:var(--font-d); }
      .brand-txt span{ font-size:.72rem; color:rgba(234,242,250,.65); }
      nav.topnav{ display:flex; gap:.15rem; flex-wrap:wrap; order:1; flex:1 1 auto; min-width:0; }
      nav.topnav .nav-btn{ flex:0 0 auto; }
      .nav-btn{ display:flex; align-items:center; gap:.45rem; border:1px solid transparent; background:transparent; color:var(--ink); border-radius:8px; padding:.4rem .6rem; cursor:pointer; font-family:inherit; font-size:.92rem; font-weight:600; min-height:2.75rem; }
      .nav-btn svg{ width:20px; height:20px; flex:0 0 auto; }
      .nav-btn .nv-en{ display:block; font-size:.66rem; font-weight:500; color:var(--muted); line-height:1.1; letter-spacing:.03em; }
      .nav-btn .nv-bn{ display:block; line-height:1.15; }
      .nav-btn:hover{ background:var(--surface2); }
      .nav-btn.active{ background:var(--brand-soft); color:var(--brand); border-color:var(--line); }
      .nav-btn.active .nv-en{ color:var(--brand); opacity:.75; }
      header.topbar .nav-btn{ color:var(--navy-ink); }
      header.topbar .nav-btn .nv-en{ color:rgba(234,242,250,.6); }
      header.topbar .nav-btn:hover{ background:rgba(255,255,255,.1); }
      header.topbar .nav-btn.active{ background:var(--accent); color:#231603; border-color:transparent; }
      header.topbar .nav-btn.active .nv-en{ color:rgba(35,22,3,.75); opacity:1; }
      /* Compact top tabs — brand sits after them; the nav wraps to a
         second line instead of scrolling when all items do not fit. */
      header.topbar .nav-btn{ gap:.32rem; padding:.34rem .42rem; font-size:.84rem; min-height:2.6rem; }
      header.topbar .nav-btn svg{ width:18px; height:18px; }
      header.topbar .nav-btn .nv-en{ font-size:.6rem; }

      /* Language toggle */
      .lang-toggle{ display:flex; border:1px solid rgba(255,255,255,.35); border-radius:999px; overflow:hidden; flex:0 0 auto; order:2; background:rgba(255,255,255,.08); }
      .lang-toggle button{ border:none; background:transparent; color:#b9cede; font-family:inherit; font-weight:700; font-size:.82rem; padding:.28rem .62rem; cursor:pointer; min-height:2.4rem; }
      .lang-toggle button.on{ background:#fff; color:var(--navy); }
      body.lang-en .en, body.lang-en .nv-en{ display:none; }

      main{ max-width:1240px; margin:0 auto; padding:1.1rem 1rem 6.5rem; }
      .tab{ display:none; }
      .tab.active{ display:block; }
      .tab-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1rem; }
      .tab-head h2{ font-size:1.55rem; font-weight:800; letter-spacing:-.01em; position:relative; padding-bottom:.4rem; }
      .tab-head h2::after{ content:""; position:absolute; left:0; bottom:0; width:42px; height:4px; border-radius:2px; background:var(--accent); }
      .tab-head p{ margin:.15rem 0 0; color:var(--muted); font-size:.94rem; }

      .card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:1rem 1.1rem; }
      .grid{ display:grid; gap:1rem; }
      .grid.stats{ grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); }
      .grid.two{ grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); }
      .grid.three{ grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); }
      .stat .lbl{ color:var(--muted); font-size:.88rem; font-weight:600; }
      .stat .val{ font-size:1.45rem; font-weight:800; font-family:var(--font-d); letter-spacing:-.01em; line-height:1.25; margin-top:.15rem; white-space:nowrap; font-variant-numeric:tabular-nums; }
      @media (max-width:480px){ .stat .val{ font-size:1.22rem; } .bal-card .val{ font-size:1.3rem; } }
      .stat .sub{ font-size:.85rem; color:var(--muted); }
      .stat .ic{ width:34px; height:34px; border-radius:8px; background:var(--brand-soft); color:var(--brand); display:flex; align-items:center; justify-content:center; margin-bottom:.5rem; }
      .stat .ic svg{ width:19px; height:19px; }
      .stat.warn .ic{ background:var(--warn-soft); color:var(--warn); }
      .stat.acc .ic{ background:var(--accent-soft); color:var(--accent); }

      .btn{ display:inline-flex; align-items:center; justify-content:center; gap:.45rem; border-radius:8px; border:1px solid var(--brand); background:var(--brand); color:var(--brand-ink); font-family:inherit; font-weight:700; font-size:.95rem; padding:.5rem 1rem; cursor:pointer; min-height:2.75rem; box-shadow:0 1px 2px rgba(16,42,67,.18); }
      .btn:hover{ filter:brightness(1.07); }
      .btn.ghost{ background:transparent; color:var(--brand); box-shadow:none; }
      .btn.plain{ background:var(--surface2); color:var(--ink); border-color:var(--line); box-shadow:none; }
      .btn.accent{ background:var(--accent); border-color:var(--accent); color:#fff; }
      .btn.small{ min-height:2.25rem; padding:.3rem .7rem; font-size:.88rem; }
      .btn.danger{ background:transparent; border-color:var(--bad); color:var(--bad); box-shadow:none; }
      .btn:disabled{ opacity:.45; cursor:not-allowed; }
      .btn svg{ width:17px; height:17px; }

      label.f{ display:block; font-weight:600; font-size:.9rem; margin-bottom:.8rem; }
      label.f span{ display:block; margin-bottom:.3rem; }
      label.f .hint{ font-weight:400; color:var(--muted); font-size:.82rem; }
      input[type="text"],input[type="tel"],input[type="number"],input[type="password"],input[type="email"],input[type="date"],input[type="month"],select,textarea{
        width:100%; font-family:inherit; font-size:1rem; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:.5rem .7rem; min-height:2.75rem; }
      input[type="range"]{ accent-color:var(--accent); }
      textarea{ min-height:4.5rem; resize:vertical; }
      input:focus,select:focus,textarea:focus{ outline:2px solid var(--brand); outline-offset:1px; border-color:var(--brand); }
      .form-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:0 1rem; }
      .toolbar{ display:flex; gap:.6rem; flex-wrap:wrap; align-items:center; margin-bottom:1rem; }
      .toolbar .grow{ flex:1 1 200px; }
      .toolbar select{ width:auto; min-width:170px; }
      .toolbar input[type="text"]{ width:100%; }

      table.rtable{ width:100%; border-collapse:collapse; font-size:.95rem; }
      .rtable th{ text-align:left; color:var(--muted); background:var(--surface2); font-size:.83rem; font-weight:700; letter-spacing:.02em; padding:.55rem .6rem; border-bottom:2px solid var(--line); white-space:nowrap; }
      .rtable td{ padding:.6rem; border-bottom:1px solid var(--line); vertical-align:middle; }
      .rtable tbody tr:hover{ background:var(--surface2); }
      .rtable tr:last-child td{ border-bottom:none; }
      .rtable tfoot td{ background:var(--surface2); border-top:2px solid var(--brand); font-weight:700; }
      .rtable .num{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
      .rtable th.num{ text-align:right; }
      .table-wrap{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; }
      .table-scroll{ overflow-x:auto; }

      .chip{ display:inline-flex; align-items:center; gap:.3rem; border-radius:6px; border:1px solid transparent; padding:.12rem .6rem; font-size:.8rem; font-weight:700; white-space:nowrap; }
      .chip.good{ background:var(--good-soft); color:var(--good); }
      .chip.bad{ background:var(--bad-soft); color:var(--bad); }
      .chip.warn{ background:var(--warn-soft); color:var(--warn); }
      .chip.soft{ background:var(--surface2); color:var(--muted); border-color:var(--line); }
      .chip.brand{ background:var(--brand-soft); color:var(--brand); }

      .avatar{ width:44px; height:44px; border-radius:10px; background:var(--brand); color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center; font-size:1.05rem; overflow:hidden; flex:0 0 auto; }
      .avatar img{ width:100%; height:100%; object-fit:cover; }
      .avatar.lg{ width:58px; height:58px; font-size:1.3rem; }
      .wcell{ display:flex; align-items:center; gap:.65rem; }
      .wcell .nm{ font-weight:600; line-height:1.25; }
      .wcell .mt{ font-size:.82rem; color:var(--muted); line-height:1.3; }

      .bar{ height:9px; border-radius:99px; background:var(--surface2); border:1px solid var(--line); overflow:hidden; }
      .bar > i{ display:block; height:100%; border-radius:99px; background:var(--brand); }
      .bar.bill > i{ background:var(--accent); }
      .prog-row{ display:grid; grid-template-columns:104px 1fr 52px; align-items:center; gap:.6rem; font-size:.88rem; margin-top:.35rem; }
      .prog-row .pl{ color:var(--muted); font-weight:600; }
      .prog-row .pv{ text-align:right; font-weight:700; font-variant-numeric:tabular-nums; }

      .kv{ display:flex; justify-content:space-between; gap:1rem; padding:.42rem 0; border-bottom:1px dashed var(--line); font-size:.95rem; }
      .kv:last-child{ border-bottom:none; }
      .kv .k{ color:var(--muted); }
      .kv .v{ font-weight:600; text-align:right; font-variant-numeric:tabular-nums; }
      .kv .v.neg{ color:var(--bad); } .kv .v.pos{ color:var(--good); }

      .proj-card h3{ font-size:1.12rem; }
      .proj-card .loc{ color:var(--muted); font-size:.88rem; margin-bottom:.4rem; }
      .proj-card.done{ opacity:.72; background:var(--surface2); }
      .ptabs{ display:flex; gap:.5rem; flex-wrap:wrap; margin:.9rem 0 .4rem; }
      .proj-actions{ display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.8rem; }

      .bal-card .lbl{ color:var(--muted); font-weight:600; font-size:.9rem; display:flex; align-items:center; gap:.45rem; }
      .bal-card .lbl svg{ width:18px; height:18px; }
      .bal-card .val{ font-size:1.5rem; font-weight:800; font-family:var(--font-d); letter-spacing:-.01em; margin-top:.2rem; font-variant-numeric:tabular-nums; }

      .modal-bg{ position:fixed; inset:0; background:rgba(8,20,33,.6); z-index:100; display:none; align-items:flex-start; justify-content:center; overflow-y:auto; padding:1rem .6rem 2rem; }
      .modal-bg.open{ display:flex; }
      .modal{ background:var(--surface); color:var(--ink); border-radius:14px; width:100%; max-width:560px; box-shadow:0 18px 50px rgba(0,0,0,.35); padding:1.2rem; margin:auto 0; }
      .modal.wide{ max-width:760px; }
      .modal-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
      .modal-head h3{ font-size:1.25rem; }
      .x-btn{ background:var(--surface2); border:1px solid var(--line); border-radius:8px; width:2.5rem; height:2.5rem; display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--ink); flex:0 0 auto; }
      .x-btn svg{ width:18px; height:18px; }

      /* ID card */
      .idcard{ border-radius:14px; overflow:hidden; border:1px solid var(--line); max-width:340px; margin:0 auto; background:var(--surface); position:relative; }
      .idcard .id-head{ background:var(--navy); border-bottom:3px solid var(--accent); color:#fff; padding:.7rem 1rem; display:flex; justify-content:space-between; align-items:center; }
      .idcard .id-head b{ font-size:1.05rem; letter-spacing:.03em; }
      .idcard .id-head span{ font-size:.72rem; opacity:.85; display:block; }
      .idcard .id-body{ padding:1rem; display:flex; gap:1rem; }
      .idcard .id-photo{ width:92px; height:112px; border-radius:8px; background:var(--brand-soft); color:var(--brand); display:flex; align-items:center; justify-content:center; font-size:1.8rem; font-weight:700; overflow:hidden; flex:0 0 auto; border:1px solid var(--line); }
      .idcard .id-photo img{ width:100%; height:100%; object-fit:cover; }
      .idcard .id-rows{ font-size:.9rem; flex:1; }
      .idcard .id-rows .r{ margin-bottom:.35rem; }
      .idcard .id-rows .r span{ color:var(--muted); font-size:.78rem; display:block; }
      .idcard .id-rows .r b{ font-size:.98rem; }
      .idcard .id-foot{ display:flex; justify-content:space-between; align-items:center; padding:.6rem 1rem; border-top:1px dashed var(--line); background:var(--surface2); }
      .qr{ display:grid; grid-template-columns:repeat(9,1fr); gap:1px; width:54px; height:54px; background:#fff; padding:3px; border:1px solid var(--line); border-radius:4px; }
      .qr i{ background:#fff; } .qr i.on{ background:#17211c; }
      .demo-stamp{ position:absolute; top:44%; left:50%; transform:translate(-50%,-50%) rotate(-18deg); border:3px solid var(--accent); color:var(--accent); font-weight:700; letter-spacing:.25em; padding:.1rem .8rem; border-radius:8px; opacity:.5; font-size:1.3rem; pointer-events:none; }

      /* Invoice */
      .invoice{ background:#fff; color:#17211c; border:1px solid #ccc; border-radius:8px; padding:1.4rem; }
      .invoice .inv-head{ display:flex; justify-content:space-between; gap:1rem; border-bottom:3px solid #14508c; padding-bottom:.8rem; flex-wrap:wrap; }
      .invoice h3{ color:#14508c; font-size:1.4rem; }
      .invoice table{ width:100%; border-collapse:collapse; margin-top:1rem; font-size:.95rem; }
      .invoice th,.invoice td{ border:1px solid #d8d8d8; padding:.5rem .6rem; text-align:left; }
      .invoice .num{ text-align:right; }
      .invoice .words{ background:#eef4fa; border:1px dashed #14508c; border-radius:8px; padding:.6rem .8rem; margin-top:1rem; font-weight:600; }

      .toast{ position:fixed; left:50%; bottom:6.2rem; transform:translateX(-50%) translateY(20px); background:var(--navy); color:var(--navy-ink); border:1px solid rgba(255,255,255,.15); padding:.65rem 1.1rem; border-radius:10px; font-weight:600; box-shadow:0 10px 30px rgba(0,0,0,.3); opacity:0; pointer-events:none; transition:.25s; z-index:200; max-width:92vw; text-align:center; }
      .toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

      .thumb-row{ display:flex; gap:.6rem; flex-wrap:wrap; margin-top:.5rem; }
      .thumb{ width:86px; height:86px; border-radius:8px; object-fit:cover; border:1px solid var(--line); }
      .file-chip{ display:inline-flex; align-items:center; gap:.45rem; background:var(--surface2); border:1px solid var(--line); border-radius:8px; padding:.4rem .7rem; font-size:.88rem; font-weight:600; }
      .file-chip svg{ width:16px; height:16px; color:var(--brand); }
      .update-item{ border-left:3px solid var(--accent); padding:.2rem 0 .2rem .8rem; margin-bottom:.9rem; }
      .update-item .dt{ font-size:.8rem; color:var(--muted); }
      .empty{ text-align:center; color:var(--muted); padding:2rem 1rem; }
      .note{ background:var(--warn-soft); border:1px solid var(--line); border-radius:8px; padding:.6rem .8rem; font-size:.9rem; }
      .dist-big{ font-size:2rem; font-weight:800; font-family:var(--font-d); line-height:1.2; }
      .seg{ display:flex; gap:.5rem; flex-wrap:wrap; }
      .seg button{ flex:1 1 130px; }
      .hidden{ display:none !important; }
      .mt{ margin-top:1rem; } .mb{ margin-bottom:1rem; }
      .row-between{ display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; }
      .small-txt{ font-size:.86rem; color:var(--muted); }

      /* Timesheet document (Pay Roll → টাইমশিট) */
      .ts-doc{ border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--surface); }
      .ts-band{ background:var(--navy); border-bottom:3px solid var(--accent); color:#fff; padding:.95rem 1.05rem; display:flex; justify-content:space-between; align-items:flex-start; gap:.6rem 1rem; flex-wrap:wrap; }
      .ts-band .co{ font-weight:700; font-size:1.05rem; line-height:1.3; }
      .ts-band .co small{ display:block; font-weight:500; font-size:.8rem; opacity:.85; }
      .ts-band .doc-t{ text-align:right; }
      .ts-band .doc-t b{ display:block; font-size:1rem; letter-spacing:.03em; }
      .ts-band .doc-t span{ font-size:.8rem; opacity:.85; }
      .ts-body{ padding:1rem 1.05rem 1.1rem; }
      .ts-info{ display:grid; grid-template-columns:1fr 1fr; gap:0 1.6rem; }
      .ts-sec{ font-size:1rem; font-weight:700; margin:1.15rem 0 .45rem; padding-bottom:.3rem; border-bottom:2px solid var(--brand); }
      table.ts-grid{ font-size:.88rem; }
      .ts-grid th{ padding:.45rem .5rem; }
      .ts-grid td{ padding:.42rem .5rem; }
      .ts-grid tr.off td, .ts-grid tr.absent td{ color:var(--muted); }
      .ts-grid tr.tot td{ border-top:2px solid var(--brand); font-weight:700; background:var(--surface2); }
      .ts-net{ display:flex; justify-content:space-between; align-items:center; gap:1rem; background:var(--brand-soft); border:1px solid var(--line); border-radius:8px; padding:.6rem .85rem; margin-top:.55rem; font-weight:700; }
      .ts-net .amt{ font-size:1.15rem; color:var(--brand); white-space:nowrap; }
      .ts-words{ font-size:.9rem; color:var(--muted); margin-top:.5rem; }
      .ts-sig{ display:grid; grid-template-columns:repeat(3,1fr); gap:1.4rem; margin-top:1.6rem; }
      .ts-sig .sig-cell{ text-align:center; }
      .ts-sig .sig-area{ min-height:52px; display:flex; align-items:flex-end; justify-content:center; border-bottom:1.5px dashed var(--muted); padding:2px 4px; background:#fff; border-radius:6px 6px 0 0; }
      .ts-sig .sig-area img{ max-height:50px; max-width:100%; object-fit:contain; }
      .ts-sig .sig-lbl{ padding-top:.35rem; font-size:.84rem; color:var(--muted); font-weight:600; }
      .ts-sig .sig-lbl small{ display:block; font-weight:500; font-size:.76rem; }
      .signed-banner{ display:flex; gap:.6rem; align-items:flex-start; background:var(--good-soft, #e5f4ec); border:1px solid var(--good); border-radius:8px; padding:.65rem .85rem; margin-top:1rem; font-size:.9rem; }
      .signed-banner b{ color:var(--good); }
      /* Signature pads (Pay Roll → স্বাক্ষর ও জমা) */
      .sig-pad-wrap{ border:1px solid var(--line); border-radius:10px; background:#fff; overflow:hidden; }
      .sig-pad{ display:block; width:100%; height:150px; touch-action:none; cursor:crosshair; background:#fff; }
      .sig-pad-wrap .sig-hint{ font-size:.78rem; color:#7a8794; text-align:center; padding:.3rem; border-top:1px dashed #ccd6df; background:#f7fafc; }
      .sig-view{ border:1px solid var(--line); border-radius:10px; background:#fff; padding:.5rem; text-align:center; }
      .sig-view img{ max-height:110px; max-width:100%; object-fit:contain; }
      @media (max-width:760px){ .ts-info{ grid-template-columns:1fr; } .ts-sig{ gap:.8rem; } .ts-band .doc-t{ text-align:left; } }

      /* Mobile bottom nav */
      .bottomnav{ display:none; }
      .more-sheet{ display:none; }
      @media (max-width:900px){
        nav.topnav{ display:none; }
        .brand{ order:0; }
        .lang-toggle{ margin-left:auto; }
        .brand-txt span{ display:none; }
        main{ padding-bottom:7.5rem; }
        .bottomnav{ display:flex; position:fixed; left:0; right:0; bottom:0; z-index:80; background:var(--navy); border-top:3px solid var(--accent); padding:.35rem .3rem calc(.35rem + env(safe-area-inset-bottom)); box-shadow:0 -4px 18px rgba(0,0,0,.25); }
        .bottomnav .nav-btn{ flex:1; flex-direction:column; gap:.15rem; padding:.35rem .1rem; font-size:.78rem; min-height:3.4rem; color:var(--navy-ink); }
        .bottomnav .nav-btn svg{ width:22px; height:22px; }
        .bottomnav .nav-btn .nv-en{ display:none; }
        .bottomnav .nav-btn:hover{ background:rgba(255,255,255,.08); }
        .bottomnav .nav-btn.active{ background:rgba(255,255,255,.1); color:var(--accent); border-color:transparent; }
        .more-sheet{ display:none; position:fixed; left:.6rem; right:.6rem; bottom:5.2rem; z-index:81; background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:0 14px 40px rgba(0,0,0,.25); padding:.7rem; grid-template-columns:1fr 1fr; gap:.5rem; }
        .more-sheet.open{ display:grid; }
        .more-sheet .nav-btn{ justify-content:flex-start; border-color:var(--line); background:var(--surface2); min-height:3.2rem; }
        .toast{ bottom:8rem; }
      }
      @media (max-width:760px){
        .rtable thead{ display:none; }
        .rtable, .rtable tbody, .rtable tr, .rtable td{ display:block; width:100%; }
        .rtable tr{ padding:.55rem .2rem; border-bottom:1px solid var(--line); }
        .rtable td{ border-bottom:none; padding:.28rem .6rem; display:flex; justify-content:space-between; align-items:center; gap:1rem; text-align:right; }
        .rtable td::before{ content:attr(data-l); color:var(--muted); font-size:.83rem; font-weight:600; text-align:left; }
        .rtable td.cell-main{ display:block; text-align:left; }
        .rtable td.cell-main::before{ display:none; }
        .rtable .num{ text-align:right; }
        .invoice{ padding:1rem; }
        .prog-row{ grid-template-columns:74px 1fr 46px; }
      }
      @media (prefers-reduced-motion: reduce){
        *{ transition:none !important; }
      }

/* ---- SBS Office additions (server-rendered pages) ---- */
.nav-btn{ text-decoration:none; }
.nav-btn:visited{ color:inherit; }
.lang-toggle a{ border:none; background:transparent; color:#b9cede; font-family:inherit; font-weight:700; font-size:.82rem; padding:.28rem .62rem; cursor:pointer; min-height:2.4rem; display:flex; align-items:center; text-decoration:none; }
.lang-toggle a.on{ background:#fff; color:var(--navy); }
.user-chip{ display:flex; align-items:center; gap:.6rem; flex:0 0 auto; order:3; color:#dbe7f2; font-size:.85rem; font-weight:600; white-space:nowrap; }
.user-chip a{ color:#ffd28a; text-decoration:none; font-weight:700; }
.user-chip a:hover{ text-decoration:underline; }
.flash{ max-width:1440px; margin:.7rem auto 0; padding:.65rem 1rem; border-radius:10px; background:#e5f4ec; border:1px solid #9fd0b4; color:#14532d; font-weight:600; }
.flash.bad{ background:#fdecec; border-color:#f3b0b0; color:#7f1d1d; }
.sys-foot{ max-width:1440px; margin:2rem auto 0; padding:0 .8rem 1rem; text-align:center; }
.auth-wrap{ max-width:560px; margin:2.5rem auto; }
.auth-card{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:1.4rem 1.5rem; box-shadow:0 8px 28px rgba(15,42,67,.08); }
.auth-card h2{ margin-bottom:.3rem; }
.perm-table{ width:100%; border-collapse:collapse; font-size:.9rem; }
.perm-table th, .perm-table td{ border:1px solid var(--line); padding:.35rem .5rem; text-align:center; }
.perm-table th:first-child, .perm-table td:first-child{ text-align:left; }

/* ---- Worker ID card actions + print (only the card prints) ---- */
.idcard-actions{ display:flex; gap:.6rem; justify-content:center; margin:1rem auto 0; max-width:340px; }
@media print{
  body{ background:#fff; }
  header.topbar, nav.bottomnav, .more-sheet, footer.sys-foot, .toast, .flash{ display:none !important; }
  main{ max-width:none; padding:0; margin:0; }
  section.tab.idcard-view > :not(.idcard){ display:none !important; }
  section.tab.idcard-view .idcard{ margin:20px auto 0; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
