:root {
      --navy: #06264b;
      --navy-2: #0b315c;
      --green: #07a94f;
      --green-dark: #078640;
      --green-soft: #e9f8f0;
      --orange: #f47a18;
      --orange-soft: #fff1e5;
      --red: #e62e2e;
      --red-soft: #fdeaea;
      --blue-soft: #eaf2ff;
      --ink: #13233a;
      --muted: #68778b;
      --line: #dfe6ee;
      --surface: #ffffff;
      --canvas: #f5f8fb;
      --shadow: 0 10px 30px rgba(20, 47, 80, .08);
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      min-width: 320px;
      min-height: 100vh;
      font-family: Inter, Arial, sans-serif;
      color: var(--ink);
      background: var(--canvas);
      line-height: 1.45;
      -webkit-font-smoothing: antialiased;
    }
    button, input, select { font: inherit; }
    button { cursor: pointer; }
    .material-symbols-rounded {
      font-family: "Material Symbols Rounded", "Material Symbols Outlined", sans-serif;
      font-weight: normal;
      font-style: normal;
      font-size: 22px;
      line-height: 1;
      letter-spacing: normal;
      text-transform: none;
      display: inline-block;
      white-space: nowrap;
      word-wrap: normal;
      direction: ltr;
      -webkit-font-smoothing: antialiased;
      font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
      font-feature-settings: "liga";
    }
    .hidden { display: none !important; }

    /* Login */
    .login-screen {
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: 32px;
      background:
        radial-gradient(circle at 80% 10%, rgba(7,169,79,.12), transparent 28%),
        linear-gradient(135deg, #f8fbff 0%, #eef5f8 100%);
    }
    .login-card {
      width: min(440px, 100%);
      padding: 40px;
      border: 1px solid var(--line);
      border-radius: 22px;
      background: #fff;
      box-shadow: var(--shadow);
    }
    .brand { display: flex; align-items: center; gap: 12px; }
    .brand-logo { display: block; width: 184px; height: 68px; object-fit: contain; object-position: left center; }
    .brand-mark {
      width: 42px; height: 42px; display: grid; place-items: center;
      color: #fff; background: var(--green); border-radius: 12px;
    }
    .brand-name { font-size: 22px; font-weight: 750; letter-spacing: -.03em; }
    .brand-name b { color: var(--green); }
    .login-card h1 { margin: 34px 0 8px; font-size: 28px; letter-spacing: -.04em; }
    .login-subtitle { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
    .form-field { margin-bottom: 17px; }
    .form-field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
    .form-field input, .form-field select {
      width: 100%; height: 48px; padding: 0 14px;
      border: 1px solid #cfd8e3; border-radius: 10px; outline: none;
      color: var(--ink); background: #fff;
    }
    .form-field input:focus, .form-field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(7,169,79,.12); }
    .primary-btn {
      display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      min-height: 44px; padding: 0 18px; border: 0; border-radius: 9px;
      color: #fff; background: var(--green); font-weight: 650;
    }
    .primary-btn:hover { background: var(--green-dark); }
    .primary-btn:disabled { opacity: .55; cursor: wait; }
    .danger-btn {
      display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      min-height: 44px; padding: 0 18px; border: 0; border-radius: 9px;
      color: #fff; background: var(--red); font-weight: 650;
    }
    .danger-btn:hover { background: #c62828; }
    .danger-btn:disabled { opacity: .55; cursor: wait; }
    .login-card .primary-btn { width: 100%; height: 50px; margin-top: 4px; }
    .error-msg { display: none; margin-top: 15px; padding: 11px 13px; border-radius: 9px; color: #a51f1f; background: var(--red-soft); font-size: 13px; }
    .error-msg.show { display: block; }
    .powered { margin: 24px 0 0; text-align: center; color: #9ba7b5; font-size: 11px; }

    /* Shell */
    .app-shell { min-height: 100vh; display: none; grid-template-columns: 230px minmax(0,1fr); }
    .app-shell.visible { display: grid; }
    .sidebar {
      position: sticky; top: 0; height: 100vh; padding: 22px 14px 18px;
      color: #fff; background: linear-gradient(180deg, #06264b, #051e3a);
      display: flex; flex-direction: column;
    }
    .sidebar .brand { padding: 0 4px 22px; }
    .sidebar .brand-name { color: #fff; font-size: 20px; }
    .sidebar small { color: rgba(255,255,255,.56); }
    .nav { display: grid; gap: 5px; }
    .nav-btn {
      width: 100%; height: 46px; display: flex; align-items: center; gap: 12px;
      padding: 0 13px; border: 0; border-radius: 9px;
      color: rgba(255,255,255,.78); background: transparent; text-align: left;
      font-size: 13px; font-weight: 550;
    }
    .nav-btn .material-symbols-rounded {
      width: 22px;
      min-width: 22px;
      height: 22px;
      display: inline-grid;
      place-items: center;
      flex-shrink: 0;
      overflow: hidden;
      color: inherit;
    }
    .nav-btn > span:not(.material-symbols-rounded) {
      flex: 1;
      min-width: 0;
      text-align: left;
      line-height: 1.25;
    }
    .nav-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
    .nav-btn.active { color: #fff; background: var(--green); }
    .nav-badge {
      margin-left: auto;
      min-width: 22px;
      height: 22px;
      display: grid;
      place-items: center;
      flex-shrink: 0;
      border-radius: 999px;
      background: #fff;
      color: var(--green-dark);
      font-size: 11px;
      font-weight: 700;
    }
    .sidebar-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
    .location-note { display: flex; gap: 10px; align-items: flex-start; padding: 4px 10px 16px; font-size: 12px; color: rgba(255,255,255,.72); }
    .location-note .material-symbols-rounded { flex-shrink: 0; margin-top: 1px; }
    .location-note strong { display: block; margin-bottom: 4px; color: #26d773; }
    .location-note span { display: block; color: rgba(255,255,255,.72); }

    .main { min-width: 0; }
    .topbar {
      min-height: 76px; padding: 13px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
      border-bottom: 1px solid var(--line); background: #fff;
    }
    .topbar > div:first-child { min-width: 0; }
    .topbar h1 { margin: 0 0 5px; font-size: 25px; letter-spacing: -.04em; line-height: 1.2; }
    .topbar p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
    .top-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
    .compact-field { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
    .compact-field label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
    .compact-field select {
      height: 42px; min-width: 170px; padding: 0 12px; border: 1px solid #ccd6e2; border-radius: 8px; background: #fff; color: var(--ink);
    }
    .datetime-display {
      display: flex; align-items: center; gap: 8px; padding: 0 4px;
      font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; user-select: none;
    }
    .datetime-display .material-symbols-rounded { font-size: 18px; color: var(--muted); }
    .connection-status {
      display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px;
      border: 1px solid var(--line); border-radius: 999px; background: #fafbfc;
      font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap;
    }
    .connection-dot {
      width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex-shrink: 0;
    }
    .connection-status.is-offline .connection-dot { background: #d97706; }
    .connection-status.is-syncing .connection-dot { background: #2563eb; animation: pulse-dot 1.2s ease-in-out infinite; }
    .connection-sync-status { color: var(--green-dark); font-weight: 600; font-size: 11px; }
    .connection-sync-status.is-syncing { color: #2563eb; }
    .connection-sync-btn {
      border: 1px solid #ccd6e2; border-radius: 7px; background: #fff;
      color: var(--green-dark); font-size: 11px; font-weight: 600; padding: 4px 8px; cursor: pointer;
    }
    .offline-banner {
      display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px;
      padding: 12px 16px; border-radius: 10px; border: 1px solid #f0d7a6; background: #fff8e8; color: #7a4d00;
      font-size: 13px;
    }
    .offline-banner strong { display: block; margin-bottom: 2px; }
    .offline-banner .material-symbols-rounded { font-size: 22px; margin-top: 2px; }
    @keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
    .user-menu {
      display: flex; align-items: center; gap: 9px; margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--line);
    }
    .avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 12px; font-weight: 700; }
    .user-menu strong { display: block; font-size: 12px; }
    .user-menu span { color: var(--muted); font-size: 10px; }
    .signout {
      display: inline-flex; align-items: center; gap: 6px; border: 0; color: var(--muted);
      background: transparent; cursor: pointer; padding: 6px 8px; border-radius: 8px; font-size: 11px; font-weight: 600;
    }
    .signout:hover { color: var(--ink); background: #eef2f6; }
    .nav-btn-logout { margin-top: 8px; color: rgba(255,255,255,.72); }
    .nav-btn-logout:hover, .nav-btn-logout.active { color: #fff; background: rgba(255,255,255,.1); }

    .content { padding: 22px 24px 28px; }
    .metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
    .metric-card {
      min-height: 140px; padding: 20px; display: grid; grid-template-columns: 56px 1fr; gap: 15px; align-items: center;
      border: 1px solid var(--line); border-radius: 11px; background: #fff;
    }
    .metric-card > div:last-child { min-width: 0; }
    .metric-title { font-size: 12px; font-weight: 650; line-height: 1.3; }
    .metric-value-row {
      margin-top: 8px;
      display: flex;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 6px;
      min-width: 0;
    }
    .metric-currency { color: var(--muted); font-size: 12px; font-weight: 600; }
    .metric-value { font-size: 26px; line-height: 1.1; font-weight: 750; color: var(--green-dark); letter-spacing: -.03em; font-variant-numeric: tabular-nums lining-nums; }
    .metric-value.warn { color: #cf650f; }
    .metric-value.danger { color: var(--red); }
    .metric-meta { margin-top: 10px; color: var(--muted); font-size: 10px; }
    .metric-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); flex-shrink: 0; }
    .metric-icon.warn { color: var(--orange); background: var(--orange-soft); }
    .metric-icon.danger { color: var(--red); background: var(--red-soft); }

    .dashboard-grid { margin-top: 16px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 16px; }
    .panel { min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; overflow: hidden; }
    .panel-head { min-height: 52px; padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1f5; }
    .panel-title { font-size: 13px; font-weight: 700; }
    .panel-title small { color: var(--muted); font-weight: 500; }
    .text-btn { border: 0; color: var(--green-dark); background: transparent; font-size: 11px; font-weight: 600; }
    .chart-box { height: 245px; padding: 16px 18px 12px; }
    .location-layout { height: 245px; padding: 14px 20px; display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 24px; }
    .donut-wrap { position: relative; width: 170px; height: 170px; margin: auto; }
    .donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
    .donut-center small { color: var(--muted); font-size: 10px; }
    .donut-center strong { margin-top: 4px; font-size: 20px; }
    .legend { display: grid; gap: 14px; align-content: center; }
    .legend-row {
      display: grid;
      grid-template-columns: 10px minmax(0, 1fr);
      gap: 6px 9px;
      align-items: start;
      font-size: 11px;
      line-height: 1.35;
    }
    .legend-row .legend-dot { margin-top: 4px; }
    .legend-row .legend-copy { min-width: 0; display: grid; gap: 2px; }
    .legend-row .legend-copy span { color: var(--ink); font-weight: 600; }
    .legend-row .legend-copy strong {
      font-size: 11px;
      font-weight: 700;
      text-align: left;
      font-variant-numeric: tabular-nums lining-nums;
      color: var(--muted);
      white-space: normal;
      word-break: break-word;
    }

    .table-panel { margin-top: 16px; }
    .table-wrap { overflow-x: auto; }
    table { width: 100%; border-collapse: collapse; font-size: 12px; }
    th { padding: 11px 15px; text-align: left; vertical-align: middle; color: var(--muted); background: #f8fafc; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
    td { padding: 11px 15px; border-top: 1px solid #edf1f5; vertical-align: middle; }
    th.num, td.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
    td.text-wrap, th.text-wrap { white-space: normal; }
    td .status { vertical-align: middle; }
    .status { display: inline-flex; padding: 5px 8px; border-radius: 6px; font-size: 9px; font-weight: 600; }
    .status.low { color: #c95700; background: var(--orange-soft); }
    .status.expiring { color: #9c6b00; background: #fff5ce; }
    .status.cash { color: #167040; background: var(--green-soft); }
    .status.mobile { color: #1558a6; background: var(--blue-soft); }
    .panel-link { padding: 12px 16px; border-top: 1px solid #edf1f5; color: var(--green-dark); font-size: 10px; font-weight: 600; }
    .loading { min-height: 240px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
    .module-page { display: none; }
    .module-page.active { display: block; }
    .module-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
    .module-head > div:first-child { min-width: 0; }
    .module-head h2 { margin: 0 0 5px; font-size: 22px; letter-spacing: -.035em; line-height: 1.2; }
    .module-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
    .module-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; flex-shrink: 0; }
    .inventory-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
    .summary-card { padding: 15px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; }
    .summary-card span { display: block; color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
    .summary-card strong { display: block; margin-top: 7px; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
    .inventory-tools { display: grid; grid-template-columns: minmax(240px,1fr) 180px 180px auto; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
    .inventory-tools .primary-btn, .inventory-tools .secondary-btn { align-self: center; }
    .inventory-pagination {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: 12px 14px; border-top: 1px solid var(--line); background: #fafbfc;
    }
    .inventory-page-info { color: var(--muted); font-size: 12px; }
    .inventory-page-actions { display: flex; gap: 8px; }
    .btn-sm { min-height: 34px; padding: 0 12px; font-size: 12px; }
    .product-conversion-note { margin-top: -4px; color: var(--muted); font-size: 11px; }
    .tool-input { height: 42px; padding: 0 12px; border: 1px solid #ccd6e2; border-radius: 8px; background: #fff; color: var(--ink); outline: none; }
    .tool-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(7,169,79,.1); }
    .inventory-table td { padding-top: 12px; padding-bottom: 12px; }
    .product-name { font-weight: 650; }
    .product-meta { margin-top: 3px; color: var(--muted); font-size: 9px; }
    .table-actions { display: flex; gap: 6px; }
    .mini-btn { min-height: 30px; padding: 0 9px; border: 1px solid #ccd6e2; border-radius: 7px; color: var(--ink); background: #fff; font-size: 9px; font-weight: 600; }
    .mini-btn:hover { border-color: var(--green); color: var(--green-dark); }
    .mini-btn-danger { color: #a51f1f; border-color: #e8b4b4; }
    .mini-btn-danger:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
    .status.stock { color: #167040; background: var(--green-soft); }
    .status.out { color: #a51f1f; background: var(--red-soft); }
    .status.expired { color: #fff; background: var(--red); }
    .empty-state { padding: 38px; text-align: center; color: var(--muted); }
    .modal-note { margin: -5px 0 16px; color: var(--muted); font-size: 11px; }
    .module-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
    .module-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
    .module-tools .tool-input { min-width: 170px; }
    .module-tools .grow { flex: 1 1 260px; }
    .report-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; margin-top: 16px; }
    .report-chart { height: 310px; padding: 18px; }
    .breakdown-list { padding: 8px 18px 18px; display: grid; gap: 12px; }
    .legend-dot { width: 10px; height: 10px; border-radius: 50%; }
    .breakdown-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid #edf1f5; font-size: 12px; line-height: 1.4; }
    .breakdown-row strong { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
    .breakdown-row:last-child { border-bottom: 0; }
    .staff-card { display: flex; align-items: center; gap: 11px; }
    .staff-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); font-size: 10px; font-weight: 700; }
    .status.active { color: #167040; background: var(--green-soft); }
    .status.inactive { color: #a51f1f; background: var(--red-soft); }
    .notification-list { display: grid; gap: 10px; }
    .notification-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 13px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
    .notification-card.unread { border-left: 4px solid var(--green); }
    .notification-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; color: #1558a6; background: var(--blue-soft); }
    .notification-icon.warning { color: #c95700; background: var(--orange-soft); }
    .notification-icon.danger { color: #a51f1f; background: var(--red-soft); }
    .notification-card h3 { margin: 1px 0 5px; font-size: 13px; }
    .notification-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
    .settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
    .settings-section { padding: 20px; }
    .settings-section h3 { margin: 0 0 5px; font-size: 15px; }
    .settings-section > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
    .support-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
    .support-contact { padding: 20px; }
    .support-contact-row { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
    .support-contact-row:first-of-type { border-top: 0; }
    .support-contact-row strong { display: block; font-size: 11px; }
    .support-contact-row span { color: var(--muted); font-size: 10px; }
    .ticket-message { max-width: 300px; white-space: normal; line-height: 1.45; }
    .receipt-modal { width: min(430px,100%); }
    .receipt-paper { width: 100%; padding: 26px; color: #111; background: #fff; font-family: Arial, sans-serif; }
    .receipt-head { text-align: center; border-bottom: 1px dashed #777; padding-bottom: 16px; }
    .receipt-logo { display: block; max-width: 120px; max-height: 64px; margin: 0 auto 10px; object-fit: contain; }
    .receipt-head h2 { margin: 0 0 6px; font-size: 20px; }
    .receipt-head p { margin: 3px 0; font-size: 11px; }
    .receipt-meta { padding: 14px 0; display: grid; gap: 5px; border-bottom: 1px dashed #777; font-size: 11px; }
    .receipt-meta div { display: flex; justify-content: space-between; gap: 12px; }
    .receipt-items { padding: 10px 0; border-bottom: 1px dashed #777; }
    .receipt-item { display: grid; grid-template-columns: 1fr 42px 82px; gap: 8px; padding: 6px 0; font-size: 11px; }
    .receipt-total { padding: 14px 0; display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; }
    .receipt-footer { padding-top: 10px; text-align: center; font-size: 10px; line-height: 1.5; }

    /* Sale modal */
    .overlay { position: fixed; inset: 0; z-index: 1000; display: none; place-items: center; padding: 24px; background: rgba(3,21,42,.54); }
    .overlay.open { display: grid; }
    .subscription-renewal-modal .modal-body p { margin: 0 0 12px; line-height: 1.55; color: var(--ink); }
    .subscription-renewal-modal .modal-body p:first-child { font-size: 15px; font-weight: 600; }
    .modal { width: min(760px,100%); max-height: 92vh; overflow: auto; border-radius: 16px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.2); }
    .modal-head { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
    .modal-head h2 { margin: 0; font-size: 18px; }
    .icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; color: var(--muted); background: #f1f4f7; }
    .modal-body { padding: 22px; }
    .sale-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .sale-form-grid .wide { grid-column: 1/-1; }
    .product-picker { display: grid; grid-template-columns: 1fr 90px auto; gap: 10px; }
    .product-picker-search { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 10px; }
    .secondary-btn {
      display: inline-flex; align-items: center; justify-content: center; gap: 6px;
      min-height: 44px; padding: 0 14px; border: 1px solid var(--green); border-radius: 9px;
      color: var(--green-dark); background: #fff; font-weight: 600; white-space: nowrap;
    }
    .upload-panel { display: grid; gap: 12px; margin: 16px 0; padding: 16px; border: 1px dashed #cfd8e3; border-radius: 12px; background: #f8fafc; }
    .upload-panel input[type=file] { font-size: 13px; }
    .upload-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
    .upload-file-name { font-size: 13px; color: var(--muted); }
    .upload-preview { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #eef6ff; color: #1e3a5f; font-size: 13px; line-height: 1.5; }
    .upload-preview.error { background: #fef2f2; color: #991b1b; }
    .cart { margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
    .cart-row {
      display: grid; grid-template-columns: minmax(0,1fr) 72px 110px 36px; gap: 12px; align-items: center;
      padding: 12px 14px; border-top: 1px solid var(--line); font-size: 12px;
    }
    .cart-row strong { line-height: 1.35; white-space: normal; word-break: break-word; }
    .cart-row span:last-of-type { text-align: right; font-variant-numeric: tabular-nums lining-nums; font-weight: 600; }
    .cart-row input { width: 100%; height: 36px; padding: 0 8px; border: 1px solid #ccd6e2; border-radius: 7px; text-align: center; }
    .cart-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 12px; }
    .cart-row:first-child { border-top: 0; }
    .cart-total { margin-top: 17px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 18px; font-weight: 750; }
    .cart-total span:last-child { font-variant-numeric: tabular-nums lining-nums; color: var(--green-dark); }
    .modal-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }
    .toast { position: fixed; right: 24px; bottom: 24px; z-index: 1200; padding: 12px 16px; border-radius: 9px; color: #fff; background: var(--navy); opacity: 0; transform: translateY(20px); transition: .2s; font-size: 12px; }
    .toast.show { opacity: 1; transform: none; }

    @media (max-width: 1100px) {
      .app-shell { grid-template-columns: 78px minmax(0,1fr); }
      .sidebar .brand-name, .sidebar small, .nav-btn span:not(.material-symbols-rounded), .location-note div, .sidebar-bottom .nav-btn span:not(.material-symbols-rounded) { display: none; }
      .sidebar .brand { justify-content: center; }
      .nav-btn { justify-content: center; padding: 0; }
      .metrics { grid-template-columns: repeat(2,1fr); }
      .inventory-summary { grid-template-columns: repeat(3,1fr); }
      .module-summary { grid-template-columns: repeat(2,1fr); }
      .topbar { align-items: flex-start; }
      .top-actions { flex-wrap: wrap; justify-content: flex-end; }
    }
    @media (max-width: 760px) {
      .app-shell { display: block; }
      .app-shell.visible { display: block; }
      .sidebar { position: static; width: 100%; height: auto; padding: 12px; }
      .sidebar .brand, .sidebar-bottom { display: none; }
      .nav { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; }
      .nav-btn { width: auto; min-width: max-content; padding: 0 13px; }
      .nav-btn span:not(.material-symbols-rounded) { display: inline; }
      .topbar { padding: 18px; display: block; }
      .top-actions { margin-top: 16px; justify-content: flex-start; }
      .compact-field, .datetime-display { display: none; }
      .user-menu .signout-label { display: none; }
      .content { padding: 14px; }
      .metrics, .dashboard-grid { grid-template-columns: 1fr; }
      .inventory-summary { grid-template-columns: repeat(2,1fr); }
      .module-summary, .report-grid { grid-template-columns: 1fr; }
      .settings-grid, .support-layout { grid-template-columns: 1fr; }
      .inventory-tools { grid-template-columns: 1fr; }
      .module-head { display: block; }
      .module-actions { margin-top: 14px; }
      .location-layout { grid-template-columns: 1fr; height: auto; }
      .sale-form-grid { grid-template-columns: 1fr; }
      .product-picker { grid-template-columns: 1fr 70px; }
      .product-picker .secondary-btn, .product-picker-search { grid-column: 1/-1; }
    }