/* =====================================================================
   NORTIQA shared portal style (v18)
   Loaded AFTER agent.css / supplier.css / admin.css, so it only restyles; no page logic depends on it.
   Brand: deep teal ink, brass accent, coral for the main call to action, warm sand ground.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=IBM+Plex+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ui-ink: #063A42;        /* sidebar, headings, primary buttons */
  --ui-ink-2: #0a4e58;      /* hover */
  --ui-ink-3: #0d6270;
  --ui-brass: #FFB800;      /* accents, active menu marker */
  --ui-coral: #E8503C;      /* the one action per page: add to quote, book, save */
  --ui-coral-2: #cf4230;
  --ui-sand: #FFFAF1;       /* page ground */
  --ui-card: #ffffff;
  --ui-text: #12303A;
  --ui-muted: #5d7178;
  --ui-line: #E4DCC8;
  --ui-line-2: #F1EBDA;
  --ui-ok: #16714a;   --ui-ok-bg: #e6f5ee;
  --ui-warn: #8a5a00; --ui-warn-bg: #fff3d6;
  --ui-bad: #b3261e;  --ui-bad-bg: #fdecec;
  --ui-info: #0a4e58; --ui-info-bg: #e6f2f3;
  --ui-radius: 10px;
  --ui-radius-sm: 7px;
  --ui-shadow: 0 1px 2px rgba(6,58,66,.06), 0 6px 18px rgba(6,58,66,.05);
  --ui-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ui-display: 'Fraunces', Georgia, serif;
  --ui-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

/* ---------- base ---------- */
body { font-family: var(--ui-font); background: var(--ui-sand); color: var(--ui-text); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--ui-ink-3); }
a:hover { color: var(--ui-ink); }
:focus-visible { outline: 3px solid var(--ui-brass); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; }
.hint, .muted { color: var(--ui-muted); }
td.num, th.num, .num-col { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- shell ---------- */
.app-shell { background: var(--ui-sand); }
.sidebar { background: var(--ui-ink); width: 236px; padding: 0; }
.sidebar .brand, .brand { font-family: var(--ui-display); font-weight: 700; letter-spacing: .06em; font-size: 19px; padding: 24px 22px 18px; border-bottom: 1px solid rgba(255,255,255,.10); color: #fff; }
.sidebar .brand span, .brand span { font-family: var(--ui-font); color: var(--ui-brass); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; margin-top: 4px; }
.sidebar nav { padding: 14px 10px; gap: 2px; overflow-y: auto; }
.sidebar nav a { color: rgba(255,255,255,.78); padding: 10px 14px; border-radius: var(--ui-radius-sm); font-size: 14px; font-weight: 600; border-left: 3px solid transparent; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.sidebar nav a.on, .sidebar nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; border-left-color: var(--ui-brass); }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.10); padding: 16px 22px; }
.sidebar-footer .logout { color: var(--ui-brass); font-weight: 700; }
.topbar { background: var(--ui-card); border-bottom: 1px solid var(--ui-line); padding: 18px 32px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-family: var(--ui-display); font-weight: 700; font-size: 24px; color: var(--ui-ink); letter-spacing: -.005em; }
.content-inner { padding: 28px 32px 48px; max-width: 1280px; }

