/* Basha Software — Invoice Printer Interactive Demo CSS (Pixel-Accurate Dark Navy + Gold) */
@property --gold-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes luxuryGoldSpin { to { --gold-angle: 360deg; } }
:root { color-scheme: dark; --ink: #f4f8ff; --gold: #f3cf7a; --gold-dark: #b87f2a; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; color: var(--ink); font-family: 'Cairo', sans-serif; background-color: #050d24; overflow-x: hidden; }
body { position: relative; isolation: isolate; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-color: #050d24;
  background-image: url('../images/app-bg-original.jpg');
  background-image: -webkit-image-set(url('../images/app-bg.webp') type('image/webp') 1x, url('../images/app-bg-original.jpg') type('image/jpeg') 1x);
  background-image: image-set(url('../images/app-bg.webp') type('image/webp') 1x, url('../images/app-bg-original.jpg') type('image/jpeg') 1x);
  background-position: center center; background-size: cover; background-repeat: no-repeat;
  transform: translateZ(0); will-change: transform;
}
@media (max-width: 900px) {
  body::before {
    background-image: image-set(url('../images/app-bg-768.webp') type('image/webp') 1x, url('../images/app-bg-original.jpg') type('image/jpeg') 1x);
  }
}
[hidden] { display: none !important; }

/* Landing Edition Choice & Simulated Login */
.center-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px 20px 26px; gap: 20px; }
.edition-head { text-align: center; max-width: 780px; }
.hero-crest { width: 88px; height: 88px; margin: 0 auto 10px; filter: drop-shadow(0 8px 22px rgba(255,215,0,.42)); }
.hero-crest img { width: 100%; height: 100%; object-fit: contain; display: block; }
.edition-head h1 { margin: 0; font-size: 27px; font-weight: 800; color: #fff; text-shadow: 0 2px 14px rgba(2,8,28,.65); }
.edition-head p { margin: 6px 0 0; font-size: 15px; color: rgba(218,234,255,.92); }
.demo-top-tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px; background: rgba(243,207,122,.16); border: 1px solid rgba(243,207,122,.52); color: #ffe7a0; font-size: 12.5px; font-weight: 700; }
.edition-cards { display: grid; grid-template-columns: repeat(2, minmax(280px, 430px)); gap: 22px; width: 100%; max-width: 890px; justify-content: center; }
@media (max-width: 760px) { .edition-cards { grid-template-columns: 1fr; } }
.ed-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px 24px; border-radius: 24px; text-align: right; color: var(--ink);
  background: linear-gradient(160deg,rgba(165,220,255,.12),transparent 42%,rgba(243,207,122,.06) 90%),linear-gradient(155deg,rgba(14,42,102,.48) 0%,rgba(6,19,52,.62) 100%);
  border: 1.5px solid rgba(132,210,255,.44); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 20px 50px rgba(2,6,20,.6), inset 0 1px 0 rgba(210,238,255,.32);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.ed-card:hover { transform: translateY(-3px); border-color: rgba(243,207,122,.82); box-shadow: 0 24px 56px rgba(2,6,20,.72), 0 0 26px rgba(235,185,86,.26); }
.ed-ico { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: rgba(243,207,122,.16); border: 1px solid rgba(243,207,122,.48); color: #ffe7a0; }
.ed-card h2 { margin: 0; font-size: 21px; font-weight: 800; color: #ffe7a0; }
.ed-card p { margin: 0; font-size: 14.5px; line-height: 1.7; color: rgba(232,243,255,.94); flex: 1; }
.login-card {
  position: relative; width: 100%; max-width: 440px; padding: 56px 28px 26px; border-radius: 26px; text-align: center;
  background: linear-gradient(160deg,rgba(165,220,255,.12),transparent 42%,rgba(243,207,122,.06) 90%),linear-gradient(155deg,rgba(14,42,102,.48) 0%,rgba(6,19,52,.62) 100%);
  border: 1.5px solid rgba(132,210,255,.46); -webkit-backdrop-filter: blur(16px) saturate(145%); backdrop-filter: blur(16px) saturate(145%);
  box-shadow: 0 22px 54px rgba(2,6,20,.62), inset 0 1px 0 rgba(210,238,255,.38);
}

/* Main App Shell — Identical to Real Laravel/Electron App */
.shell {
  width: 100%; padding: 16px clamp(16px,2vw,32px); display: grid;
  grid-template-columns: clamp(228px,14.5vw,268px) minmax(0,1fr);
  gap: clamp(16px,1.5vw,24px); align-items: start; position: relative; isolation: isolate; overflow-x: hidden;
}
@media (max-width: 1200px) { .shell { padding: 14px 18px; gap: 16px; grid-template-columns: 216px minmax(0,1fr); } }
@media (max-width: 980px) { .shell { grid-template-columns: 210px minmax(0,1fr); } .top { grid-template-columns: 1fr !important; } }
@media (max-width: 820px) { .shell { grid-template-columns: 1fr; } .g3 { grid-template-columns: 1fr 1fr !important; } }

.glass {
  background: linear-gradient(160deg,rgba(165,220,255,.12),transparent 42%,rgba(243,207,122,.05) 90%),linear-gradient(155deg,rgba(15,44,104,.40) 0%,rgba(7,21,54,.50) 100%);
  border: 1.5px solid rgba(132,210,255,.42); border-radius: 24px;
  -webkit-backdrop-filter: blur(14px) saturate(145%); backdrop-filter: blur(14px) saturate(145%);
  box-shadow: 0 18px 44px rgba(2,6,20,.52), 0 0 26px rgba(46,146,255,.22), inset 0 1px 0 rgba(205,235,255,.38);
  position: relative; contain: layout style;
}
.top>.glass::before, aside.glass::before {
  content: ""; position: absolute; inset: -3px; border-radius: inherit; padding: 4px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--gold-angle) at 50% 50%,transparent 0deg,rgba(184,127,42,.10) 18deg,rgba(212,155,53,.30) 46deg,rgba(255,216,107,.58) 72deg,rgba(255,246,214,.76) 84deg,rgba(255,216,107,.36) 92deg,transparent 102deg,transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude;
  opacity: .58; animation: luxuryGoldSpin 5s linear infinite;
}
.top>.glass::after, aside.glass::after {
  content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 2px; pointer-events: none; z-index: 3;
  background: conic-gradient(from var(--gold-angle) at 50% 50%,transparent 0deg,rgba(184,127,42,.16) 14deg,rgba(212,155,53,.55) 42deg,#eab64d 66deg,#ffd86b 78deg,#fff6d6 85deg,#ffd86b 90deg,rgba(234,182,77,.28) 97deg,transparent 105deg,transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude;
  animation: luxuryGoldSpin 5s linear infinite;
}
.glass > * { position: relative; z-index: 1; }
aside.glass { align-self: start; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; }
main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.top { display: grid; grid-template-columns: minmax(0,1fr) clamp(340px,26vw,440px); gap: clamp(16px,1.4vw,22px); align-items: start; }
.top > .glass { padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px 14px; }

.nav { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: rgba(236,245,255,.94); font-size: 14.5px; border: 0; border-bottom: 1px solid rgba(130,205,255,.18); background: transparent; font-family: inherit; width: 100%; text-align: right; cursor: pointer; text-decoration: none; transition: background .2s ease, border-radius .2s ease; }
.nav:not(.on):hover { background: rgba(68,150,255,.18); border-radius: 999px; border-bottom-color: transparent; }
.nav.on { background: linear-gradient(90deg,#fdf0c4 0%,#ebb956 55%,#cf912e 100%); color: #1c1305; border: 1px solid rgba(255,246,208,.88); border-radius: 999px; font-weight: 700; box-shadow: 0 6px 20px rgba(235,185,86,.40), inset 0 1px 0 rgba(255,255,255,.72); }
.nav.on svg { stroke: #1c1305; color: #1c1305; }

.lab { display: block; color: rgba(226,238,255,.95); font-weight: 600; font-size: 12.5px; margin-bottom: 5px; }
.inp { width: 100%; height: 40px; font-size: 14.5px; padding: 0 16px; background: rgba(10,30,78,.46); color: #fff; border: 1.5px solid rgba(122,206,255,.48); border-radius: 999px; font-family: inherit; box-shadow: inset 0 2px 6px rgba(2,8,26,.45), 0 0 12px rgba(64,156,255,.12); }
.inp::placeholder { color: rgba(196,218,248,.74); }
.inp:focus { outline: none; border-color: rgba(155,222,255,.92); box-shadow: 0 0 0 3px rgba(72,168,255,.24); }
select.inp option { color: #fff; background: #091a46; }
.seg { display: flex; gap: 6px; padding: 3px; height: 40px; align-items: center; background: rgba(10,30,78,.46); border: 1.5px solid rgba(122,206,255,.48); border-radius: 999px; }
.seg button { flex: 1; height: 32px; border: 0; border-radius: 999px; background: transparent; color: rgba(232,243,255,.92); font-family: inherit; font-size: 14px; cursor: pointer; }
.seg button.on { background: linear-gradient(180deg,#fae39c 0%,#e0a63a 55%,#b87c1e 100%); color: #1c1305; font-weight: 700; box-shadow: 0 4px 14px rgba(227,173,74,.38); }
.opt { flex: 1; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 16px; font-size: 14px; background: rgba(10,32,82,.44); color: #fff; border: 1.5px solid rgba(122,206,255,.48); border-radius: 999px; font-family: inherit; cursor: pointer; box-shadow: 0 4px 14px rgba(4,14,42,.28); }
.opt:hover:not([disabled]):not(.on) { border-color: rgba(155,222,255,.78); background: rgba(22,56,126,.56); }
.opt[disabled] { opacity: .6; cursor: not-allowed; }
.opt.on { background: linear-gradient(90deg,#fae8b6 0%,#eac167 52%,#d49c3b 100%); border: 1px solid rgba(255,245,206,.88); color: #1c1305; font-weight: 700; }
.opt.on svg { stroke: #1c1305; }
.go { width: 100%; height: 48px; border-radius: 999px; border: 1.5px solid rgba(255,244,196,.85); background: linear-gradient(180deg,#f7d983 0%,#e0a63b 52%,#b97a1c 100%); color: #1c1305; font-family: inherit; font-size: 17px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 26px rgba(224,166,59,.42); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.go:hover { filter: brightness(1.06); }
.sim-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(243,207,122,.16); border: 1.5px solid rgba(243,207,122,.56); color: #ffe7a0; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.sim-dot { width: 9px; height: 9px; border-radius: 50%; background: #f3cf7a; box-shadow: 0 0 8px rgba(243,207,122,.7); }
.brand-pill { padding: 8px 14px; border-radius: 999px; background: rgba(10,32,82,.54); border: 1.5px solid rgba(135,212,255,.42); text-align: center; direction: ltr; font: 800 15px Arial,sans-serif; color: #f3cf7a; margin-top: 8px; }

/* Racing Speedometer — Exact Match */
#statusCard { padding: 14px 18px; gap: 9px; }
.racing-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.racing-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(10,32,82,.62); border: 1px solid rgba(122,206,255,.42); color: #9cd6ff; }
#statusCard.is-running .racing-badge { background: rgba(220,166,61,.24); border-color: rgba(255,231,160,.72); color: #FFE7A0; }
#statusCard.is-victory .racing-badge { background: linear-gradient(90deg,rgba(53,244,154,.92),rgba(20,184,104,.94)); border-color: rgba(186,255,222,.92); color: #042a18; }
#statusCard.is-partial .racing-badge { background: rgba(232,140,36,.32); border-color: rgba(255,196,102,.76); color: #ffe4b5; }
#statusCard.is-error .racing-badge { background: rgba(188,36,64,.48); border-color: rgba(255,120,148,.78); color: #ffd5de; }
.racing-dial-wrap { position: relative; width: 268px; height: 196px; margin: -4px auto 0; display: flex; align-items: center; justify-content: center; }
.racing-dial-svg { width: 268px; height: 196px; display: block; overflow: visible; }
.racing-ticks text { font-family: 'Cairo', sans-serif; font-size: 8px; font-weight: 700; fill: rgba(255,231,160,.88); text-anchor: middle; }
.racing-ticks line { stroke: rgba(255,231,160,.62); stroke-width: 1.4; stroke-linecap: round; }
#ring { transition: stroke-dashoffset .28s cubic-bezier(.22,1,.36,1); filter: drop-shadow(0 0 7px rgba(255,215,0,.65)); }
#speedNeedle { transform-box: view-box; transform-origin: 0px 0px; transform: rotate(-135deg); will-change: transform; transition: transform .3s cubic-bezier(.22,1,.36,1); }
.racing-readout { position: absolute; left: 50%; top: 57%; transform: translate(-50%,-50%); width: 76px; display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none; z-index: 3; }
#pct { direction: ltr; font-size: 25px; line-height: 1.05; font-weight: 800; color: #FFE7A0; }
#gaugeSubLabel { position: absolute; left: 50%; top: 86%; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; color: rgba(255,231,160,.94); white-space: nowrap; }
#statusCard.is-victory #ring { stroke: url(#racingArcGradSuccess) !important; }
#statusCard.is-victory #pct { color: #7bffbe; }
#statusCard.is-partial #ring { stroke: url(#racingArcGradPartial) !important; }
#statusCard.is-partial #pct { color: #ffd28a; }
#statusCard.is-error #ring { stroke: url(#racingArcGradError) !important; }
#statusCard.is-error #pct { color: #ff8fa0; }
.victory-banner { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 5px 14px; border-radius: 999px; background: linear-gradient(90deg,rgba(53,244,154,.18),rgba(20,184,104,.34),rgba(53,244,154,.18)); border: 1px solid rgba(112,255,184,.78); color: #a8ffd4; font-size: 13px; font-weight: 700; margin: 0 auto; }
.racing-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.racing-stat { display: flex; flex-direction: column; align-items: center; padding: 6px; border-radius: 14px; background: rgba(10,30,78,.48); border: 1px solid rgba(122,206,255,.32); text-align: center; }
.racing-stat-val { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 800; }
.racing-stat-lbl { font-size: 11px; color: rgba(218,234,255,.85); margin-top: 2px; }
.racing-led { width: 10px; height: 10px; border-radius: 50%; opacity: .25; }
#ledOk { background: #35F49A; } #ledOk.is-on { opacity: 1; box-shadow: 0 0 10px #35F49A; }
#ledLeft { background: #FFD447; } #ledLeft.is-on { opacity: 1; box-shadow: 0 0 10px #FFD447; }
#ledFail { background: #FF526B; } #ledFail.is-on { opacity: 1; box-shadow: 0 0 10px #FF526B; }
.gauge-breakdown { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; font-size: 11.5px; color: rgba(214,234,255,.88); padding: 5px 8px; border-radius: 12px; background: rgba(7,20,54,.44); border: 1px solid rgba(122,206,255,.22); }
.gauge-breakdown b { color: #ffe7a0; }

/* Tables, Chips, Modals, Pagination */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; text-align: right; font-size: 14px; border-bottom: 1px solid rgba(110,196,255,.18); }
th { color: rgba(195,222,255,.92); font-size: 12.5px; font-weight: 700; }
.chip { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(46,204,145,.22); color: #a8f5d6; border: 1px solid rgba(94,234,178,.4); }
.chip-partial { background: rgba(245,178,66,.22); color: #ffe0a3; border-color: rgba(245,196,94,.52); }
.chip-failed { background: rgba(220,58,86,.26); color: #ffc8d2; border-color: rgba(255,112,138,.52); }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(3,9,24,.78); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-panel { width: 100%; max-width: 780px; max-height: 88vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 22px 24px; border-radius: 24px; background: linear-gradient(155deg,rgba(12,35,88,.96),rgba(6,17,46,.98)); border: 1.5px solid rgba(243,207,122,.56); box-shadow: 0 24px 64px rgba(2,6,20,.82); color: var(--ink); }
.pager-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(122,206,255,.38); background: rgba(10,30,78,.52); color: #fff; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.page-btn.is-current { background: linear-gradient(180deg,#f7d983,#d4982c); color: #1c1305; border-color: #fff2c2; }
.page-btn[disabled] { opacity: .42; cursor: not-allowed; }
.retry-btn { background: linear-gradient(90deg,rgba(234,179,68,.24),rgba(184,127,42,.34)); border-color: rgba(255,216,107,.78); color: #fff4d2; font-weight: 700; }
.recheck-btn { background: rgba(30,80,160,.36); border-color: rgba(132,210,255,.68); color: #dff0ff; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .top>.glass::before, .top>.glass::after, aside.glass::before, aside.glass::after { animation: none !important; } }
