/* COMnet brand – same palette, font and layout as the COMnet Helpdesk:
   lime #D7DF21, charcoal text, navy sign-in pages, white header with lime top line, side panel. */
@font-face {
  font-family: 'Work Sans Variable';
  src: url('fonts/work-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #f8f9fa;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6c757d;
  --line: #dee2e6;
  --navy: #0f2d5c;
  --header-h: 68px;
  --sidebar-w: 250px;
  --primary: #d7df21;
  --primary-hover: #c2c91a;
  --primary-ink: #1a1a1a;
  --brand-text: #7c810e;            /* dark olive: readable lime-family text on white */
  --brand-tint: rgba(215, 223, 33, 0.18);
  --charcoal: #333333;
  --danger: #d23b3b;
  --ok: #18874f;
  --warn: #b26b00;
  --radius: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font: 14px/1.55 'Work Sans Variable', 'Work Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- app shell: header + side panel (as in the Helpdesk) ---------- */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px;
  background: #fff; border-top: 3px solid var(--primary); border-bottom: 1px solid var(--line);
}
.header-left, .header-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 42px; width: auto; display: block; }
.brand-name { display: flex; flex-direction: column; padding-left: 14px; border-left: 1px solid var(--line); line-height: 1.2; }
.brand-name b { font-size: 16px; font-weight: 600; }
.brand-name small { font-size: 12px; color: var(--muted); }
@media (max-width: 768px) { .brand img { height: 34px; } }
.icon-btn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 18px; color: var(--text); }
.burger { display: none; }

.account { position: relative; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; background: var(--brand-tint); color: var(--brand-text);
  font: 600 14px/1 inherit; display: grid; place-items: center; }
.avatar:hover { box-shadow: 0 0 0 3px var(--brand-tint); }
.account-menu { position: absolute; right: 0; top: 50px; width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 4px; z-index: 40; }
.account-who { display: flex; flex-direction: column; padding: 8px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.account-who b { color: var(--text); font-size: 13px; }
.menu-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; color: var(--text); font: inherit; cursor: pointer; }
.menu-item:hover { background: var(--bg); text-decoration: none; }
.menu-item.danger { color: var(--danger); }

.sidebar {
  position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--sidebar-w); z-index: 20;
  background: #fff; border-right: 1px solid var(--line); padding: 10px 8px; overflow-y: auto; display: flex; flex-direction: column;
}
.nav-group { margin-bottom: 10px; }
.nav-group-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 12px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--text); font-size: 14px; }
.nav-item svg { color: var(--muted); flex-shrink: 0; }
.nav-item:hover { background: var(--bg); text-decoration: none; }
.nav-item.active { background: var(--brand-tint); color: var(--brand-text); font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
.nav-item.active svg { color: var(--brand-text); }
.nav-bottom { margin-top: auto; border-top: 1px solid var(--line); padding-top: 8px; }
.sidebar-backdrop { display: none; }
@media (min-width: 769px) { .show-mobile { display: none !important; } }

main { margin-left: var(--sidebar-w); padding: calc(var(--header-h) + 20px) 24px 24px; max-width: calc(1180px + var(--sidebar-w)); }
/* big monitors: use the extra width */
@media (min-width: 1600px) { main { max-width: calc(1440px + var(--sidebar-w)); } }
/* small laptops (1366×768, 125% Windows scaling): slightly more compact so pages fit without zooming out */
@media (min-width: 1025px) and (max-width: 1440px), (min-width: 1025px) and (max-height: 800px) {
  :root { --header-h: 60px; --sidebar-w: 224px; }
  .brand img { height: 36px; }
  main { padding: calc(var(--header-h) + 16px) 20px 20px; }
  .card { padding: 16px 18px; }
  .nav-item { padding: 8px 12px; }
}

/* signed-out pages: no header / side panel, full-screen navy layout */
body.auth-mode .app-header, body.auth-mode .sidebar, body.auth-mode .sidebar-backdrop { display: none; }
body.auth-mode main { margin: 0; padding: 0; max-width: none; }

/* tablets and phones: the side menu becomes a drawer opened with ☰ */
@media (max-width: 1024px) {
  .burger { display: inline-grid; place-items: center; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  body.sidebar-open .sidebar { transform: none; box-shadow: 0 0 30px rgba(0,0,0,.2); }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,.3); z-index: 15; }
  main { margin-left: 0; padding: calc(var(--header-h) + 18px) 20px 20px; max-width: none; }
}
@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .brand-name, .hide-mobile { display: none !important; }
  main { padding: calc(var(--header-h) + 14px) 14px 16px; }
  .card { padding: 16px 14px; }
  h1 { font-size: 20px; overflow-wrap: anywhere; }
  dl.kv { grid-template-columns: minmax(96px, 38%) 1fr; }
  dl.kv dd { overflow-wrap: anywhere; }
  .modal-backdrop { padding: 12px 10px; }
  .modal { padding: 18px 16px; }
  .wiz-actions { flex-wrap: wrap; }
  .wiz-actions > .btn:last-child { flex: 1 1 auto; justify-content: center; }
}