/* ---------- panels, stats ---------- */
.panel { background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); padding: 22px 24px; }
.panel h2 { font-family: var(--ui-display); font-weight: 700; font-size: 18px; color: var(--ui-ink); margin-top: 0; }
.panel-header { gap: 12px; flex-wrap: wrap; }
.stat-grid { gap: 14px; }
.stat-card { text-align: left; border-radius: var(--ui-radius); border-color: var(--ui-line); box-shadow: var(--ui-shadow); padding: 16px 18px; }
.stat-card .num { font-family: var(--ui-display); font-size: 30px; color: var(--ui-ink); font-variant-numeric: tabular-nums; }
.stat-card .label { color: var(--ui-muted); font-weight: 700; letter-spacing: .06em; font-size: 11px; }
.stat-card.warn { border-color: var(--ui-brass); background: linear-gradient(0deg, #fffbee, #fff); }

/* ---------- buttons ---------- */
.btn, button.btn, a.btn { background: var(--ui-ink); color: #fff !important; border: 1px solid var(--ui-ink); border-radius: var(--ui-radius-sm); padding: 10px 18px; font: 700 13.5px/1.2 var(--ui-font); cursor: pointer; text-decoration: none !important; transition: background .15s, transform .05s, box-shadow .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { background: var(--ui-ink-2); border-color: var(--ui-ink-2); }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 6px 12px; font-size: 12.5px; }
.btn.secondary, .btn.ghost { background: transparent; color: var(--ui-ink) !important; border: 1px solid var(--ui-line); margin-left: 0; }
.btn.secondary:hover, .btn.ghost:hover { background: var(--ui-line-2); border-color: var(--ui-line); }
.btn.primary, .btn.cta, .btn.accent, .btn-cta { background: var(--ui-coral); border-color: var(--ui-coral); }
.btn.primary:hover, .btn.cta:hover, .btn.accent:hover, .btn-cta:hover { background: var(--ui-coral-2); border-color: var(--ui-coral-2); }
.btn.danger { background: var(--ui-bad); border-color: var(--ui-bad); }
.btn[disabled], button[disabled] { opacity: .5; cursor: not-allowed; }
.quick-actions { gap: 10px; }

/* ---------- forms ---------- */
.form-grid label, .hx-grid label, .hx-sec label.hx-l, .auth-card label { font-weight: 700; font-size: 12.5px; color: var(--ui-ink); letter-spacing: .01em; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], input[type=url], select, textarea,
.form-grid input, .form-grid select, .form-grid textarea, .hx-grid input, .hx-grid select, .hx-grid textarea, .auth-card input, .filter-bar input, .filter-bar select {
  border: 1px solid #d3cbb3; border-radius: var(--ui-radius-sm); background: #fff; color: var(--ui-text); font-family: var(--ui-font); font-size: 14px; padding: 9px 11px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ui-ink-3); box-shadow: 0 0 0 3px rgba(13,98,112,.18); }
input::placeholder, textarea::placeholder { color: #9aa9ad; }
input[type=checkbox], input[type=radio] { accent-color: var(--ui-ink-3); }
.form-grid { gap: 16px 18px; }

/* ---------- tables ---------- */
.data-table { border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.data-table th { background: #FAF6EA; color: var(--ui-muted); font-size: 11px; font-weight: 800; letter-spacing: .07em; padding: 9px 12px; border-bottom: 1px solid var(--ui-line); white-space: nowrap; }
.data-table th:first-child { border-top-left-radius: 8px; } .data-table th:last-child { border-top-right-radius: 8px; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--ui-line-2); vertical-align: middle; }
.data-table tbody tr:hover td { background: #FFFCF4; }
.data-table tr:last-child td { border-bottom: 0; }
@media (max-width: 900px) { .panel:has(> .data-table), .panel > .data-table { display: block; overflow-x: auto; } .data-table { min-width: 560px; } }

/* ---------- badges and alerts ---------- */
.badge { font-weight: 700; font-size: 11.5px; letter-spacing: .01em; padding: 3px 10px; border-radius: 999px; background: #eef1f2; color: var(--ui-muted); text-transform: capitalize; display: inline-block; }
.badge.active, .badge.confirmed, .badge.paid, .badge.completed, .badge.approved { background: var(--ui-ok-bg); color: var(--ui-ok); }
.badge.pending, .badge.testing, .badge.draft, .badge.new { background: var(--ui-warn-bg); color: var(--ui-warn); }
.badge.suspended, .badge.rejected, .badge.inactive, .badge.cancelled, .badge.failed, .badge.disabled, .badge.expired { background: var(--ui-bad-bg); color: var(--ui-bad); }
.badge.inactive, .badge.disabled { background: #f1f1f1; color: #666; }
.alert { border-radius: var(--ui-radius-sm); padding: 12px 14px; font-size: 13.5px; border: 1px solid transparent; }
.alert.error { background: var(--ui-bad-bg); color: var(--ui-bad); border-color: #f1c4c1; }
.alert.success { background: var(--ui-ok-bg); color: var(--ui-ok); border-color: #bfe2d0; }
.alert.info, .alert.warn { background: var(--ui-warn-bg); color: var(--ui-warn); border-color: #f0d78c; }
.alert.info { background: var(--ui-info-bg); color: var(--ui-info); border-color: #bcd9dd; }

/* ---------- filter bar, product cards (agent) ---------- */
.filter-bar { gap: 10px; flex-wrap: wrap; background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); padding: 12px; box-shadow: var(--ui-shadow); margin-bottom: 18px; }
.filter-bar input { min-width: 220px; }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.product-card { border-radius: 14px; border: 1px solid var(--ui-line); box-shadow: var(--ui-shadow); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(6,58,66,.08), 0 14px 30px rgba(6,58,66,.12); }
.product-card img, .product-card .img-placeholder { height: 178px; background: linear-gradient(135deg, #e9dfc4, #f6efdc); }
.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body h3 { font-family: var(--ui-display); font-weight: 700; font-size: 17px; line-height: 1.25; margin: 4px 0 2px; color: var(--ui-ink); }
.product-body p { color: var(--ui-muted); font-size: 13px; min-height: 0; margin: 0; }
.source-tag { background: var(--ui-line-2); color: var(--ui-muted); font-weight: 700; letter-spacing: .06em; border-radius: 999px; padding: 3px 9px; }
.price, .price-box .price { font-family: var(--ui-font); font-weight: 800; color: var(--ui-ink); font-size: 20px; font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.price-box { gap: 16px; flex-wrap: wrap; }
.product-detail .hero { border-radius: 14px; max-height: 360px; box-shadow: var(--ui-shadow); }

/* ---------- login / reset pages ---------- */
.auth-body, .auth-page { background: radial-gradient(1200px 600px at 20% -10%, #0d6270 0%, transparent 60%), var(--ui-ink); }
.auth-card { border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.28); padding: 40px 38px; }
.auth-card h1 { font-family: var(--ui-display); color: var(--ui-ink); }
.auth-card .brand, .auth-logo { font-family: var(--ui-display); color: var(--ui-ink); border: 0; padding: 0; }
.auth-card button, .auth-card .btn { background: var(--ui-ink); border-radius: var(--ui-radius-sm); font-weight: 700; padding: 12px; }
.auth-card button:hover { background: var(--ui-ink-2); }

/* ---------- special screens: hotels, transfers, venue (the .hx pages) ---------- */
.hx { --ink: var(--ui-ink); --brass: var(--ui-brass); --line: var(--ui-line); --mute: var(--ui-muted); }
.hx-sec { border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); padding: 22px 24px; border-color: var(--ui-line); }
.hx-sec > h3 { font-family: var(--ui-display); font-size: 18px; font-weight: 700; }
.hx-tabs { gap: 6px; border-bottom: 1px solid var(--ui-line); padding-bottom: 0; }
.hx-tabs a { border-radius: 8px 8px 0 0; font-weight: 700; color: var(--ui-ink); padding: 10px 16px; border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; }
.hx-tabs a:hover { background: #FBF5E4; }
.hx-tabs a.on { background: var(--ui-card); color: var(--ui-ink); border-color: var(--ui-line); box-shadow: inset 0 3px 0 var(--ui-brass); }
.hx-savebar { position: sticky; bottom: 0; z-index: 5; background: linear-gradient(0deg, var(--ui-sand) 70%, rgba(255,250,241,0)); padding: 16px 0 8px; display: flex; gap: 10px; }
.hx table.tx th, .hx table.vt th { background: #FAF6EA; font-weight: 800; }
.hx table.tx input[type=text], .hx table.tx input[type=number], .hx table.tx select { border-color: #d3cbb3; border-radius: 6px; }
.hx-gridwrap { border-radius: var(--ui-radius); border-color: var(--ui-line); }

/* ---------- phone / tablet: sidebar becomes a slide-in menu ---------- */
.nav-toggle { display: none; background: transparent; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-sm); width: 40px; height: 40px; padding: 0; cursor: pointer; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 2px; background: var(--ui-ink); border-radius: 2px; content: ""; position: relative; }
.nav-toggle span::before { position: absolute; top: -6px; } .nav-toggle span::after { position: absolute; top: 6px; }
.nav-scrim { display: none; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: 100%; width: min(84vw, 300px); z-index: 60; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(6,58,66,.45); z-index: 50; }
  .topbar { padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
  .topbar h1 { font-size: 20px; }
  .content-inner { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
  .form-grid { grid-template-columns: 1fr; }
  .panel, .hx-sec { padding: 16px; }
  .filter-bar input { min-width: 0; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- pieces the supplier sheet never had, so all three portals share them ---------- */
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-header h2 { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 22px; }
.stat-card { background: var(--ui-card); border: 1px solid var(--ui-line); }
.stat-card .num { display: block; line-height: 1.15; }
.stat-card .label { display: block; margin-top: 4px; }
.product-grid { display: grid; }
.product-card { background: var(--ui-card); overflow: hidden; }
.product-card img, .product-card .img-placeholder { width: 100%; object-fit: cover; display: block; }
.source-tag { align-self: flex-start; display: inline-block; font-size: 10.5px; text-transform: uppercase; }
.product-body .btn { align-self: flex-start; margin-top: auto; }
.filter-bar { display: flex; }
.filter-bar input { flex: 1; }
.quick-actions { display: flex; flex-wrap: wrap; }

/* Account sub-navigation (Statement / Enquiries / Bookings / Branding) */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 32px 0; }
@media (max-width: 900px) { .subnav { padding: 12px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); } }
