@font-face { font-family: "Montserrat"; font-weight: 500; src: url(../fonts/montserrat-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; src: url(../fonts/montserrat-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; src: url(../fonts/montserrat-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 800; src: url(../fonts/montserrat-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; src: url(../fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; src: url(../fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; src: url(../fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; src: url(../fonts/inter-latin-700-normal.woff2) format("woff2"); }

:root {
  --navy-950: #061227;
  --navy-900: #0a1a33;
  --navy-800: #102849;
  --navy-700: #183863;
  --navy-600: #24508a;
  --sky-500: #2f7de1;
  --sky-100: #e6f0fc;
  --gold-500: #e8962b;
  --gold-400: #f2ad4e;
  --gold-100: #fdf1e0;
  --rose-500: #d9468f;
  --green-600: #0f9d58;
  --green-100: #e3f5ec;
  --red-600: #d93025;
  --red-100: #fde8e6;
  --amber-100: #fff4d6;
  --amber-700: #9a6a00;
  --ink: #0f1d33;
  --ink-2: #44526a;
  --ink-3: #7a879c;
  --line: #e2e7ef;
  --line-2: #eef1f6;
  --bg: #f3f5f9;
  --card: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(10, 26, 51, .06), 0 4px 16px rgba(10, 26, 51, .06);
  --shadow-lg: 0 12px 40px rgba(6, 18, 39, .22);
  --brand-grad: linear-gradient(90deg, #f4c04a 0%, #e8962b 40%, #d9468f 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: "Montserrat", "Segoe UI", sans-serif; margin: 0; letter-spacing: -.01em; }
a { color: var(--sky-500); text-decoration: none; }
button { font-family: inherit; }
[v-cloak] { display: none; }

/* ---------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: 248px 1fr; grid-template-rows: 64px 1fr; height: 100vh; }
.topbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 24px 0 16px;
  background: var(--navy-900); color: #fff; position: relative; z-index: 5;
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brand-grad); }
.brand { display: flex; align-items: center; gap: 12px; width: 232px; }
.brand-logo { width: 42px; height: 42px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.brand-logo img { width: 42px; height: 42px; object-fit: cover; }
.brand-name { font-family: "Montserrat"; font-weight: 800; font-size: 13px; letter-spacing: .14em; line-height: 1.15; }
.brand-name small { display: block; font-weight: 500; letter-spacing: .32em; font-size: 9.5px; color: var(--gold-400); }
.top-search { flex: 1; max-width: 520px; position: relative; }
.top-search input {
  width: 100%; height: 38px; border-radius: 20px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08); color: #fff; padding: 0 16px 0 40px; font-size: 13.5px; outline: none;
}
.top-search input::placeholder { color: rgba(255,255,255,.55); }
.top-search input:focus { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.top-search svg { position: absolute; left: 14px; top: 11px; opacity: .6; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 12.5px; color: rgba(255,255,255,.8); }
.clock { font-family: "Montserrat"; font-weight: 600; letter-spacing: .04em; display: flex; gap: 14px; }
.clock span b { color: var(--gold-400); font-weight: 700; margin-right: 6px; font-size: 10.5px; letter-spacing: .14em; }

.sidebar { background: var(--navy-950); color: rgba(255,255,255,.75); padding: 18px 12px; overflow-y: auto; display: flex; flex-direction: column; }
.nav-sec { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.38); padding: 14px 12px 8px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; cursor: pointer;
  font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s; user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(232,150,43,.22), rgba(232,150,43,.04)); color: #fff; box-shadow: inset 3px 0 0 var(--gold-500); }
.nav-item svg { flex: 0 0 18px; opacity: .9; }
.nav-item .count { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.08); padding: 1px 8px; border-radius: 10px; }
.side-foot { margin-top: auto; padding: 14px 12px 4px; font-size: 11px; color: rgba(255,255,255,.35); line-height: 1.5; }

.main { overflow-y: auto; padding: 26px 32px 60px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; }
.page-head .sub { color: var(--ink-3); font-size: 13px; margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-500); font-weight: 700; margin-bottom: 6px; }

/* ---------------------------------------------------------------- componentes */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 13px;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: #c9d2df; background: #f8fafc; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn-gold { background: var(--gold-500); border-color: var(--gold-500); color: #fff; }
.btn-gold:hover { background: #d98520; border-color: #d98520; }
.btn-danger { color: var(--red-600); }
.btn-danger:hover { background: var(--red-100); border-color: #f5c2bd; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--line-2); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn-icon { width: 32px; padding: 0; height: 32px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 11.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.field > label .opt { font-weight: 400; color: var(--ink-3); }
.input, select.input, textarea.input {
  height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font-size: 13.5px; background: #fff;
  color: var(--ink); outline: none; font-family: inherit; width: 100%; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 70px; padding: 9px 12px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(47,125,225,.14); }
.input.upper { text-transform: uppercase; }
.input.mono, .mono { font-family: "Montserrat", monospace; font-weight: 600; letter-spacing: .04em; }
.hint { font-size: 11.5px; color: var(--ink-3); }
.grid { display: grid; gap: 14px 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: span 4; } .full { grid-column: 1 / -1; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.right { text-align: right; }
.center { text-align: center; }
.sep { height: 1px; background: var(--line-2); margin: 18px 0; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.blue { background: var(--sky-100); color: var(--navy-600); }
.badge.green { background: var(--green-100); color: var(--green-600); }
.badge.red { background: var(--red-100); color: var(--red-600); }
.badge.gold { background: var(--gold-100); color: #b26b0e; }
.badge.amber { background: var(--amber-100); color: var(--amber-700); }
.badge.navy { background: var(--navy-800); color: #fff; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfd; position: sticky; top: 0; }
table.list td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #f7f9fc; }
table.list tr.inactive td { opacity: .5; }
.empty { padding: 50px 20px; text-align: center; color: var(--ink-3); }
.empty svg { opacity: .35; margin-bottom: 10px; }

.toolbar { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search input { padding-left: 36px; }
.search svg { position: absolute; left: 12px; top: 11px; opacity: .45; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 12px 16px; font-weight: 600; font-size: 13px; color: var(--ink-3); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--navy-800); border-bottom-color: var(--gold-500); }
.tab .n { background: var(--line-2); border-radius: 10px; padding: 0 7px; font-size: 11px; color: var(--ink-2); }
.tab.active .n { background: var(--gold-100); color: #b26b0e; }

/* ---------------------------------------------------------------- dashboard */
.hero {
  border-radius: 16px; padding: 26px 30px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(1200px 300px at 90% -40%, rgba(232,150,43,.35), transparent 60%),
              linear-gradient(120deg, var(--navy-900), var(--navy-700));
  margin-bottom: 22px;
}
.hero h1 { font-size: 26px; font-weight: 700; }
.hero p { margin: 6px 0 0; opacity: .75; }
.hero .plane { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); opacity: .12; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { padding: 16px 18px; cursor: pointer; transition: transform .15s; }
.kpi:hover { transform: translateY(-2px); }
.kpi .k-lbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.kpi .k-val { font-family: "Montserrat"; font-size: 28px; font-weight: 700; margin-top: 6px; color: var(--navy-800); }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }

.fids { background: #0b1220; border-radius: var(--radius); overflow: hidden; color: #e9eef7; box-shadow: var(--shadow); }
.fids-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: #060b16; border-bottom: 1px solid #1c2740; }
.fids-head h3 { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-400); }
.fids table { width: 100%; border-collapse: collapse; font-family: "Montserrat", monospace; }
.fids th { font-size: 10px; letter-spacing: .18em; color: #7d8aa5; text-align: left; padding: 10px 16px; font-weight: 600; text-transform: uppercase; }
.fids td { padding: 11px 16px; border-top: 1px solid #172138; font-size: 13px; font-weight: 600; }
.fids td.y { color: #ffd34d; letter-spacing: .06em; }
.fids tr { cursor: pointer; }
.fids tr:hover td { background: #111b30; }
.fids .st { font-size: 10.5px; letter-spacing: .12em; padding: 3px 8px; border-radius: 4px; }
.st-PROGRAMADA { background: #10305a; color: #8cc0ff; }
.st-REALIZADA { background: #0d3b26; color: #6fe3a5; }
.st-CANCELADA { background: #4a1414; color: #ff9b94; }

/* ---------------------------------------------------------------- viagens */
.trip-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.trip-card { cursor: pointer; overflow: hidden; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.trip-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(10,26,51,.12); }
.tc-top { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 16px 18px; position: relative; }
.tc-top .reg { font-family: "Montserrat"; font-weight: 800; letter-spacing: .08em; font-size: 18px; }
.tc-top .comp { opacity: .75; font-size: 12.5px; margin-top: 2px; }
.tc-top .badge { position: absolute; right: 14px; top: 14px; }
.tc-route { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 14px 18px 4px; font-family: "Montserrat"; font-weight: 700; color: var(--navy-800); letter-spacing: .05em; }
.tc-route .arrow { color: var(--gold-500); }
.tc-body { padding: 4px 18px 16px; color: var(--ink-2); font-size: 12.5px; }
.tc-foot { margin-top: auto; display: flex; gap: 16px; padding: 12px 18px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--ink-3); }

.trip-head { display: grid; grid-template-columns: 1fr 300px; gap: 18px; margin-bottom: 18px; }
.cover-box { border-radius: var(--radius); overflow: hidden; background: var(--navy-800) center/cover no-repeat; min-height: 170px; position: relative; display: flex; align-items: flex-end; box-shadow: var(--shadow); }
.cover-box .cover-actions { display: flex; gap: 8px; padding: 12px; width: 100%; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.cover-empty { color: rgba(255,255,255,.6); position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 12.5px; padding: 20px; }

.savebar { position: sticky; top: -26px; z-index: 4; background: var(--bg); margin: -26px -32px 18px; padding: 14px 32px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.savebar .title { font-family: "Montserrat"; font-weight: 700; font-size: 17px; }
.dirty { color: #b26b0e; font-size: 12px; font-weight: 600; display: flex; gap: 6px; align-items: center; }

/* boarding pass / etapa */
.leg { display: grid; grid-template-columns: 56px 1fr; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 4px; box-shadow: var(--shadow); overflow: visible; position: relative; }
.leg-num { background: var(--navy-800); color: #fff; border-radius: 13px 0 0 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-family: "Montserrat"; }
.leg-num b { font-size: 20px; }
.leg-num span { font-size: 9px; letter-spacing: .2em; opacity: .7; }
.leg.REALIZADA .leg-num { background: var(--green-600); }
.leg.CANCELADA .leg-num { background: #9aa4b5; }
.leg-body { padding: 16px 18px; }
.leg-route { display: grid; grid-template-columns: 1fr 120px 1fr; gap: 16px; align-items: start; }
.leg-mid { text-align: center; padding-top: 22px; color: var(--ink-3); font-size: 11.5px; }
.leg-mid .line { height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px); position: relative; margin: 10px 0 8px; }
.leg-mid .line svg { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); background: #fff; padding: 0 4px; color: var(--gold-500); }
.leg-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.loc-time { font-size: 12px; color: var(--ink-2); margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.loc-time b { font-family: "Montserrat"; color: var(--navy-800); }
.leg-extra { display: grid; grid-template-columns: 140px 120px 1fr 160px; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.leg-tools { position: absolute; right: 10px; top: 10px; display: flex; gap: 2px; }
.ground { display: flex; align-items: center; gap: 10px; margin: 0 0 4px 56px; padding: 8px 16px; font-size: 12px; color: var(--ink-2); }
.ground .gline { width: 2px; height: 28px; background: repeating-linear-gradient(var(--gold-400) 0 4px, transparent 4px 7px); margin-left: 10px; }
.ground input { width: 80px; height: 30px; }
.ground.warn { color: var(--red-600); }
.add-leg { display: flex; gap: 10px; margin-top: 14px; }

/* airport picker */
.ap { position: relative; }
.ap-input { position: relative; }
.ap-input .input { padding-right: 30px; }
.ap-clear { position: absolute; right: 6px; top: 7px; border: 0; background: transparent; cursor: pointer; color: var(--ink-3); width: 24px; height: 24px; border-radius: 6px; }
.ap-clear:hover { background: var(--line-2); }
.ap-sel { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px 6px 10px; min-height: 38px; background: #fbfcfe; cursor: pointer; }
.ap-sel:hover { border-color: #c9d2df; }
.ap-code { font-family: "Montserrat"; font-weight: 800; font-size: 16px; color: var(--navy-800); letter-spacing: .04em; }
.ap-big .ap-code { font-size: 24px; }
.ap-name { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-free { background: var(--amber-100); border-color: #f1d48a; }
.ap-drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 50; max-height: 330px; overflow-y: auto; min-width: 340px; }
.ap-opt { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; padding: 9px 12px; cursor: pointer; align-items: center; border-bottom: 1px solid var(--line-2); }
.ap-opt:hover, .ap-opt.hl { background: var(--sky-100); }
.ap-opt .c { font-family: "Montserrat"; font-weight: 800; color: var(--navy-800); }
.ap-opt .c small { display: block; font-weight: 600; color: var(--ink-3); font-size: 10.5px; }
.ap-opt .n { font-size: 12.5px; line-height: 1.3; min-width: 0; }
.ap-opt .n small { display: block; color: var(--ink-3); font-size: 11px; }
.ap-free-opt { padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); background: #fffbef; cursor: pointer; }
.ap-free-opt:hover { background: var(--amber-100); }

/* pessoas */
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; background: var(--navy-600); flex: 0 0 34px; font-family: "Montserrat"; overflow: hidden; }
.avatar.crew { background: var(--gold-500); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.pick-list { max-height: 420px; overflow-y: auto; }
.pick-item { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.pick-item:hover { background: #f7f9fc; }
.pick-item.sel { background: var(--sky-100); }
.manifest { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.man-row { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.man-row:last-child { border-bottom: 0; }
.seat { font-family: "Montserrat"; font-weight: 700; color: var(--ink-3); width: 22px; font-size: 12px; }

.passport-drop { border: 2px dashed #c6d3e6; border-radius: 12px; padding: 18px; text-align: center; background: #f8fbff; cursor: pointer; transition: all .15s; }
.passport-drop:hover, .passport-drop.over { border-color: var(--sky-500); background: var(--sky-100); }
.passport-preview { max-width: 100%; max-height: 220px; border-radius: 8px; border: 1px solid var(--line); }
.progress { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand-grad); transition: width .2s; }
.mrz { font-family: "Courier New", monospace; font-size: 11.5px; background: #0b1220; color: #9ef0b6; padding: 10px 12px; border-radius: 8px; white-space: pre; overflow-x: auto; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(6,18,39,.55); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 50px 20px; overflow-y: auto; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 760px; box-shadow: var(--shadow-lg); animation: pop .16s ease-out; }
.modal.wide { max-width: 1040px; }
.modal.narrow { max-width: 480px; }
.modal-head { padding: 18px 24px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 22px 24px; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; background: #fafbfd; border-radius: 0 0 16px 16px; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; display: flex; gap: 10px; align-items: center; animation: pop .2s; max-width: 380px; }
.toast.err { background: var(--red-600); }
.toast.ok { background: #0b6b3d; }

/* recall */
.recall { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; background: #fff; position: relative; }
.recall-preview { margin-top: 12px; padding: 10px 12px; background: #fafbfd; border-radius: 8px; font-weight: 700; font-size: 13px; border: 1px dashed var(--line); }
.hl-yellow { background: #ffff00; padding: 0 2px; }
.hl-gray { background: #d0d0d0; text-decoration: underline; padding: 0 2px; }

/* preview documento */
.paper { background: #fff; width: 100%; max-width: 760px; margin: 0 auto; padding: 46px 56px; box-shadow: 0 2px 20px rgba(0,0,0,.12); font-family: Calibri, Carlito, "Segoe UI", sans-serif; color: #000; font-size: 13px; }
.paper h2 { font-family: Calibri, Carlito, sans-serif; text-align: center; font-size: 19px; margin-bottom: 14px; }
.paper .cover { width: 100%; aspect-ratio: 2.45; object-fit: cover; margin: 6px 0 14px; }
.paper table { width: 100%; border-collapse: collapse; font-size: 11px; }
.paper th, .paper td { border: 1px solid #000; padding: 4px 6px; }
.paper th { text-align: center; }
.paper tr.shade td { background: #dce6f2; }
.paper td.green { color: #00b050; }
.paper td.bold { font-weight: 700; }
.paper .ctr { text-align: center; font-weight: 700; margin: 18px 0 10px; }
.paper .pfoot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 40px; font-size: 10px; }
.paper .pfoot img { width: 54px; }

.handler-group { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.handler-group .hg-head { padding: 12px 16px; background: #fafbfd; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-2); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check:hover { background: #f8fafc; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--navy-800); }
.switch { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; }
.switch button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 12px; color: var(--ink-3); cursor: pointer; }
.switch button.on { background: #fff; color: var(--navy-800); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.emit-grid { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.history { font-size: 12.5px; }
.history li { padding: 8px 0; border-bottom: 1px solid var(--line-2); list-style: none; }
.history ul { padding: 0; margin: 0; }
.flag { font-size: 15px; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.spinner.dark { border-color: rgba(0,0,0,.12); border-top-color: var(--navy-700); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .dash-grid, .trip-head, .emit-grid, .manifest { grid-template-columns: 1fr; }
  .leg-extra { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- v1.1: acesso, alertas, campos */
.boot { height: 100vh; display: grid; place-items: center; background: var(--navy-950); }
.boot img { width: 90px; border-radius: 18px; margin-bottom: 18px; }
.masked { position: relative; }
.masked .input { padding-right: 34px; }
.masked-btn { position: absolute; right: 5px; top: 6px; width: 28px; height: 26px; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; border-radius: 6px; }
.masked-btn:hover { background: var(--line-2); color: var(--navy-700); }
.native-date { position: absolute; right: 8px; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.input.invalid { border-color: var(--red-600); box-shadow: 0 0 0 3px rgba(217,48,37,.1); }
.field-err { display: block; font-size: 11px; color: var(--red-600); margin-top: 3px; font-weight: 600; }

.top-pop { position: relative; }
.top-icon { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; display: grid; place-items: center; }
.top-icon:hover { background: rgba(255,255,255,.12); }
.top-icon.hot { color: var(--gold-400); border-color: rgba(242,173,78,.5); animation: ring 2.4s ease-in-out infinite; }
@keyframes ring { 0%, 86%, 100% { transform: rotate(0); } 89% { transform: rotate(12deg); } 92% { transform: rotate(-10deg); } 95% { transform: rotate(6deg); } }
.bubble { position: absolute; top: -6px; right: -6px; background: var(--red-600); color: #fff; font-size: 10.5px; font-weight: 700; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--navy-900); }
.user-chip { display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 3px 14px 3px 4px; color: #fff; cursor: pointer; }
.user-chip:hover { background: rgba(255,255,255,.12); }
.uc-txt { display: flex; flex-direction: column; text-align: left; line-height: 1.15; font-size: 12.5px; }
.uc-txt small { color: var(--gold-400); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; background: #fff; color: var(--ink); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; border: 1px solid var(--line); max-height: 420px; overflow-y: auto; }
.pop-head { padding: 12px 16px; font-weight: 700; font-size: 12.5px; background: var(--amber-100); color: var(--amber-700); }
.pop-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 13px; }
.pop-item:hover { background: #f6f8fb; }
.nav-item .count.warn { background: var(--red-600); color: #fff; }
.side-logo { width: 100%; border-radius: 8px; margin-bottom: 10px; opacity: .9; display: block; }

.alert-banner { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; font-size: 13px; line-height: 1.5; }
.alert-banner.warn { background: #fff4e5; border: 1px solid #f5c98a; color: #8a4b00; }
.alert-banner.danger { background: var(--red-100); border: 1px solid #f3b5ae; color: #8c1d14; }
.alert-banner.info { background: var(--sky-100); border: 1px solid #bcd5f5; color: var(--navy-700); }
.alert-banner .btn { margin-left: auto; }

/* telas de acesso */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.25fr 1fr; background: var(--navy-950); }
.auth-art { background: radial-gradient(90% 60% at 50% 28%, #0d2147 0%, #08142c 55%, #061227 100%); position: relative; display: flex; align-items: flex-end; overflow: hidden; }
.auth-art::before { content: ""; position: absolute; left: 50%; top: 12%; transform: translateX(-50%); width: min(84%, 720px); aspect-ratio: 1536 / 610;
  background: url(/static/img/login_jet.png) center/contain no-repeat; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,18,39,0) 40%, rgba(6,18,39,.92) 100%); }
.auth-brand { position: relative; z-index: 1; padding: 48px 56px; color: #fff; }
.auth-brand h1 { font-size: 46px; font-weight: 800; letter-spacing: .06em; line-height: 1.02; }
.auth-brand h1 span { font-size: 17px; letter-spacing: .5em; font-weight: 500; color: var(--gold-400); }
.auth-brand p { opacity: .7; margin-top: 16px; letter-spacing: .04em; }
.auth-panel { display: grid; place-items: center; padding: 30px; background: linear-gradient(160deg, #0d1f3c, #061227); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 18px; padding: 34px 34px 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.auth-card h2 { font-size: 21px; }
.auth-card p { margin: -6px 0 0; line-height: 1.5; }
.auth-logo { width: 190px; height: auto; align-self: flex-start; margin-bottom: 4px; }
.auth-err { background: var(--red-100); color: var(--red-600); padding: 10px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.auth-ok { background: var(--green-100); color: #0b6b3d; padding: 10px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.auth-box { background: #f6f8fb; border-radius: 10px; padding: 12px 14px; line-height: 1.5; color: var(--ink-2); }
.recovery-key { font-family: "Montserrat", monospace; font-weight: 800; font-size: 22px; letter-spacing: .08em; text-align: center; padding: 18px; border: 2px dashed var(--gold-500); border-radius: 12px; background: var(--gold-100); color: var(--navy-800); }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { min-height: 220px; } }

/* imagem do destino na viagem */
.dest-box { border-radius: var(--radius); overflow: hidden; background: var(--navy-800) center/cover no-repeat; min-height: 190px; position: relative; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); }
.dest-tag { margin: 12px; align-self: flex-start; background: rgba(6,18,39,.78); color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 11px; letter-spacing: .14em; font-weight: 700; text-transform: uppercase; backdrop-filter: blur(4px); }
.dest-tag small { display: block; letter-spacing: .04em; font-weight: 500; text-transform: none; opacity: .75; margin-top: 2px; }
.locked { position: relative; }
.locked .input { background: #f4f6f9; color: var(--ink-3); }
@media print { .auth-art, .auth-panel > form > :not(.recovery-key):not(h2) { display: none !important; } }

/* prévia do briefing (layout de impressão) */
.paper.p2 { padding: 34px 40px; font-family: Calibri, Carlito, "Segoe UI", sans-serif; color: #0b1f3a; }
.p2-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2.5px solid #c28a2e; padding-bottom: 8px; margin-bottom: 16px; }
.p2-head img { height: 40px; }
.p2-head div { text-align: right; }
.p2-head b { letter-spacing: .14em; font-size: 13px; display: block; }
.p2-head small { color: #c28a2e; letter-spacing: .16em; font-size: 8.5px; font-weight: 700; }
.p2-title { font-size: 24px; font-weight: 700; }
.p2-sub { color: #6b7689; margin: 2px 0 10px; }
.p2-strip { display: grid; grid-template-columns: 1fr 1.5fr 1fr 1.2fr; background: #eef2f8; font-weight: 700; font-size: 11.5px; margin-bottom: 10px; }
.p2-strip div { padding: 8px 10px; }
.p2-strip small { display: block; color: #c28a2e; font-size: 7.5px; letter-spacing: .14em; }
.p2-hero { aspect-ratio: 2.55; background: center/cover no-repeat #0b1f3a; }
.p2-band { background: #0b1f3a; color: #fff; font-weight: 700; letter-spacing: .16em; font-size: 10px; padding: 6px 12px; }
.p2-sec { border-left: 4px solid #c28a2e; padding-left: 8px; font-weight: 700; letter-spacing: .14em; font-size: 12px; margin: 18px 0 8px; }
.p2-t { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.p2-t th { background: #0b1f3a; color: #fff; text-align: left; padding: 5px 7px; font-size: 9px; letter-spacing: .08em; border: 0; }
.p2-t td { border: 0; border-bottom: 1px solid #d3dae5; padding: 5px 7px; vertical-align: middle; }
.p2-t tr:nth-child(even) td { background: #f5f7fb; }
.p2-t td.n { color: #c28a2e; font-weight: 700; text-align: center; }
.p2-t td.hl { background: #fff1c2 !important; font-weight: 700; }
.p2-t tr.done td { color: #0f8a4b; }
.p2-t tr.canc td { color: #9aa4b5; text-decoration: line-through; }
.p2-t small { color: inherit; opacity: .8; }
.p2-handlers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p2-hc { border: 1px solid #d3dae5; font-size: 10.5px; }
.p2-hl { background: #eef2f8; font-weight: 700; padding: 5px 8px; font-size: 9.5px; }
.p2-hb { padding: 6px 8px; line-height: 1.5; }
.p2-hb span { color: #6b7689; font-weight: 700; }
.p2-foot { border-top: 1px solid #0b1f3a; margin-top: 26px; padding-top: 6px; font-size: 9px; color: #6b7689; display: flex; gap: 4px; }
.p2-foot span { margin-left: auto; }
.dest-box .cover-actions { gap: 6px; align-items: center; }
.dest-box .cover-actions select { flex: 1; min-width: 0; }
.dest-box .cover-actions .btn { flex: 0 0 auto; }
.hero { background: url(/static/img/login_jet.png) right 3% center/auto 86% no-repeat, radial-gradient(60% 120% at 78% 50%, #13305e 0%, transparent 70%), linear-gradient(120deg, #0a1a33, #102849); min-height: 210px; }
.hero .plane { display: none; }
.rab-card { border: 1px solid #bcd5f5; background: #f5f9ff; border-radius: 12px; padding: 14px 16px; }
.rab-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--navy-700); }

/* ---------------------------------------------------------------- v1.3: rolagem garantida e telas pequenas */
html, body { overflow: hidden; }
.app { height: 100vh; height: 100dvh; min-height: 0; }
.main { min-height: 0; min-width: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sidebar { min-height: 0; overflow-y: auto; }
.auth-wrap { height: 100vh; height: 100dvh; overflow-y: auto; min-height: 0; }
.boot { height: 100dvh; }
.card:has(> table.list), .card:has(> .p2-t), .fids { overflow-x: auto; }
table.list { min-width: 640px; }
.modal-bg { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-body { overflow-x: auto; }
.pick-list, .pop, .ap-drop { overscroll-behavior: contain; }
.menu-btn { display: none; }
.modal-foot .left { margin-right: auto; }
.trip-card { position: relative; }
.trip-del { position: absolute; right: 10px; bottom: 8px; background: #fff; border-color: #f3c6c1 !important; }
.trip-card:hover .trip-del { opacity: 1; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .menu-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; }
  .sidebar { position: fixed; top: 64px; bottom: 0; left: 0; width: 260px; z-index: 40; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .brand { width: auto; }
  .brand-name, .top-search, .clock { display: none; }
  .main { padding: 18px 14px 60px; grid-column: 1; }
  .savebar { margin: -18px -14px 14px; padding: 10px 14px; top: -18px; flex-wrap: wrap; }
  .grid.g4, .grid.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span3, .span4 { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .trip-cards { grid-template-columns: 1fr; }
  .leg-route { grid-template-columns: 1fr; }
  .leg-mid { padding-top: 0; }
  .leg-extra { grid-template-columns: 1fr 1fr; }
  .trip-del { opacity: 1; }
  [style*="grid-template-columns:1fr 1fr"], [style*="grid-template-columns:1.25fr 1fr"], [style*="grid-template-columns:1.3fr 1fr"],
  [style*="grid-template-columns:1fr 380px"], [style*="grid-template-columns:300px 1fr"], [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
  .modal-bg { padding: 12px 8px; }
}
.imp-row { display: grid; grid-template-columns: 54px 1fr; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
.imp-row.off { opacity: .5; background: #f7f8fa; }
.imp-check { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 22px; color: var(--ink-3); }
.imp-check input { width: 18px; height: 18px; accent-color: var(--navy-800); }