/* ---------- sign-in pages: navy brand panel + floating card (as in the Helpdesk) ---------- */
.auth-shell {
  position: relative; overflow: hidden; min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(440px, 1fr);
  background: linear-gradient(145deg, #0f2d5c 0%, #143a74 55%, #1b4a8c 100%);
}
.auth-shell::before, .auth-shell::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.06); pointer-events: none; }
.auth-shell::before { width: 820px; height: 820px; left: 34%; top: -330px; }
.auth-shell::after { width: 620px; height: 620px; left: -300px; bottom: -330px; background: rgba(255,255,255,.045); }
.auth-shell > * { position: relative; z-index: 1; }
.auth-brand { display: flex; flex-direction: column; justify-content: space-between; padding: 48px 64px 40px; color: #fff; }
.auth-brand-head { display: flex; align-items: center; gap: 20px; }
.auth-logo { display: block; height: 60px; width: auto; }
.auth-brand-name { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.25); }
.auth-company { font-size: 24px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.auth-product { font-size: 14px; color: #dbe4f3; letter-spacing: .04em; margin-top: 4px; }
.auth-brand-content { max-width: 680px; }
.auth-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ff7a3d; }
.auth-headline { margin: 14px 0 0; font-size: clamp(40px, 4.6vw, 64px); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; color: #fff; }
.auth-lead { margin-top: 24px; max-width: 520px; font-size: 17px; line-height: 1.65; color: #c9d5ea; }
.auth-brand-footer { font-size: 13px; color: #9fb1d0; }
.auth-brand-footer a { color: #fff; font-weight: 600; text-decoration: underline; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 48px 40px 16px; }
.auth-card { width: 100%; max-width: 430px; padding: 26px 32px 22px; border-radius: 18px; background: #fff; color: var(--text);
  border-top: 4px solid var(--primary); box-shadow: 0 24px 60px rgba(4,16,40,.45); }
.auth-card-logo { display: none; height: 34px; margin-bottom: 16px; }
.auth-title { font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.auth-sub { color: var(--muted); margin: 0 0 18px; }
.auth-card .btn[type=submit] { min-width: 120px; justify-content: center; }
.btn-block { width: 100%; justify-content: center; padding: 11px 16px; font-size: 15px; }
.login-row { display: flex; justify-content: flex-end; margin: -4px 0 14px; font-size: 14px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 40px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; font-size: 16px; opacity: .6; }
.pw-eye:hover { opacity: 1; }
.auth-card .register-link { border-top: 0; margin-top: 14px; padding-top: 0; color: var(--muted); }
@media (min-width: 992px) {
  .auth-shell { height: 100vh; height: 100dvh; min-height: 0; }
  .auth-panel { padding-top: 16px; padding-bottom: 16px; overflow-y: auto; }
}
@media (min-width: 992px) and (max-height: 820px) {
  .auth-brand { padding: 28px 56px 24px; }
  .auth-logo { height: 48px; }
  .auth-headline { font-size: clamp(34px, 3.6vw, 50px); margin-top: 10px; }
  .auth-lead { margin-top: 14px; font-size: 15px; line-height: 1.55; }
}
@media (max-width: 991px) {
  .auth-card-logo { display: block; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 28px 16px; min-height: 100vh; }
}

/* cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.detail-layout > * { min-width: 0; }
/* with the side menu, medium screens are too narrow for two columns */
@media (max-width: 1200px) { .detail-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .grid.two, .grid.three, .detail-layout { grid-template-columns: 1fr; }
}

/* forms */
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
label .req { color: var(--danger); }
input, select, textarea {
  width: 100%; padding: 8px 10px; font: inherit; color: inherit;
  border: 1px solid #cdd3df; border-radius: 6px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(215,223,33,.45); border-color: var(--primary-hover); }
textarea { min-height: 70px; resize: vertical; }
.field { margin-bottom: 14px; }
.checks { display: flex; gap: 10px; flex-wrap: wrap; }
.check-tile {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid #cdd3df; border-radius: 8px; padding: 10px 16px; font-weight: 600; margin: 0;
}
.check-tile input { width: auto; }
.check-tile:has(input:checked) { border-color: var(--primary-hover); background: var(--brand-tint); color: var(--text); }
.service-block { border-left: 3px solid var(--primary); padding: 4px 0 4px 14px; margin: 12px 0; }
.service-block[hidden] { display: none; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 6px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--primary); color: var(--primary-ink);
}
.btn:hover { filter: brightness(.96); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.secondary { background: #fff; color: var(--text); border-color: #cdd3df; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.ghost { background: transparent; color: inherit; border-color: rgba(255,255,255,.3); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.link { background: none; color: var(--brand-text); padding: 0; border: 0; font-weight: 600; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; background: #fafaf7; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #fbfce6; }
.table-wrap { overflow-x: auto; }
tr.selected-row { background: #eaf8f0; }
td.num, th.num { text-align: right; white-space: nowrap; }
/* phones: each table row becomes a small card (cells are labelled by labelTables() in app.js) */
@media (max-width: 640px) {
  .table-wrap { overflow-x: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .table-wrap td { padding: 3px 0; border: 0; text-align: right; overflow-wrap: anywhere; }
  .table-wrap td::after { content: ""; display: block; clear: both; }
  .table-wrap td[data-label]::before { content: attr(data-label); float: left; margin-right: 12px; padding-top: 2px; font-size: 11px; font-weight: 700;
    color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
  .table-wrap td:not([data-label]) { text-align: left; }
  .table-wrap td:empty { display: none; }
  .table-wrap td:first-child { font-weight: 600; }
  .table-wrap td.num { white-space: normal; }
}

/* badges */
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.s-PENDING_MANAGER, .s-PENDING_ADMIN { background: #fff3dc; color: #8a5300; }
.s-PENDING_TRAVEL_DESK, .s-PENDING_BOOKING { background: #e5edff; color: #1d47c2; }
.s-OPTIONS_SHARED { background: #f3e8ff; color: #6b2fb3; }
.s-BOOKED { background: #ddf5e7; color: #116b3c; }
.s-REJECTED, .s-CANCELLED { background: #fde4e4; color: #a32222; }
.svc { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #eef1f6; color: #3a4560; margin-right: 4px; }
.flag { color: var(--danger); font-weight: 600; font-size: 12px; }
.pill-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-left: 6px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 12px; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--text); border-bottom: 3px solid var(--primary); }

/* stepper */
.stepper { display: flex; gap: 0; margin: 4px 0 0; overflow-x: auto; padding-bottom: 4px; }
.step { flex: 1 0 96px; position: relative; padding-top: 22px; font-size: 12px; color: var(--muted); text-align: center; }
.step::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 3px; background: var(--line); }
.step::after { content: ""; position: absolute; top: 3px; left: 50%; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: #fff; border: 2px solid #c3c9d6; }
.step.done { color: var(--ok); }
.step.done::before { background: var(--ok); }
.step.done::after { background: var(--ok); border-color: var(--ok); }
.step.current { color: var(--text); font-weight: 700; }
.step.current::after { border-color: var(--primary-hover); background: var(--primary); box-shadow: 0 0 0 4px var(--brand-tint); }
.step.skipped { opacity: .45; text-decoration: line-through; }
.step.stopped { color: var(--danger); font-weight: 700; }
.step.stopped::after { border-color: var(--danger); background: var(--danger); }
/* phones: progress as a vertical list, so every step is visible without sideways scrolling */
@media (max-width: 640px) {
  .stepper { flex-direction: column; overflow: visible; padding: 0; }
  .step { flex: none; padding: 0 0 12px 26px; text-align: left; min-height: 24px; }
  .step:last-child { padding-bottom: 0; }
  .step::before { top: 10px; bottom: -4px; left: 5px; right: auto; width: 3px; height: auto; }
  .step:last-child::before { display: none; }
  .step::after { top: 3px; left: 0; margin-left: 0; }
}

/* key/value */
dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; white-space: pre-wrap; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--line); margin-left: 4px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 1px solid var(--primary-hover); }
.timeline .c { white-space: pre-wrap; background: #f6f7fa; border-radius: 6px; padding: 6px 8px; margin-top: 4px; font-size: 13px; }

.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; }
.notice.warn { background: #fff4e0; color: #7a4a00; border: 1px solid #f5d79e; }
.notice.info { background: #eaf1ff; color: #1d3f9c; border: 1px solid #c5d6ff; }
.notice.ok { background: #e3f6eb; color: #0f5e35; border: 1px solid #b6e3c8; }
.notice.err { background: #fde8e8; color: #8d1f1f; border: 1px solid #f4bdbd; }

.empty { text-align: center; padding: 40px 0; color: var(--muted); }


/* ---------- phones: app-style home, request cards, bottom bar ---------- */
.bottom-nav { display: none; }
/* "‹ Helpdesk" (opened from the Helpdesk): every screen size */
.hd-back { display: none; }
body.from-helpdesk .hd-back { display: inline-flex; align-items: center; height: 36px; padding: 0 12px 0 8px; border-radius: 8px;
  background: var(--brand-tint); color: var(--brand-text); font-weight: 600; font-size: 13px; white-space: nowrap; }
body.from-helpdesk .hd-back:hover { text-decoration: none; filter: brightness(.97); }
@media (max-width: 768px) {
  body.from-helpdesk .brand img { height: 28px; }
  body.has-bottom-nav main { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; align-items: flex-end; justify-content: space-around;
    background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0,0,0,.05); }
  .bottom-nav[hidden] { display: none; }
  .bn-item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 0; border: 0; background: none;
    font: inherit; font-size: 11px; color: var(--muted); cursor: pointer; }
  .bn-item:hover { text-decoration: none; }
  .bn-item.active { color: var(--navy); font-weight: 600; }
  .bn-ico { font-style: normal; font-size: 21px; line-height: 1.1; }
  .bn-item .m-count { position: absolute; top: 0; left: calc(50% + 6px); }
  .bn-new { flex: 1; display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 11px; }
  .bn-new:hover { text-decoration: none; }
  .bn-new span { width: 54px; height: 54px; margin-top: -28px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center;
    font-size: 30px; line-height: 1; border: 4px solid #fff; box-shadow: 0 4px 14px rgba(15,45,92,.35); }
  .bn-new small { font-size: 11px; margin-top: 1px; }
  .bn-new.active small { color: var(--navy); font-weight: 600; }
  body.has-bottom-nav .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.has-bottom-nav .trial-ribbon { bottom: calc(68px + env(safe-area-inset-bottom)); border-radius: 8px; }
}
.m-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger);
  color: #fff; font-size: 11px; font-weight: 700; font-style: normal; line-height: 1; }
.m-count[hidden] { display: none; }

.m-hello { display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-radius: 18px; background: var(--navy); color: #fff; margin-bottom: 12px; }
.m-avatar { width: 58px; height: 58px; flex-shrink: 0; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center;
  font-weight: 700; font-size: 20px; border: 3px solid var(--primary); }
.m-hello-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.m-hello-text .m-greet { color: #ff9a5c; font-weight: 600; font-size: 15px; }
.m-hello-text b { font-size: 18px; overflow-wrap: anywhere; }
.m-hello-text span:last-child { color: #c9d5ea; font-size: 13px; }
.m-trip { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 40px 14px 16px; margin-bottom: 10px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--primary); color: var(--text); }
.m-trip:hover { text-decoration: none; border-color: var(--primary-hover); }
.m-trip-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.m-trip b { font-size: 17px; }
.m-trip span { font-size: 13px; color: var(--muted); }
.m-trip-go, .m-chev { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--brand-text); }
.m-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 40px 14px 16px; margin-bottom: 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.m-row:hover { text-decoration: none; }
.m-row .m-badge { margin-left: auto; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; background: var(--danger); color: #fff;
  display: grid; place-items: center; font-size: 13px; }
.m-row .m-badge.zero { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.m-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; margin: 6px 0 18px; }
.m-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); font-size: 13px; text-align: center; line-height: 1.25; }
.m-tile:hover { text-decoration: none; }
.m-tile-ico { position: relative; width: 62px; height: 62px; border-radius: 16px; background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 28px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.m-tile-ico .m-count { position: absolute; top: -6px; right: -6px; }
.m-section { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 2px 8px; }
.m-section h3 { margin: 0; }
.req-list { display: grid; gap: 10px; }
.req-card { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--text); }
.req-card:hover { text-decoration: none; border-color: var(--primary-hover); }
.req-card-top { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.req-card-mid { font-size: 13px; color: var(--muted); }
.req-card-bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.trial-ribbon { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 70; pointer-events: none;
  background: #ff7a3d; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 3px 14px; border-radius: 8px 8px 0 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,.15); white-space: nowrap; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--charcoal); color: #fff; padding: 10px 18px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.2); z-index: 60; max-width: 90vw; }
.toast.err { background: var(--danger); }

/* From / To place picker */
.journey-row { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 12px; align-items: start; }
.place-field { position: relative; }
.place-field input { font-size: 15px; font-weight: 600; padding: 10px 12px; }
.swap-btn { margin-top: 24px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #cdd3df; background: #fff; font-size: 18px; cursor: pointer; color: var(--brand-text); }
.swap-btn:hover { background: #fbfce6; border-color: var(--primary-hover); }
.place-menu { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% - 10px); background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.14); max-height: 380px; overflow-y: auto; padding: 4px 0; }
.place-head { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 14px 4px; }
.place-item { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 8px 14px; cursor: pointer; }
.place-item.active, .place-item:hover { background: #fbfce6; }
.place-main { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.place-region { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-code { grid-row: span 2; align-self: center; font-weight: 700; font-size: 12px; background: var(--charcoal); color: var(--primary); border-radius: 4px; padding: 2px 7px; letter-spacing: .04em; }
.place-road { grid-row: span 2; align-self: center; font-size: 13px; opacity: .6; }
.place-airport { color: var(--muted); font-size: 12px; }
.place-item.custom { display: block; color: var(--brand-text); font-weight: 600; }
.place-kind { align-self: center; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.place-loading { font-weight: 500; text-transform: none; letter-spacing: 0; font-style: italic; }
.place-credit { font-size: 10px; color: var(--muted); text-align: right; padding: 4px 12px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
@media (max-width: 900px) {
  .journey-row { grid-template-columns: 1fr; gap: 0; }
  .swap-btn { margin: -6px auto 8px; transform: rotate(90deg); }
}

/* new request: 3-step wizard */
.wizard-steps { list-style: none; display: flex; gap: 0; margin: 0 0 16px; padding: 0; counter-reset: s; }
.wizard-steps li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border: 1px solid var(--line);
  color: var(--muted); font-weight: 600; font-size: 14px; position: relative; }
.wizard-steps li:first-child { border-radius: 10px 0 0 10px; }
.wizard-steps li:last-child { border-radius: 0 10px 10px 0; }
.wizard-steps li + li { border-left: 0; }
.wizard-steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); font-size: 13px; flex-shrink: 0; }
.wizard-steps li.active { color: var(--text); box-shadow: inset 0 -3px 0 var(--primary); }
.wizard-steps li.active span { background: var(--primary); border-color: var(--primary-hover); color: var(--primary-ink); }
.wizard-steps li.done { color: var(--brand-text); cursor: pointer; }
.wizard-steps li.done span { background: var(--brand-tint); border-color: var(--primary-hover); }
.wizard-steps li.done span::after { content: "✓"; }
.wizard-steps li.done span { font-size: 0; }
.wizard-steps li.done span::after { font-size: 13px; }
.wiz-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.trip-summary { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.trip-summary-right { display: flex; align-items: center; gap: 6px; }
.pref-lines { flex-basis: 100%; display: grid; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pref-line { font-size: 13px; white-space: pre-wrap; }
.option-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.option-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 10px; font-size: 15px; }
.option-card-head b { white-space: nowrap; }
.approval-path { margin-top: 6px; }
@media (max-width: 768px) {
  .wizard-steps li { font-size: 12px; padding: 8px; gap: 6px; }
}

/* options attached by the employee */
.choice-box { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.choice-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.choice-list { display: grid; gap: 6px; }
.choice { display: grid; grid-template-columns: 92px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; background: #fff;
  border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 8px; }
.choice.detail { margin-bottom: 8px; }
.choice-rank { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-text); }
.choice-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.choice-text .small { white-space: normal; }
.choice-fare { font-weight: 700; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.choice-tools { display: flex; gap: 4px; }
.choice-empty { padding: 6px 2px; }
.icon-mini { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; }
.icon-mini:hover { border-color: var(--primary-hover); background: #fbfce6; }
.manual-add { margin-top: 10px; }
.manual-add summary { cursor: pointer; font-weight: 600; color: var(--brand-text); font-size: 13px; }
.manual-grid { display: grid; grid-template-columns: 1.3fr 1.3fr 110px auto; gap: 8px; margin-top: 8px; }
.review-choice { margin: 2px 0 0 4px; }
/* screenshot of an option found elsewhere */
.shot-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; }
.shot-btn { cursor: pointer; margin: 0; }
.choice.shot { grid-template-columns: 92px 1fr auto; align-items: start; }
.shot-body { display: flex; gap: 10px; min-width: 0; }
.shot-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); flex-shrink: 0;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.shot-fields { display: grid; gap: 6px; flex: 1; min-width: 0; }
.shot-fields input { padding: 6px 8px; }
.shot-fields .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-view { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; color: var(--brand-text); width: fit-content; }
.shot-view:hover { border-color: var(--primary-hover); background: #fbfce6; }
.shot-view .shot-thumb { width: 48px; height: 48px; }
/* train station filter */
.station-filter { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
.station-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
@media (max-width: 768px) {
  .choice { grid-template-columns: 1fr auto; }
  .choice-rank { grid-column: 1 / -1; }
  .choice.shot { grid-template-columns: 1fr auto; }
  .choice.shot .shot-body { flex-direction: column; }
  .choice.shot .shot-thumb { width: 100%; height: 140px; object-fit: contain; background: #f3f4f6; }
  .manual-grid { grid-template-columns: 1fr; }
}

/* live flight / hotel results */
.live-results { margin-bottom: 12px; }
.live-loading { display: flex; align-items: center; gap: 10px; padding: 14px; color: var(--muted); background: var(--bg); border-radius: 8px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--primary-hover); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.live-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 8px; }
.live-tools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; background: #fff;
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text); margin: 0; }
.chip.on { background: var(--brand-tint); border-color: var(--primary-hover); color: var(--brand-text); }
.chip input { width: auto; margin: 0; }
.offer { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 8px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.offer:hover { border-color: #c5cbd6; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.offer.picked { border-color: var(--primary-hover); background: #fcfdf2; box-shadow: inset 3px 0 0 var(--primary); }
.offer-legs { display: grid; gap: 10px; min-width: 0; }
.leg { display: grid; grid-template-columns: minmax(110px, 1.2fr) auto minmax(90px, 1fr) auto; gap: 12px; align-items: center; }
.leg-time, .hotel-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.leg-air { display: flex; align-items: center; gap: 8px; line-height: 1.25; min-width: 0; }
.leg-air > span { display: flex; flex-direction: column; min-width: 0; }
.air-logo { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.leg-time b { font-size: 16px; }
.leg-mid { display: flex; flex-direction: column; align-items: center; color: var(--muted); }
.leg-line { width: 100%; height: 1px; background: #c5cbd6; margin: 3px 0; position: relative; }
.leg-line::after { content: "✈"; position: absolute; right: -2px; top: -8px; font-size: 11px; color: #9aa3b2; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
.offer-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.offer-price b { font-size: 18px; }
.key-add { display: grid; grid-template-columns: 1.2fr 1.4fr 1.4fr auto; gap: 8px; margin-top: 12px; }
@media (max-width: 768px) { .key-add { grid-template-columns: 1fr; } }
.station-pick { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.station-pick label { flex: 1; min-width: 200px; margin: 0; font-size: 12px; }
.station-pick select { margin-top: 4px; }
.station-arrow { padding-bottom: 9px; color: var(--muted); }
.leg-line.rail::after { content: "🚆"; top: -9px; font-size: 10px; }
.run-days { margin-top: 4px; }
.live-credit { font-size: 11px; color: var(--muted); text-align: right; margin-top: 4px; }
textarea.flash { box-shadow: 0 0 0 3px rgba(215,223,33,.55); transition: box-shadow .3s; }
@media (max-width: 768px) {
  .offer { grid-template-columns: 1fr; }
  .offer-price { flex-direction: row; align-items: center; justify-content: space-between; }
  .leg { grid-template-columns: 1fr auto 1fr auto; }
  .leg-air { grid-column: 1 / -1; flex-direction: row; gap: 8px; }
}

/* "Check availability & fares" links */
.book-links { margin: 16px 0 4px; padding: 12px 14px; border: 1px dashed var(--primary-hover); border-radius: 10px; background: #fcfdf2; }
.book-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.book-row { display: flex; flex-wrap: wrap; gap: 8px; }
.book-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--text); font-weight: 600; font-size: 13px; }
.book-btn:hover { border-color: var(--primary-hover); background: #fbfce6; text-decoration: none; }
.book-btn .ext { color: var(--muted); font-size: 11px; }

/* helpdesk integration */
.hd-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 4px; background: var(--charcoal); color: var(--primary); vertical-align: middle; letter-spacing: .02em; }
.hd-card { border-left: 4px solid var(--primary); }
.job-list { display: grid; gap: 8px; }
.job { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; cursor: pointer; }
.job:hover, .job.selected { border-color: var(--primary-hover); background: #fbfce6; }
.job-date { min-width: 96px; font-weight: 700; color: var(--brand-text); }
.hd-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; background: #fafaf7; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.hd-info > div { display: flex; flex-direction: column; }
input[readonly] { background: #f5f5f3; color: var(--muted); }

.sent-mail { width: 56px; height: 56px; margin: 6px auto 0; border-radius: 50%; background: var(--brand-tint); color: var(--brand-text); display: grid; place-items: center; font-size: 26px; }
.register-link { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; text-align: center; }



/* page tabs (settings) */
.page-tabs { margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.page-tabs a:hover { text-decoration: none; color: var(--text); }
.page-tabs a.active { color: var(--text); border-bottom-color: var(--primary); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px; }
.toolbar input { flex: 1; min-width: 220px; }
.toolbar select { width: auto; }

/* checkbox + label: the box keeps its size and lines up with the first line when the text wraps */
.switch { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; cursor: pointer; line-height: 1.45; margin: 0; }
.switch input { flex: 0 0 18px; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary-hover); }
code { background: #f0f0ec; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
details summary { cursor: pointer; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(26,26,26,.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--card); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 480px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { max-width: 780px; }
.secret-box { display: flex; flex-direction: column; gap: 4px; background: #fbfce6; border: 1px dashed var(--primary-hover); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
.secret-box code { font-size: 20px; background: none; padding: 0; letter-spacing: .05em; }

.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
