/* ---------- GLOBAL DARK + SHINY MIX ---------- */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    }

    body {
      background: #0a0c10;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
      padding: 24px;
      background-image: radial-gradient(circle at 20% 30%, rgba(30, 40, 70, 0.3) 0%, transparent 40%),
                        radial-gradient(circle at 90% 80%, rgba(70, 30, 90, 0.25) 0%, transparent 45%);
    }

    /* ================= LAYOUT: SIDEBAR + MAIN ================= */
    .app-shell {
      display: flex;
      max-width: 100%;
      width: 100%;
      gap: 20px;
      align-items: stretch;
    }

    /* ---------- SIDEBAR (Afrinex store nav) ---------- */
    .sidebar {
      width: 240px;
      flex-shrink: 0;
      background: #0f1219;
      background: linear-gradient(160deg, #0b0f16 0%, #12161f 100%);
      border-radius: 28px;
      padding: 24px 16px 18px;
      border: 1px solid rgba(255, 255, 255, 0.06);
      box-shadow: 0 25px 50px -8px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03) inset,
                  0 0 30px rgba(0, 180, 255, 0.06), 0 0 20px rgba(180, 0, 255, 0.04);
      display: flex;
      flex-direction: column;
      min-height: 640px;
    }

    .sidebar .brand {
      font-size: 1.45rem;
      font-weight: 900;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      background: linear-gradient(135deg, #ffd966, #ffb347, #ff8c42, #ffb347, #ffd966);
      background-size: 200% 200%;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      filter: drop-shadow(0 0 10px rgba(255, 170, 0, 0.6));
      animation: brandShimmer 4s ease-in-out infinite;
      padding: 0 6px;
    }

    @keyframes brandShimmer {
      0%   { background-position: 0% 50%; }
      50%  { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    .sidebar .brand-sub {
      font-size: 0.7rem;
      letter-spacing: 5px;
      text-transform: uppercase;
      color: #8fa6c2;
      margin: 2px 0 18px 6px;
      font-weight: 300;
      text-shadow: 0 0 10px rgba(0, 150, 255, 0.4);
    }

    .nav {
      display: flex;
      flex-direction: column;
      gap: 3px;
      flex: 1;
      overflow-y: auto;
      padding-right: 4px;
    }

    .nav::-webkit-scrollbar { width: 5px; }
    .nav::-webkit-scrollbar-track { background: transparent; }
    .nav::-webkit-scrollbar-thumb {
      background: #243b55;
      border-radius: 10px;
    }

    .nav button {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      text-align: left;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 12px;
      padding: 9px 12px;
      color: #a9bfd8;
      font-size: 0.78rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s ease;
      letter-spacing: 0.2px;
      font-family: inherit;
    }

    .nav button i {
      width: 16px;
      font-size: 0.8rem;
      color: #5f82ab;
      transition: 0.15s;
      text-align: center;
    }

    .nav button:hover {
      background: #121c29;
      border-color: #1f3147;
      color: #e4edfd;
      box-shadow: 0 0 12px rgba(0, 150, 255, 0.08);
    }

    .nav button:hover i {
      color: #7ab0ff;
    }

    .nav button.on {
      background: #16243a;
      border-color: #2f5580;
      color: #ffffff;
      box-shadow: 0 0 15px rgba(0, 140, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .nav button.on i {
      color: #7ab0ff;
      filter: drop-shadow(0 0 5px #3f7eff);
    }

    .nav .nav-sep {
      height: 1px;
      margin: 8px 6px;
      background: linear-gradient(90deg, transparent, #1e3147, transparent);
    }

    .side-foot {
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px solid #1a2538;
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding-left: 4px;
      padding-right: 4px;
    }

    .side-foot .who {
      font-size: 0.7rem;
      color: #8fa6c2;
      letter-spacing: 0.2px;
    }

    .side-foot .who span {
      display: block;
      color: #c2d6ef;
      font-weight: 600;
      font-size: 0.74rem;
    }

    .btn-logout {
      background: #11161f;
      border: 1px solid #3a2430;
      color: #ff9aa8;
      padding: 8px 14px;
      border-radius: 40px;
      font-weight: 600;
      font-size: 0.7rem;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      cursor: pointer;
      transition: 0.15s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      box-shadow: 0 0 10px rgba(255, 50, 90, 0.08);
    }

    .btn-logout:hover {
      background: #241018;
      border-color: #7a2f44;
      box-shadow: 0 0 18px rgba(255, 50, 90, 0.25);
      color: #ffd0d8;
    }

    .btn-logout i { color: #ff6a88; font-size: 0.75rem; }

    /* ---------- MAIN PANEL ---------- */
    .backoffice {
      flex: 1;
      min-width: 0;
      background: #0f1219;
      background: linear-gradient(145deg, #0d1017 0%, #12161f 100%);
      border-radius: 32px;
      box-shadow: 0 25px 50px -8px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03) inset,
                  0 0 30px rgba(0, 180, 255, 0.08), 0 0 20px rgba(180, 0, 255, 0.05);
      padding: 26px 28px 30px;
      border: 1px solid rgba(255, 255, 255, 0.06);
      backdrop-filter: blur(2px);
    }

    /* ==================================================================
       ARTISTIC AFRINEX HEADING — MOTION + TOUCH/HOVER COLOR SHIFT
       ================================================================== */
    .afrinex-heading {
      margin-bottom: 16px;
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      animation: headingFloat 6s ease-in-out infinite;
    }

    @keyframes headingFloat {
      0%   { transform: translateY(0px); }
      50%  { transform: translateY(-3px); }
      100% { transform: translateY(0px); }
    }

    .afrinex-heading .main-title {
      font-size: 1.6rem;
      font-weight: 800;
      letter-spacing: 1px;
      line-height: 1.2;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      gap: 0 5px;
      text-transform: uppercase;
      background: linear-gradient(135deg, #ffffff 0%, #ffe99a 15%, #b8d0ff 35%, #d9b0ff 55%, #7aa9ff 75%, #ffffff 100%);
      background-size: 300% 300%;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      text-shadow: 0 0 20px rgba(120, 180, 255, 0.6), 0 0 40px rgba(180, 100, 255, 0.3);
      filter: drop-shadow(0 0 8px #3f7eff) drop-shadow(0 0 15px #a040ff);
      position: relative;
      cursor: default;
      user-select: none;
      animation: gradientShift 8s ease infinite, titlePulse 3s ease-in-out infinite;
      transition: filter 0.3s ease, text-shadow 0.3s ease;
    }

    @keyframes gradientShift {
      0%   { background-position: 0% 50%; }
      50%  { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    @keyframes titlePulse {
      0%   { filter: drop-shadow(0 0 8px #3f7eff) drop-shadow(0 0 15px #a040ff); }
      50%  { filter: drop-shadow(0 0 16px #3f7eff) drop-shadow(0 0 30px #a040ff); }
      100% { filter: drop-shadow(0 0 8px #3f7eff) drop-shadow(0 0 15px #a040ff); }
    }

    .afrinex-heading .main-title:hover,
    .afrinex-heading .main-title:active,
    .afrinex-heading .main-title.touched {
      animation: gradientShift 2s ease infinite, titlePulseFast 0.8s ease-in-out infinite, titleBounce 0.5s ease;
      filter: drop-shadow(0 0 20px #ffaa00) drop-shadow(0 0 40px #ff3355) drop-shadow(0 0 60px #7aa9ff);
      text-shadow: 0 0 40px #ffaa00, 0 0 80px #ff3355, 0 0 120px #7aa9ff;
    }

    @keyframes titlePulseFast {
      0%   { filter: drop-shadow(0 0 18px #ffaa00) drop-shadow(0 0 35px #ff3355); }
      50%  { filter: drop-shadow(0 0 30px #ffaa00) drop-shadow(0 0 55px #ff3355); }
      100% { filter: drop-shadow(0 0 18px #ffaa00) drop-shadow(0 0 35px #ff3355); }
    }

    @keyframes titleBounce {
      0%   { transform: scale(1); }
      30%  { transform: scale(1.04); }
      60%  { transform: scale(0.98); }
      100% { transform: scale(1); }
    }

    .afrinex-heading .main-title i {
      background: none;
      -webkit-text-fill-color: #ffe484;
      font-size: 1.35rem;
      filter: drop-shadow(0 0 10px #ffb347) drop-shadow(0 0 20px #ffaa00);
      margin: 0 2px;
      transition: transform 0.25s ease, filter 0.25s ease;
      animation: iconWiggle 4s ease-in-out infinite;
    }

    @keyframes iconWiggle {
      0%, 100% { transform: rotate(0deg) scale(1); }
      25%      { transform: rotate(6deg) scale(1.06); }
      75%      { transform: rotate(-6deg) scale(1.06); }
    }

    .afrinex-heading .main-title i:hover {
      animation: iconWiggle 0.6s ease infinite;
      filter: drop-shadow(0 0 20px #ffaa00) drop-shadow(0 0 40px #ff3355);
    }

    .afrinex-heading .main-title .afrinex-word {
      background: linear-gradient(135deg, #ffd966, #ffb347, #ff8c42, #ffb347, #ffd966);
      background-size: 200% 200%;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      text-shadow: 0 0 25px #ffaa00, 0 0 50px #ff6600;
      filter: drop-shadow(0 0 8px #ffaa00);
      font-weight: 900;
      letter-spacing: 1.5px;
      transition: all 0.25s ease;
      animation: wordShimmer 3s ease-in-out infinite;
    }

    @keyframes wordShimmer {
      0%   { background-position: 0% 50%; }
      50%  { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    .afrinex-heading .main-title .sales-word {
      background: linear-gradient(135deg, #7aa9ff, #b47aff, #7aa9ff);
      background-size: 200% 200%;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      text-shadow: 0 0 25px #3f7eff, 0 0 50px #a040ff;
      filter: drop-shadow(0 0 8px #3f7eff);
      font-weight: 800;
      transition: all 0.25s ease;
      animation: wordShimmer 3.5s ease-in-out infinite;
    }

    .afrinex-heading .main-title .stock-word {
      background: linear-gradient(135deg, #6effc0, #3fd0a0, #6effc0);
      background-size: 200% 200%;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      text-shadow: 0 0 25px #00ffa0, 0 0 50px #00cc88;
      filter: drop-shadow(0 0 8px #00ffa0);
      font-weight: 800;
      transition: all 0.25s ease;
      animation: wordShimmer 4s ease-in-out infinite;
    }

    .afrinex-heading .main-title .management-word {
      background: linear-gradient(135deg, #ffb347, #ffd966, #ffb347);
      background-size: 200% 200%;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      text-shadow: 0 0 25px #ffaa00, 0 0 50px #ff8800;
      filter: drop-shadow(0 0 8px #ffaa00);
      font-weight: 800;
      transition: all 0.25s ease;
      animation: wordShimmer 2.8s ease-in-out infinite;
    }

    .afrinex-heading .main-title .system-word {
      background: linear-gradient(135deg, #ff8c9f, #ff6a88, #ff8c9f);
      background-size: 200% 200%;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      text-shadow: 0 0 25px #ff3355, 0 0 50px #cc0033;
      filter: drop-shadow(0 0 8px #ff3355);
      font-weight: 800;
      transition: all 0.25s ease;
      animation: wordShimmer 3.2s ease-in-out infinite;
    }

    .afrinex-heading .main-title .afrinex-word:hover,
    .afrinex-heading .main-title .sales-word:hover,
    .afrinex-heading .main-title .stock-word:hover,
    .afrinex-heading .main-title .management-word:hover,
    .afrinex-heading .main-title .system-word:hover {
      transform: scale(1.08) translateY(-2px);
      filter: drop-shadow(0 0 20px #ffffff) drop-shadow(0 0 40px #ffaa00);
      text-shadow: 0 0 40px #ffffff, 0 0 80px #ffaa00;
    }

    .afrinex-heading::after {
      content: '';
      display: block;
      width: 48%;
      max-width: 380px;
      height: 1.5px;
      margin-top: 6px;
      background: linear-gradient(90deg, transparent, #7aa9ff, #ffb347, #b47aff, #ffb347, #7aa9ff, transparent);
      background-size: 200% 100%;
      border-radius: 4px;
      box-shadow: 0 0 14px #7aa9ff, 0 0 28px #b47aff, 0 0 42px #ffb347;
      filter: blur(0.3px);
      animation: underlineSweep 3s linear infinite, underlinePulse 2s ease-in-out infinite;
      transition: box-shadow 0.3s ease, height 0.3s ease;
    }

    @keyframes underlineSweep {
      0%   { background-position: 0% 0%; }
      100% { background-position: 200% 0%; }
    }

    @keyframes underlinePulse {
      0%, 100% { opacity: 0.7; }
      50%      { opacity: 1; }
    }

    .afrinex-heading:hover::after {
      height: 2.5px;
      box-shadow: 0 0 25px #ffaa00, 0 0 50px #ff3355, 0 0 75px #7aa9ff;
      animation: underlineSweep 1s linear infinite, underlinePulseFast 0.6s ease-in-out infinite;
    }

    @keyframes underlinePulseFast {
      0%, 100% { opacity: 1; }
      50%      { opacity: 0.5; }
    }

    .afrinex-heading .sub-tagline {
      font-size: 0.65rem;
      letter-spacing: 4.5px;
      text-transform: uppercase;
      color: #c0d4f0;
      margin-top: 5px;
      font-weight: 300;
      text-shadow: 0 0 12px rgba(0, 180, 255, 0.5), 0 0 24px rgba(180, 0, 255, 0.25);
      word-spacing: 2px;
      transition: all 0.3s ease;
      animation: taglineGlow 4s ease-in-out infinite;
    }

    @keyframes taglineGlow {
      0%, 100% { color: #c0d4f0; text-shadow: 0 0 12px rgba(0,180,255,0.5), 0 0 24px rgba(180,0,255,0.25); }
      50%      { color: #ffe99a; text-shadow: 0 0 20px rgba(255,180,0,0.8), 0 0 40px rgba(255,80,0,0.4); }
    }

    .afrinex-heading .sub-tagline:hover {
      color: #ffd966;
      text-shadow: 0 0 20px #ffaa00, 0 0 40px #ff6600;
      letter-spacing: 5.5px;
      animation: none;
    }

    /* ---------- TOP BAR: BRAND + QR EXIT ---------- */
    .top-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
      flex-wrap: wrap;
      gap: 16px;
    }

    .logo-area h1 {
      font-size: 1.7rem;
      font-weight: 600;
      letter-spacing: -0.5px;
      background: linear-gradient(135deg, #ffffff, #b0d0ff, #d9b0ff);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      text-shadow: 0 0 20px rgba(120, 180, 255, 0.5);
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .logo-area h1 i {
      background: none;
      -webkit-text-fill-color: #7aa9ff;
      font-size: 1.6rem;
      filter: drop-shadow(0 0 8px #3f7eff);
    }

    .logo-area .sub {
      font-size: 0.78rem;
      color: #8b9bb8;
      letter-spacing: 1px;
      margin-top: 4px;
      text-shadow: 0 0 6px rgba(0, 200, 255, 0.3);
      font-weight: 300;
    }

    .qr-exit-box {
      display: flex;
      align-items: center;
      gap: 18px;
      background: #080b10;
      padding: 9px 18px 9px 20px;
      border-radius: 60px;
      border: 1px solid #2c3f5a;
      box-shadow: 0 0 15px rgba(0, 180, 255, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.05);
      backdrop-filter: blur(4px);
    }

    .qr-exit-box i {
      font-size: 1.6rem;
      color: #6ea8ff;
      text-shadow: 0 0 12px #2f6eff;
    }

    .qr-exit-box .qr-label {
      font-weight: 600;
      color: #eef5ff;
      font-size: 0.85rem;
      line-height: 1.3;
      text-shadow: 0 0 5px rgba(100, 180, 255, 0.4);
    }

    .qr-exit-box .qr-label small {
      display: block;
      font-weight: 300;
      font-size: 0.68rem;
      color: #93aac9;
      letter-spacing: 0.4px;
    }

    .btn-exit {
      background: #11161f;
      border: 1px solid #2e4b73;
      color: #dbebff;
      padding: 9px 20px;
      border-radius: 40px;
      font-weight: 600;
      font-size: 0.76rem;
      display: flex;
      align-items: center;
      gap: 9px;
      cursor: pointer;
      transition: all 0.2s;
      box-shadow: 0 0 10px rgba(0, 140, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08);
      letter-spacing: 0.3px;
      text-transform: uppercase;
      font-family: inherit;
    }

    .btn-exit:hover {
      background: #1a2538;
      border-color: #4d7dbf;
      box-shadow: 0 0 20px rgba(0, 180, 255, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.1);
      color: #ffffff;
    }

    .btn-exit i { font-size: 0.95rem; color: #7ab0ff; }

    /* ---------- MAIN GRID ---------- */
    .panel-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 18px;
      margin-bottom: 20px;
    }

    .card {
      background: #0c1017;
      background: linear-gradient(145deg, #0b0f16, #111722);
      border-radius: 22px;
      padding: 18px 16px;
      border: 1px solid #1e2a3a;
      box-shadow: 0 15px 25px -10px #000000, 0 0 0 1px rgba(255, 255, 255, 0.02) inset,
                  0 0 15px rgba(0, 120, 255, 0.08);
      transition: transform 0.1s, box-shadow 0.2s;
      display: flex;
      flex-direction: column;
    }

    .card:hover {
      border-color: #2b3f5c;
      box-shadow: 0 20px 30px -10px #000000, 0 0 25px rgba(0, 150, 255, 0.15),
                  0 0 12px rgba(180, 0, 255, 0.1);
    }

    .card-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 14px;
      padding-bottom: 10px;
      border-bottom: 1px solid #1c2636;
    }

    .card-header i {
      font-size: 1.4rem;
      background: linear-gradient(135deg, #7aa9ff, #b47aff);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      filter: drop-shadow(0 0 6px #3f7eff);
      width: 26px;
      text-align: center;
    }

    .card-header h2 {
      font-size: 1.05rem;
      font-weight: 600;
      letter-spacing: 0.2px;
      background: linear-gradient(to right, #ffffff, #b8d0ff);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    .card-header .badge {
      margin-left: auto;
      background: #1b2330;
      color: #afcbff;
      font-size: 0.62rem;
      padding: 4px 9px;
      border-radius: 40px;
      font-weight: 600;
      border: 1px solid #2d405e;
      box-shadow: 0 0 8px rgba(0, 150, 255, 0.2);
      letter-spacing: 0.4px;
      text-transform: uppercase;
      white-space: nowrap;
    }

    /* ---------- TABLES ---------- */
    .inv-table, .order-table, .dispatch-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.76rem;
    }

    .inv-table th, .order-table th, .dispatch-table th {
      text-align: left;
      color: #859eb8;
      font-weight: 500;
      font-size: 0.66rem;
      letter-spacing: 0.5px;
      padding-bottom: 6px;
      border-bottom: 1px solid #1d293b;
      text-transform: uppercase;
    }

    .inv-table td, .order-table td, .dispatch-table td {
      padding: 7px 0;
      border-bottom: 1px solid #151f2c;
      color: #d3e2f5;
      font-weight: 400;
    }

    .inv-table td:last-child, .inv-table th:last-child,
    .order-table td:last-child, .order-table th:last-child {
      text-align: right;
    }

    .stock-level { font-weight: 600; }

    .stock-low {
      color: #ff8181;
      background: rgba(255, 60, 60, 0.12);
      padding: 2px 8px;
      border-radius: 30px;
      font-size: 0.68rem;
      font-weight: 600;
      border: 1px solid rgba(255, 80, 80, 0.3);
      box-shadow: 0 0 8px rgba(255, 0, 0, 0.2);
    }

    .stock-ok {
      color: #7bffb0;
      background: rgba(0, 255, 120, 0.08);
      padding: 2px 8px;
      border-radius: 30px;
      font-size: 0.68rem;
      font-weight: 600;
      border: 1px solid rgba(0, 255, 150, 0.25);
      box-shadow: 0 0 8px rgba(0, 255, 130, 0.15);
    }

    .status-badge {
      padding: 3px 9px;
      border-radius: 40px;
      font-size: 0.65rem;
      font-weight: 600;
      letter-spacing: 0.3px;
      text-transform: uppercase;
      border: 1px solid;
      white-space: nowrap;
    }

    .status-pending {
      background: rgba(255, 170, 0, 0.08);
      color: #ffc061;
      border-color: #6b4d1a;
      box-shadow: 0 0 8px rgba(255, 170, 0, 0.15);
    }

    .status-dispatched {
      background: rgba(0, 140, 255, 0.08);
      color: #7ab0ff;
      border-color: #1e3b66;
      box-shadow: 0 0 8px rgba(0, 140, 255, 0.2);
    }

    .status-pod {
      background: rgba(0, 255, 180, 0.06);
      color: #6effc0;
      border-color: #1b5a44;
      box-shadow: 0 0 8px rgba(0, 255, 180, 0.15);
    }

    /* ---------- FILTER BAR ---------- */
    .filter-bar {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
      flex-wrap: wrap;
    }

    .filter-chip {
      background: #111a26;
      border: 1px solid #243b55;
      color: #b6d0f0;
      font-size: 0.68rem;
      padding: 4px 12px;
      border-radius: 30px;
      display: flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      transition: 0.1s;
      font-weight: 500;
      letter-spacing: 0.2px;
      box-shadow: 0 0 6px rgba(0, 120, 255, 0.05);
      font-family: inherit;
    }

    .filter-chip i { color: #6f9fff; font-size: 0.68rem; }

    .filter-chip.active {
      background: #1a2b41;
      border-color: #3b6ea3;
      box-shadow: 0 0 12px rgba(0, 150, 255, 0.3);
      color: #ffffff;
    }

    .filter-chip:hover {
      border-color: #4b7bb5;
      background: #141f2e;
    }

    /* ---------- SUPPLIER LIST ---------- */
    .supplier-list {
      list-style: none;
      font-size: 0.78rem;
    }

    .supplier-list li {
      display: flex;
      justify-content: space-between;
      padding: 7px 0;
      border-bottom: 1px solid #172230;
      align-items: center;
    }

    .supplier-list li:last-child { border-bottom: none; }

    .supplier-name { font-weight: 600; color: #e0ecff; }

    .supplier-contact {
      font-size: 0.66rem;
      color: #8fa6c2;
      margin-left: 4px;
    }

    .supplier-tag {
      background: #16212e;
      border-radius: 40px;
      padding: 3px 9px;
      font-size: 0.6rem;
      font-weight: 600;
      color: #b6d0f0;
      border: 1px solid #273f56;
      box-shadow: 0 0 6px rgba(0, 150, 255, 0.1);
      letter-spacing: 0.3px;
      white-space: nowrap;
    }

    /* ---------- FORMS ---------- */
    .form-row {
      display: flex;
      flex-direction: column;
      margin-bottom: 10px;
    }

    .form-row label {
      font-size: 0.66rem;
      font-weight: 500;
      color: #97b1cc;
      margin-bottom: 5px;
      letter-spacing: 0.4px;
      text-transform: uppercase;
    }

    .form-row input,
    .form-row select {
      padding: 8px 12px;
      border: 1px solid #253d57;
      border-radius: 12px;
      font-size: 0.78rem;
      background: #0b111a;
      color: #e4edfd;
      outline: none;
      transition: 0.15s;
      box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 120, 255, 0.05);
      font-family: inherit;
    }

    .form-row input:focus,
    .form-row select:focus {
      border-color: #3f7eff;
      box-shadow: 0 0 16px rgba(0, 140, 255, 0.3), inset 0 1px 4px #000;
      background: #0e1622;
    }

    .btn-delivery, .btn-pod {
      background: #121e2e;
      border: 1px solid #2f5580;
      color: #dbebff;
      padding: 9px 12px;
      border-radius: 40px;
      font-weight: 600;
      font-size: 0.72rem;
      width: 100%;
      margin-top: 4px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: 0.15s;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      box-shadow: 0 0 15px rgba(0, 120, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
      font-family: inherit;
    }

    .btn-delivery:hover, .btn-pod:hover {
      background: #1a2c40;
      border-color: #4b7bb5;
      box-shadow: 0 0 25px rgba(0, 180, 255, 0.3);
      color: white;
    }

    .btn-delivery i, .btn-pod i { color: #7ab0ff; }

    /* ---------- SECOND ROW ---------- */
    .row2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
      margin-top: 4px;
    }

    /* ---------- BOTTOM BAR ---------- */
    .bottom-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 20px;
      padding-top: 16px;
      border-top: 1px solid #1a2538;
      font-size: 0.75rem;
      color: #889bb3;
      flex-wrap: wrap;
      gap: 14px;
    }

    .qr-mini {
      display: flex;
      align-items: center;
      gap: 12px;
      background: #0a0f16;
      padding: 6px 16px 6px 14px;
      border-radius: 40px;
      border: 1px solid #253b55;
      box-shadow: 0 0 15px rgba(0, 150, 255, 0.1);
    }

    .qr-mini i {
      font-size: 1.3rem;
      color: #6ea8ff;
      text-shadow: 0 0 12px #2f6eff;
    }

    .btn-qr-scan {
      background: transparent;
      border: 1px solid #2f5580;
      padding: 6px 18px;
      border-radius: 40px;
      font-size: 0.68rem;
      font-weight: 600;
      color: #c2d9ff;
      cursor: pointer;
      transition: 0.15s;
      text-transform: uppercase;
      letter-spacing: 0.4px;
      box-shadow: 0 0 10px rgba(0, 150, 255, 0.1);
      font-family: inherit;
    }

    .btn-qr-scan:hover {
      background: #142235;
      border-color: #4b8bdd;
      box-shadow: 0 0 20px rgba(0, 180, 255, 0.3);
      color: white;
    }

    .report-badge {
      display: flex;
      align-items: center;
      gap: 10px;
      background: #0c1119;
      border: 1px solid #1f3147;
      padding: 7px 16px;
      border-radius: 40px;
      box-shadow: 0 0 15px rgba(100, 0, 255, 0.1);
    }

    .report-badge i {
      color: #b47aff;
      filter: drop-shadow(0 0 8px #a040ff);
    }

    .pod-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.76rem;
      padding: 6px 0;
      border-bottom: 1px solid #172230;
      color: #c2d6ef;
    }

    .pod-row:last-child { border-bottom: none; }

    .tiny-note {
      font-size: 0.66rem;
      color: #6d86a3;
      margin-top: 10px;
      letter-spacing: 0.2px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* ---------- RESPONSIVE ---------- */
    @media (max-width: 1280px) {
      .panel-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 1024px) {
      .app-shell { flex-direction: column; }
      .sidebar {
        width: 100%;
        min-height: auto;
      }
      .nav {
        flex-direction: row;
        flex-wrap: wrap;
        overflow: visible;
      }
      .nav button { width: auto; flex: 1 1 auto; justify-content: center; }
      .nav .nav-sep { display: none; }
      .side-foot { flex-direction: row; align-items: center; justify-content: space-between; }
    }

    @media (max-width: 720px) {
      body { padding: 12px; }
      .panel-grid { grid-template-columns: 1fr; gap: 14px; }
      .row2 { grid-template-columns: 1fr; }
      .top-bar { flex-direction: column; align-items: stretch; }
      .qr-exit-box { justify-content: space-between; }
      .afrinex-heading .main-title { font-size: 1.15rem; letter-spacing: 0.6px; }
      .afrinex-heading .main-title i { font-size: 1rem; }
      .afrinex-heading .sub-tagline { font-size: 0.55rem; letter-spacing: 2px; }
      .backoffice { padding: 18px 16px 22px; }
    }

    .inv-table tr:hover td,
    .order-table tr:hover td,
    .dispatch-table tr:hover td {
      background: rgba(50, 120, 255, 0.03);
      transition: 0.1s;
    }

    .shine-divider {
      width: 100%;
      height: 1px;
      background: linear-gradient(90deg, transparent, #7aa9ff40, #ffb34760, #b47aff60, #ffb34760, #7aa9ff40, transparent);
      margin: 6px 0 10px;
      filter: blur(0.3px);
    }

    @media (prefers-reduced-motion: reduce) {
      .afrinex-heading,
      .afrinex-heading .main-title,
      .afrinex-heading .main-title i,
      .afrinex-heading .main-title span,
      .afrinex-heading::after,
      .afrinex-heading .sub-tagline,
      .sidebar .brand {
        animation: none !important;
        transition: none !important;
      }
    }

/* Live app: sample look wins over the older sheet */
body.signed, body.gate {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 24px;
  background: #0a0c10;
  background-image: radial-gradient(circle at 20% 30%, rgba(30, 40, 70, 0.3) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(70, 30, 90, 0.25) 0%, transparent 45%);
  color: #d5e4f7;
}
body.gate .hero { display: none; }
body.signed main, body.gate main { background: transparent; padding: 0; color: inherit; }
body.signed h1 { margin: 0 0 8px; padding: 0; background: none; color: inherit; font-size: inherit; }
#side.sidebar { display: flex; }
#side[hidden] { display: none !important; }
#nav { display: flex; flex-direction: column; gap: 3px; }
#nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px 12px;
  color: #a9bfd8;
  font-size: 0.78rem;
  font-weight: 500;
}
#nav button i { width: 16px; font-size: 0.8rem; color: #5f82ab; text-align: center; }
#nav button:hover { background: #121c29; border-color: #1f3147; color: #e4edfd; }
#nav button:hover i { color: #7ab0ff; }
#nav button.on { background: #16243a; border-color: #2f5580; color: #ffffff; }
#nav button.on i { color: #7ab0ff; }
#logout.btn-logout {
  background: transparent;
  border: 1px solid #2f5580;
  color: #c2d9ff;
  padding: 6px 18px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(0, 150, 255, 0.1);
}
#who { color: #8fa6c2; font-size: 0.7rem; }
#who span { display: block; color: #c2d6ef; font-weight: 600; font-size: 0.74rem; }
.logo-area h1 { margin: 0; padding: 0; background: none; }
body.signed .inv-table th, body.signed .order-table th, body.signed .dispatch-table th {
  background: transparent; color: #859eb8; font-weight: 500; font-size: 0.66rem;
}
body.signed .inv-table td, body.signed .order-table td, body.signed .dispatch-table td {
  background: transparent; color: #d3e2f5;
}
#labelSheet .qr-label { width: 42mm; display: flex; flex-direction: column; }
.qr-exit-box .qr-label {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: block;
  text-align: left;
  box-shadow: none;
}
@media (min-width: 781px) {
  .app-shell { flex-direction: row; }
  .sidebar { width: 240px; min-height: 640px; }
  #nav { flex-direction: column; }
  #nav button { width: 100%; flex: none; justify-content: flex-start; }
  .side-foot { flex-direction: column; align-items: stretch; }
}
.backoffice { position: relative; }
#side.sidebar { position: relative; padding-top: 48px; }
#afrinexLangBar { position: absolute; top: 8px; left: 12px; right: auto; margin: 0; z-index: 30; }
#afrinexLangBtn {
  background: #11161f;
  color: #ffd966;
  border: 1px solid #2e4b73;
  border-radius: 40px;
  padding: 6px 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: 12px;
}
#afrinexLangMenu {
  margin-top: 6px;
  background: #12161f;
  border: 1px solid #2e4b73;
  border-radius: 12px;
  min-width: 160px;
  overflow: hidden;
}
#afrinexLangMenu[hidden] { display: none !important; }
#afrinexLangMenu button {
  display: block;
  width: 100%;
  text-align: left;
  background: #12161f;
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
  color: #d5e4f7;
  border-radius: 0;
}
#afrinexLangMenu button:hover, #afrinexLangMenu button.on { background: #16243a; color: #ffd966; }
body.signed .panel, body.signed .stat, body.signed .fact, body.gate .door, body.signed .art-login, body.gate .art-login {
  background: #12161f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d5e4f7;
  border-radius: 22px;
}
body.gate .door b, body.signed .panel h2, body.signed .stat b { color: #f3f7ff; }
body.gate .door span, body.signed label, body.signed .muted, body.signed .lead { color: #8fa6c2; }
body.gate .door:hover { border-color: #4b7bb5; box-shadow: 0 0 25px rgba(0, 180, 255, 0.25); }
body.signed input, body.signed select, body.signed textarea, body.gate input, body.gate select, body.gate textarea {
  background: #0d121a;
  color: #e8f1ff;
  border: 1px solid #24344a;
}
body.signed th { background: #16243a; color: #9ec0e8; }
body.signed td { background: #10151d; border-color: #24344a; color: #d5e4f7; }
body.signed .inv-table th, body.signed .order-table th, body.signed .dispatch-table th,
body.signed .inv-table td, body.signed .order-table td, body.signed .dispatch-table td {
  background: transparent;
}

/* Color balance: gold is the brand, blue is the action, green amber and red are status only */
body.signed, body.gate {
  background: #07090d;
  background-image: radial-gradient(circle at 18% 20%, rgba(36, 58, 96, 0.35) 0%, transparent 42%),
    radial-gradient(circle at 88% 80%, rgba(72, 48, 16, 0.18) 0%, transparent 46%);
  color: #e7eef8;
}
.sidebar {
  background: linear-gradient(160deg, #0b0f16 0%, #12161f 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.backoffice {
  background: linear-gradient(145deg, #0d1017 0%, #12161f 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.card {
  background: linear-gradient(145deg, #0b0f16, #111722);
  border: 1px solid #1e2a3a;
}
.card:hover { border-color: #2b3f5c; }
.card-header { border-bottom: 1px solid #1c2636; }
.card-header i {
  background: none;
  -webkit-text-fill-color: #9ec0ff;
  color: #9ec0ff;
  filter: drop-shadow(0 0 6px rgba(90, 150, 255, 0.45));
}
.card-header h2 {
  background: none;
  -webkit-text-fill-color: #f7f9fc;
  color: #f7f9fc;
}
.card-header .badge {
  background: #1b2330;
  color: #afcbff;
  border: 1px solid #2d405e;
}
#nav button { color: #d5e2f4; border: 1px solid transparent; }
#nav button i { color: #9eb6d4; }
#nav button:hover { color: #ffffff; background: #121c29; border-color: #1f3147; }
#nav button:hover i { color: #b9d2ff; }
#nav button.on {
  background: #16243a;
  border: 1px solid #2f5580;
  color: #ffffff;
}
#nav button.on i { color: #d6e6ff; }
.sidebar .brand-sub, #who, .supplier-contact, .bottom-bar, .tiny-note, .logo-area .sub {
  color: #c5d4e8;
}
.inv-table th, .order-table th, .dispatch-table th,
body.signed .inv-table th, body.signed .order-table th, body.signed .dispatch-table th {
  color: #d0deef;
  font-weight: 650;
}
.inv-table td, .order-table td, .dispatch-table td,
body.signed .inv-table td, body.signed .order-table td, body.signed .dispatch-table td {
  color: #f2f6fc;
}
.stock-low { color: #ffd0d0; background: rgba(180, 40, 40, 0.28); border-color: #c45a5a; }
.stock-ok { color: #d8ffee; background: rgba(16, 120, 78, 0.28); border-color: #3d9a72; }
.status-pending { color: #ffe1a8; background: rgba(160, 100, 16, 0.28); border-color: #c4923a; }
.status-dispatched { color: #d6e6ff; background: rgba(30, 80, 160, 0.32); border-color: #6a96d4; }
.status-pod { color: #d8ffee; background: rgba(16, 120, 78, 0.28); border-color: #3d9a72; }
.filter-chip {
  color: #b6d0f0;
  background: #111a26;
  border: 1px solid #243b55;
  box-shadow: 0 0 6px rgba(0, 120, 255, 0.05);
}
.filter-chip i { color: #6f9fff; }
.filter-chip.active {
  color: #ffffff;
  background: #1a2b41;
  border: 1px solid #3b6ea3;
  box-shadow: 0 0 12px rgba(0, 150, 255, 0.3);
}
.filter-chip.active i { color: #6f9fff; }
.qr-exit-box,
.btn-exit,
.btn-qr-scan,
.btn-pod,
.btn-delivery {
  border-width: 1px;
  border-style: solid;
}
.qr-exit-box { border-color: #2c3f5a; }
.btn-exit, .btn-qr-scan { border-color: #2e4b73; }
.btn-pod, .btn-delivery { border-color: #2f5580; }
#app h1 {
  color: #f7f9fc;
  -webkit-text-fill-color: #f7f9fc;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 4px 0 12px;
  background: none;
}
body.signed table th {
  background: #1a3354;
  color: #f7f9fc;
  border-color: #34506e;
}
body.signed table td {
  background: #121a28;
  color: #f2f6fc;
  border-color: #2a3d56;
}
body.signed table.sheet th,
body.signed table.sheet.inventory th,
body.signed table.sheet.supplier th {
  background: #1a3354;
  color: #ffe7a3;
}
body.signed table.sheet td,
body.signed table.sheet.supplier td {
  background: #121a28;
  color: #f2f6fc;
}
body.signed .pill {
  display: inline;
  background: none;
  color: #d7e6f8;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
body.signed #app button,
body.gate #app button:not(.door),
body.signed .sheet-tools button {
  background: transparent;
  border: 1px solid #2f5580;
  padding: 6px 18px;
  border-radius: 40px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #c2d9ff;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: 0 0 10px rgba(0, 150, 255, 0.1);
}
body.signed #app button:hover,
body.gate #app button:not(.door):hover,
body.signed .sheet-tools button:hover,
#logout.btn-logout:hover {
  background: #142235;
  border-color: #4b8bdd;
  box-shadow: 0 0 20px rgba(0, 180, 255, 0.3);
  color: #ffffff;
}
body.signed #app button.primary,
body.signed #app button.warn,
body.signed .warn,
body.signed #app button.ok,
body.signed .ok,
body.signed #app button.bad,
body.signed .bad {
  background: transparent;
  color: #c2d9ff;
  border-color: #2f5580;
}
body.signed #app button.filter-chip,
body.signed #app .card-header button.badge {
  text-transform: none;
  letter-spacing: 0.2px;
  font-weight: 500;
  box-shadow: none;
}
body.signed #app button.filter-chip {
  padding: 4px 12px;
  background: #111a26;
  border-color: #243b55;
  color: #b6d0f0;
}
body.signed #app button.filter-chip.active {
  background: #1a2b41;
  border-color: #3b6ea3;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 150, 255, 0.3);
}
body.signed #app .card-header button.badge {
  padding: 2px 8px;
  border-radius: 20px;
  background: #1b2330;
  color: #afcbff;
  border: 1px solid #2d405e;
  font-size: 0.62rem;
}

.logo-area h1 {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  background: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(120, 180, 255, 0.5);
  filter: none;
}
.logo-area h1 .brand-name { display: inline-flex; align-items: baseline; gap: 0; }
.logo-area h1 button,
.logo-area .sub button {
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.logo-area .sub button {
  background: none;
  color: inherit;
}
.logo-area h1 button {
  font-size: 1.7rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ffffff, #b0d0ff, #d9b0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.logo-area h1 button.core {
  background: none;
  font-weight: 300;
  color: #88aaff;
  -webkit-text-fill-color: #88aaff;
}
.logo-area h1 button:hover,
.logo-area h1 button:focus-visible {
  text-decoration: underline;
}
.logo-area .sub button:hover,
.logo-area .sub button:focus-visible {
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  text-decoration: underline;
}
.logo-area .sub button.on {
  color: #7CFFB2;
  -webkit-text-fill-color: #7CFFB2;
  text-decoration: underline;
}
.logo-area .sub button.is-disabled,
.logo-area .sub button:disabled {
  opacity: 0.45;
  cursor: default;
  text-decoration: none;
  pointer-events: none;
}
body.signed, body.gate {
  display: block !important;
  width: 100%;
  max-width: 100%;
  padding: 24px;
  box-sizing: border-box;
  grid-template-columns: none;
}
.app-shell,
body.signed .app-shell,
body.gate .app-shell {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  align-items: stretch;
}
.backoffice {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
}
body.gate .doors {
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  max-width: 500px;
  margin: 18px auto 0;
  padding: 0;
}
body.gate .door,
body.gate #app .door {
  width: 100%;
  padding: 6px 12px;
  border-radius: 40px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: #11161f;
  border: 1px solid #2e4b73;
  color: #8ec5ff;
  box-shadow: 0 0 10px rgba(0, 140, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
body.gate .door b { font-size: 0.72rem; font-weight: 600; white-space: nowrap; color: #8ec5ff; }
body.gate .shop-link a { color: #8ec5ff; font-weight: 400; }
body.gate .art-login {
  max-width: 420px;
  margin: 16px auto;
  padding: 18px 20px;
}
body.gate .art-login button {
  width: auto;
  padding: 8px 18px;
  font-size: 14px;
  margin-top: 8px;
}
body.gate #app h2 { font-size: 1.15rem; margin: 0 0 10px; }
body.gate .art-login input {
  padding: 8px 10px;
  font-size: 14px;
}
body.signed, body.gate { font-size: 13px; }
#app h1 {
  font-size: 1rem;
  margin: 0 0 8px;
  position: static;
}
body.signed .panel h2,
body.signed h2,
.sheet-title {
  font-size: 0.92rem;
  color: #f7f9fc;
}
body.signed .panel { padding: 8px 10px; }
#nav button { font-size: 0.72rem; padding: 6px 8px; }
.backoffice { padding: 14px 16px 16px; }
body.signed .rule-note,
body.signed .lead,
body.signed .muted {
  color: #d7e4f6;
  font-size: 13px;
  line-height: 1.45;
}
body.signed input[type="file"] {
  color: #f7f9fc;
  background: #1a2740;
  border: 1px solid #8eb6ff;
  border-radius: 999px;
  padding: 6px 10px;
  width: auto;
  max-width: 100%;
}
body.signed input[type="file"]::-webkit-file-upload-button,
body.signed input[type="file"]::file-selector-button {
  border-radius: 40px;
  border: 1px solid #2f5580;
  background: transparent;
  color: #c2d9ff;
  padding: 6px 18px;
  margin-right: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: 0 0 10px rgba(0, 150, 255, 0.1);
}
body.signed .sheet-wrap,
body.signed .sheet-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  resize: none;
}
body.signed td button {
  box-shadow: none;
}
body.signed .sheet-scroll table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
}
body.signed .sheet-scroll th,
body.signed .sheet-scroll td {
  white-space: nowrap;
  padding: 4px 8px;
  line-height: 1.2;
  vertical-align: middle;
}
body.signed td.actions {
  display: table-cell;
  white-space: nowrap;
}
body.signed td.actions button {
  display: inline-block;
  width: auto;
  margin: 0 4px 0 0;
  padding: 3px 10px;
  vertical-align: middle;
}
body.signed table.sheet,
body.signed table.sheet.supplier,
body.signed table.sheet.inventory {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}
body.signed table.sheet.cash-sheet {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 12px;
}
body.signed table.sheet.cash-sheet th,
body.signed table.sheet.cash-sheet td {
  white-space: nowrap;
  word-break: normal;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.2;
  color: #6effcc;
}
body.signed table.sheet.cash-sheet td.cash-account {
  min-width: 8.5rem;
  position: relative;
  z-index: 5;
  background: #121a28;
}
body.signed table.sheet.cash-sheet td.cash-ref-cell,
body.signed table.sheet.cash-sheet td.cash-slip-cell {
  width: 7.5rem;
  min-width: 7.5rem;
  max-width: 8.5rem;
  white-space: normal;
  vertical-align: middle;
  overflow: hidden;
}
body.signed .cash-pay {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 3px;
  width: 7.2rem;
  max-width: 7.2rem;
  margin: 0;
  white-space: normal;
}
body.signed .cash-pay input,
body.signed table.sheet.cash-sheet td.cash-ref-cell input.cash-ref,
body.signed .cash-pay select.cash-menu {
  width: 7.2rem;
  max-width: 7.2rem;
  box-sizing: border-box;
  margin: 0;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  color: #e8f1ff;
  -webkit-text-fill-color: #e8f1ff;
  background: #0d121a;
  border: 1px solid #6ea8ff;
  font-size: 12px;
}
body.signed .cash-file-name {
  display: block;
  max-width: 7.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #ffd966;
}
body.signed label.cash-slip-label {
  position: relative;
  display: block;
  height: 22px;
  overflow: hidden;
  border: 1px solid #6ea8ff;
  color: #e8f1ff;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
}
body.signed label.cash-slip-label input.cash-slip {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
body.signed p.cash-chapa-line { margin: 0 0 8px; }
body.signed .cash-pay button,
body.signed a.cash-chapa {
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  z-index: 2;
  white-space: nowrap;
}
body.signed a.cash-chapa,
body.signed a.cash-chapa:visited {
  color: #b47aff !important;
  -webkit-text-fill-color: #b47aff !important;
  text-decoration: underline;
  font-weight: 650;
}
body.signed .cash-panel { margin-bottom: 14px; }
body.signed .cash-panel h2,
body.signed p.cash-bank {
  color: #6ea8ff !important;
  -webkit-text-fill-color: #6ea8ff !important;
}
body.signed .cash-panel h2 { font-size: 15px; margin: 0 0 4px; }
body.signed .cash-bank { margin: 0 0 6px; font-size: 12px; }
body.signed .cash-pay-live { color: #ffd966; font-size: 12px; }
body.signed table.sheet th,
body.signed table.sheet.supplier th,
body.signed table.sheet.inventory th {
  white-space: nowrap;
  background: #1a3354;
  color: #f7f9fc;
  padding: 8px 10px;
  border: 1px solid #4d6e96;
  font-weight: 650;
  line-height: 1.3;
}
body.signed table.sheet td,
body.signed table.sheet.supplier td,
body.signed table.sheet.inventory td {
  white-space: nowrap;
  background: #121a28;
  color: #f2f6fc;
  padding: 7px 10px;
  border: 1px solid #2e4664;
  line-height: 1.35;
}
.qr-exit-box .qr-label { color: #f4f8ff; }
.qr-exit-box .qr-label small { color: #c5d4e8; }
.supplier-name { color: #f4f8ff; }
.supplier-tag { color: #e7eef8; border-color: #4d6e96; }
.btn-exit, .btn-qr-scan, .btn-pod, .btn-delivery { color: #f4f8ff; }
#logout.btn-logout { color: #c2d9ff; border-color: #2f5580; background: transparent; }
body.signed input:-webkit-autofill,
body.signed input:-webkit-autofill:hover,
body.signed input:-webkit-autofill:focus,
body.gate input:-webkit-autofill,
body.gate input:-webkit-autofill:hover,
body.gate input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e8f1ff;
  caret-color: #e8f1ff;
  box-shadow: 0 0 0 1000px #0d121a inset;
  transition: background-color 9999s ease-out;
}
.gate-pair {
  max-width: 760px;
  margin: 12px auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
body.gate .gate-pair .gate-card {
  margin: 0;
  max-width: none;
  width: 100%;
}
body.gate .gate-card {
  font-family: "Inter", "Segoe UI", sans-serif;
  font-weight: 300;
  color: #8ec5ff;
  background: #0c121b;
  border: 1px solid #2f5580;
  border-radius: 22px;
  box-shadow: 0 0 18px rgba(0, 150, 255, 0.12);
  max-width: 760px;
  margin: 12px auto;
  padding: 18px 20px;
}
body.gate .gate-card h2,
body.gate .gate-card label,
body.gate .gate-card .rule-note,
body.gate .gate-card p,
body.gate .gate-card .pick-list label {
  font-family: "Inter", "Segoe UI", sans-serif;
  font-weight: 300;
  color: #8ec5ff;
}
body.gate .gate-card h2 { font-weight: 400; color: #8ec5ff; }
body.gate .gate-card input,
body.gate .gate-card select,
body.gate .gate-card option {
  font-family: "Inter", "Segoe UI", sans-serif;
  font-weight: 300;
  color: #8ec5ff;
  background: #0a0f16;
  border: 1px solid #2f5580;
  border-radius: 40px;
}
.backoffice,
.qr-exit-box {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.card {
  box-shadow: none;
  min-width: 0;
  transition: none;
  contain: layout paint;
}
.card:hover {
  box-shadow: none;
  transform: none;
}
.card-header i {
  filter: none;
}
body.signed .inv-table,
body.signed .order-table,
body.signed .dispatch-table {
  table-layout: fixed;
}
body.signed .inv-table td,
body.signed .order-table td,
body.signed .dispatch-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar .brand {
  animation: none !important;
  filter: none !important;
  text-shadow: none !important;
}
.afrinex-heading .main-title { font-size: 1.28rem; }
.afrinex-heading .main-title i { font-size: 1.08rem; }
.afrinex-heading .sub-tagline { font-size: 0.52rem; }
#nav button[hidden] { display: none !important; }
body.signed a.doc-code,
body.signed a.doc-code:visited {
  color: #8ec5ff;
  font-weight: 650;
}
body.signed th,
body.signed table th,
body.signed .inv-table th,
body.signed .order-table th,
body.signed .dispatch-table th,
body.signed table.sheet th,
body.signed table.sheet.supplier th,
body.signed table.sheet.inventory th {
  color: #f5ffeb;
}
body.signed table.sheet.cash-sheet th {
  color: #ffaa00;
}
body.signed table.sheet.cash-sheet td,
body.signed table.sheet.cash-sheet td strong {
  color: #6effcc;
}
body.signed table.sheet.cash-sheet td.cash-slip-cell a,
body.signed table.sheet.cash-sheet td.cash-slip-cell a:link,
body.signed table.sheet.cash-sheet td.cash-slip-cell a:visited,
body.signed table.sheet.cash-sheet td.cash-slip-cell a:hover,
body.signed table.sheet.cash-sheet td.cash-slip-cell a:focus,
body.signed a.cash-slip-open,
body.signed a.cash-slip-open:link,
body.signed a.cash-slip-open:visited,
body.signed a.cash-slip-open:hover,
body.signed a.cash-slip-open:focus {
  color: #b47aff !important;
  -webkit-text-fill-color: #b47aff !important;
}
#scanBox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
}
#scanBox[hidden] { display: none !important; }
#scanBox .scan-card {
  width: min(420px, 100%);
  background: #0c121b;
  color: #d5e4f7;
  border: 1px solid #2f5580;
  border-radius: 18px;
  padding: 14px;
}
#scanBox video {
  width: 100%;
  max-height: 60vh;
  background: #000;
  border-radius: 12px;
}
#scanBox button { margin-top: 10px; }
@media (max-width: 780px) {
  body.signed,
  body.gate {
    padding: 8px;
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }
  .app-shell,
  body.signed .app-shell,
  body.gate .app-shell {
    flex-direction: column;
    gap: 10px;
  }
  #side.sidebar {
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 46px 10px 10px;
    border-radius: 18px;
  }
  #nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }
  #nav button {
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
    white-space: nowrap;
    padding: 8px 12px;
  }
  #nav .nav-sep { display: none; }
  .side-foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
  }
  #who { max-width: 58%; overflow: hidden; }
  .backoffice {
    width: 100%;
    min-width: 0;
    padding: 14px 10px 16px;
    border-radius: 18px;
  }
  .top-bar,
  .bottom-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .qr-exit-box,
  .qr-mini,
  .report-badge {
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    border-radius: 18px;
  }
  .logo-area .sub {
    letter-spacing: 1px;
    line-height: 1.45;
  }
  .panel-grid,
  .row2,
  .grid2,
  .form-grid,
  .entry-form .form-grid,
  .stock-edit .form-grid,
  .gate-card .form-grid,
  .photo-card,
  .photo-card .mini,
  body.gate .doors,
  .doors {
    grid-template-columns: 1fr;
  }
  body.gate .door b { white-space: normal; }
  .gate-card,
  .art-login,
  body.gate .art-login,
  body.gate .gate-card {
    width: 100%;
    max-width: 100%;
  }
  body.signed input,
  body.signed select,
  body.signed textarea,
  body.gate input,
  body.gate select,
  body.gate textarea {
    font-size: 16px;
    max-width: 100%;
  }
  .sheet-scroll,
  .sheet-wrap,
  .pass-scroll {
    width: 100%;
    max-width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .afrinex-heading {
    width: 100%;
    max-width: 100%;
    padding: 0 4px;
    box-sizing: border-box;
  }
  .afrinex-heading .main-title {
    font-size: 0.92rem;
    letter-spacing: 0.4px;
    line-height: 1.35;
    max-width: 100%;
  }
  .afrinex-heading .main-title i,
  .afrinex-heading .main-title i.fa-crown {
    font-size: 0.8rem !important;
  }
  .afrinex-heading .main-title .afrinex-word {
    letter-spacing: 0.6px;
  }
  .afrinex-heading .sub-tagline {
    font-size: 0.44rem;
    letter-spacing: 1.2px;
    word-spacing: 1px;
    line-height: 1.55;
    max-width: 100%;
  }
  .afrinex-heading::after {
    width: 72%;
    max-width: 100%;
  }
}
.desk-table { width: 100%; }
.desk-table th { color: #f5ffeb; white-space: nowrap; }
.desk-table .collect-tick { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; white-space: nowrap; }
.desk-tight td { padding: 4px 6px; font-size: 0.74rem; line-height: 1.35; }
.desk-inputs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
body.signed .desk-inputs input {
  width: 88px;
  height: 24px;
  margin: 0;
  padding: 0 6px;
  font-size: 12px;
  border-radius: 6px;
}
body.signed .desk-inputs input[placeholder="Delivery person"] { width: 128px; }
body.signed .desk-inputs input[placeholder="Email"] { width: 132px; }
body.signed .desk-inputs button {
  height: 24px;
  margin: 0;
  padding: 0 8px;
  font-size: 0.68rem;
  line-height: 22px;
}
@media (max-width: 780px) {
  body.signed .desk-inputs input,
  body.signed .desk-inputs input[placeholder="Email"] {
    font-size: 16px;
    height: 30px;
    width: calc(50% - 4px);
  }
}
.logo-area .sub button.link-blink,
.status-badge.link-blink {
  color: #04210f;
  -webkit-text-fill-color: #04210f;
  background: #7bffb0;
  border-radius: 4px;
  font-weight: 700;
  padding: 0 3px;
}
#nav button.link-blink {
  color: #04210f;
  -webkit-text-fill-color: #04210f;
  background: #7bffb0;
  border-color: #7bffb0;
  font-weight: 700;
}
#nav button.link-blink i { color: #04210f; }

body.signed table.tone-ecard th,
body.signed table.tone-ecard th select,
body.signed table.tone-ecard th option {
  color: #FF7A1A !important;
  -webkit-text-fill-color: #FF7A1A !important;
}
body.signed table.tone-ecard td,
body.signed table.tone-ecard td.muted,
body.signed table.tone-ecard td label,
body.signed table.tone-ecard td input,
body.signed table.tone-ecard td select,
body.signed table.tone-ecard td option {
  color: #D4F0A0 !important;
  -webkit-text-fill-color: #D4F0A0 !important;
}

body.signed table.tone-pay th,
body.signed table.desk-table.tone-pay th {
  color: #FFD23F !important;
  -webkit-text-fill-color: #FFD23F !important;
}
body.signed table.tone-pay td,
body.signed table.desk-table.tone-pay td,
body.signed table.tone-pay td.muted,
body.signed table.tone-pay td label,
body.signed table.tone-pay td input,
body.signed table.tone-pay td select,
body.signed table.tone-pay td option {
  color: #c7b9ff !important;
  -webkit-text-fill-color: #c7b9ff !important;
}
body.signed table.tone-pay td.gen-no,
body.signed table.tone-pay .gen-no {
  color: #f2f6fc !important;
  -webkit-text-fill-color: #f2f6fc !important;
}
body.signed table.tone-pay a.doc-code,
body.signed table.tone-pay a.doc-code:visited,
body.signed table.desk-table.tone-pay a.doc-code,
body.signed table.desk-table.tone-pay a.doc-code:visited {
  color: #8ec5ff !important;
  -webkit-text-fill-color: #8ec5ff !important;
}

body.signed table.tone-centers th {
  color: #FF1744 !important;
  -webkit-text-fill-color: #FF1744 !important;
}
body.signed table.tone-centers td,
body.signed table.tone-centers td.muted,
body.signed table.tone-centers td label,
body.signed table.tone-centers td input,
body.signed table.tone-centers td select,
body.signed table.tone-centers td option {
  color: #F7C5D0 !important;
  -webkit-text-fill-color: #F7C5D0 !important;
}

body.signed table.sheet.supplier.tone-suppliers th {
  color: #9EE6D4 !important;
  -webkit-text-fill-color: #9EE6D4 !important;
}
body.signed table.sheet.supplier.tone-suppliers td,
body.signed table.sheet.supplier.tone-suppliers td.muted,
body.signed table.sheet.supplier.tone-suppliers td label,
body.signed table.sheet.supplier.tone-suppliers td input,
body.signed table.sheet.supplier.tone-suppliers td select,
body.signed table.sheet.supplier.tone-suppliers td option {
  color: #FFB3A6 !important;
  -webkit-text-fill-color: #FFB3A6 !important;
}

body.signed table.tone-stock th,
body.signed table.sheet.inventory.tone-stock th {
  color: #FF6B35 !important;
  -webkit-text-fill-color: #FF6B35 !important;
}
body.signed table.tone-stock td,
body.signed table.sheet.inventory.tone-stock td,
body.signed table.tone-stock td.muted,
body.signed table.tone-stock td label,
body.signed table.tone-stock td input,
body.signed table.tone-stock td select,
body.signed table.tone-stock td option,
body.signed table.sheet.inventory.tone-stock td.muted,
body.signed table.sheet.inventory.tone-stock td label,
body.signed table.sheet.inventory.tone-stock td input,
body.signed table.sheet.inventory.tone-stock td select,
body.signed table.sheet.inventory.tone-stock td option {
  color: #9EE6D4 !important;
  -webkit-text-fill-color: #9EE6D4 !important;
}

body.signed table.tone-pass th,
body.signed table.tone-pass th select,
body.signed table.tone-pass th option {
  color: #FFBF00 !important;
  -webkit-text-fill-color: #FFBF00 !important;
}
body.signed table.tone-pass td,
body.signed table.tone-pass td.muted,
body.signed table.tone-pass td label,
body.signed table.tone-pass td input,
body.signed table.tone-pass td select,
body.signed table.tone-pass td option {
  color: #b3e0ff !important;
  -webkit-text-fill-color: #b3e0ff !important;
}

body.signed .supplier-recon-panel { margin: 14px 0 18px; }
body.signed .supplier-recon-title {
  background: #e8f5e9;
  color: #1a237e !important;
  -webkit-text-fill-color: #1a237e !important;
  font-weight: 700;
  text-align: center;
  padding: 4px;
  border: 1px solid #e0b000;
  font-size: 13px;
}
body.signed .supplier-recon-id {
  margin: 0;
  padding: 6px 8px;
  background: #fff;
  color: #1a237e !important;
  -webkit-text-fill-color: #1a237e !important;
  border: 1px solid #e0b000;
  border-top: 0;
  font-size: 13px;
}
body.signed .supplier-recon-id span {
  display: inline-block;
  min-width: 140px;
  border-bottom: 1px solid #1a237e;
  margin: 0 18px 0 6px;
  padding: 0 6px;
}
body.signed .sheet-wrap table.supplier-recon,
body.signed table.supplier-recon {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  background: #fff;
  font-size: 12px;
}
body.signed table.supplier-recon th,
body.signed table.supplier-recon td {
  border: 1px solid #e0b000 !important;
  padding: 3px 6px;
  text-align: center;
  background: #fff !important;
  color: #1a237e !important;
  -webkit-text-fill-color: #1a237e !important;
  white-space: nowrap;
  font-weight: 500;
}
body.signed table.supplier-recon th {
  background: #e8f5e9 !important;
  font-weight: 700;
}
body.signed table.supplier-recon tr.supplier-total td {
  font-weight: 700;
  background: #f7fbf7 !important;
}
body.signed .supplier-sales-inv {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
body.signed .supplier-sales-inv.muted {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  font-size: 11px;
  font-style: italic;
}
body.signed .supplier-sales-inv button.supplier-sales-inv-generate,
body.signed .supplier-sales-inv button.supplier-sales-inv-send {
  height: 26px;
  margin: 0;
  padding: 0 8px;
  font-size: 11px;
  line-height: 24px;
  border: 1px solid #163a5f;
  border-radius: 0;
  background: #163a5f !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  cursor: pointer;
  white-space: nowrap;
}
body.signed .supplier-sales-inv button.supplier-sales-inv-send {
  background: #0f766e !important;
  border-color: #0f766e;
}
body.signed .supplier-sales-inv .supplier-sales-inv-sent {
  color: #15803d !important;
  -webkit-text-fill-color: #15803d !important;
  font-size: 11px;
  font-weight: 700;
}
body.signed .supplier-sales-inv a.supplier-sales-inv-link {
  color: #1565c0 !important;
  -webkit-text-fill-color: #1565c0 !important;
  font-size: 11px;
  text-decoration: underline;
}
