@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #eef3f8;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #172033;
  --muted: #667085;
  --line: #d7dee9;
  --primary: #0477d9;
  --primary-dark: #025cab;
  --primary-soft: #e7f2ff;
  --green: #17845b;
  --red: #c73737;
  --yellow: #a86b00;
  --blue-soft: #e9f2ff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 14px 35px rgba(15, 23, 42, .10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
}

body.auth-locked .sidebar,
body.auth-locked .app {
  filter: blur(2px);
  pointer-events: none;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #080d1a;
  color: #e9eef8;
}

.login-card {
  width: min(380px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  background: #0d1424;
  border: 1px solid #1f2a3d;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,.38);
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 6px;
  text-align: center;
}

.login-brand span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(245, 158, 11, .16);
  color: #f59e0b;
  font-size: 24px;
}

.login-brand strong {
  font-size: 24px;
}

.login-brand small,
.login-help {
  color: #8f9bb0;
  font-size: 13px;
}

.login-card label {
  color: #cbd5e1;
}

.login-error {
  margin: -6px 0 0;
  padding: 10px 12px;
  background: rgba(220, 38, 38, .15);
  border: 1px solid #dc2626;
  border-radius: 8px;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.remember-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  text-transform: none;
  font-size: 13px;
}

.remember-row input {
  width: 16px;
  height: 16px;
}

.hub-view {
  max-width: none;
}

body.home-mode {
  display: block;
  background: #f8fafc;
  color: #020817;
}

body.home-mode .sidebar {
  display: none;
}

body.home-mode .app {
  padding: 0;
}

.home-topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 64px;
  background: #fff;
  border-bottom: 1px solid #dbe3ef;
}

.home-brand,
.home-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-brand span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #dbeafe;
  border: 1px solid #9bbcff;
  color: #2563eb;
  font-size: 20px;
}

.home-brand span img {
  width: 20px;
  height: 20px;
  filter: invert(36%) sepia(89%) saturate(2656%) hue-rotate(213deg) brightness(96%) contrast(91%);
}

.home-brand strong {
  font-size: 21px;
  font-weight: 800;
}

.home-user {
  color: #64748b;
  font-size: 16px;
}

.home-welcome {
  max-width: 1240px;
  margin: 52px auto 38px;
  padding: 0 0;
}

.home-welcome h1 {
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: 0;
}

.home-welcome p {
  margin-top: 10px;
  color: #5c6f91;
  font-size: 21px;
}

.home-welcome p::before {
  content: "♢";
  margin-right: 10px;
  color: #2563eb;
}

.hub-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 20px;
}

.hub-card {
  position: relative;
  min-height: 242px;
  display: grid;
  align-content: start;
  gap: 18px;
  text-align: left;
  padding: 30px;
  border: 1px solid #d9e2ef;
  border-radius: 13px;
  background: #fff;
  color: #020817;
  cursor: pointer;
  box-shadow: none;
}

.hub-card:hover {
  border-color: #bfd0e8;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

.hub-card em {
  position: absolute;
  top: 30px;
  right: 30px;
  padding: 5px 13px;
  border-radius: 6px;
  background: #f3f6fa;
  color: #020817;
  font-style: normal;
  font-size: 15px;
  font-weight: 700;
}

.hub-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 13px;
  font-size: 28px;
  font-weight: 900;
}

.hub-icon.blue {
  background: #dff6ff;
  border: 1px solid #a8e5ff;
  color: #0284c7;
}

.hub-icon.green {
  background: #dffbf0;
  border: 1px solid #a8efd2;
  color: #10b981;
}

.hub-icon.purple {
  background: #ede2ff;
  border: 1px solid #d8b4fe;
  color: #8b5cf6;
}

.hub-icon.orange {
  background: #fff4df;
  border: 1px solid #fed7aa;
  color: #f59e0b;
}

.hub-card strong {
  margin-top: 8px;
  font-size: 25px;
  line-height: 1.2;
}

.hub-card small {
  max-width: 530px;
  color: #516484;
  font-size: 18px;
  line-height: 1.5;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.home-link img,
.home-user .button img,
.admin-new-user img {
  width: 18px;
  height: 18px;
}

.admin-page {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 32px 16px 72px;
}

.admin-view .home-topbar {
  padding-left: max(16px, calc((100vw - 1120px) / 2));
  padding-right: max(16px, calc((100vw - 1120px) / 2));
}

.admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.admin-heading h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.33;
  color: #111827;
}

.admin-heading p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 16px;
}

.admin-new-user {
  min-width: 145px;
  min-height: 38px;
  border-radius: 6px;
  font-size: 14px;
}

.admin-user-form {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  background: #fff;
}

.admin-table-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.users-access-table {
  width: 100%;
  border-collapse: collapse;
}

.users-access-table th {
  height: 49px;
  padding: 0 10px;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  border-bottom: 1px solid #dbe3ef;
}

.users-access-table th:last-child {
  text-align: right;
}

.users-access-table td {
  height: 66px;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #111827;
  vertical-align: middle;
}

.users-access-table td:last-child {
  width: 250px;
}

.users-access-table tr:last-child td {
  border-bottom: 0;
}

.users-access-table td:first-child strong {
  display: block;
  font-size: 14px;
  line-height: 1.1;
}

.users-access-table td:first-child small {
  display: block;
  margin-top: 4px;
  color: #536b92;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12px;
  letter-spacing: 0;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 25px;
  gap: 5px;
  padding: 3px 10px;
  border: 1px solid #e6ebf2;
  border-radius: 7px;
  background: #fff;
  color: #020817;
  font-size: 12px;
  font-weight: 600;
}

.profile-badge img {
  width: 14px;
  height: 14px;
}

.profile-badge.principal img {
  filter: brightness(0) invert(1);
}

