/* Anaqat "Al Jouf Desert Night" cinematic theme — shared across every page. Screen only: printed documents keep their original look. */
@media screen {
  html:root {
    --bg: #051211;
    --card: rgba(10, 28, 27, .62);
    --card2: rgba(16, 38, 36, .66);
    --line: rgba(130, 210, 195, .16);
    --text: #eef7f4;
    --muted: #9dbbb4;
    --side: rgba(6, 20, 19, .72);
    --side2: rgba(8, 24, 23, .8);
    --navy: #071816;
    --navy2: #0c201e;
    --navy3: #12302c;
    --accent: #3ccfb4;
    --blue: #3ccfb4;
    --brand: #3ccfb4;
    --gold: #e8b96a;
    --gold2: #f3d39a;
    --green: #9ad872;
    --pos: #9ad872;
    --good: #9ad872;
    --red: #ff7a6b;
    --neg: #ff7a6b;
    --bad: #ff7a6b;
    --glow-blue: rgba(60, 207, 180, .35);
    --glow-amber: rgba(232, 185, 106, .35);
    color-scheme: dark;
  }

  html {
    background-color: var(--bg) !important;
  }
  html body {
    background: transparent !important;
    animation: none !important;
    -webkit-font-smoothing: antialiased;
  }

  /* Video-like scene: the photo sits on its own fixed layer so it can be moved like a camera */
  html::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
      url('/cinematic-bg-desert.jpg') center 60% / cover no-repeat;
    transform-origin: 60% 55%;
    will-change: transform;
    animation: cine-camera 48s ease-in-out infinite alternate;
  }
  @keyframes cine-camera {
    0%   { transform: scale(1.06) translate3d(0, 0, 0); }
    50%  { transform: scale(1.16) translate3d(-2.2%, -1.2%, 0); }
    100% { transform: scale(1.24) translate3d(1.8%, -2.4%, 0); }
  }

  /* Drifting sand / dust particles */
  html::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: .55;
    background-image:
      radial-gradient(1.6px 1.6px at 20px 30px, rgba(255, 228, 180, .9), transparent 60%),
      radial-gradient(1.2px 1.2px at 140px 90px, rgba(255, 236, 200, .8), transparent 60%),
      radial-gradient(2px 2px at 90px 170px, rgba(240, 200, 140, .7), transparent 60%),
      radial-gradient(1px 1px at 210px 220px, rgba(255, 255, 255, .7), transparent 60%),
      radial-gradient(1.4px 1.4px at 60px 250px, rgba(255, 220, 170, .75), transparent 60%);
    background-size: 260px 280px, 300px 260px, 340px 320px, 280px 300px, 360px 340px;
    will-change: background-position;
    animation: cine-dust 38s linear infinite;
  }
  @keyframes cine-dust {
    from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
    to   { background-position: -520px 140px, -600px 90px, -680px 200px, -560px 60px, -720px 170px; }
  }

  /* Cinematic grade + vignette over the moving scene, with a slow light sweep */
  html body::before {
    content: "" !important;
    display: block !important;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
      radial-gradient(40% 30% at var(--sweep-x, 20%) 15%, rgba(60, 207, 180, .16), transparent 70%),
      radial-gradient(35% 28% at 85% 70%, rgba(232, 185, 106, .14), transparent 70%),
      linear-gradient(180deg, rgba(5, 18, 17, .35) 0%, rgba(5, 18, 17, .15) 35%, rgba(5, 18, 17, .78) 100%),
      radial-gradient(130% 100% at 50% 30%, rgba(5, 18, 17, 0) 40%, rgba(4, 13, 12, .85) 100%);
    animation: cine-sweep 22s ease-in-out infinite alternate;
  }
  @property --sweep-x {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 20%;
  }
  @keyframes cine-sweep {
    from { --sweep-x: 12%; }
    to   { --sweep-x: 78%; }
  }

  /* Film grain */
  html body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: .05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    height: auto;
    box-shadow: none;
    background-color: transparent;
  }

  /* Glass surfaces */
  .card, .kpi, .panel, .stat, .side, .sidebar, .modal, .tmodal-box {
    backdrop-filter: blur(20px) saturate(1.35);
    -webkit-backdrop-filter: blur(20px) saturate(1.35);
  }
  .card, .kpi, .panel, .stat {
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 40%),
      var(--card) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 24px 50px -18px rgba(0, 0, 0, .6);
  }
  .card .head, .panel .head {
    background: linear-gradient(90deg, rgba(60, 207, 180, .1), rgba(255, 255, 255, .02)) !important;
    border-radius: 18px 18px 0 0 !important;
    border-color: var(--line) !important;
  }

  /* KPI cards: top light edge + gradient values */
  .kpi, .stat { position: relative; overflow: hidden; transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .3s; }
  .kpi::before, .stat::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: .7;
  }
  .kpi:nth-child(even)::before, .stat:nth-child(even)::before { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
  .kpi:hover, .stat:hover {
    transform: translateY(-4px);
    border-color: rgba(60, 207, 180, .4) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 28px 60px -20px var(--glow-blue);
  }
  .kpi:nth-child(even):hover, .stat:nth-child(even):hover {
    border-color: rgba(232, 185, 106, .4) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 28px 60px -20px var(--glow-amber);
  }
  .kpi .v, .kpi .val, .kpi .value, .stat .v, .stat .val, .stat .value {
    background: linear-gradient(180deg, #ffffff, #c4efe4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    letter-spacing: -.01em;
  }

  /* Sidebar */
  .side, .sidebar {
    background: linear-gradient(180deg, rgba(6, 20, 19, .82), rgba(6, 20, 19, .62)) !important;
    border-color: rgba(60, 207, 180, .14) !important;
    box-shadow: 0 0 60px -20px rgba(0, 0, 0, .7);
  }

  /* Navigation */
  .nav button, .snav, button.nav { transition: background .25s, color .25s; border-radius: 12px !important; }
  .nav button:hover, .snav:hover, button.nav:hover { background: rgba(60, 207, 180, .08) !important; color: var(--text) !important; }
  .nav button.active, .snav.active, button.nav.active {
    background: linear-gradient(270deg, rgba(60, 207, 180, .22), rgba(60, 207, 180, .02)) !important;
    color: #ffffff !important;
    box-shadow: inset -3px 0 0 var(--accent), 0 8px 24px -12px var(--glow-blue);
  }

  /* Icons */
  .ti { display: inline-flex; align-items: center; justify-content: center; width: 1.15em; height: 1.15em; vertical-align: -.18em; flex: none; }
  .ti svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .ti-dot { display: inline-block; width: .62em; height: .62em; border-radius: 50%; vertical-align: .05em; box-shadow: 0 0 10px currentColor; }
  .ti-dot.red { background: var(--red); color: var(--red); }
  .ti-dot.amber { background: var(--gold); color: var(--gold); }
  .ti-dot.green { background: var(--green); color: var(--green); }

  /* Navigation icon tiles */
  .nav > button { display: flex !important; align-items: center; gap: 12px; }
  .snav > span:has(> .ti), .nav > span:has(> .ti), .nav button > span:has(> .ti), .nav-ico {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 34px; height: 34px; border-radius: 11px; font-size: 17px;
    color: #9fe6d6;
    background: linear-gradient(145deg, rgba(60, 207, 180, .22), rgba(60, 207, 180, .04));
    border: 1px solid rgba(60, 207, 180, .22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 12px rgba(0, 0, 0, .3);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), background .3s, color .3s, border-color .3s, box-shadow .3s;
  }
  .snav > span:has(> .ti) .ti svg, .nav-ico .ti svg, .nav button > span:has(> .ti) .ti svg { stroke-width: 1.75; }
  .snav:hover > span:has(> .ti), .nav button:hover > span:has(> .ti), .nav button:hover > .nav-ico {
    transform: translateY(-1px) scale(1.07);
    color: #ffffff;
    border-color: rgba(60, 207, 180, .5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 6px 18px var(--glow-blue);
  }
  .snav.active > span:has(> .ti), .nav.active > span:has(> .ti), .nav button.active > span:has(> .ti), .nav button.active > .nav-ico {
    color: #ffffff;
    background: linear-gradient(145deg, #6fe0c8, #22a98f);
    border-color: transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 6px 22px var(--glow-blue);
  }

  /* KPI icon badges */
  .kpi-ico {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 13px; font-size: 18px; margin-bottom: 12px;
    color: #9fe6d6;
    background: linear-gradient(145deg, rgba(60, 207, 180, .28), rgba(60, 207, 180, .05));
    border: 1px solid rgba(60, 207, 180, .26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 24px -6px var(--glow-blue);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  }
  .kpi-ico .ti svg { stroke-width: 1.7; }
  .kpi:nth-child(even) .kpi-ico {
    color: var(--gold2);
    background: linear-gradient(145deg, rgba(232, 185, 106, .28), rgba(232, 185, 106, .05));
    border-color: rgba(232, 185, 106, .3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 24px -6px var(--glow-amber);
  }
  .kpi:hover .kpi-ico { transform: rotate(-6deg) scale(1.1); }

  /* Plus chips inside action buttons */
  .btn-plus {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 22px; height: 22px; border-radius: 7px; font-size: 13px;
    background: rgba(255, 255, 255, .22);
    margin-inline-end: 8px; vertical-align: middle;
  }
  .btn-plus .ti svg { stroke-width: 2.4; }
  .btn:has(> .btn-plus) { display: inline-flex; align-items: center; }

  /* Buttons */
  .btn { border-radius: 11px !important; transition: transform .2s, box-shadow .2s, border-color .2s, background .2s; }
  .btn:hover { border-color: rgba(60, 207, 180, .45) !important; }
  .btn.primary, button.primary, .primary-btn {
    background: linear-gradient(135deg, #f3d39a, #d9a04f) !important;
    color: #2a1a05 !important;
    border-color: transparent !important;
    box-shadow: 0 10px 26px -8px var(--glow-amber), inset 0 1px 0 rgba(255, 255, 255, .45);
  }
  .btn.primary:hover, button.primary:hover, .primary-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -8px rgba(232, 185, 106, .55), inset 0 1px 0 rgba(255, 255, 255, .45); }

  /* Inputs */
  input, select, textarea { border-radius: 10px !important; }
  input:focus, select:focus, textarea:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(60, 207, 180, .22) !important;
    outline: none;
  }
  select option { background: #0c201e; color: var(--text); }

  /* Tables */
  th { color: #9fe6d6 !important; background: rgba(12, 32, 30, .85) !important; letter-spacing: .01em; }
  tbody tr { transition: background .2s; }
  tbody tr:hover td { background: rgba(60, 207, 180, .08); }

  /* Modals */
  .overlay { background: rgba(3, 11, 10, .6) !important; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .modal, .tmodal-box { border-radius: 20px !important; border-color: rgba(130, 210, 195, .2) !important; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .75) !important; }

  /* Scrollbars */
  * { scrollbar-color: rgba(60, 207, 180, .35) transparent; scrollbar-width: thin; }
  ::-webkit-scrollbar { width: 9px; height: 9px; }
  ::-webkit-scrollbar-thumb { background: rgba(60, 207, 180, .3); border-radius: 9px; }
  ::-webkit-scrollbar-track { background: transparent; }

  /* Login screen */
  html .login { background: transparent !important; }
  html .login .login-visual {
    background:
      linear-gradient(90deg, rgba(5, 18, 17, 0) 0%, rgba(5, 18, 17, .55) 100%),
      linear-gradient(180deg, rgba(5, 18, 17, .1) 30%, rgba(5, 18, 17, .8) 100%) !important;
  }
  html .login .login-panel {
    background: linear-gradient(180deg, rgba(8, 24, 23, .8), rgba(6, 20, 19, .9)) !important;
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border-left: 1px solid var(--line);
    color: var(--text) !important;
  }
  html .login .login-panel::before { background: linear-gradient(90deg, var(--accent), var(--gold)) !important; height: 3px !important; }
  html .login .loginCard { background: transparent !important; }
  html .login .loginCard h2 { color: #ffffff !important; }
  html .login .loginCard > p, html .login .loginRow, html .login .rememberBox, html .login .loginSecurity { color: var(--muted) !important; }
  html .login .loginCopyright { color: rgba(157, 187, 180, .7) !important; }
  html .login .fieldIcon label { color: #c6ded8 !important; }
  html .login .fieldIcon .fi { color: #86d3c2 !important; }
  html .login .fieldIcon input {
    background: rgba(255, 255, 255, .05) !important;
    border: 1px solid rgba(130, 210, 195, .22) !important;
    color: var(--text) !important;
    border-radius: 12px !important;
  }
  html .login .fieldIcon input::placeholder { color: rgba(157, 187, 180, .65); }
  html .login .fieldIcon input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(60, 207, 180, .22) !important; }
  html .login .rememberBox input { accent-color: var(--accent); }
  html .login .forgotLink, html .login .loginSecurity svg { color: var(--gold2) !important; }
  html .login .loginCard .panelMark {
    color: #9fe6d6 !important;
    border: 1px solid rgba(60, 207, 180, .3) !important;
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(60, 207, 180, .22), rgba(60, 207, 180, .04));
  }
  html .login .loginGoldBtn {
    background: linear-gradient(135deg, #f3d39a, #d9a04f) !important;
    color: #2a1a05 !important;
    border-radius: 12px !important;
    box-shadow: 0 14px 30px -10px var(--glow-amber), inset 0 1px 0 rgba(255, 255, 255, .45) !important;
  }
  html .login #loginError { background: rgba(255, 122, 107, .12) !important; color: #ffb3a8 !important; }
  @media (max-width: 760px) { html .login { background: var(--bg) !important; } }

  /* Home dashboard — replaces the legacy ivory overrides with one cinematic glass system */
  html .app:has(#home.active) {
    background: transparent !important;
    animation: none !important;
    color: var(--text) !important;
  }
  html .app:has(#home.active) .content::before { display: none !important; }
  html .app:has(#home.active) .appTop {
    background: rgba(6, 20, 19, .55) !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--line) !important;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6) !important;
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
  }
  html .app:has(#home.active) .appTopActions { color: var(--muted) !important; }
  html .app:has(#home.active) .avatar {
    background: rgba(60, 207, 180, .14) !important;
    color: #d2f3eb !important;
    border-color: rgba(60, 207, 180, .3) !important;
  }
  html .app:has(#home.active) #home { color: var(--text) !important; }

  /* Hero */
  html .app:has(#home.active) .homeHero {
    position: relative;
    padding: 26px !important;
    border-radius: 24px !important;
    color: var(--text) !important;
    background:
      radial-gradient(120% 140% at 100% 0%, rgba(60, 207, 180, .2), transparent 55%),
      radial-gradient(90% 120% at 0% 100%, rgba(232, 185, 106, .14), transparent 60%),
      rgba(8, 24, 23, .66) !important;
    border: 1px solid rgba(130, 210, 195, .2) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 30px 70px -24px rgba(0, 0, 0, .75) !important;
    backdrop-filter: blur(22px) saturate(1.35);
    -webkit-backdrop-filter: blur(22px) saturate(1.35);
  }
  html .app:has(#home.active) .homeHero::before {
    content: "" !important;
    position: absolute; inset: 0 24px auto 24px;
    height: 2px; border: 0 !important; border-radius: 2px !important;
    background: linear-gradient(90deg, transparent, var(--accent), var(--gold), transparent) !important;
  }
  html .app:has(#home.active) .homeHero::after { display: none !important; }
  html .app:has(#home.active) .homeHero .hello { color: #ffffff !important; font-size: 24px !important; font-weight: 800; letter-spacing: -.01em; }
  html .app:has(#home.active) .homeHero .today2,
  html .app:has(#home.active) .heroStat small,
  html .app:has(#home.active) .riyal { color: var(--muted) !important; opacity: 1 !important; }
  html .app:has(#home.active) .heroBtn {
    background: linear-gradient(135deg, #f3d39a, #d9a04f) !important;
    color: #2a1a05 !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 28px -10px var(--glow-amber), inset 0 1px 0 rgba(255, 255, 255, .45) !important;
  }
  html .app:has(#home.active) .heroBtn:hover { transform: translateY(-2px); background: linear-gradient(135deg, #f7deae, #e2ad5e) !important; }
  html .app:has(#home.active) .heroTruckLane {
    margin-top: 16px !important;
    border-radius: 16px !important;
    background: linear-gradient(90deg, rgba(4, 14, 13, .85), rgba(12, 36, 34, .7)) !important;
    border: 1px solid var(--line);
    border-bottom: 1px solid rgba(232, 185, 106, .35) !important;
  }
  html .app:has(#home.active) .heroStat { margin-top: 22px !important; }
  html .app:has(#home.active) .heroStat .revv {
    font-size: 40px !important;
    background: linear-gradient(180deg, #ffffff, #c4efe4);
    -webkit-background-clip: text; background-clip: text;
    color: transparent !important;
    letter-spacing: -.02em;
  }
  html .app:has(#home.active) .riyal { margin-inline-start: 6px; }
  html .app:has(#home.active) .heroStat-side > div {
    min-width: 76px !important;
    padding: 11px 16px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .05) !important;
    border: 1px solid var(--line) !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  }
  html .app:has(#home.active) .heroStat-side span { font-size: 24px !important; }

  /* KPI tiles */
  html .app:has(#home.active) #home .grid { grid-template-columns: repeat(4, 1fr) !important; gap: 14px !important; margin: 16px 0 !important; }
  html .app:has(#home.active) .kpi2 {
    --k: var(--accent);
    padding: 18px !important;
    gap: 10px !important;
    border-radius: 20px !important;
    background:
      radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--k) 18%, transparent), transparent 60%),
      rgba(8, 24, 23, .62) !important;
    border: 1px solid rgba(130, 210, 195, .16) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 22px 46px -20px rgba(0, 0, 0, .7) !important;
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .3s !important;
  }
  html .app:has(#home.active) .kpi2.a-orange { --k: #e8b96a; }
  html .app:has(#home.active) .kpi2.a-green { --k: #9ad872; }
  html .app:has(#home.active) .kpi2.a-purple { --k: #b69cff; }
  html .app:has(#home.active) .kpi2.a-blue { --k: #3ccfb4; }
  html .app:has(#home.active) .kpi2::before {
    inset: 0 18px auto 18px !important; width: auto !important; height: 2px !important;
    background: linear-gradient(90deg, transparent, var(--k), transparent) !important;
  }
  html .app:has(#home.active) .kpi2:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--k) 45%, transparent) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 28px 56px -22px color-mix(in srgb, var(--k) 55%, transparent) !important;
  }
  html .app:has(#home.active) .kpi2 .chip {
    width: 42px !important; height: 42px !important; border-radius: 14px !important; font-size: 19px !important;
    color: var(--k) !important;
    background: linear-gradient(145deg, color-mix(in srgb, var(--k) 30%, transparent), color-mix(in srgb, var(--k) 6%, transparent)) !important;
    border: 1px solid color-mix(in srgb, var(--k) 35%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 22px -8px color-mix(in srgb, var(--k) 55%, transparent);
  }
  html .app:has(#home.active) .kpi2 b {
    font-size: 30px !important; font-weight: 800; letter-spacing: -.02em;
    color: #ffffff !important;
  }
  html .app:has(#home.active) .kpi2 small { color: var(--muted) !important; font-size: 12px !important; }

  /* Sections */
  html .app:has(#home.active) #home > .section {
    padding: 20px !important;
    border-radius: 22px !important;
    background: rgba(8, 24, 23, .6) !important;
    border: 1px solid rgba(130, 210, 195, .16) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 50px -22px rgba(0, 0, 0, .7) !important;
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
  }
  html .app:has(#home.active) #home .section h3 { color: #ffffff !important; font-size: 16px; }
  html .app:has(#home.active) .statbar .lbl { color: var(--muted) !important; }
  html .app:has(#home.active) .track { background: rgba(255, 255, 255, .07) !important; }
  html .app:has(#home.active) .trip { border-color: var(--line) !important; }
  html .app:has(#home.active) .trip:hover { background: rgba(60, 207, 180, .07) !important; }
  html .app:has(#home.active) .addbtn {
    background: rgba(60, 207, 180, .1) !important;
    border: 1px solid rgba(60, 207, 180, .3) !important;
    color: #d2f3eb !important;
    border-radius: 11px !important;
  }

  /* Quick actions */
  html .app:has(#home.active) #home .quick { grid-template-columns: repeat(6, 1fr) !important; gap: 12px !important; }
  html .app:has(#home.active) .q2 {
    display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    padding: 18px 8px !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)) !important;
    border: 1px solid rgba(130, 210, 195, .16) !important;
    color: #dbe7fa !important;
    font-weight: 700; font-size: 13px !important;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s, background .3s, box-shadow .3s !important;
  }
  html .app:has(#home.active) .q2:hover {
    transform: translateY(-3px);
    background: linear-gradient(180deg, rgba(60, 207, 180, .14), rgba(60, 207, 180, .03)) !important;
    border-color: rgba(60, 207, 180, .45) !important;
    box-shadow: 0 18px 36px -16px var(--glow-blue);
    color: #ffffff !important;
  }
  html .app:has(#home.active) .q2 .qi {
    width: 46px !important; height: 46px !important; margin: 0 !important;
    display: flex !important; align-items: center; justify-content: center;
    border-radius: 15px !important; font-size: 20px !important;
    color: #9fe6d6 !important;
    background: linear-gradient(145deg, rgba(60, 207, 180, .26), rgba(60, 207, 180, .05)) !important;
    border: 1px solid rgba(60, 207, 180, .28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 20px -8px var(--glow-blue);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  }
  html .app:has(#home.active) .q2:hover .qi { transform: scale(1.08) rotate(-4deg); color: #ffffff !important; }
  html .app:has(#home.active) .q2.primary {
    background: linear-gradient(160deg, rgba(255, 194, 122, .95), rgba(255, 150, 64, .95)) !important;
    border-color: transparent !important;
    color: #2a1a05 !important;
    box-shadow: 0 16px 34px -14px var(--glow-amber), inset 0 1px 0 rgba(255, 255, 255, .45) !important;
  }
  html .app:has(#home.active) .q2.primary .qi {
    color: #2a1a05 !important;
    background: rgba(255, 255, 255, .3) !important;
    border-color: rgba(255, 255, 255, .45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
  }

  @media (max-width: 900px) {
    html .app:has(#home.active) #home .grid { grid-template-columns: repeat(2, 1fr) !important; }
    html .app:has(#home.active) #home .quick { grid-template-columns: repeat(3, 1fr) !important; }
  }
  @media (max-width: 600px) {
    html .app:has(#home.active) .homeHero { padding: 18px !important; }
    html .app:has(#home.active) .heroStat .revv { font-size: 32px !important; }
    html .app:has(#home.active) .kpi2 b { font-size: 24px !important; }
  }

  @media (prefers-reduced-motion: reduce) {
    html .app:has(#home.active) .kpi2, html .app:has(#home.active) .q2, html .app:has(#home.active) .q2 .qi { transition: none !important; transform: none !important; }
    html body::before, html::before, html::after { animation: none !important; }
    .kpi, .stat, .nav button, .snav, .nav-ico, .kpi-ico, .snav > span, .btn { transition: none !important; transform: none !important; }
  }
}

@media print {
  .ti { display: inline-flex; width: 1em; height: 1em; vertical-align: -.15em; }
  .ti svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
}

/* Afaqy live-tracking button */
.btn.afaqy-track{display:inline-flex;align-items:center;gap:6px;background:linear-gradient(135deg,#0ea5a4,#0b7f86);color:#fff;border-color:transparent;box-shadow:0 4px 14px -6px rgba(14,165,164,.7)}
.btn.afaqy-track:hover{filter:brightness(1.08);transform:translateY(-1px)}
.btn.afaqy-track svg{flex:none}
.afaqy-notice{position:fixed;bottom:24px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:rgba(15,23,42,.92);color:#f1f5f9;padding:10px 18px;border-radius:12px;font-size:14px;z-index:9999;transition:opacity .25s,transform .25s;backdrop-filter:blur(8px)}
.afaqy-notice.show{opacity:1;transform:translate(-50%,0)}

/* trip document "view file" link */
.docbox .doclink{display:block;margin-top:6px;font-size:13px;font-weight:700;color:var(--primary,#0e7490);text-decoration:underline;word-break:break-all}
