/* ===== Design tokens ===== */
:root {
  --navy: #0a2540;
  --navy-2: #103a63;
  --blue: #1a73c9;
  --blue-dark: #145da0;
  --blue-soft: #e8f2fc;
  --sky: #f4f9fe;
  --line: #dbe7f2;
  --ink: #11263a;
  --muted: #5d7286;
  --bg: #f4f8fc;
  --white: #ffffff;
  --green: #0e9f74;
  --green-bg: #e6f7f1;
  --amber: #b07315;
  --amber-bg: #fdf3df;
  --red: #c0392b;
  --red-bg: #fdecea;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 14px 40px rgba(9, 35, 60, 0.09);
  --shadow-sm: 0 3px 10px rgba(9, 35, 60, 0.06);
  --sidebar-w: 268px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 800; color: var(--navy); }
p { margin: 0; }
img { max-width: 100%; }
button { font-family: inherit; }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* ===== Brand ===== */
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand-mark {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--blue), var(--navy));
  color: #fff; font-weight: 900; font-size: 22px;
  box-shadow: 0 6px 16px rgba(26, 115, 201, 0.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-text strong { font-size: 19px; font-weight: 800; }
.brand-text small { font-size: 9.5px; letter-spacing: 2.6px; color: var(--muted); font-weight: 700; }
.brand-light { color: #fff; }
.brand-light:hover { color: #fff; }
.brand-light .brand-text small { color: rgba(255, 255, 255, 0.55); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 14.5px; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; box-shadow: 0 8px 20px rgba(26, 115, 201, 0.28); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 24px rgba(26, 115, 201, 0.38); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { color: var(--navy); background: var(--sky); }
.btn-outline { background: #fff; color: var(--blue); border-color: #bcd7f0; }
.btn-outline:hover { background: var(--blue-soft); }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: #f3c9c4; }
.btn-danger:hover { background: #fadbd7; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: inherit; cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.12); }

/* ===== Public header ===== */
.public-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 30px;
  padding: 14px max(24px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(219, 231, 242, 0.8);
}
.site-nav { display: flex; gap: 26px; margin-inline-start: auto; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: 14.5px; }
.site-nav a:hover { color: var(--blue); }
.header-actions { display: flex; gap: 10px; align-items: center; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1100px 500px at 85% -10%, #1b5e9e 0%, transparent 60%),
              linear-gradient(135deg, #071c31 0%, #0b2e50 55%, #114a7f 100%);
  color: #fff;
  padding: 82px 0 90px;
}
.hero::after {
  content: ""; position: absolute; inset: auto -140px -260px auto;
  width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px;
  align-items: center; position: relative; z-index: 2;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px; font-weight: 600; color: #d8ebff;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #5fe3b6; box-shadow: 0 0 0 4px rgba(95, 227, 182, 0.16); }
.hero h1 { color: #fff; font-size: clamp(34px, 4.2vw, 52px); line-height: 1.22; margin: 22px 0 16px; letter-spacing: -0.5px; }
.hero h1 em { font-style: normal; color: #79c4ff; }
.hero-lead { font-size: 17px; color: rgba(255, 255, 255, 0.76); max-width: 520px; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 42px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 26px; font-weight: 800; }
.hero-stats div span { font-size: 12.5px; color: rgba(255, 255, 255, 0.6); }

.hero-visual { position: relative; }
.map-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px; padding: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
}
.map-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.map-card-head strong { font-size: 15px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #8df0c8; background: rgba(95, 227, 182, 0.1); padding: 4px 10px; border-radius: 99px; }
.live-pill .dot { width: 6px; height: 6px; background: #5fe3b6; border-radius: 50%; }
.map-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.slot { aspect-ratio: 1.35; border-radius: 6px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.08); }
.slot.taken { background: linear-gradient(145deg, #2f80c9, #1a5c9b); border-color: transparent; }
.slot.free { background: rgba(95, 227, 182, 0.26); border-color: rgba(95, 227, 182, 0.35); }
.map-legend { display: flex; gap: 16px; margin-top: 16px; font-size: 11.5px; color: rgba(255, 255, 255, 0.66); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ===== Sections ===== */
.section { padding: 74px 0; }
.section.alt { background: #fff; }
.section-head { max-width: 640px; margin-bottom: 38px; }
.section-head .eyebrow { color: var(--blue); font-weight: 800; font-size: 12.5px; letter-spacing: 1.5px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); margin: 8px 0 10px; }
.section-head p { color: var(--muted); font-size: 16px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); margin-bottom: 15px;
}
.feature-icon .icon { width: 23px; height: 23px; }
.feature-card h3 { font-size: 17px; margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 14px; }

.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.app-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 24px; box-shadow: var(--shadow-sm);
}
.app-card h3 { font-size: 18px; }
.app-card > p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.app-preview {
  margin-top: 18px; border-radius: 14px; padding: 16px;
  background: linear-gradient(160deg, #0b2c4d, #144d80); color: #fff;
  min-height: 190px; display: flex; flex-direction: column; gap: 10px;
}
.app-preview.light { background: linear-gradient(160deg, #eef6fd, #dcecfb); color: var(--navy); }
.preview-row { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.preview-muted { opacity: .65; font-size: 11.5px; }
.preview-bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.preview-bar span { display: block; height: 100%; background: #6cc0ff; border-radius: 99px; }
.light .preview-bar { background: rgba(10, 37, 64, 0.1); }
.light .preview-bar span { background: var(--blue); }
.preview-big { font-size: 26px; font-weight: 800; }
.preview-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preview-kpi div { background: rgba(255, 255, 255, 0.08); border-radius: 9px; padding: 7px 8px; font-size: 9.5px; }
.preview-kpi strong { display: block; font-size: 15px; }

.lots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lot-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.lot-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.lot-code { font-size: 11.5px; font-weight: 800; color: var(--blue); background: var(--blue-soft); padding: 3px 9px; border-radius: 7px; }
.lot-card h3 { font-size: 17px; margin-top: 10px; }
.lot-card p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.lot-meta { display: flex; justify-content: space-between; margin-top: 18px; font-size: 12px; color: var(--muted); }
.lot-meta strong { color: var(--navy); font-size: 13px; }

.cta-band {
  background: linear-gradient(120deg, #0a2540, #145da0);
  color: #fff; border-radius: 24px; padding: 46px;
  display: flex; justify-content: space-between; align-items: center; gap: 30px;
  flex-wrap: wrap; margin-bottom: 74px;
  box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; font-size: 28px; }
.cta-band p { color: rgba(255, 255, 255, 0.72); margin-top: 6px; }

/* ===== Footer ===== */
.site-footer {
  margin-top: auto; background: var(--navy); color: rgba(255, 255, 255, 0.65);
  display: flex; justify-content: space-between; gap: 26px; align-items: center;
  padding: 30px max(24px, calc((100vw - 1180px) / 2));
  flex-wrap: wrap; font-size: 13px;
}
.footer-main { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer-meta { display: flex; gap: 20px; align-items: center; }
.footer-meta a { color: rgba(255, 255, 255, 0.75); }

/* ===== Flash ===== */
.flash-stack {
  display: flex; flex-direction: column; gap: 9px;
  width: min(760px, 100%); margin: 16px auto;
}
.app-content > .flash-stack {
  width: 100%; margin: 0 0 18px;
}
.site-header + .container > .flash-stack { margin-top: 16px; }
.flash {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow); border: 1px solid transparent;
  animation: dropIn .25s ease;
}
.flash-success { background: var(--green-bg); color: #086a4e; border-color: #bfe9d9; }
.flash-error { background: var(--red-bg); color: #9c2b20; border-color: #f2c6c1; }
.flash-close { border: 0; background: transparent; font-size: 19px; line-height: 1; color: inherit; cursor: pointer; opacity: .6; }
@keyframes dropIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== Dashboard shell ===== */
.dashboard-body { background: var(--bg); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: radial-gradient(600px 300px at 50% 0%, #144d80 0%, transparent 70%), var(--navy);
  color: #fff; padding: 22px 16px; display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 0; height: 100vh; z-index: 80;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.sidebar-close { display: none; background: transparent; border: 0; color: #fff; font-size: 26px; cursor: pointer; }
.side-nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1; }
.nav-label { font-size: 10.5px; letter-spacing: 1.6px; color: rgba(255, 255, 255, 0.38); font-weight: 800; margin: 16px 12px 6px; }
.nav-label:first-child { margin-top: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border-radius: 11px;
  color: rgba(255, 255, 255, 0.7); font-size: 14px; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.side-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.side-nav a.active { background: rgba(255, 255, 255, 0.13); color: #fff; font-weight: 700; box-shadow: inset -3px 0 0 #64b5ff; }
.side-nav .icon { width: 20px; height: 20px; flex: 0 0 20px; opacity: .9; }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.avatar {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, #2a86d8, #155ea8); color: #fff; font-weight: 800;
}
.sidebar-user-info { flex: 1; min-width: 0; line-height: 1.3; }
.sidebar-user-info strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info small { font-size: 11px; color: rgba(255, 255, 255, 0.55); }
.sidebar-user .icon-btn:hover { background: rgba(255, 255, 255, 0.13); }
.sidebar-user .icon { width: 19px; height: 19px; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 30px; background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px);
}
.page-heading h1 { font-size: 23px; }
.page-heading p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.topbar-actions { margin-inline-start: auto; display: flex; gap: 10px; align-items: center; }
.menu-btn {
  display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between;
}
.menu-btn span { display: block; height: 2px; border-radius: 2px; background: var(--navy); }
.app-content { padding: 28px 30px 40px; flex: 1; }
.app-footer {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 16px 30px; color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line);
}
.sidebar-backdrop { display: none; }

/* ===== Cards & stats ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 19px 20px; display: flex; gap: 14px; align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  display: grid; place-items: center; background: var(--blue-soft); color: var(--blue);
}
.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-icon.amber { background: var(--amber-bg); color: var(--amber); }
.stat-icon.navy { background: #e8edf4; color: var(--navy); }
.stat-icon .icon { width: 21px; height: 21px; }
.stat-body { min-width: 0; flex: 1; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 25px; font-weight: 800; color: var(--navy); line-height: 1.3; letter-spacing: -.4px; }
.stat-value small { font-size: 12px; font-weight: 600; color: var(--muted); }
.stat-meta { font-size: 11.5px; color: var(--muted); }
.stat-meta .up { color: var(--green); font-weight: 700; }
.stat-meta .down { color: var(--red); font-weight: 700; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 22px; overflow: hidden;
}
.card-head {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.card-head h2, .card-head h3 { font-size: 16.5px; }
.card-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 22px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line); background: #fbfdff; font-size: 12.5px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.grid-main-side { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; align-items: start; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: start; padding: 12px 16px; font-size: 11.5px; font-weight: 800;
  color: var(--muted); background: #f8fbfe; border-bottom: 1px solid var(--line);
  white-space: nowrap; letter-spacing: .3px;
}
.table td { padding: 13px 16px; border-bottom: 1px solid #edf3f9; vertical-align: middle; }
.table tbody tr:hover { background: #fafdff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .mono, .mono { font-family: "Consolas", "Courier New", monospace; font-size: 12.5px; letter-spacing: .4px; }
.table .strong { font-weight: 700; color: var(--navy); }
.table .muted { color: var(--muted); font-size: 12.5px; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { width: 38px; height: 38px; opacity: .35; margin-bottom: 10px; }
.empty strong { display: block; color: var(--navy); margin-bottom: 3px; font-size: 14.5px; }
.empty p { font-size: 12.5px; }

/* ===== Badges & meters ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700;
  background: #eef2f7; color: var(--muted); white-space: nowrap;
}
.badge-success { background: var(--green-bg); color: #087a58; }
.badge-warning { background: var(--amber-bg); color: var(--amber); }
.badge-danger { background: var(--red-bg); color: var(--red); }
.badge-info { background: var(--blue-soft); color: var(--blue-dark); }
.badge-navy { background: #e6ecf4; color: var(--navy); }

.meter { height: 8px; background: #e9f0f7; border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2d8be0, #1a73c9); }
.meter.warn > span { background: linear-gradient(90deg, #e0a02d, #c9821f); }
.meter.danger > span { background: linear-gradient(90deg, #de6a5a, #c0392b); }
.meter.green > span { background: linear-gradient(90deg, #2fc39a, #0e9f74); }
.meter-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.meter-row strong { color: var(--navy); }

/* ===== Forms ===== */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--navy); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.icon { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: middle; }
.input, .select, .textarea, input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="datetime-local"], input[type="date"], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid #cbdcec;
  background: #fff; font-family: inherit; font-size: 14px; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26, 115, 201, 0.13);
}
textarea { min-height: 88px; resize: vertical; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.form-actions.end { justify-content: flex-end; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.check input { width: 17px; height: 17px; accent-color: var(--blue); }
.price-box {
  background: linear-gradient(150deg, #f2f8fe, #e8f2fc);
  border: 1px solid #cfe4f8; border-radius: 14px; padding: 16px 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px;
}
.price-box .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.price-box .value { font-size: 26px; font-weight: 800; color: var(--navy); }
.price-box .value small { font-size: 12px; color: var(--muted); }

/* ===== Auth ===== */
.auth-wrap { min-height: calc(100vh - 74px); display: grid; place-items: center; padding: 46px 20px; }
.auth-card {
  width: min(940px, 100%); background: #fff; border: 1px solid var(--line);
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1fr;
}
.auth-side {
  background: radial-gradient(500px 300px at 20% 10%, #1a5c9b 0%, transparent 65%),
              linear-gradient(150deg, #071c31, #0d3a66);
  color: #fff; padding: 42px 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px;
}
.auth-side h2 { color: #fff; font-size: 27px; line-height: 1.35; }
.auth-side p { color: rgba(255, 255, 255, 0.68); font-size: 13.5px; margin-top: 8px; }
.auth-side ul { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 11px; font-size: 13px; }
.auth-side li { display: flex; gap: 8px; align-items: flex-start; color: rgba(255, 255, 255, 0.8); }
.auth-side li .icon { width: 16px; height: 16px; color: #6fe0b9; flex: 0 0 16px; margin-top: 3px; }
.auth-main { padding: 42px 38px; }
.auth-main h1 { font-size: 25px; margin-bottom: 4px; }
.auth-main > p { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.auth-main .field { margin-bottom: 14px; }
.demo-box { margin-top: 22px; background: #f7fbff; border: 1px dashed #c8dff3; border-radius: 13px; padding: 14px 16px; }
.demo-box strong { font-size: 12px; color: var(--navy); display: block; margin-bottom: 7px; }
.demo-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 11.5px; color: var(--muted); }
.demo-list code { color: var(--blue-dark); font-family: Consolas, monospace; font-size: 11px; }
.auth-switch { margin-top: 20px; font-size: 13px; color: var(--muted); text-align: center; }

/* ===== Customer ===== */
.hero-mini {
  background: linear-gradient(120deg, #0b2c4d, #145da0);
  border-radius: 20px; color: #fff; padding: 26px 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.hero-mini h2 { color: #fff; font-size: 22px; }
.hero-mini p { color: rgba(255, 255, 255, 0.7); font-size: 13.5px; margin-top: 3px; }
.points-chip {
  display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 15px; padding: 12px 18px;
}
.points-chip strong { display: block; font-size: 23px; line-height: 1.2; }
.points-chip small { font-size: 11px; color: rgba(255, 255, 255, 0.65); }
.points-chip .icon { width: 28px; height: 28px; color: #8ed4ff; }

.booking-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px;
  background: #fbfdff; margin-bottom: 12px; flex-wrap: wrap;
}
.booking-strip:last-child { margin-bottom: 0; }
.booking-strip .main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.booking-strip .main strong { display: block; font-size: 14.5px; }
.booking-strip .main small { color: var(--muted); font-size: 12px; }
.code-chip {
  font-family: Consolas, monospace; font-size: 12px; font-weight: 700;
  background: var(--blue-soft); color: var(--blue-dark); padding: 6px 10px; border-radius: 8px;
  letter-spacing: .5px; white-space: nowrap;
}
.qr-panel { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.qr-panel .qr {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px;
  box-shadow: var(--shadow-sm);
}
.qr-panel .qr img { display: block; width: 176px; height: 176px; }
.qr-info { flex: 1; min-width: 220px; }
.qr-info .label { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.qr-info .big { font-size: 24px; font-weight: 800; color: var(--navy); font-family: Consolas, monospace; letter-spacing: 1px; }
.timeline { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.timeline-item { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; inset-inline-start: 6px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 13px; height: 13px; border-radius: 50%; background: #cfe4f8; border: 2px solid #fff; box-shadow: 0 0 0 1px #bcd7f0; flex: 0 0 13px; margin-top: 5px; position: relative; z-index: 1; }
.timeline-item.done .timeline-dot { background: var(--green); box-shadow: 0 0 0 1px #7bd0b6; }
.timeline-item.current .timeline-dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(26, 115, 201, 0.15); }
.timeline-body strong { display: block; font-size: 13.5px; }
.timeline-body small { color: var(--muted); font-size: 12px; }

.lot-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lot-option { position: relative; }
.lot-option input { position: absolute; opacity: 0; pointer-events: none; }
.lot-option label {
  display: block; border: 1.5px solid var(--line); border-radius: 13px; padding: 14px 16px;
  cursor: pointer; background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.lot-option label:hover { border-color: #a9cdea; }
.lot-option input:checked + label { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26, 115, 201, 0.12); background: #fbfdff; }
.lot-option strong { display: block; font-size: 14px; }
.lot-option small { color: var(--muted); font-size: 11.5px; }
.lot-option .price-tag { display: inline-block; margin-top: 6px; font-size: 11.5px; font-weight: 700; color: var(--blue-dark); }

/* ===== Gate ===== */
.gate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.gate-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.gate-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--blue); }
.gate-panel.exit::before { background: var(--amber); }
.gate-panel h2 { font-size: 19px; display: flex; align-items: center; gap: 9px; }
.gate-panel h2 .icon { width: 23px; height: 23px; color: var(--blue); }
.gate-panel.exit h2 .icon { color: var(--amber); }
.gate-panel > p { color: var(--muted); font-size: 12.5px; margin-top: 3px; margin-bottom: 18px; }
.big-input { font-size: 19px !important; font-weight: 700; letter-spacing: 1.2px; padding: 14px 16px !important; text-align: center; }
.gate-panel .hint { margin-top: 10px; font-size: 11.5px; color: var(--muted); text-align: center; }
.gate-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.gate-stats .badge { padding: 7px 13px; font-size: 12px; }

.exit-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.exit-summary div { background: #f8fbfe; border: 1px solid #e7f0f8; border-radius: 11px; padding: 11px 14px; }
.exit-summary small { display: block; color: var(--muted); font-size: 11px; }
.exit-summary strong { font-size: 14px; color: var(--navy); }
.fee-total {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(150deg, #f2f8fe, #e8f2fc); border: 1px solid #cfe4f8;
  border-radius: 14px; padding: 16px 18px; margin: 18px 0;
}
.fee-total strong { font-size: 27px; color: var(--navy); }
.method-pick { display: flex; gap: 8px; margin-bottom: 16px; }
.method-pick label {
  flex: 1; border: 1.5px solid var(--line); border-radius: 11px; padding: 10px;
  text-align: center; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.method-pick input { display: none; }
.method-pick input:checked + span { color: var(--blue); }
.method-pick label:has(input:checked) { border-color: var(--blue); background: #f5faff; }

/* ===== Ticket ===== */
.ticket-wrap { max-width: 520px; margin: 0 auto; }
.ticket {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow); margin-bottom: 18px;
}
.ticket-head { background: linear-gradient(120deg, #0b2c4d, #145da0); color: #fff; padding: 22px 24px; }
.ticket-head .brand-text strong { color: #fff; }
.ticket-head .brand-text small { color: rgba(255, 255, 255, 0.55); }
.ticket-logo { width: 56px; height: 56px; object-fit: contain; flex: 0 0 56px; }
.ticket-airport { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, 0.82); }
.ticket-body { padding: 24px; }
.ticket-code { text-align: center; font-family: Consolas, monospace; font-size: 25px; font-weight: 800; color: var(--navy); letter-spacing: 2px; margin: 6px 0 16px; }
.ticket-qr { text-align: center; margin: 6px 0 18px; }
.ticket-qr img { width: 172px; height: 172px; }
.ticket-barcode { max-width: 330px; margin: 2px auto 14px; }
.barcode-svg { display: block; width: 100%; height: 64px; }
.ticket-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #e5eef7; font-size: 13px; }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row span { color: var(--muted); }
.ticket-row strong { color: var(--navy); }
.ticket-total { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: #f8fbfe; border-top: 1px solid var(--line); }
.ticket-total strong { font-size: 24px; color: var(--navy); }
.print-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===== Charts ===== */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 210px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar-track { width: 100%; max-width: 46px; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar-fill {
  width: 100%; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #4ba3e8, #1a73c9);
  min-height: 3px; transition: height .4s ease;
}
.bar-col:hover .bar-fill { background: linear-gradient(180deg, #6bb8f2, #145da0); }
.bar-label { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.bar-value { font-size: 10px; color: var(--navy); font-weight: 700; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.rank-list { display: flex; flex-direction: column; gap: 14px; }
.rank-item .meter-row { margin-bottom: 5px; }
.rank-item small { color: var(--muted); font-size: 11.5px; }

.kpi-inline { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.kpi-inline strong { color: var(--navy); }

/* ===== Error ===== */
.error-page { min-height: 60vh; display: grid; place-items: center; padding: 60px 20px; }
.error-card { text-align: center; max-width: 460px; }
.error-code { font-size: 78px; font-weight: 900; color: #cfe4f8; line-height: 1; }
.error-card h1 { font-size: 26px; margin: 8px 0; }
.error-card p { color: var(--muted); margin-bottom: 22px; }

/* ===== Utilities ===== */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; }
.text-center { text-align: center; }
.text-end { text-align: end; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.pill-list { display: flex; gap: 7px; flex-wrap: wrap; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 520px; }
  .feature-grid, .apps-grid, .lots-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main-side, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .header-actions { margin-inline-start: auto; }
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0;
    transform: translateX(105%); transition: transform .25s ease;
    width: 290px; flex-basis: 290px; box-shadow: 0 0 50px rgba(0, 0, 0, .3);
  }
  .sidebar.open { transform: none; }
  .sidebar-close { display: block; }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(7, 22, 37, .5); z-index: 70; }
  .menu-btn { display: flex; }
  .app-shell { display: block; }
  .app-content { padding: 20px 18px 34px; }
  .app-topbar { padding: 14px 18px; }
  .app-footer { padding: 14px 18px; }
  .gate-grid { grid-template-columns: 1fr; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 28px); }
  .site-header { padding: 11px 16px; gap: 12px; }
  .site-header .brand { gap: 8px; }
  .site-header .brand-mark { width: 37px; height: 37px; flex-basis: 37px; font-size: 18px; border-radius: 11px; }
  .site-header .brand-text strong { font-size: 15.5px; }
  .site-header .brand-text small { font-size: 7.5px; letter-spacing: 2px; }
  .site-header .btn { padding: 9px 12px; font-size: 12.5px; border-radius: 10px; }
  .header-actions { gap: 6px; }
  .hero { padding: 56px 0 64px; }
  .hero-stats { gap: 22px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .feature-grid, .apps-grid, .lots-grid, .grid-2, .form-grid, .stat-grid { grid-template-columns: 1fr; }
  .section { padding: 54px 0; }
  .cta-band { padding: 30px 24px; }
  .card-head, .card-body { padding: 16px; }
  .table th, .table td { padding: 10px 12px; }
  .auth-main { padding: 30px 22px; }
  .lot-pick { grid-template-columns: 1fr; }
  .exit-summary { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .app-topbar { gap: 10px; }
  .page-heading h1 { font-size: 19px; }
  .page-heading p { display: none; }
  .app-topbar .btn { padding: 8px 12px; font-size: 12.5px; border-radius: 10px; }
  .topbar-actions .inline-form .btn { padding: 7px 9px; }
  .app-content { padding: 16px 14px 30px; }
  .hero-mini { padding: 20px; }
  .hero-mini h2 { font-size: 19px; }
  .points-chip { width: 100%; justify-content: center; }
  .flash-stack { margin: 12px auto; }
  .app-content > .flash-stack { margin-bottom: 14px; }
}

/* ===== Print: only the ticket payload ===== */
@media print {
  @page { size: 80mm auto; margin: 3mm; }
  body { background: #fff; margin: 0; }
  .site-header, .site-footer, .app-topbar, .sidebar, .sidebar-backdrop,
  .flash-stack, .print-actions, .app-footer, .ticket-back, .lang-switch,
  .ticket-wrap > .ticket, .ticket-wrap > p { display: none !important; }
  .public-shell main, .public-shell main > .container { padding: 0 !important; margin: 0 !important; }
  .app-shell, .app-main { display: block; }
  .app-content { padding: 0; }
  .ticket-wrap { max-width: none; margin: 0; }
  .thermal-ticket {
    display: block !important;
    width: 80mm;
    margin: 0 auto;
    padding: 0 0 12mm;
    font-size: 12px;
  }
  .thermal-title { font-size: 20px; margin-bottom: 2px; }
  .thermal-code { font-size: 18px; margin-bottom: 8px; }
  .thermal-line { font-size: 15px; padding: 7px 0; }
  .thermal-line strong { font-size: 15px; }
  .thermal-barcode .barcode-svg { height: 80px; }
  .thermal-qr img { width: 42mm; height: 42mm; }
  .invoice-qr img { width: 34mm; height: 34mm; }
  .brand-logo, .logo-img {
    animation: none !important; transition: none !important; transform: none !important;
  }
}
.thermal-ticket {
  display: none;
  box-sizing: border-box;
  width: 384px;
  padding: 18px 14px 80px;
  background: #fff;
  color: #000;
  direction: rtl;
  text-align: right;
  font-family: Arial, Tahoma, sans-serif;
}
.thermal-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-bottom: 10px;
}
.thermal-brand .brand-logo { width: 52px; height: 52px; flex: 0 0 52px; }
.thermal-brand .logo-svg { filter: none; }
.thermal-logo {
  width: 120px; height: 120px; object-fit: contain; flex: 0 0 120px;
  filter: grayscale(1) brightness(0);
}
.thermal-brand .brand-logo::after,
.invoice-brand .brand-logo::after { display: none !important; }
.thermal-brand .logo-orbit,
.thermal-brand .logo-p,
.thermal-brand .logo-dot,
.thermal-brand .logo-spark,
.invoice-brand .logo-orbit,
.invoice-brand .logo-p,
.invoice-brand .logo-dot,
.invoice-brand .logo-spark { animation: none !important; }
.thermal-airport { text-align: center; font-size: 14px; font-weight: 700; line-height: 1.25; }
.thermal-spacer { height: 40px; }
.thermal-title { text-align: center; font-size: 25px; font-weight: 800; margin-bottom: 2px; }
.thermal-sub { text-align: center; font-size: 11px; letter-spacing: 2px; margin-bottom: 8px; }
.thermal-label { text-align: center; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.thermal-barcode { width: 100%; margin: 0 auto 6px; }
.thermal-barcode .barcode-svg { height: 80px; }
.thermal-qr { display: block; width: auto; height: auto; margin: 2px auto 10px; text-align: center; }
.thermal-code { text-align: center; direction: ltr; font: 700 22px monospace; margin-bottom: 10px; }
.thermal-qr img { display: block; margin: 0 auto; width: 150px; height: 150px; image-rendering: pixelated; }
.thermal-qr-label { font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.thermal-foot { text-align: center; font-size: 13px; margin-top: 12px; border-top: 1px dashed #000; padding-top: 8px; }
.thermal-services-title { text-align: center; font-size: 13px; font-weight: 800; margin-top: 8px; border-top: 1px dashed #000; padding-top: 6px; }
.thermal-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #000;
  padding: 9px 0;
  font-size: 19px;
}
.thermal-line strong { font-size: 20px; text-align: left; }

/* ===== Services & permission matrix ===== */
.service-pick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.service-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  background: #fff;
}
.service-option input { width: 18px; height: 18px; accent-color: var(--blue); }
.service-option > span { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.service-option small { color: var(--muted); font-size: 12px; }
.permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.permission-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.permission-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.permission-group { margin-top: 10px; }
.permission-group-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
@media (max-width: 860px) {
  .service-pick, .permissions-grid { grid-template-columns: 1fr; }
}

/* ===== Barcode scan result ===== */
.exit-summary .full { grid-column: 1 / -1; }
.exit-services {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #f8fbfe;
}
.scan-card { margin-bottom: 16px; }
.scan-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.scan-form .field { flex: 1; min-width: 260px; margin: 0; }
.scan-result {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}
.scan-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.scan-result-head h2 { font-size: 26px; margin: 2px 0; color: var(--navy); }
.scan-account {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #f3f9ff, #eef6ff);
  border: 1px solid #dcebfa;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.scan-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2F80ED, #0D3B6B);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}
.scan-account > div:nth-child(2) { flex: 1; }
.scan-account strong { display: block; font-size: 16px; color: var(--navy); }
.scan-points { text-align: center; }
.scan-points strong { display: block; font-size: 20px; color: var(--blue); }
.scan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scan-cell { background: #f8fbfe; border: 1px solid #e7f0f8; border-radius: 12px; padding: 10px 14px; }
.scan-cell.wide { grid-column: 1 / -1; }
.scan-cell small { display: block; color: var(--muted); font-size: 11px; }
.scan-cell strong { font-size: 14px; color: var(--navy); }
.scan-fee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 14px;
}
.scan-fee strong { font-size: 26px; color: var(--navy); }
.scan-fee strong span { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) {
  .scan-grid { grid-template-columns: 1fr; }
  .scan-cell.wide { grid-column: auto; }
  .scan-result { padding: 16px; }
}

/* ===== Payment invoice ===== */
.invoice-wrap { max-width: 460px; margin: 0 auto; }
.invoice-sheet {
  width: 384px;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 16px 62px;
  color: #000;
  direction: rtl;
}
.invoice-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  border-bottom: 2px solid #000;
  padding-bottom: 10px;
}
.invoice-brand .brand-logo { width: 48px; height: 48px; flex: 0 0 48px; }
.invoice-brand .logo-svg { filter: none; }
.invoice-logo-img {
  width: 92px; height: 92px; object-fit: contain; flex: 0 0 92px;
  filter: grayscale(1) brightness(0);
}
.invoice-airport { font-size: 13px; font-weight: 700; text-align: center; }
.invoice-brand .brand-logo::after,
.invoice-brand .logo-orbit,
.invoice-brand .logo-p,
.invoice-brand .logo-dot,
.invoice-brand .logo-spark { animation: none !important; }
.invoice-spacer { height: 34px; }
.invoice-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: #0b2b4a; color: #ffd89b;
  display: grid; place-items: center; font-weight: 900; font-size: 18px;
}
.invoice-brand strong { display: block; font-size: 18px; }
.invoice-brand small { display: block; font-size: 10px; letter-spacing: 2px; color: #555; }
.invoice-type { text-align: center; font-size: 22px; font-weight: 900; margin-top: 10px; }
.invoice-number { text-align: center; font-family: Consolas, monospace; font-size: 16px; margin-bottom: 8px; }
.invoice-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 4px 0; border-bottom: 1px dotted #ddd; }
.invoice-meta span { color: #555; }
.invoice-meta strong { text-align: left; }
.invoice-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.invoice-table th { text-align: right; border-bottom: 1px solid #000; padding: 5px 0; font-size: 11px; color: #555; }
.invoice-table td { padding: 5px 0; border-bottom: 1px dotted #ddd; vertical-align: top; }
.invoice-table td:last-child { text-align: left; font-weight: 700; }
.invoice-total { display: flex; justify-content: space-between; align-items: center; border-top: 2px solid #000; margin-top: 10px; padding-top: 8px; font-weight: 800; }
.invoice-total strong { font-size: 24px; }
.invoice-total small { font-size: 12px; color: #555; }
.invoice-barcode { margin: 12px 0 4px; }
.invoice-barcode .barcode-svg { height: 60px; }
.invoice-qr { text-align: center; margin: 8px auto 4px; }
.invoice-qr img { display: block; margin: 0 auto; width: 120px; height: 120px; image-rendering: pixelated; }
.invoice-qr-label { font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.invoice-foot { text-align: center; font-size: 12px; color: #555; border-top: 1px dashed #000; padding-top: 6px; margin-top: 8px; }
.invoice-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

@media print {
  @page { size: 80mm auto; margin: 3mm; }
  body.invoice-body { background: #fff; margin: 0; }
  body.invoice-body .site-header, body.invoice-body .site-footer,
  body.invoice-body .app-topbar, body.invoice-body .sidebar,
  body.invoice-body .sidebar-backdrop, body.invoice-body .app-footer,
  body.invoice-body .flash-stack, body.invoice-body .invoice-actions,
  body.invoice-body .lang-switch { display: none !important; }
  body.invoice-body .app-content { padding: 0 !important; }
  body.invoice-body .invoice-wrap { max-width: none; margin: 0; }
  body.invoice-body .invoice-sheet {
    display: block !important;
    width: 80mm;
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    padding: 0 0 12mm;
    box-shadow: none;
  }
}

/* ===== Sales / posting ===== */
.sales-filters { flex-wrap: wrap; }
.sales-table td { vertical-align: top; }
.sale-actions { min-width: 230px; }
.sale-edit { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* ===== Gate service yes/no ===== */
.service-yesno { display: grid; gap: 8px; }
.service-yesno-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #f8fbfe;
}
.service-yesno-row > span { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.service-yesno-row small { color: var(--muted); }
.service-yesno-row label { display: flex; align-items: center; gap: 4px; font-size: 13px; }

.sale-downloads { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ===== Support contact under QR ===== */
.thermal-contact, .invoice-contact {
  text-align: center;
  margin: 6px 0 10px;
  padding-top: 6px;
  border-top: 1px dashed #000;
  font-size: 12px;
  font-weight: 700;
}
.thermal-contact strong, .invoice-contact strong {
  display: block;
  margin-top: 2px;
  letter-spacing: 1.5px;
  direction: ltr;
}
.thermal-contact strong { font-size: 26px; }
.invoice-contact strong { font-size: 18px; }