.profile-badge.principal {
  min-width: 111px;
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.profile-badge.admin {
  background: #f3f6fa;
}

.access-select {
  width: 190px;
  height: 44px;
  padding: 0 36px 0 14px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  background: #fff;
  color: #020817;
  font: inherit;
  font-size: 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}

.access-select:disabled {
  color: #8a94a3;
  background: #fff;
}

.user-status {
  display: inline-flex;
  align-items: center;
  min-width: 78px;
  color: #05b87b;
  font-size: 14px;
}

.user-status.blocked {
  color: #ef4444;
}

.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.icon-action {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #111827;
  cursor: pointer;
  border-radius: 4px;
}

.icon-action img {
  width: 18px;
  height: 18px;
}

.icon-action:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.icon-action:not(:disabled):hover {
  background: #f1f5f9;
}

.icon-action.danger {
  color: #ff4d57;
}

.icon-action.danger img {
  filter: invert(43%) sepia(98%) saturate(2709%) hue-rotate(330deg) brightness(102%) contrast(104%);
}

.audit-details {
  margin-top: 22px;
  color: #5c6f91;
}

.audit-details summary {
  cursor: pointer;
  font-weight: 700;
}

.user-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, .75);
}

.user-modal-card {
  position: relative;
  width: min(448px, 100%);
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .22);
}

.user-modal-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

.user-modal-card > p {
  margin: -10px 0 4px;
  color: #64748b;
  font-size: 14px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.user-modal-card label {
  display: grid;
  gap: 6px;
  color: #111827;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
}

.user-modal-card .input {
  min-height: 40px;
  border-radius: 6px;
  font-size: 14px;
}

.user-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-toggle-row {
  grid-template-columns: 1fr auto !important;
  align-items: center;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #e0e7f0;
  border-radius: 10px;
  background: #f8fafc;
}

.admin-toggle-row strong,
.admin-toggle-row small {
  display: block;
}

.admin-toggle-row strong {
  font-size: 14px;
  font-weight: 400;
}

.admin-toggle-row small {
  margin-top: 4px;
  color: #637493;
  font-size: 12px;
}

.admin-toggle-row input {
  width: 46px;
  height: 28px;
  appearance: none;
  border-radius: 999px;
  background: #e5ebf3;
  cursor: pointer;
  transition: background .15s ease;
}

.admin-toggle-row input::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  margin: 2px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .22);
  transition: transform .15s ease;
}

.admin-toggle-row input:checked {
  background: #2563eb;
}

.admin-toggle-row input:checked::before {
  transform: translateX(18px);
}

.user-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.user-modal-actions .button {
  min-width: 0;
  min-height: 38px;
  border-radius: 6px;
  font-size: 14px;
}

.password-modal-card {
  gap: 16px;
}

.logout-button {
  width: 100%;
  margin-top: 12px;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 13, 26, .72);
}

.modal-card {
  width: min(860px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.sidebar {
  background: linear-gradient(180deg, #101827 0%, #172033 100%);
  color: #f8fafc;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 10px 0 30px rgba(15, 23, 42, .12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #045fbd);
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(4, 119, 217, .25);
}

.brand small, .api-box span { display: block; color: #aeb7c8; font-size: 12px; }

nav { display: grid; gap: 8px; }

.nav-button {
  border: 0;
  border-radius: 10px;
  padding: 12px 13px;
  text-align: left;
  color: #d9e1ee;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.nav-button:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.nav-button.active { background: #f8fafc; color: #111827; }

.api-box {
  margin-top: auto;
  padding: 12px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}

code {
  display: block;
  margin-top: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #bfdbfe;
  font-size: 12px;
}

.app { padding: 28px; min-width: 0; }
.view { display: none; }
.view.active { display: block; }

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

h1, h2, p { margin: 0; }
h1 { font-size: 26px; letter-spacing: 0; }
h2 { font-size: 16px; margin-bottom: 12px; }
.view-header p, .muted { color: var(--muted); font-size: 14px; margin-top: 5px; }

.actions, .toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar { margin: 14px 0; }

.button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); }
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15, 23, 42, .10); }
.button.secondary:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.button.danger { color: var(--red); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.stats article, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.stats span { color: var(--muted); font-size: 13px; }
.stats strong { display: block; font-size: 28px; margin-top: 4px; }

.input, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.input:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(4, 119, 217, .12);
  outline: 0;
}

.input.compact { width: auto; min-width: 150px; }
.textarea { min-height: 180px; font-family: Consolas, monospace; font-size: 13px; }
.textarea.small { min-height: 150px; }

.date-input-wrap {
  position: relative;
}

.date-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.date-display {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.date-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, .34);
  backdrop-filter: blur(4px);
  padding: 20px;
}

.date-picker {
  width: min(680px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(17, 24, 39, .28);
  padding: 16px;
}

.date-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  min-height: 38px;
  padding: 0 2px;
}

.date-picker-header strong {
  font-size: 16px;
}

.calendar-nav {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.calendar-nav:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.date-picker-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 322px;
}

