/* Flight Hub pieces that the Vuexy template has no ready class for.
   Everything uses the template's own variables so it matches its look. */

:root {
  --fh-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---- Brand ---- */
.fh-logo {
  display: inline-grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 0.5rem;
  background: var(--bs-primary);
  color: #fff;
}
.app-brand-link { display: inline-flex; align-items: center; text-decoration: none; }
.app-brand-link:hover { text-decoration: none; }
.auth-cover-brand { display: inline-flex; align-items: center; gap: 0.75rem; }
/* On wide screens the brand sits over the busy cover photo: give it a dark glass chip. */
@media (min-width: 1200px) {
  .auth-cover-brand {
    background: rgba(0, 0, 0, 0.55);
    padding: 8px 12px;
    border-radius: 10px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .auth-cover-brand .app-brand-text { color: #fff !important; font-size: 16px; }
}

/* ---- Menu icons are inline SVG instead of the template's icon font ---- */
.menu-icon { display: inline-flex; align-items: center; justify-content: center; }
.menu-icon svg { inline-size: 20px; block-size: 20px; }
.layout-navbar .btn.nav-link { border: 0; background: none; }

/* ---- Buttons with an icon ---- */
.btn { gap: 0.375rem; }
.btn svg { flex-shrink: 0; }
.btn.is-busy { pointer-events: none; opacity: 0.7; }

/* ---- Page header ---- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-block-end: 1.5rem; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.375rem; margin-block-end: 0.75rem; color: var(--bs-secondary-color); font-size: 0.8125rem; }
.mono-title .mono { font-size: 0.9em; }

/* ---- Layout helpers ---- */
.stack { display: flex; flex-direction: column; gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; align-items: center; margin-block-start: 0.25rem; }
.card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.card-flush > .card-body { padding: 0; }
.pad { padding: 1.5rem; }
@media (max-width: 767.98px) {
  .grid-2, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none !important; }
}

/* ---- Text ---- */
.muted { color: var(--bs-secondary-color); }
.mono { font-family: var(--fh-mono); font-size: 0.8125rem; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.cell-main { display: block; font-weight: 500; color: var(--bs-heading-color); }
.cell-sub { display: block; font-size: 0.8125rem; color: var(--bs-secondary-color); }

/* ---- Chips (counts, tags) ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.625rem;
  border-radius: 50rem;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
.table-wrap .table { margin-bottom: 0; }
.row-link { cursor: pointer; }
.row-link:hover > td { background-color: rgba(var(--bs-primary-rgb), 0.04); }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; }
.field .form-label { margin-bottom: 0.25rem; }
.field.has-error .invalid-feedback { display: block; }
.field .invalid-feedback:empty { display: none; }
.field-meta { display: flex; flex-wrap: wrap; gap: 0.375rem; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.filters .field { min-width: 180px; }
.login-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-message:empty { display: none; }
.form-message { margin-bottom: 0; }

/* ---- Alerts ---- */
.fh-alert { display: flex; gap: 0.75rem; align-items: flex-start; }
.alert-text { flex: 1; display: flex; flex-direction: column; gap: 0.125rem; }

/* ---- Loading and empty states ---- */
.loading { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 2rem 1rem; color: var(--bs-secondary-color); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2.5rem 1rem; text-align: center; color: var(--bs-secondary-color); }
.empty-icon { display: inline-grid; place-items: center; inline-size: 52px; block-size: 52px; margin-bottom: 0.25rem; }

/* ---- Overview ---- */
a.card.stat { color: inherit; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
a.card.stat:hover { transform: translateY(-2px); }
.bars { display: flex; flex-direction: column; gap: 1rem; }
.bar-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.375rem; }
.bars .progress { block-size: 8px; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li + li { border-top: 1px solid var(--bs-border-color); }
.mini-list a { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.75rem 0; color: inherit; text-decoration: none; transition: background-color 0.15s ease; }
.mini-list a:hover { background-color: rgba(var(--bs-primary-rgb), 0.04); }
.mini-list a > div { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.mini-end { align-items: flex-end; text-align: end; }

/* ---- Key/value lists and raw data ---- */
.kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 0.625rem 1.25rem; margin: 0; }
.kv dt { color: var(--bs-secondary-color); font-weight: 400; }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }
.data-section + .data-section { margin-top: 1.25rem; }
.data-section h3 { margin-bottom: 0.625rem; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bs-secondary-color); }
.json { margin: 0; padding: 1rem; background: #2f3349; color: #e1def5; border-radius: var(--bs-border-radius); font-family: var(--fh-mono); font-size: 0.78rem; line-height: 1.55; overflow: auto; max-height: 460px; white-space: pre-wrap; word-break: break-word; }
.secret-box { display: flex; gap: 0.5rem; align-items: center; padding: 0.75rem; background: #2f3349; color: #ffd8b3; border-radius: var(--bs-border-radius); font-family: var(--fh-mono); font-size: 0.8125rem; word-break: break-all; }
.secret-box span { flex: 1; }

/* ---- Providers ---- */
.providers { display: flex; flex-direction: column; gap: 1rem; }
.provider { overflow: hidden; }
.provider-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.25rem; }
.provider-title { display: flex; align-items: center; gap: 0.75rem; min-width: 0; color: var(--bs-primary); }
.provider-title > div { display: flex; flex-direction: column; min-width: 0; color: var(--bs-heading-color); }
.provider-body { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; border-top: 1px solid var(--bs-border-color); }
.provider.collapsed .provider-body { display: none; }
.switch { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }

/* ---- Pager ---- */
.pager-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1.25rem; border-top: 1px solid var(--bs-border-color); }
.pager-info { font-size: 0.8125rem; color: var(--bs-secondary-color); }
.pager-buttons { display: flex; align-items: center; gap: 0.5rem; }

/* ---- Timeline (booking events) ---- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1.25rem 1.75rem; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 6px; top: 8px; bottom: -6px; width: 1px; background: var(--bs-border-color); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 0; top: 4px; width: 13px; height: 13px; border-radius: 50%; background: var(--bs-paper-bg, #fff); border: 3px solid var(--bs-primary); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.16); }
.timeline-head { display: flex; flex-wrap: wrap; gap: 0.625rem; align-items: baseline; }
.timeline-head strong { font-family: var(--fh-mono); font-size: 0.8125rem; color: var(--bs-heading-color); }
.timeline details { margin-top: 0.375rem; }

/* ---- Modal (native dialog styled like the template's modal) ---- */
.fh-modal {
  inline-size: min(560px, calc(100vw - 2rem));
  max-block-size: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: var(--bs-paper-bg, #fff);
  color: var(--bs-body-color);
  box-shadow: 0 0.25rem 1.125rem rgba(47, 43, 61, 0.16);
}
.fh-modal-wide { inline-size: min(760px, calc(100vw - 2rem)); }
/* Template page pieces the app draws without images: initials stand in for photos. */
.user-avatar-big { inline-size: 120px; block-size: 120px; display: grid; place-items: center; font-size: 2.5rem; font-weight: 600; }
.account-avatar { inline-size: 100px; block-size: 100px; flex: none; display: grid; place-items: center; font-size: 2rem; font-weight: 600; }
.fh-misc { min-block-size: calc(100vh - 14rem); padding: 1.5rem; }
.fh-misc-code { font-size: 6rem; line-height: 6rem; }
.fh-stat-tile { min-inline-size: 7rem; }
.fh-ip-list { max-block-size: 9rem; overflow: auto; }
.fh-modal::backdrop { background: rgba(47, 43, 61, 0.5); }
.fh-modal .modal-content { border: 0; box-shadow: none; background: transparent; }
.fh-modal .modal-body { position: relative; padding: 0; }
.fh-modal.modal-simple .fh-modal-close { position: absolute; inset-block-start: -1.75rem; inset-inline-end: -1.75rem; }
@media (max-width: 767.98px) { .fh-modal.modal-simple .fh-modal-close { inset-block-start: -0.5rem; inset-inline-end: -0.5rem; } }
.fh-modal-body { display: flex; flex-direction: column; gap: 1rem; }
.fh-modal-body p { margin: 0; }
.fh-modal-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; padding-block-start: 1.5rem; }

/* ---- Toasts ---- */
.fh-toasts { position: fixed; inset-block-end: 1.5rem; inset-inline-end: 1.5rem; z-index: 1090; display: flex; flex-direction: column; gap: 0.75rem; max-inline-size: min(380px, calc(100vw - 2rem)); }
.fh-toast {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--bs-paper-bg, #fff);
  color: var(--bs-heading-color);
  box-shadow: 0 0.25rem 1.125rem rgba(47, 43, 61, 0.16);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.fh-toast .avatar-initial { display: inline-grid; place-items: center; inline-size: 30px; block-size: 30px; flex-shrink: 0; }
.fh-toast.leaving { opacity: 0; transform: translateY(6px); }

/* ---- Navbar ---- */
.fh-navbar-title { font-size: 0.9375rem; }

/* ---- Horizontal menu ----
   The template's menu.js turns the bar into a side panel below xl; this does the same with CSS only. */
.fh-menu-head { display: none; }
/* The template's helpers.js sets this inline from the fixed navbar's height. */
.layout-navbar-fixed .layout-horizontal .layout-page { padding-top: 3.5rem; }
@media (max-width: 1199.98px) {
  .layout-horizontal .layout-menu-horizontal { display: none; }
  .layout-menu-expanded .layout-horizontal .layout-menu-horizontal {
    display: block;
    position: fixed !important;
    inset-block: 0 !important;
    inset-inline-start: 0;
    z-index: 1100;
    inline-size: min(260px, 85vw) !important;
    background: var(--bs-paper-bg, #fff);
    box-shadow: 0 0.25rem 1.125rem rgba(47, 43, 61, 0.16);
    overflow-y: auto;
  }
  .layout-menu-expanded .layout-horizontal .layout-menu-horizontal > .container-xxl { flex-direction: column; padding-inline: 0.75rem; }
  .layout-menu-expanded .fh-menu-head { display: flex; align-items: center; padding-block: 1rem; }
  .layout-menu-expanded .layout-horizontal .menu-inner { flex-direction: column; flex: none; }
  .layout-menu-expanded .layout-horizontal .menu-inner > .menu-item { margin-inline: 0 !important; margin-block: 0.125rem; }
  .layout-menu-expanded .layout-horizontal .layout-overlay { display: block; position: fixed; inset: 0; z-index: 1099; background: rgba(47, 43, 61, 0.5); }
}

/* ---- Course-style cards (template's app-academy-course page) ---- */
.fh-course-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  aspect-ratio: 16 / 9;
  padding: 1rem;
  color: inherit;
  text-decoration: none;
  transition: filter 0.2s ease;
}
.fh-course-banner:hover { filter: brightness(0.97); }
.fh-course-banner .fh-route { font-family: var(--fh-mono); font-size: 0.8125rem; font-weight: 500; }
.fh-course-card .h5 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fh-course-card .fh-desc { overflow-wrap: anywhere; }
.page-link svg { display: block; }
.app-academy .btn-icon svg { display: block; }
.avatar .avatar-initial { display: inline-grid; place-items: center; }

/* ---- Login page background image ---- */
.auth-cover-bg { background: #0b0f1e url("/img/login-bg.jpg") center / cover no-repeat !important; }
.auth-cover-bg .auth-illustration { display: none; }
.auth-cover-bg .platform-bg { display: none; }

/* ---- Palette taken from the login background: neon orange on deep slate ---- */
:root, [data-bs-theme="light"] {
  --bs-primary: #f26a1b;
  --bs-primary-rgb: 242, 106, 27;
  --bs-link-color: #d9560a;
  --bs-link-color-rgb: 217, 86, 10;
  --bs-link-hover-color: #b84506;
  --bs-link-hover-color-rgb: 184, 69, 6;
  --bs-heading-color: #162d3b;
  --bs-body-color: #3b4a54;
  --bs-body-bg: #f3f5f7;
  --bs-border-color: #dde3e8;
}
.btn-primary {
  --bs-btn-bg: #f26a1b; --bs-btn-border-color: #f26a1b; --bs-btn-color: #fff;
  --bs-btn-hover-bg: #d9560a; --bs-btn-hover-border-color: #d9560a; --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #b84506; --bs-btn-active-border-color: #b84506;
  --bs-btn-disabled-bg: #f26a1b; --bs-btn-disabled-border-color: #f26a1b;
  box-shadow: 0 0.125rem 0.25rem rgba(242, 106, 27, 0.4);
}
.btn-outline-primary { --bs-btn-color: #d9560a; --bs-btn-border-color: #f26a1b; --bs-btn-hover-bg: #f26a1b; --bs-btn-hover-border-color: #f26a1b; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #d9560a; }
.btn-label-primary { --bs-btn-color: #d9560a; --bs-btn-bg: rgba(242, 106, 27, 0.14); }
.bg-primary { background-color: #f26a1b !important; }
.text-primary { color: #d9560a !important; }
.bg-label-primary { background-color: rgba(242, 106, 27, 0.14) !important; color: #d9560a !important; }
.progress-bar { background-color: #f26a1b; }
.form-control:focus, .form-select:focus { border-color: #f26a1b; box-shadow: 0 0 0 0.15rem rgba(242, 106, 27, 0.2); }
.form-check-input:checked { background-color: #f26a1b; border-color: #f26a1b; }
.layout-menu.menu-vertical { background-color: #162d3b !important; }
.menu-vertical .menu-link, .menu-vertical .app-brand-text { color: #d7e0e6 !important; }
.menu-vertical .app-brand .btn { color: #d7e0e6; }
.menu-vertical .menu-item.active > .menu-link, .menu-vertical .menu-link:hover { background: rgba(242, 106, 27, 0.18) !important; color: #ff9a55 !important; }
.menu-vertical .menu-item.active > .menu-link { box-shadow: 0 0.125rem 0.5rem rgba(242, 106, 27, 0.35); }
.menu-vertical .menu-inner-shadow { display: none; }
.layout-content-navbar .layout-navbar { margin-block-start: 0.75rem; }
.card { box-shadow: 0 0.125rem 0.5rem rgba(22, 45, 59, 0.1); }
.json, .secret-box { background: #0b141b; }
.auth-cover-bg { background-color: #06080a; }
/* Template-style navbar: search trigger + user dropdown */
.layout-navbar .dropdown-user .dropdown-menu { inset-inline-end: 0; inset-inline-start: auto; min-inline-size: 15rem; margin-block-start: 0.5rem; }
.layout-navbar .search-toggler:hover span { color: var(--bs-primary) !important; }
.layout-navbar .dropdown-item svg { inline-size: 18px; block-size: 18px; }
/* Template header extras (language, theme, shortcuts, notifications) and collapse toggle */
.layout-navbar .navbar-nav-right > .navbar-nav { flex: 0 0 auto; }
.layout-navbar .dropdown > .nav-link.btn { padding: 0.5rem; color: var(--bs-heading-color, #4b465c); }
.layout-navbar .dropdown-menu.show { display: block; inset-inline-end: 0; inset-inline-start: auto; margin-block-start: 0.5rem; }
.layout-navbar .dropdown-shortcuts .dropdown-menu, .layout-navbar .dropdown-menu.dropdown-shortcuts { min-inline-size: 22rem; }
.layout-navbar .dropdown-notifications-menu { min-inline-size: 22rem; }
.layout-navbar .navbar-nav-right > ul > li.dropdown { position: relative; }
.fh-collapse-toggle { background: none; border: 0; padding: 0; }
.fh-collapse-toggle .menu-toggle-icon { display: inline-block; inline-size: 1.1rem; block-size: 1.1rem; border-radius: 50%; border: 2px solid #d7e0e6; position: relative; }
.fh-collapse-toggle .menu-toggle-icon::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #d7e0e6; }
.layout-menu-collapsed .fh-collapse-toggle .menu-toggle-icon::after { display: none; }
.menu-vertical .menu-header .menu-header-text { color: #8fa2ad !important; }
.dropdown-shortcuts-item { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; padding: 1.25rem 1rem; border-inline-end: 1px solid #e6e9ec; border-block-end: 1px solid #e6e9ec; }
.dropdown-shortcuts-item a { color: var(--bs-heading-color, #162d3b); font-weight: 500; }
.dropdown-shortcuts-item small { color: #8fa2ad; }
.dropdown-shortcuts-icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 3rem; block-size: 3rem; background: #fdeee3; color: #d9560a; }
.dropdown-shortcuts-list .row { display: flex; }
.dropdown-shortcuts-list .row > .col { flex: 1 1 50%; }
