    :root {
      --bg: #f0f5fa;
      --surface: #ffffff;
      --s2: #f1f5f9;
      --border: #dbeafe;
      --accent: #2563eb;
      --accent2: #7c3aed;
      --green: #059669;
      --red: #dc2626;
      --yellow: #d97706;
      --purple: #7c3aed;
      --text: #0f172a;
      --muted: #64748b;
      --sub: #475569;
    }
    [data-theme="dark"] {
      --bg: #111318;
      --surface: #181b23;
      --s2: #1e2130;
      --border: #262b3d;
      --accent: #4f8ef7;
      --accent2: #7c3aed;
      --green: #22c55e;
      --red: #f87171;
      --yellow: #fbbf24;
      --purple: #b4a4f5;
      --text: #e4e7f0;
      --muted: #5c657a;
      --sub: #8892a4;
    }
    /* Theme toggle button */
    #themeToggle {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--sub);
      border-radius: 7px;
      padding: 5px 10px;
      font-size: 15px;
      cursor: pointer;
      transition: all .15s;
      font-family: inherit;
      line-height: 1;
    }
    #themeToggle:hover { background: var(--s2); color: var(--text); }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
    }

    /* HEADER */
    .hdr {
      height: 52px;
      padding: 0 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 200;
    }

    .hdr-brand {
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .hdr-icon {
      width: 28px;
      height: 28px;
      border-radius: 6px;
      font-size: 14px;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .hdr-name {
      font-size: 13px;
      font-weight: 600;
    }

    .hdr-date {
      font-size: 12px;
      color: var(--muted);
    }

    /* TABS */
    .tabs {
      display: flex;
      padding: 0 28px;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
    }

    .tab {
      padding: 11px 16px;
      font-size: 13px;
      font-weight: 500;
      color: var(--muted);
      cursor: pointer;
      border-bottom: 2px solid transparent;
      transition: all .15s;
      user-select: none;
      white-space: nowrap;
    }

    .tab:hover {
      color: var(--sub);
    }

    .tab.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
    }

    /* PANEL */
    .panel {
      display: none;
      padding: 22px 28px;
    }

    .panel.active {
      display: block;
    }

    /* PAGE HEADER */
    .ph {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 18px;
      flex-wrap: wrap;
      gap: 10px;
    }

    .ph-title {
      font-size: 15px;
      font-weight: 600;
    }

    .ph-sub {
      font-size: 12px;
      color: var(--muted);
      margin-top: 2px;
    }

    .ph-actions {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    /* BUTTONS */
    .btn {
      padding: 7px 14px;
      border-radius: 7px;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      border: none;
      font-family: inherit;
      transition: all .13s;
      white-space: nowrap;
    }

    .btn-primary {
      background: var(--accent);
      color: #fff;
    }

    .btn-primary:hover {
      background: #3a7cf5;
    }

    .btn-ghost {
      background: transparent;
      color: var(--sub);
      border: 1px solid var(--border);
    }

    .btn-ghost:hover {
      background: var(--s2);
      color: var(--text);
    }

    .btn-sm {
      padding: 4px 10px;
      font-size: 11px;
    }

    .btn-del {
      background: transparent;
      color: var(--muted);
      border: 1px solid var(--border);
    }

    .btn-del:hover {
      background: rgba(248, 113, 113, .1);
      color: var(--red);
      border-color: rgba(248, 113, 113, .35);
    }

    /* INPUTS */
    input,
    select {
      background: var(--s2);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 7px;
      padding: 7px 10px;
      font-size: 12px;
      font-family: inherit;
      outline: none;
      transition: border-color .15s;
    }

    input:focus,
    select:focus {
      border-color: var(--accent);
    }

    select option {
      background: var(--s2);
      color: var(--text);
    }

    input[readonly] {
      color: var(--sub);
      cursor: default;
    }

    /* CARDS */
    .cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
      gap: 10px;
      margin-bottom: 18px;
    }

    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px 24px;
      box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    }

    .c-bar {
      height: 2px;
      border-radius: 2px;
      margin-bottom: 12px;
    }

    .c-label {
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-bottom: 5px;
    }

    .c-val {
      font-size: 19px;
      font-weight: 700;
      line-height: 1;
    }

    .c-sub {
      font-size: 11px;
      color: var(--muted);
      margin-top: 4px;
    }

    /* FORM */
    .form-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 16px 18px;
      margin-bottom: 16px;
      display: none;
    }

    .form-box.open {
      display: block;
    }

    .form-ttl {
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 14px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
      gap: 9px;
      margin-bottom: 12px;
    }

    .fg label {
      display: block;
      font-size: 10px;
      color: var(--muted);
      margin-bottom: 4px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .fg input,
    .fg select {
      width: 100%;
    }

    .fg .calc-hint {
      font-size: 10px;
      color: var(--accent);
      margin-top: 3px;
    }

    .form-foot {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
    }

    /* FILTER */
    .filter-row {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
      margin-bottom: 14px;
      padding: 10px 14px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 9px;
    }

    .filter-row label {
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .05em;
    }

    .fsep {
      width: 1px;
      height: 18px;
      background: var(--border);
    }

    /* TABLE */
    .tw {
      border: 1px solid var(--border);
      border-radius: 10px;
      overflow: hidden;
      overflow-x: auto;
    }

    /* === RESPONSIVE AUDIT (NEW 2026) === */
    @media (max-width: 768px) {
      .hdr { padding: 0 15px; }
      .hdr-name { display: none; }
      .tabs { padding: 0 15px; }
      .tab { padding: 11px 12px; font-size: 11px; }
      .panel { padding: 15px; }
      .cards { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
      .ph { flex-direction: column; align-items: stretch; gap: 15px; }
      .ph-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
      .ph-actions .btn { font-size: 11px; }
      .filter-row { padding: 8px 12px; gap: 6px; }
      .mod-ctx { padding: 20px !important; }
    }

    @media (max-width: 480px) {
      .hdr-date { display: none; }
      .ph-actions { grid-template-columns: 1fr; }
      .form-grid { grid-template-columns: 1fr; }
      .cards { grid-template-columns: 1fr 1fr; }
      .c-val { font-size: 16px; }
      .btn { padding: 8px 12px; }
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
      font-variant-numeric: tabular-nums;
    }

    thead th {
      padding: 12px 14px;
      text-align: left;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .05em;
      color: var(--muted);
      background: var(--surface);
      border-bottom: 2px solid var(--border);
      white-space: nowrap;
    }

    tbody tr {
      border-bottom: 1px solid var(--border);
      transition: background .15s ease;
    }

    tbody tr:nth-child(even) {
      background: rgba(255, 255, 255, 0.015);
    }
    
    [data-theme="light"] tbody tr:nth-child(even) {
      background: rgba(0, 0, 0, 0.015);
    }

    tbody tr:last-child {
      border-bottom: none;
    }

    tbody tr.main-row {
      cursor: pointer;
    }

    tbody tr.main-row:hover {
      background: rgba(79, 142, 247, .08) !important;
    }

    tbody tr.detail-row {
      display: none;
      background: var(--s2);
    }

    tbody tr.detail-row.open {
      display: table-row;
    }

    tbody tr.detail-row td {
      padding: 0;
      border-bottom: 1px solid var(--border);
    }

    tbody td {
      padding: 9px 12px;
      white-space: nowrap;
      vertical-align: middle;
    }

    .empty {
      text-align: center;
      padding: 52px;
      color: var(--muted);
      font-size: 13px;
    }

    /* detail box inside collapsed row */
    .detail-box {
      padding: 12px 16px;
      display: flex;
      flex-wrap: wrap;
      gap: 16px 28px;
    }

    .detail-item {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .detail-item .dl {
      font-size: 10px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .05em;
    }

    .detail-item .dv {
      font-size: 12px;
      font-weight: 500;
    }

    .chevron {
      font-size: 10px;
      color: var(--muted);
      transition: transform .2s;
      display: inline-block;
      margin-left: 4px;
    }

    tr.main-row.open .chevron {
      transform: rotate(180deg);
    }

    /* BADGES */
    .badge {
      display: inline-flex;
      align-items: center;
      padding: 2px 8px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 600;
    }

    .b-test {
      background: rgba(251, 191, 36, .1);
      color: var(--yellow);
      border: 1px solid rgba(251, 191, 36, .25);
    }

    .b-winning {
      background: rgba(34, 197, 94, .1);
      color: var(--green);
      border: 1px solid rgba(34, 197, 94, .25);
    }

    .b-off {
      background: rgba(92, 101, 122, .15);
      color: var(--muted);
      border: 1px solid rgba(92, 101, 122, .3);
    }

    /* PROFIT */
    .profit {
      color: var(--green);
      font-weight: 600;
    }

    .loss {
      color: var(--red);
      font-weight: 600;
    }

    .rg {
      color: var(--green);
      font-weight: 600;
    }

    .rm {
      color: var(--yellow);
      font-weight: 600;
    }

    .rb {
      color: var(--red);
      font-weight: 600;
    }

    /* CLOSING RATE pill */
    .cr-pill {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 600;
      background: rgba(124, 58, 237, .12);
      color: var(--purple);
      border: 1px solid rgba(124, 58, 237, .25);
    }

    /* KEPUTUSAN SELECT */
    .kep-sel {
      background: var(--s2);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 7px;
      padding: 4px 8px;
      font-size: 11px;
      font-family: inherit;
      outline: none;
      cursor: pointer;
      transition: border-color .15s;
      min-width: 120px;
    }

    .kep-sel:focus {
      border-color: var(--accent);
    }

    .kep-sel.ks-stop {
      border-color: rgba(248, 113, 113, .5);
      color: var(--red);
    }

    .kep-sel.ks-lanjut {
      border-color: rgba(251, 191, 36, .5);
      color: var(--yellow);
    }

    .kep-sel.ks-winning {
      border-color: rgba(34, 197, 94, .5);
      color: var(--green);
    }

    .kep-sel.ks-scale {
      border-color: rgba(124, 58, 237, .5);
      color: var(--purple);
    }

    /* TOAST */
    .toast {
      position: fixed;
      bottom: 18px;
      right: 18px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-left: 3px solid var(--green);
      border-radius: 8px;
      padding: 9px 14px;
      font-size: 12px;
      font-weight: 500;
      z-index: 999;
      opacity: 0;
      transform: translateY(10px);
      transition: all .22s;
      pointer-events: none;
    }

    .toast.show {
      opacity: 1;
      transform: translateY(0);
    }
    
    /* AUTH OVERLAY */
    .auth-wrapper {
      position: fixed; inset: 0;
      background: rgba(15, 23, 42, 0.7);
      backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
      z-index: 10000;
      display: flex; align-items: center; justify-content: center;
      overflow: hidden;
    }
    .auth-wrapper.hidden { display: none; }
    
    .auth-bg-shape {
      position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; z-index: -1;
      animation: float 10s ease-in-out infinite alternate;
    }
    .shape-1 { background: var(--accent); width: 400px; height: 400px; top: -100px; left: -100px; }
    .shape-2 { background: var(--purple); width: 300px; height: 300px; bottom: -50px; right: -50px; animation-delay: -5s; }
    @keyframes float { 0% { transform: translateY(0) scale(1); } 100% { transform: translateY(30px) scale(1.1); } }

    .auth-box {
      background: rgba(30, 41, 59, 0.85);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 20px; padding: 40px;
      width: 100%; max-width: 400px;
      box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
      text-align: center;
      position: relative;
    }
    .auth-box h2 { font-size: 26px; font-weight: 800; margin-bottom: 8px; color: #fff; letter-spacing: -0.5px; }
    .auth-box p { color: var(--muted); font-size: 14px; margin-bottom: 30px; line-height: 1.5; }
    .auth-box .fg { text-align: left; margin-bottom: 20px; }
    .auth-box label { font-size: 13px; font-weight: 600; color: var(--sub); margin-bottom: 8px; display: block; }
    .auth-box input { 
      background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255,255,255,0.08); 
      color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 15px; width: 100%; box-sizing: border-box;
      transition: all 0.2s;
    }
    .auth-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); outline: none; }
    .auth-box .btn-primary { 
      width: 100%; justify-content: center; padding: 14px 0; font-size: 15px; font-weight: 600; 
      margin-top: 10px; border-radius: 10px; 
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      border: none;
    }
    .auth-box .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(59, 130, 246, 0.5); }
    
    .auth-link {
      display: inline-block; margin-top: 20px; color: var(--accent); font-size: 13px; text-decoration: none; font-weight: 500; transition: color 0.2s; cursor:pointer;
    }
    .auth-link:hover { color: #fff; }    /* MODAL EXTRAS */
    .modal-overlay {
      position: fixed; top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.6);
      z-index: 1000;
      display: flex; align-items: center; justify-content: center;
      animation: fadeIn 0.15s ease-out;
    }
    .modal-content {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      width: 90%; max-width: 500px;
      position: relative;
      box-shadow: 0 10px 40px rgba(0,0,0,0.5);
      animation: slideUp 0.15s ease-out;
    }
    .modal-x {
      position: absolute; top: 16px; right: 16px;
      background: transparent; border: none;
      color: var(--muted); font-size: 20px;
      cursor: pointer;
      transition: color 0.1s;
    }
    .modal-x:hover { color: var(--red); }
    .input-rp {
      display: flex; align-items: center;
      background: var(--s2); border: 1px solid var(--border);
      border-radius: 8px; overflow: hidden;
    }
    .input-rp .rp-prefix {
      padding: 10px 14px; background: rgba(255,255,255,0.03);
      color: var(--muted); font-size: 14px; font-weight: 500;
      border-right: 1px solid var(--border);
    }
    .input-rp input {
      border: none; border-radius: 0; flex: 1;
    }

    /* ── RIWAYAT IMPORT DRAWER ── */
    .riwayat-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.45);
      z-index: 1500; opacity: 0; pointer-events: none;
      transition: opacity .2s;
    }
    .riwayat-overlay.open { opacity: 1; pointer-events: all; }
    .riwayat-drawer {
      position: fixed; top: 0; right: -460px; bottom: 0;
      width: 440px; max-width: 100vw;
      background: var(--surface);
      border-left: 1px solid var(--border);
      z-index: 1501;
      display: flex; flex-direction: column;
      transition: right .25s cubic-bezier(.4,0,.2,1);
      box-shadow: -8px 0 32px rgba(0,0,0,0.35);
    }
    .riwayat-drawer.open { right: 0; }
    .rw-header {
      padding: 20px 20px 14px;
      border-bottom: 1px solid var(--border);
      display: flex; align-items: flex-start; justify-content: space-between;
    }
    .rw-title { font-size: 16px; font-weight: 700; }
    .rw-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
    .rw-close {
      background: none; border: none; color: var(--muted);
      font-size: 20px; cursor: pointer; padding: 0 4px; line-height: 1;
      transition: color .1s;
    }
    .rw-close:hover { color: var(--red); }
    .rw-filter {
      padding: 10px 20px;
      border-bottom: 1px solid var(--border);
      display: flex; gap: 6px;
    }
    .rw-pill {
      padding: 4px 12px; border-radius: 20px; font-size: 11px;
      font-weight: 600; cursor: pointer; border: 1px solid var(--border);
      background: transparent; color: var(--muted); font-family: inherit;
      transition: all .13s;
    }
    .rw-pill.active {
      background: var(--accent); color: #fff; border-color: var(--accent);
    }
    .rw-body {
      flex: 1; overflow-y: auto; padding: 14px 16px;
      display: flex; flex-direction: column; gap: 8px;
    }
    .rw-card {
      border-radius: 8px; border: 1px solid var(--border);
      padding: 12px 14px; transition: background .15s;
    }
    .rw-card-ok { border-left: 3px solid var(--green); }
    .rw-card-double {
      border: 1px solid rgba(251,191,36,0.5);
      background: rgba(251,191,36,0.05);
    }
    .rw-card-missing {
      border: 1px dashed rgba(92,101,122,0.4);
      opacity: 0.65;
    }
    .rw-card-row1 {
      display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
    }
    .rw-date { font-size: 14px; font-weight: 700; flex: 1; }
    .rw-budget { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
    .rw-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
    .rw-warn { font-size: 11px; color: var(--yellow); margin-top: 4px; }
    .rw-badge-double {
      background: rgba(251,191,36,0.15); color: var(--yellow);
      border: 1px solid rgba(251,191,36,0.4);
      border-radius: 4px; font-size: 10px; font-weight: 700;
      padding: 2px 6px; white-space: nowrap;
    }
    .rw-badge-ok {
      color: var(--green); font-size: 13px; line-height: 1;
    }
    .rw-badge-missing { color: var(--muted); font-size: 13px; line-height: 1; }
    .rw-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 20px; }

    /* ── DASHBOARD UI ── */
    .dashboard-grid {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    }
    .dash-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 16px; padding: 20px; display: flex; flex-direction: column;
      position: relative; overflow: hidden;
      box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }
    .dash-card.large { grid-column: span 2; }
    .dash-card::before {
      content: ''; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%); pointer-events: none;
    }
    .dash-title { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
    .dash-val { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.2; display: flex; align-items: baseline; gap: 8px; }
    .dash-val small { font-size: 14px; font-weight: 500; }
    .dash-chart { flex: 1; min-height: 120px; margin-top: auto; }
    .dash-icon { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
    
    @media (max-width: 1024px) {
      .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 768px) {
      .dashboard-grid { grid-template-columns: 1fr; }
      .dash-card.large { grid-column: span 1; }
      .dash-card { padding: 16px; border-radius: 12px; }
      .dash-val { font-size: 24px; }
    }

    /* ── MOBILE UI REFACTOR (Screens < 768px) ── */
    /* Container for mobile cards */
    .mobile-cards-container { display: none; flex-direction: column; gap: 12px; padding-bottom: 80px; margin-top: 16px; }
    
    @media (max-width: 768px) {
      /* Hide standard tables ONLY initially for daily panel */
      #panel-daily > .tw,
      #panel-daily > div[style*="overflow-x:auto"],
      #panel-daily > div > table { display: none !important; }
      
      /* Show mobile container */
      .mobile-cards-container { display: flex; }
      
      /* Mobile Card Style */
      .m-card {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 16px;
        position: relative;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      }
      .m-card-title { font-weight: 700; font-size: 14px; margin-bottom: 12px; padding-right: 60px; line-height: 1.4; color: var(--text); }
      .m-card-data { display: flex; justify-content: space-between; align-items: flex-end; border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 4px; }
      .m-card-item { display: flex; flex-direction: column; gap: 4px; }
      .m-card-item.right { text-align: right; }
      .m-card-lbl { font-size: 11px; color: var(--muted); }
      .m-card-val { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
      
      .m-badge {
        position: absolute; top: 16px; right: 16px;
        font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 20px;
        border: 1px solid var(--border); text-transform: uppercase;
      }
      .m-badge.test { color: var(--yellow); border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.1); }
      .m-badge.winning { color: var(--green); border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.1); }
      .m-badge.stop { color: var(--muted); border-color: rgba(136,146,164,0.3); background: rgba(136,146,164,0.1); }
      
      /* Swipeable Metrics */
      .metrics-grid {
        display: flex !important; flex-wrap: nowrap !important; gap: 12px !important; overflow-x: auto !important; padding-bottom: 8px; margin-bottom: 8px;
        scroll-snap-type: x mandatory;
      }
      .metrics-grid::-webkit-scrollbar { display: none; }
      .metric-card {
        min-width: 150px; scroll-snap-align: start; flex-shrink: 0;
      }
      
      /* Bottom Navigation Bar */
      .tabs {
        display: flex; position: fixed; bottom: 0; left: 0; width: 100%;
        background: rgba(24, 27, 35, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border); border-bottom: none; z-index: 900;
        padding: 8px 4px; justify-content: space-around; margin: 0; gap: 0;
      }
      .tab { border: none; flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; padding: 6px; border-radius: 8px; }
      .tab.active { background: transparent; color: var(--accent); }
      .tab:not(.active) { opacity: 0.6; }
      
      /* FAB (Floating Action Button) */
      .fab-tulis { display: flex !important; }
      
      /* Adjust Header and Toolbar for Mobile */
      .hdr { padding: 0 16px; height: 60px; }
      .panel { padding: 12px; padding-bottom: 100px; }
      .hdr-name { display: none; } /* Hide large text to save space */
      .hdr-date { display: none; } /* Hide fixed date text */
      #gSearch { width: 160px !important; }
      .ph { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom:14px !important; }
      .ph > div { width: 100%; justify-content: space-between; }
      #btn-tulis-manual { display: none !important; } /* Hide desktop button, use FAB */
      
      /* Mobile Only Utility Buttons */
      .desktop-only { display: none !important; }
    }
    
    /* Tab Icons defaults */
    .tab .icon { display: none; }
    .tab .lbl { display: inline; }
    
    /* Default hidden for desktop */
    .fab-tulis {
        display: none;
        position: fixed; bottom: 85px; right: 20px; width: 56px; height: 56px;
        background: var(--accent); color: #fff; border-radius: 28px;
        align-items: center; justify-content: center; font-size: 24px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 890; cursor: pointer;
        border: none;
    }

    @media (max-width: 768px) {
      .tab .icon { display: block; font-size: 20px; line-height: 1; margin-bottom: 4px; }
      .tab .lbl { font-size: 10px; display: block; font-weight: 500;}
      /* Hide "Rekap Produk" tab on mobile to save space if needed, or keep it */
    }