.calendar-month {
  min-width: 0;
  background: var(--panel-soft);
  border: 1px solid #e4eaf2;
  border-radius: 14px;
  padding: 14px 12px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.calendar-month h3 {
  margin: 0 0 12px;
  text-transform: capitalize;
  font-size: 14px;
  line-height: 18px;
  min-height: 18px;
  text-align: center;
  color: #111827;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekdays {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-grid {
  grid-template-rows: repeat(6, 34px);
}

.calendar-day,
.calendar-empty {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  justify-self: center;
}

.calendar-day {
  border: 1px solid transparent;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  padding: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.calendar-day:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.calendar-day.selected {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(4, 119, 217, .25);
}

.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  box-shadow: var(--shadow-sm);
}

table { width: 100%; min-width: 960px; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; background: #f8fafc; position: sticky; top: 0; }
tbody tr:hover { background: #f8fbff; }
tr:last-child td { border-bottom: 0; }

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.status.pending { background: var(--blue-soft); color: var(--primary); }
.status.running { background: #fff4d7; color: var(--yellow); }
.status.done { background: #e6f6ef; color: var(--green); }
.status.error { background: #ffe8e8; color: var(--red); }

.grid-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.template-form {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  margin-bottom: 0;
}

.wide-field {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.age-fields {
  align-self: end;
}

.age-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 1fr));
  gap: 8px;
}

.preview-panel {
  position: sticky;
  top: 16px;
}

.preview-total {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}

.preview-routes {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.preview-routes div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--panel-soft);
  font-size: 13px;
}

.section-gap {
  margin-top: 16px;
}

.embedded-table {
  margin-top: 12px;
  box-shadow: none;
}

.flight-view {
  max-width: 1700px;
  margin: 0 auto;
}

.flight-hero {
  align-items: center;
  padding: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.flight-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.flight-stats article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.flight-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.flight-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
}

.flight-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.flight-form-card {
  position: sticky;
  top: 16px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-title h2 {
  margin-bottom: 3px;
}

.panel-title p {
  color: var(--muted);
  font-size: 12px;
}

.small-button {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.flight-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.full-field {
  grid-column: 1 / -1;
}

.flight-leg {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 64px repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  padding: 10px;
  background: var(--panel-soft);
  border: 1px solid #e5ebf4;
  border-radius: 10px;
}

.flight-leg strong {
  align-self: center;
  color: var(--primary-dark);
  font-size: 13px;
}

.flight-panel {
  padding: 0;
  overflow: hidden;
}

.flight-tab-panel {
  display: none;
}

.flight-tab-panel.active {
  display: block;
}

.flight-panel .panel-title {
  margin: 0;
  padding: 14px 16px;
  background: #fbfdff;
}

.flight-search {
  max-width: 320px;
}

.analyze-toolbar { display: flex; align-items: center; gap: 8px; }
.analyze-toolbar .flight-search { margin-left: 4px; }
#attentionFilterToggle.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #fff;
}
body.conference-mode #attentionFilterToggle.active {
  background: #9a650d;
  border-color: #b9790e;
  color: #f59e0b;
}

.flight-table {
  min-width: 980px;
}

.flight-table th {
  background: #f4f7fb;
}

.reservation-cell,
.flight-times {
  display: grid;
  gap: 4px;
}

.reservation-cell strong {
  font-size: 13px;
}

.reservation-cell small,
.queue-line,
.flight-times span {
  color: var(--muted);
  font-size: 12px;
}

.reservation-cell span {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.flight-times b {
  display: inline-flex;
  min-width: 42px;
  margin-right: 4px;
  color: var(--text);
}

.row-actions {
  white-space: nowrap;
}

.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.icon-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.icon-button.danger {
  color: var(--red);
}

.difference-line {
  display: block;
  margin-bottom: 3px;
  color: var(--yellow);
  font-weight: 700;
}

.diff-badge,
.airline-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.diff-badge.ok {
  background: #e6f6ef;
  color: var(--green);
}

.diff-badge.warn {
  background: #fff4d7;
  color: var(--yellow);
}

.diff-badge.bad {
  background: #ffe8e8;
  color: var(--red);
}

.airline-pill {
  background: var(--primary-soft);
  color: var(--primary-dark);
  text-transform: uppercase;
}

.analyze-flight-table {
  min-width: 1500px;
}

.filter-row th {
  top: 34px;
  background: #f8fafc;
}

.table-filter {
  min-width: 110px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 11px;
}

body.conference-mode {
  grid-template-columns: 1fr;
  background: #080d1a;
}

body.conference-mode .sidebar {
  display: none;
}

body.conference-mode .app {
  padding: 0;
  min-height: 100vh;
  background: #080d1a;
  color: #e9eef8;
}

body.conference-mode .flight-view {
  max-width: none;
  min-height: 100vh;
  padding: 0 26px 34px;
  background: #080d1a;
}

.flight-topbar {
  display: none;
}

body.conference-mode .flight-topbar {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 58px;
  margin: 0 -26px 28px;
  padding: 0 26px;
  background: #0c1324;
  border-bottom: 1px solid #1b263a;
}

.flight-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.flight-brand > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(245, 158, 11, .16);
  color: #f59e0b;
}

.flight-brand strong {
  color: #f8fafc;
  font-size: 18px;
}

.flight-brand strong span {
  color: #f59e0b;
}

.flight-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.flight-tabs button,
.flight-user button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 13px;
  background: transparent;
  color: #8f9bb0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.flight-tabs button.active {
  background: #f59e0b;
  color: #111827;
}

.flight-tabs button:hover,
.flight-user button:hover {
  color: #f8fafc;
  background: rgba(255,255,255,.06);
}

.flight-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8f9bb0;
  font-size: 13px;
}

body.conference-mode .flight-hero {
  padding: 0;
  margin-bottom: 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.conference-mode .flight-hero h1 {
  color: #f8fafc;
  font-size: 28px;
}

body.conference-mode .flight-hero p {
  color: #8f9bb0;
  font-size: 15px;
}

body.conference-mode .flight-hero .actions {
  gap: 8px;
}

body.conference-mode .button {
  background: #111a2c;
  border-color: #253149;
  color: #e9eef8;
  box-shadow: none;
}

body.conference-mode .button.primary {
  background: #9a650d;
  border-color: #b9790e;
}

body.conference-mode .button.secondary {
  color: #f59e0b;
  border-color: #9a650d;
}

body.conference-mode .flight-stats {
  display: none;
}

body.conference-mode .flight-layout {
  grid-template-columns: 1fr;
}

body.conference-mode .flight-main {
  order: 1;
}

body.conference-mode .flight-form-card {
  order: 2;
  position: static;
  max-width: 820px;
}

body.conference-mode .panel,
body.conference-mode .table-wrap {
  background: #0d1424;
  border-color: #1f2a3d;
  box-shadow: none;
}

body.conference-mode .flight-panel {
  border-radius: 10px;
  margin-bottom: 16px;
}

body.conference-mode .flight-panel .panel-title {
  background: #0d1424;
  border-color: #1f2a3d;
}

body.conference-mode .panel-title h2 {
  color: #f8fafc;
}

body.conference-mode .panel-title p,
body.conference-mode label,
body.conference-mode .queue-line,
body.conference-mode .flight-times span,
body.conference-mode .reservation-cell small {
  color: #8f9bb0;
}

body.conference-mode .input,
body.conference-mode .textarea {
  background: #0b1120;
  border-color: #253149;
  color: #e9eef8;
}

body.conference-mode .flight-search {
  max-width: 360px;
}

body.conference-mode .flight-table {
  width: 100%;
  min-width: 1180px;
  color: #dbe4f0;
}

body.conference-mode th {
  background: #151c2d;
  border-color: #1f2a3d;
  color: #91a0b8;
}

body.conference-mode td {
  border-color: #172133;
}

body.conference-mode tbody tr:hover {
  background: #10192a;
}

body.conference-mode .reservation-cell span {
  background: #1a2436;
  color: #dbe4f0;
}

body.conference-mode .status.done {
  background: rgba(16, 185, 129, .16);
  color: #34d399;
}

body.conference-mode .status.running {
  background: rgba(245, 158, 11, .16);
  color: #f59e0b;
}

body.conference-mode .status.error {
  background: rgba(249, 115, 22, .16);
  color: #fb923c;
}

body.conference-mode .status.pending {
  background: #1a2436;
  color: #91a0b8;
}

body.conference-mode .diff-badge.ok {
  background: rgba(16, 185, 129, .16);
  color: #34d399;
}

body.conference-mode .diff-badge.warn {
  background: rgba(245, 158, 11, .16);
  color: #f59e0b;
}

body.conference-mode .diff-badge.bad {
  background: rgba(249, 115, 22, .16);
  color: #fb923c;
}

body.conference-mode .airline-pill {
  background: #1a2436;
  color: #dbe4f0;
}

body.conference-mode .icon-button {
  background: transparent;
  border-color: transparent;
  color: #91a0b8;
}

body.conference-mode .icon-button:hover {
  color: #f59e0b;
  background: #151c2d;
}

body.conference-mode .flight-leg {
  background: #0b1120;
  border-color: #253149;
}

body.conference-mode .flight-leg strong,
body.conference-mode .flight-times b {
  color: #f8fafc;
}

body.conference-mode .modal-card {
  background: #0d1424;
  border-color: #1f2a3d;
  color: #e9eef8;
}

body.conference-mode .filter-row th {
  background: #151c2d;
}

.panel label + label { margin-top: 12px; }
.money { font-variant-numeric: tabular-nums; font-weight: 800; }
.link { color: var(--primary); text-decoration: none; font-weight: 700; }

/* Conferência de Voos — reservas / modal / relatório / avisos */

.flight-action { display: inline-flex; align-items: center; gap: 8px; text-transform: none; font-weight: 700; }
.flight-action img,
.icon-button img { width: 16px; height: 16px; }
.icon-button { display: inline-grid; place-items: center; }
.reservations-table { min-width: 1180px; }
.reservations-table .airline-pill,
.history-table .airline-pill,
.report-item .airline-pill { text-transform: lowercase; }

.flight-modal-card label,
.notice-check,
.notice-card--row,
.notice-card--row strong {
  text-transform: none;
  font-weight: 400;
  color: var(--text);
}
.flight-modal-card label { font-size: 13px; font-weight: 700; color: var(--muted); }
body.conference-mode .flight-modal-card label { color: #8f9bb0; }
body.conference-mode .notice-check strong,
body.conference-mode .notice-card--row strong { color: #f8fafc; }

.link-suggestions { display: grid; gap: 12px; padding: 16px; }
.link-suggestion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--panel-soft);
  border: 1px solid var(--yellow);
  border-radius: 10px;
}
.link-suggestion-card strong { display: block; font-size: 14px; }
.link-suggestion-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.link-suggestion-reason { margin: 6px 0; color: var(--yellow); font-size: 12px; font-weight: 700; }
.link-suggestion-links { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.link-suggestion-links img { width: 14px; height: 14px; flex: none; opacity: .7; }
.link-suggestion-old { color: var(--red); text-decoration: line-through; word-break: break-all; }
.link-suggestion-new { color: var(--green); font-weight: 700; word-break: break-all; }
.link-suggestion-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }

body.conference-mode .link-suggestion-card { background: #0d1424; border-color: #9a650d; }
body.conference-mode .link-suggestion-reason { color: #f59e0b; }
body.conference-mode .link-suggestion-old { color: #fb923c; }
body.conference-mode .link-suggestion-new { color: #34d399; }

.row-checkbox { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
body.conference-mode .row-checkbox { accent-color: #f59e0b; }
.select-col { width: 36px; }

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 12px;
  padding: 10px 14px;
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}
body.conference-mode .bulk-bar { background: rgba(245, 158, 11, .12); border-color: #9a650d; color: #f59e0b; }

.button.danger {
  background: #fff0f0;
  border-color: #f3b8b8;
  color: var(--red);
}
.button.danger:hover { background: #ffe0e0; border-color: var(--red); }
body.conference-mode .button.danger { background: rgba(249, 115, 22, .12); border-color: #7a3418; color: #fb923c; }

.col-filter-btn {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 4px;
  padding: 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: .6;
}
.col-filter-btn:hover { opacity: 1; }
.col-filter-btn img { width: 12px; height: 12px; }
.col-filter-btn.active { opacity: 1; }
.col-filter-btn.active img { filter: invert(56%) sepia(88%) saturate(1000%) hue-rotate(1deg); }

.filter-popover {
  position: fixed;
  z-index: 120;
  width: 240px;
  max-height: 360px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: 10px;
}
.filter-popover-sort {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.filter-popover-sort button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}
.filter-popover-sort button:hover { background: var(--primary-soft); }
.filter-popover-sort button.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; }
body.conference-mode .filter-popover-sort { border-color: #1f2a3d; }
body.conference-mode .filter-popover-sort button { color: #e9eef8; }
body.conference-mode .filter-popover-sort button:hover { background: rgba(245, 158, 11, .12); }
body.conference-mode .filter-popover-sort button.active { background: rgba(245, 158, 11, .18); color: #f59e0b; }

.filter-popover-search { margin-bottom: 8px; }
.filter-popover-search .input { padding: 6px 8px; font-size: 12px; }
.filter-popover-actions { display: flex; gap: 10px; margin-bottom: 6px; }
.filter-popover-actions button {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
}
.filter-popover-options {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  margin-bottom: 8px;
}
.filter-popover-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  color: var(--text);
  cursor: pointer;
}
.filter-popover-option input { accent-color: var(--primary); }
.filter-popover-footer { display: flex; justify-content: flex-end; gap: 8px; }
.filter-popover-empty { padding: 10px 2px; color: var(--muted); font-size: 12px; }

body.conference-mode .filter-popover { background: #0d1424; border-color: #1f2a3d; color: #e9eef8; }
body.conference-mode .filter-popover-options { border-color: #1f2a3d; }
body.conference-mode .filter-popover-option { color: #e9eef8; }
body.conference-mode .filter-popover-option input { accent-color: #f59e0b; }
body.conference-mode .filter-popover-actions button { color: #f59e0b; }
body.conference-mode .filter-popover-empty { color: #8f9bb0; }

.reservation-cell strong { display: block; }
.reservation-cell small { display: block; margin-top: 2px; }

.leg-cell { display: grid; gap: 2px; }
.leg-cell strong { font-size: 13px; }
.leg-cell span { color: var(--muted); font-size: 12px; }

.switch-input {
  width: 42px;
  height: 24px;
  appearance: none;
  border-radius: 999px;
  background: #e5ebf3;
  cursor: pointer;
  transition: background .15s ease;
  flex: none;
}
.switch-input::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 3px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .22);
  transition: transform .15s ease;
}
.switch-input:checked { background: var(--primary); }
.switch-input:checked::before { transform: translateX(18px); }

.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; }

.flight-modal-card { position: relative; display: grid; gap: 16px; }
.modal-card-header { display: flex; justify-content: space-between; align-items: center; }
.modal-card-header h2 { margin: 0; }
.modal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.flight-leg-card {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}
.flight-leg-card legend { padding: 0 6px; font-weight: 800; color: var(--primary-dark); }

.notice-card--row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.notice-card--row p { margin: 2px 0 0; }

.report-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.report-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.report-card img { width: 20px; height: 20px; opacity: .8; }
.report-card span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.report-card strong { display: block; margin-top: 2px; font-size: 24px; }
.report-card--warn strong, .report-card--warn img { color: var(--yellow); }
.report-card--ok strong, .report-card--ok img { color: var(--green); }
.report-card--bad strong, .report-card--bad img { color: var(--red); }

.report-list { display: grid; gap: 12px; }
.report-item {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.report-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.report-item-head h3 { margin: 0 0 4px; font-size: 15px; }
.report-item-meta { text-align: right; color: var(--muted); font-size: 12px; }
.report-item-meta .link { display: block; margin-top: 4px; }
.report-item-empty { padding: 30px; text-align: center; color: var(--muted); }

.history-filters { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.history-filters .flight-search { flex: 1; max-width: none; }
.history-filters select.input { max-width: 220px; }

.notice-form { display: grid; gap: 16px; margin-bottom: 16px; }
.notice-card { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.notice-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 14px; }
.notice-card h3 img { width: 16px; height: 16px; }
.panel-title h2 img { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.notice-hint { margin: 4px 0 10px; color: var(--muted); font-size: 12px; }
.notice-inline-label { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.notice-check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; }
.notice-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); }
body.conference-mode .notice-check input { accent-color: #f59e0b; }
.notice-check strong { display: block; font-size: 13px; }
.notice-check small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.email-chip-list { display: grid; gap: 8px; margin-bottom: 10px; }
.email-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.email-chip button { border: 0; background: transparent; color: var(--red); cursor: pointer; }

body.conference-mode .difference-line { color: #f59e0b; }
body.conference-mode .report-card,
body.conference-mode .report-item,
body.conference-mode .notice-card,
body.conference-mode .email-chip { background: #0d1424; border-color: #1f2a3d; }
body.conference-mode .report-card--warn strong, body.conference-mode .report-card--warn img { color: #f59e0b; }
body.conference-mode .report-card--ok strong, body.conference-mode .report-card--ok img { color: #34d399; }
body.conference-mode .report-card--bad strong, body.conference-mode .report-card--bad img { color: #fb923c; }
body.conference-mode .report-card--neutral strong { color: #e9eef8; }
body.conference-mode .report-item-head h3,
body.conference-mode .notice-check strong,
body.conference-mode .notice-card h3 { color: #f8fafc; }
body.conference-mode .report-item-meta,
body.conference-mode .notice-hint,
body.conference-mode .notice-check small,
body.conference-mode .leg-cell span,
body.conference-mode .history-filters .input { color: #8f9bb0; }
body.conference-mode .flight-leg-card { background: #0b1120; border-color: #253149; }
body.conference-mode .flight-leg-card legend { color: #f59e0b; }
body.conference-mode .modal-card-header h2,
body.conference-mode .leg-cell strong { color: #f8fafc; }
body.conference-mode .switch-input { background: #253149; }
body.conference-mode .switch-input:checked { background: #f59e0b; }
body.conference-mode .modal-close { color: #e9eef8; }

.toast {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  background: #111827;
  color: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.hidden { display: none; }

/* Price application */
body.price-mode {
  grid-template-columns: 254px minmax(0, 1fr);
  background: #f8fafc;
  color: #111827;
}

body.price-mode .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 0;
  gap: 0;
  background: #fff;
  color: #111827;
  border-right: 1px solid #e2e8f0;
  box-shadow: none;
}

body.price-mode .brand {
  height: 56px;
  padding: 0 16px;
  gap: 9px;
  border-bottom: 1px solid #e2e8f0;
}

body.price-mode .brand > img {
  width: 19px;
  height: 19px;
  filter: invert(35%) sepia(94%) saturate(2284%) hue-rotate(199deg) brightness(98%) contrast(93%);
}

body.price-mode .brand strong {
  font-size: 16px;
  font-weight: 700;
}

.price-sidebar-nav {
  display: grid;
  gap: 4px;
  padding: 16px;
}

.internal-sidebar-nav {
  display: none;
}

body.price-mode .nav-button {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 4px;
  color: #64748b;
  font-size: 14px;
  font-weight: 400;
}

body.price-mode .nav-button img {
  width: 16px;
  height: 16px;
  opacity: .8;
}

body.price-mode .nav-button:hover {
  transform: none;
  background: #f1f5f9;
  color: #111827;
}

body.price-mode .nav-button.active {
  background: #dbeafe;
  color: #0f5fae;
  font-weight: 500;
}

.sidebar-separator {
  height: 1px;
  margin: 14px 0 10px;
  background: #e2e8f0;
}

.sidebar-label {
  padding: 0 12px 7px;
  color: #94a3b8;
  font-size: 10px;
  text-transform: uppercase;
}

.sidebar-footer {
  margin-top: auto;
  min-height: 62px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
}

.sidebar-footer > span {
  max-width: 70px;
  overflow-wrap: anywhere;
}

.sidebar-icon-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #111827;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.sidebar-icon-button.bordered {
  border: 1px solid #334155;
  background: #fff;
}

.sidebar-icon-button img {
  width: 16px;
  height: 16px;
}

body.price-mode .app {
  padding: 26px 24px 56px;
  background: #f8fafc;
}

body.price-mode .view-header {
  align-items: center;
  margin-bottom: 20px;
}

body.price-mode .view-header h1 {
  color: #0f172a;
  font-size: 24px;
  line-height: 1.2;
}

body.price-mode .view-header p {
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
}

.icon-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-title img {
  width: 22px;
  height: 22px;
  filter: invert(40%) sepia(96%) saturate(1519%) hue-rotate(184deg) brightness(89%) contrast(94%);
}

body.price-mode .button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
}

body.price-mode .button img {
  width: 16px;
  height: 16px;
}

body.price-mode .button:hover {
  transform: none;
}

body.price-mode .button.primary {
  background: #087dea;
  border-color: #087dea;
}

body.price-mode .button.danger.filled {
  background: #f43f4b;
  border-color: #f43f4b;
  color: #fff;
}

body.price-mode .button.danger.filled img,
body.price-mode .button.primary img {
  filter: brightness(0) invert(1);
}

body.price-mode .stats {
  gap: 16px;
  margin-bottom: 18px;
}

body.price-mode .stats article {
  position: relative;
  min-height: 86px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .07);
}

body.price-mode .stats span {
  display: block;
  color: #64748b;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.price-mode .stats strong {
  margin-top: 4px;
  color: #111827;
  font-size: 24px;
}

body.price-mode .stats article > img {
  position: absolute;
  top: 25px;
  right: 18px;
  width: 18px;
  height: 18px;
  opacity: .75;
}

body.price-mode .stats article:nth-child(1) > img { filter: invert(48%) sepia(95%) saturate(1687%) hue-rotate(182deg); }
body.price-mode .stats article:nth-child(2) > img { filter: invert(82%) sepia(94%) saturate(1062%) hue-rotate(346deg); }
body.price-mode .stats article:nth-child(3) > img { filter: invert(69%) sepia(53%) saturate(540%) hue-rotate(103deg); }
body.price-mode .stats article:nth-child(4) > img { filter: invert(45%) sepia(94%) saturate(2299%) hue-rotate(329deg); }

.price-filter-panel {
  margin-bottom: 18px;
  padding: 17px 16px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.price-filter-panel h2 {
  margin-bottom: 16px;
  font-size: 14px;
}

.price-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px 12px;
}

body.price-mode label {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

body.price-mode .input {
  min-height: 34px;
  padding: 7px 10px;
  border-color: #dbe2ea;
  border-radius: 4px;
  font-size: 13px;
}

body.price-mode .table-wrap {
  border-color: #e2e8f0;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
}

body.price-mode table {
  min-width: 1040px;
  font-size: 12px;
}

body.price-mode th,
body.price-mode td {
  padding: 10px 12px;
  border-color: #e8edf3;
  vertical-align: middle;
}

body.price-mode th {
  height: 42px;
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
  background: #f8fafc;
}

body.price-mode td {
  height: 58px;
}

body.price-mode td strong {
  color: #172033;
  font-size: 12px;
}

body.price-mode td small {
  color: #7b8799;
  font-size: 10px;
}

body.price-mode .status {
  position: relative;
  gap: 6px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 400;
}

body.price-mode .status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.price-type-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 3px;
  background: #f1f5f9;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.table-icon-button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.table-icon-button:hover { background: #f1f5f9; }
.table-icon-button:disabled { opacity: .35; cursor: not-allowed; }
.table-icon-button img { width: 16px; height: 16px; }
.table-icon-button.priority.active img { filter: invert(70%) sepia(95%) saturate(1097%) hue-rotate(357deg) brightness(99%) contrast(102%); }
.table-icon-button.priority { position: relative; overflow: visible; }
.priority-level-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: #f59e0b;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.table-icon-button.danger img { filter: invert(45%) sepia(95%) saturate(2500%) hue-rotate(330deg); }

.monitor-total {
  padding: 12px 2px 0;
  color: #64748b;
  font-size: 12px;
}

.new-search-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.segmented-control {
  display: inline-flex;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
}

.segmented-control button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.segmented-control button:last-child { border-right: 0; }
.segmented-control button.active { background: #087dea; color: #fff; }
.segmented-control button img { width: 14px; height: 14px; }
.segmented-control button.active img { filter: brightness(0) invert(1); }

.price-new-panel { display: none; }
.price-new-panel.active { display: block; }

.manual-search-table {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
}

.manual-search-table table { min-width: 1180px; }
.manual-search-table td { height: auto; vertical-align: top; }
.manual-search-table .input { min-width: 0; }

.manual-dates,
.manual-pax,
.manual-ages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.manual-dates input { width: 104px; }
.manual-pax input { width: 46px; text-align: center; }
.manual-ages { margin-top: 6px; flex-wrap: wrap; }
.manual-ages input { width: 54px; padding: 5px; }

.add-line-button {
  margin: 12px;
}

.interval-form {
  padding: 18px;
  border-radius: 4px;
}

.interval-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 12px;
}

.interval-grid label small,
.template-modal-grid label small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 400;
  text-transform: none;
}

.pax-fieldset {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.pax-fieldset legend {
  margin-bottom: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.date-field-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #dbe2ea;
  border-radius: 4px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13px;
}

.interval-preview {
  margin: 16px 0;
  padding: 11px 12px;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
}

.models-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  color: #64748b;
  font-size: 13px;
}

.models-intro-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.input-with-icon-button {
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-with-icon-button .input {
  flex: 1;
}

.icon-only-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.icon-only-button:hover {
  background: #f1f5f9;
}

.icon-only-button img {
  width: 16px;
  height: 16px;
}

.template-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 12px;
}

.template-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 255px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.template-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.template-card h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14px;
}

.template-card h3 img {
  width: 14px;
  height: 14px;
  filter: invert(70%) sepia(95%) saturate(1097%) hue-rotate(357deg);
}

.template-card header > span {
  padding: 3px 7px;
  border-radius: 3px;
  background: #e8f2ff;
  color: #2563eb;
  font-size: 10px;
}

.template-card > p {
  min-height: 34px;
  margin: 7px 0 12px;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.template-card dl,
.search-details-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  margin: 0;
  font-size: 11px;
}

.template-card dt,
.search-details-card dt { color: #7b8799; }
.template-card dd,
.search-details-card dd { margin: 0; color: #172033; text-align: right; }

.template-card footer {
  display: grid;
  grid-template-columns: 1fr repeat(3, 34px);
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.table-action-bordered {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #334155;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.table-action-bordered img { width: 15px; height: 15px; }
.table-action-bordered.danger { border-color: #ef4444; }
.table-action-bordered.danger img { filter: invert(45%) sepia(95%) saturate(2500%) hue-rotate(330deg); }

.template-modal-card,
.search-details-card {
  position: relative;
  width: min(640px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f9fafb;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
}

.template-modal-card > h2,
.search-details-card > h2 { margin: 0; font-size: 18px; }
.template-modal-card > p { margin: 6px 28px 18px 0; color: #64748b; font-size: 12px; }

.template-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.template-modal-grid .full-field { grid-column: 1 / -1; }

.priority-toggle {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  text-transform: none !important;
}

.priority-toggle input { width: 18px; height: 18px; }
.priority-toggle strong,
.priority-toggle small { display: block; }
.priority-toggle strong { color: #172033; font-size: 12px; }

.template-preview-box {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  background: #eff6ff;
}

.preview-list {
  display: grid;
  gap: 3px;
  color: #1e3a8a;
  font-size: 11px;
}

.preview-list strong { font-size: 13px; }

.search-details-card { width: min(520px, 100%); }
.search-details-card #searchDetailsContent { margin-top: 18px; }
.search-detail-error { margin-top: 14px; color: #dc2626; font-size: 12px; }

.compare-search { width: 290px !important; }
.inline-label { color: #64748b; font-size: 11px; }
.compare-export { margin-top: 12px; }
.compare-select-column { width: 34px; min-width: 34px; text-align: center !important; }
.compare-select-column input { width: 16px; height: 16px; accent-color: #087dea; }
.compare-row-selected td { background-color: #eff6ff; }

.compare-column-filter {
  width: 100%;
  min-width: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.compare-column-filter img {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  opacity: .45;
}

.compare-column-filter:hover,
.compare-column-filter.active { color: #087dea; }
.compare-column-filter.active img { opacity: 1; filter: invert(38%) sepia(99%) saturate(1804%) hue-rotate(188deg); }

.compare-filter-menu {
  position: fixed;
  z-index: 220;
  width: 300px;
  max-height: min(520px, calc(100vh - 16px));
  overflow: auto;
  padding: 12px;
  border: 1px solid #d8e1ed;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, .18);
}

.compare-filter-heading {
  margin-bottom: 8px;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}

.compare-filter-sort {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.compare-filter-sort:hover,
.compare-filter-sort.active { background: #eff6ff; color: #087dea; }
.compare-filter-sort img { width: 15px; height: 15px; }
.compare-filter-divider { height: 1px; margin: 8px 0; background: #e5eaf1; }
.compare-filter-search { width: 100% !important; margin-bottom: 8px; }

.compare-filter-values {
  max-height: 230px;
  overflow: auto;
  border-top: 1px solid #edf1f6;
}

.compare-filter-option {
  min-height: 34px;
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  color: #334155 !important;
  font-size: 12px !important;
  text-transform: none !important;
  cursor: pointer;
}

.compare-filter-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #087dea;
}

.compare-filter-select-all { font-weight: 700; }
.compare-filter-range { display: grid; gap: 10px; }
.compare-filter-range label { display: grid !important; gap: 5px; margin: 0 !important; }
.compare-filter-range .input { width: 100% !important; }

.compare-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5eaf1;
}

.compare-filter-actions .button { min-height: 34px; padding: 7px 12px; }
.compare-capture-cell { min-width: 142px; white-space: nowrap; color: #475569; font-size: 11px; }
.compare-flight-cell { min-width: 130px; white-space: nowrap; color: #475569; font-size: 11px; }

.compare-price-cell strong,
.compare-price-cell small,
.best-price-cell span,
.best-price-cell strong {
  display: block;
  white-space: nowrap;
}

.compare-price-cell strong { color: #172033; }
.compare-price-cell small { margin-top: 3px; color: #64748b; font-size: 10px; }

.compare-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0;
  font-size: 13px;
  color: #475569;
}
.compare-pagination button:disabled { opacity: .4; cursor: default; }

.best-price-cell {
  min-width: 126px;
  background: #ecfdf5;
  box-shadow: inset 3px 0 #10b981;
}

.best-price-cell span {
  color: #047857;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

body.price-mode .best-price-cell strong { margin-top: 3px; color: #065f46; }

.best-price-cell.pontos {
  background: #eff6ff;
  box-shadow: inset 3px 0 #2563eb;
}

.best-price-cell.pontos span { color: #1d4ed8; }
body.price-mode .best-price-cell.pontos strong { color: #1e3a8a; }

.compare-links { min-width: 86px; }
.compare-links .link { display: block; margin: 2px 0; }

.compare-table-wrap.is-empty {
  min-height: 195px;
  display: grid;
  place-items: center;
}

.compare-table-wrap.is-empty table { display: none; }

.compare-empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #64748b;
  text-align: center;
}

.compare-empty img { width: 34px; height: 34px; opacity: .25; }
.compare-empty strong { color: #64748b; font-size: 15px; }
.compare-empty span { font-size: 12px; }

.compare-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 110;
  overflow: auto;
  padding: 24px;
  background: #f8fafc;
}

.price-settings-stack {
  max-width: 840px;
  display: grid;
  gap: 14px;
  margin: 0 auto;
}

.price-settings-panel {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
}

.price-settings-panel > h2,
.price-settings-panel > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.price-settings-panel > h2 img { width: 16px; height: 16px; }
.price-settings-body { padding: 18px; }

.settings-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 10px;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.settings-three-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.settings-row-list { display: grid; gap: 8px; }
.mile-tier-row,
.airport-fee-row,
.city-iata-row,
.installment-row {
  display: grid;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 11px;
}

.mile-tier-row { grid-template-columns: auto 110px auto 110px auto 28px; }
.airport-fee-row { grid-template-columns: 54px 1fr 110px auto 28px; }
.city-iata-row { grid-template-columns: 1fr auto 80px 28px; }
.installment-row { grid-template-columns: 90px auto 100px auto 28px; }
.airport-code { text-transform: uppercase; font-weight: 700; }

.suffix-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 7px;
}

.advanced-settings > summary { cursor: pointer; border-bottom: 0; }
.advanced-settings[open] > summary { border-bottom: 1px solid #e2e8f0; }

.settings-popup-launchers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.settings-popup-card {
  width: min(680px, 100%);
  max-height: 88vh;
}

.settings-popup-scroll {
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 4px;
}

.modal-subtitle {
  margin: -8px 0 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.discount-rules-list { display: grid; gap: 12px; }

.discount-rule-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.discount-rule-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.discount-rule-row label {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.discount-rule-conditional textarea {
  min-height: 60px;
}

.discount-rule-remove {
  position: absolute;
  top: 10px;
  right: 10px;
}

.discount-rule-card .textarea {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  padding: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

@media (max-width: 1050px) {
  .price-filter-grid,
  .interval-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-cards { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .new-search-actions { align-items: flex-end; flex-direction: column; }
}

@media (max-width: 760px) {
  body.price-mode { display: block; }
  body.price-mode .sidebar { position: static; height: auto; }
  .price-sidebar-nav { grid-template-columns: repeat(2, 1fr); }
  .sidebar-footer { display: flex; }
  body.price-mode .app { padding: 18px 12px 40px; }
  body.price-mode .view-header { align-items: stretch; flex-direction: column; }
  body.price-mode .stats,
  .price-filter-grid,
  .interval-grid,
  .template-cards,
  .settings-three-columns,
  .template-modal-grid { grid-template-columns: 1fr; }
  .segmented-control { overflow-x: auto; }
  .template-modal-grid .full-field { grid-column: auto; }
  .compare-search { width: 100% !important; }
}

.hidden { display: none !important; }

/* ── Emissões ─────────────────────────────────────────────── */

.hub-icon.teal {
  background: #d5f5f6;
  border: 1px solid #81e6d9;
  color: #0d9488;
}

body.emissions-mode {
  grid-template-columns: 1fr;
  background: #f0fdf4;
}
body.emissions-mode .sidebar { display: none; }
body.emissions-mode .app { padding: 0; min-height: 100vh; }

.emissions-view {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px;
}

.emissions-view .view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.emissions-view .view-header h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 0;
}
.emissions-view .view-header p {
  color: #64748b;
  margin: 4px 0 0;
  font-size: 14px;
}
.emissions-view .view-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.emissions-view .view-actions .input {
  min-width: 220px;
}

.emission-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.emission-stats .stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.emission-stats .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
}
.emission-stats .stat-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
}

.emission-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow-x: auto;
}
.emission-table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
  font-size: 13px;
}
.emission-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.emission-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.emission-table tbody tr:hover {
  background: #f0fdf4;
}

.em-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.em-status-ok {
  background: rgba(16, 185, 129, .12);
  color: #059669;
}
.em-status-cancel {
  background: rgba(239, 68, 68, .12);
  color: #dc2626;
}
.em-status-pending {
  background: rgba(245, 158, 11, .12);
  color: #d97706;
}

.em-actions {
  display: flex;
  gap: 4px;
  white-space: nowrap;
}
.em-actions .icon-btn {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
  color: #475569;
  transition: background .15s, color .15s;
}
.em-actions .icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.em-actions .icon-btn.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.table-empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 14px;
}

/* Emission detail modal */
.emission-detail-card {
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
}
.em-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 16px;
  margin-bottom: 16px;
}
.em-detail-grid .k {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #64748b;
  font-weight: 600;
}
.em-detail-grid .v {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}
.em-detail-obs {
  margin-bottom: 16px;
}
.em-detail-obs .k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #64748b;
  font-weight: 600;
}
.em-detail-obs p {
  margin: 4px 0 0;
  font-size: 14px;
  color: #334155;
  white-space: pre-wrap;
}
.em-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}
.em-detail-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.em-detail-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f5f9;
}

/* Emission form modal */
.emission-form-card {
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
}
.em-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 14px;
  margin-bottom: 12px;
}
.em-form-grid label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.em-form-grid .input,
.em-form-grid textarea {
  width: 100%;
  margin-top: 4px;
}
.em-form-wide {
  grid-template-columns: 1fr;
}

@media (max-width: 900px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stats, .settings-grid, .grid-form, .template-layout, .template-form, .flight-layout, .flight-stats, .flight-form, .flight-leg, .hub-grid { grid-template-columns: 1fr; }
  .wide-field { grid-column: auto; }
  .full-field { grid-column: auto; }
  .flight-form-card { position: static; }
  .flight-search { max-width: none; }
  .date-picker-months { grid-template-columns: 1fr; }
  .view-header { flex-direction: column; }
  .em-form-grid, .em-detail-grid { grid-template-columns: 1fr; }
  .emission-detail-card, .emission-form-card { max-width: 95vw; }
}
