@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; }

#proxyCapacityTable .input {
  width: 92px;
  min-width: 72px;
}

#saveProxyCapacityBtn {
  margin-top: 14px;
}

.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-rules-card {
  width: min(920px, calc(100vw - 32px));
}

.discount-rule-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #33445d;
  border-radius: 12px;
  background: #101824;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

.discount-rule-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #29384e;
}

.discount-rule-card-header > strong {
  color: #eef4fb;
  font-size: 14px;
}

.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: #b8c5d7;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

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

.discount-rule-remove { position: static; min-height: 34px; }
.discount-rule-remove img { filter: brightness(0) invert(1); }

.discount-rule-card .textarea {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #34445b;
  background: #070c13;
  color: #eef4fb;
  padding: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.discount-rule-card .input,
.discount-rule-card select {
  background: #070c13;
  border-color: #34445b;
  color: #eef4fb;
}

.discount-rule-card .priority-toggle {
  background: #0b121d;
  border: 1px solid #2d3c52;
}

.discount-rule-card .priority-toggle strong { color: #eef4fb; }
.discount-rule-card .priority-toggle small { color: #98a7bb; }

.settings-save-hint {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: #aebdd0;
  background: #101824;
  border: 1px solid #29384e;
  border-radius: 9px;
  font-size: 12px;
}

html[data-theme="light"] .discount-rule-card {
  background: #f7f9fc;
  border-color: #d5dfeb;
  box-shadow: 0 8px 22px rgba(40, 66, 96, .08);
}
html[data-theme="light"] .discount-rule-card-header { border-color: #d7e1ee; }
html[data-theme="light"] .discount-rule-card-header > strong,
html[data-theme="light"] .discount-rule-card .priority-toggle strong { color: #172235; }
html[data-theme="light"] .discount-rule-row label { color: #52657d; }
html[data-theme="light"] .discount-rule-card .input,
html[data-theme="light"] .discount-rule-card select,
html[data-theme="light"] .discount-rule-card .textarea { background: #ffffff; border-color: #cbd7e6; color: #172235; }
html[data-theme="light"] .discount-rule-card .priority-toggle { background: #eef4fb; border-color: #d1ddea; }
html[data-theme="light"] .discount-rule-card .priority-toggle small { color: #64758b; }
html[data-theme="light"] .settings-save-hint { color: #53657c; background: #eef4fb; border-color: #d1ddea; }

@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; }
}

/* ── FlyUp black interface — navegação unificada ────────────────────────── */
:root {
  --bg: #05070b;
  --panel: #0b0f17;
  --panel-soft: #101722;
  --text: #f2f5f9;
  --muted: #98a4b7;
  --line: #202938;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-soft: #122445;
  --green: #34d399;
  --red: #fb7185;
  --yellow: #fbbf24;
  --blue-soft: #122445;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .28);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, .38);
}

html { color-scheme: dark; }

body,
body.home-mode,
body.price-mode,
body.conference-mode,
body.emissions-mode {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  background: var(--bg);
  color: var(--text);
}

.sidebar,
body.home-mode .sidebar,
body.price-mode .sidebar,
body.conference-mode .sidebar,
body.emissions-mode .sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 14px;
  gap: 14px;
  background: #070a10;
  color: var(--text);
  border-right: 1px solid var(--line);
  box-shadow: none;
}

.sidebar .brand,
body.price-mode .brand {
  min-height: 52px;
  height: auto;
  padding: 6px 8px 14px;
  border-bottom: 1px solid var(--line);
}

.sidebar .brand > img,
body.price-mode .brand > img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.sidebar .brand strong,
body.price-mode .brand strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}

.sidebar .brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.global-sidebar-nav,
.price-sidebar-nav,
.flight-sidebar-nav {
  display: grid;
  gap: 4px;
  padding: 2px 0;
}

.price-sidebar-nav,
.flight-sidebar-nav,
.internal-sidebar-nav { display: none; }

body.price-mode .price-sidebar-nav,
body.conference-mode .flight-sidebar-nav { display: grid; }

.sidebar-label,
body.price-mode .sidebar-label {
  padding: 8px 10px 5px;
  color: #718096;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-separator,
body.price-mode .sidebar-separator {
  height: 1px;
  margin: 9px 8px 5px;
  background: var(--line);
}

.sidebar .nav-button,
body.price-mode .nav-button {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transform: none;
}

.sidebar .nav-button img,
body.price-mode .nav-button img {
  width: 16px;
  height: 16px;
  opacity: .82;
  filter: brightness(0) invert(1);
}

.sidebar .nav-button:hover,
body.price-mode .nav-button:hover {
  background: #111722;
  color: var(--text);
  transform: none;
}

.sidebar .nav-button.active,
body.price-mode .nav-button.active,
.flight-sidebar-nav .nav-button.active {
  background: #162033;
  border-color: #263653;
  color: #ffffff;
  font-weight: 700;
}

.sidebar-footer,
body.price-mode .sidebar-footer {
  margin-top: auto;
  min-height: 60px;
  padding: 12px 4px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.sidebar-icon-button,
.sidebar-icon-button.bordered {
  border-color: var(--line);
  background: #0d121c;
  color: var(--text);
}

.sidebar-icon-button img { filter: brightness(0) invert(1); }

.app,
body.home-mode .app,
body.price-mode .app,
body.conference-mode .app,
body.emissions-mode .app {
  min-width: 0;
  min-height: 100vh;
  padding: 26px 28px 54px;
  background: var(--bg);
  color: var(--text);
}

.home-topbar,
.admin-view .home-topbar {
  height: auto;
  min-height: 58px;
  margin: -26px -28px 0;
  padding: 10px 28px;
  background: #080b12;
  border-color: var(--line);
}

.home-brand { display: none; }
.home-user { margin-left: auto; color: var(--muted); }
.home-link { color: var(--text); }
.home-link img,
.home-user .button img,
.admin-new-user img { filter: brightness(0) invert(1); }

.home-welcome {
  max-width: 1380px;
  margin: 34px auto 24px;
}

.home-welcome h1 { color: var(--text); font-size: 32px; }
.home-welcome p { color: var(--muted); font-size: 16px; }
.home-welcome p::before { color: var(--primary); }

.hub-grid {
  max-width: 1380px;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 14px;
}

.hub-card {
  min-height: 210px;
  padding: 22px;
  gap: 14px;
  border-color: var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  box-shadow: none;
}

.hub-card:hover {
  border-color: #34425a;
  background: #0e141e;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .22);
}

.hub-card em {
  top: 22px;
  right: 22px;
  background: #151d2a;
  color: #cbd5e1;
  font-size: 11px;
}

.hub-icon {
  width: 48px;
  height: 48px;
  border-color: #2a3850 !important;
  background: #121c2b !important;
  color: #77aaff !important;
  font-size: 22px;
}

.hub-card strong { color: var(--text); font-size: 19px; }
.hub-card small { color: var(--muted); font-size: 14px; }

.view-header h1,
body.price-mode .view-header h1,
.emissions-view .view-header h1,
.admin-heading h1 { color: var(--text); }

.view-header p,
body.price-mode .view-header p,
.emissions-view .view-header p,
.admin-heading p,
.muted { color: var(--muted); }

.panel,
.modal-card,
.table-wrap,
.stats article,
.flight-stats article,
.admin-table-card,
.emission-table-wrap,
.emission-stats .stat-card,
.price-filter-panel,
.price-settings-panel,
.search-details-card,
.template-card,
.notice-card,
.report-card,
.report-item {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.panel-title,
.flight-panel .panel-title,
body.conference-mode .flight-panel .panel-title {
  background: var(--panel);
  border-color: var(--line);
}

.panel-title h2,
body.conference-mode .panel-title h2,
.price-settings-panel h2,
.notice-card h3 { color: var(--text); }

.input,
.textarea,
select,
textarea,
body.price-mode .input,
body.conference-mode .input,
body.conference-mode .textarea {
  background: #070b12;
  border-color: #293448;
  color: var(--text);
}

.input::placeholder,
.textarea::placeholder,
textarea::placeholder { color: #68758a; }

.button,
.icon-button,
body.price-mode .button,
body.conference-mode .button {
  background: #111722;
  border-color: #293448;
  color: var(--text);
  box-shadow: none;
}

.button:hover,
.icon-button:hover,
body.price-mode .button:hover,
body.conference-mode .button:hover {
  background: #182131;
  border-color: #3a4b66;
  color: #ffffff;
  box-shadow: none;
}

.button.primary,
body.price-mode .button.primary,
body.conference-mode .button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.button.secondary,
body.conference-mode .button.secondary { color: #b9c8dd; border-color: #344158; }
.button.danger { color: var(--red); }

table,
body.price-mode table,
.emission-table,
.users-access-table { color: #dce4ef; }

th,
body.price-mode th,
body.conference-mode th,
.emission-table th,
.users-access-table th {
  background: #0f1520;
  border-color: var(--line);
  color: #8f9bb0;
}

td,
body.price-mode td,
body.conference-mode td,
.emission-table td,
.users-access-table td { border-color: #182131; }

tbody tr:hover,
body.conference-mode tbody tr:hover,
.emission-table tbody tr:hover { background: #0f1621; }

body.price-mode .stats article,
body.price-mode .price-filter-panel,
body.price-mode .table-wrap {
  background: var(--panel);
  border-color: var(--line);
}

body.price-mode .stats span,
body.price-mode th,
body.price-mode td small,
body.price-mode label { color: var(--muted); }

body.price-mode .stats strong,
body.price-mode td strong { color: var(--text); }

body.conference-mode .flight-view {
  max-width: none;
  min-height: 0;
  padding: 0;
  background: var(--bg);
}

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

body.conference-mode .flight-hero {
  margin-bottom: 18px;
  padding: 0;
}

body.conference-mode .flight-hero h1 { color: var(--text); }
body.conference-mode .flight-hero p { color: var(--muted); }

body.conference-mode .panel,
body.conference-mode .table-wrap,
body.conference-mode .flight-panel,
body.conference-mode .report-card,
body.conference-mode .report-item,
body.conference-mode .notice-card,
body.conference-mode .email-chip {
  background: var(--panel);
  border-color: var(--line);
}

body.conference-mode .flight-table { min-width: 1500px; }
.reservations-table { min-width: 1500px; }
.analyze-flight-table { min-width: 1500px; }

body.emissions-mode .emissions-view {
  max-width: none;
  margin: 0;
  padding: 0;
}

.emission-stats .stat-value,
.em-detail-grid .v { color: var(--text); }
.emission-stats .stat-label,
.em-detail-grid .k,
.em-detail-obs .k,
.em-detail-obs p,
.em-form-grid label { color: var(--muted); }

.em-actions .icon-btn {
  background: #111722;
  border-color: var(--line);
  color: var(--muted);
}

.em-actions .icon-btn:hover { background: #182131; color: var(--text); }

.admin-page { max-width: 1400px; }
.admin-table-card { overflow-x: auto; }

.modal { background: rgba(0, 0, 0, .78); }
.modal-close { color: var(--text); }

@media (max-width: 1180px) {
  .hub-grid { grid-template-columns: repeat(2, minmax(230px, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

@media (max-width: 900px) {
  body,
  body.home-mode,
  body.price-mode,
  body.conference-mode,
  body.emissions-mode {
    display: grid;
    grid-template-columns: 196px minmax(0, 1fr);
  }

  .sidebar,
  body.home-mode .sidebar,
  body.price-mode .sidebar,
  body.conference-mode .sidebar,
  body.emissions-mode .sidebar {
    position: sticky;
    height: 100vh;
  }

  .app,
  body.home-mode .app,
  body.price-mode .app,
  body.conference-mode .app,
  body.emissions-mode .app { padding: 20px 16px 40px; }

  .home-topbar,
  .admin-view .home-topbar { margin: -20px -16px 0; padding: 10px 16px; }
}

@media (max-width: 640px) {
  body,
  body.home-mode,
  body.price-mode,
  body.conference-mode,
  body.emissions-mode { display: block; }

  .sidebar,
  body.home-mode .sidebar,
  body.price-mode .sidebar,
  body.conference-mode .sidebar,
  body.emissions-mode .sidebar {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
  }

  .global-sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.price-mode .price-sidebar-nav,
  body.conference-mode .flight-sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-footer { display: flex; }
  .hub-grid { grid-template-columns: 1fr; }
}

/* ── FlyUp accessibility pass: contrast + hover sidebar ─────────────────── */
body,
body.home-mode,
body.price-mode,
body.conference-mode,
body.emissions-mode {
  grid-template-columns: 68px minmax(0, 1fr);
}

.sidebar,
body.home-mode .sidebar,
body.price-mode .sidebar,
body.conference-mode .sidebar,
body.emissions-mode .sidebar {
  width: 68px;
  padding: 16px 10px;
  overflow-x: hidden;
  transition: width .2s ease, box-shadow .2s ease;
}

.sidebar:hover,
body.home-mode .sidebar:hover,
body.price-mode .sidebar:hover,
body.conference-mode .sidebar:hover,
body.emissions-mode .sidebar:hover {
  width: 248px;
  box-shadow: 18px 0 42px rgba(0, 0, 0, .42);
}

.sidebar .brand,
body.price-mode .brand {
  min-width: 216px;
  padding-left: 9px;
}

.sidebar .brand > div,
.sidebar-label,
.sidebar-footer > span {
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease;
}

.sidebar:hover .brand > div,
.sidebar:hover .sidebar-label,
.sidebar:hover .sidebar-footer > span {
  opacity: 1;
  pointer-events: auto;
}

.global-sidebar-nav { min-width: 216px; }

.sidebar .nav-button,
body.price-mode .nav-button {
  width: 100%;
  min-width: 48px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0;
}

.sidebar .nav-button img,
body.price-mode .nav-button img { flex: 0 0 16px; }

.sidebar:hover .nav-button,
body.price-mode .sidebar:hover .nav-button { font-size: 12px; }

.sidebar-submenu {
  position: relative;
  margin: 2px 0 5px;
  padding: 3px 0 3px 10px;
  border-left: 1px solid #263248;
}

.sidebar-submenu .nav-button {
  min-height: 34px;
  padding-top: 7px;
  padding-bottom: 7px;
  color: #8190a7;
}

.sidebar-submenu .nav-button.active {
  background: #111a29;
  border-color: #263653;
}

.sidebar-footer,
body.price-mode .sidebar-footer {
  min-width: 216px;
  grid-template-columns: 1fr auto auto;
}

.sidebar .sidebar-icon-button {
  overflow: hidden;
  white-space: nowrap;
  font-size: 0;
}

.sidebar:hover .sidebar-icon-button,
.sidebar:hover .sidebar-icon-button { font-size: 12px; }

/* Contraste de usuários e histórico */
.users-access-table td,
.users-access-table td strong,
.users-access-table td button,
.users-access-table td details,
.users-access-table td summary { color: #dce4ef; }

.users-access-table td:first-child small,
.audit-details,
.audit-details pre,
.audit-details code { color: #9aa8bc; }

.profile-badge,
.profile-badge.admin {
  background: #111722;
  border-color: #2a3548;
  color: #dce4ef;
}

.profile-badge.principal {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

.access-select,
.access-select:disabled {
  background: #080d15;
  border-color: #2a3548;
  color: #e4eaf2;
  opacity: 1;
}

.icon-action { color: #dce4ef; }
.icon-action img,
.compare-column-filter img { filter: brightness(0) invert(1); opacity: .8; }
.icon-action:not(:disabled):hover { background: #182131; }

/* Contraste de configurações, formulários e modais */
.price-settings-panel > h2,
.price-settings-panel > summary,
body.price-mode .price-settings-panel > h2,
body.price-mode .price-settings-panel > summary {
  background: #0f1520;
  border-color: var(--line);
  color: #e7edf5;
}

.settings-section-title,
.mile-tier-row,
.airport-fee-row,
.city-iata-row,
.installment-row,
.modal-subtitle { color: #9aa8bc; }

.advanced-settings[open] > summary { border-color: var(--line); }

.user-modal-card,
.template-modal-card,
.search-details-card,
.settings-popup-card {
  background: #0b0f17;
  border-color: var(--line);
  color: #e7edf5;
}

.user-modal-card > p,
.template-modal-card > p,
.user-modal-card label { color: #a8b4c6; }

.priority-toggle,
.template-preview-box,
.table-action-bordered {
  background: #0f1520;
  border-color: #2a3548;
  color: #dce4ef;
}

.template-card dd,
.search-details-card dd,
.priority-toggle strong,
.compare-price-cell strong,
.search-details-card dt { color: #dce4ef; }

.compare-fullscreen { background: var(--bg); color: var(--text); }

.price-settings-body table td,
.price-settings-body table td strong,
.price-settings-body table td span { color: #dce4ef; }

.price-settings-body table th { color: #9aa8bc; }

.price-settings-body .input,
.price-settings-body select,
.price-settings-body textarea { color: #f2f5f9; }

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  body.home-mode .sidebar,
  body.price-mode .sidebar,
  body.conference-mode .sidebar,
  body.emissions-mode .sidebar { transition: none; }
}

@media (max-width: 640px) {
  body,
  body.home-mode,
  body.price-mode,
  body.conference-mode,
  body.emissions-mode { display: block; }

  .sidebar,
  body.home-mode .sidebar,
  body.price-mode .sidebar,
  body.conference-mode .sidebar,
  body.emissions-mode .sidebar {
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .sidebar .brand > div,
  .sidebar-label,
  .sidebar-footer > span { opacity: 1; pointer-events: auto; }

  .sidebar .nav-button,
  body.price-mode .nav-button,
  .sidebar .sidebar-icon-button { font-size: 12px; }
}

/* ── Navegação contextual superior + revisão geral de contraste ─────────── */
body,
body.home-mode,
body.price-mode,
body.conference-mode,
body.emissions-mode {
  display: block;
  min-height: 100vh;
}

.sidebar,
body.home-mode .sidebar,
body.price-mode .sidebar,
body.conference-mode .sidebar,
body.emissions-mode .sidebar {
  position: sticky;
  inset: 0 0 auto;
  z-index: 120;
  width: 100%;
  height: 68px;
  padding: 9px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(7, 11, 18, .97);
  border-right: 0;
  border-bottom: 1px solid #253149;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
  transition: none;
}

.sidebar:hover,
body.home-mode .sidebar:hover,
body.price-mode .sidebar:hover,
body.conference-mode .sidebar:hover,
body.emissions-mode .sidebar:hover {
  width: 100%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
}

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

.sidebar .brand,
body.price-mode .brand {
  min-width: max-content;
  padding: 0 18px 0 0;
  border-right: 1px solid #253149;
}

.sidebar .brand > div,
.sidebar .sidebar-label,
.sidebar .sidebar-footer > span,
.sidebar:hover .brand > div,
.sidebar:hover .sidebar-label,
.sidebar:hover .sidebar-footer > span {
  opacity: 1;
  pointer-events: auto;
}

.sidebar .brand small { display: none; }

.global-sidebar-nav,
.internal-sidebar-nav,
.flight-sidebar-nav,
.price-sidebar-nav { display: none; }

body.conference-mode .flight-sidebar-nav,
body.price-mode .price-sidebar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: max-content;
}

.context-nav .nav-button,
body.price-mode .context-nav .nav-button,
.sidebar:hover .context-nav .nav-button,
body.price-mode .sidebar:hover .context-nav .nav-button {
  width: auto;
  min-width: max-content;
  min-height: 42px;
  padding: 10px 13px;
  gap: 8px;
  overflow: visible;
  font-size: 13px;
  color: #b8c5d8;
  border: 1px solid transparent;
  border-radius: 10px;
}

.context-nav .nav-button img {
  width: 17px;
  height: 17px;
  filter: brightness(0) invert(1);
  opacity: .9;
}

.context-nav .nav-button:hover {
  color: #ffffff;
  background: #111a29;
  border-color: #2b3952;
}

.context-nav .nav-button.active,
body.price-mode .context-nav .nav-button.active {
  color: #ffffff;
  background: #17243a;
  border-color: #36527d;
}

.sidebar-footer,
body.price-mode .sidebar-footer {
  position: static;
  margin: 0 0 0 auto;
  padding: 0;
  min-width: max-content;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
}

.sidebar .sidebar-icon-button,
.sidebar:hover .sidebar-icon-button {
  min-width: max-content;
  min-height: 40px;
  padding: 9px 11px;
  gap: 7px;
  overflow: visible;
  font-size: 12px;
  color: #dce5f2;
  border: 1px solid #2b3952;
  border-radius: 10px;
}

.sidebar .sidebar-icon-button:hover { color: #ffffff; background: #17243a; }
.sidebar .sidebar-icon-button img { opacity: 1; }

.sidebar .sidebar-home-button {
  flex: 0 0 auto;
  margin: 0;
}

body.price-mode .app,
body.conference-mode .app,
body.emissions-mode .app,
body.admin-mode .app,
body.activity-mode .app {
  width: 100%;
  min-width: 0;
  padding: 24px 28px 48px;
}

/* Calendário: fundo e conteúdo escuros com leitura clara */
.date-picker-overlay {
  background: rgba(1, 5, 12, .84);
  backdrop-filter: blur(5px);
}

.date-picker {
  background: #0a0f18;
  border: 1px solid #334155;
  color: #eef3fa;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .62);
}

.date-picker-header { border-color: #29364b; }
.date-picker-header strong { color: #f3f6fb; }
.calendar-nav {
  background: #131c2a;
  border-color: #40506a;
  color: #ffffff;
}
.calendar-nav:hover { background: #1d2b41; border-color: #5b78a6; }
.calendar-month {
  background: #0f1724;
  border-color: #334155;
}
.calendar-month h3 { color: #edf2f8; }
.calendar-weekdays { color: #aebbd0; }
.calendar-day {
  background: #182334;
  border: 1px solid #31415b;
  color: #edf3fb;
}
.calendar-day:hover { background: #223552; border-color: #4d72a8; color: #ffffff; }
.calendar-day.selected {
  background: #2563eb;
  border-color: #60a5fa;
  color: #ffffff;
}

/* Elementos de conteúdo compartilhados */
.view { color: #e7edf5; }
.view h1, .view h2, .view h3, .view h4,
.modal-card h1, .modal-card h2, .modal-card h3,
.user-modal-card h1, .user-modal-card h2, .user-modal-card h3 { color: #f3f6fb; }

.view input,
.view select,
.view textarea,
.modal-card input,
.modal-card select,
.modal-card textarea {
  background-color: #080d15;
  border-color: #334155;
  color: #eef3f9;
}

.view input::placeholder,
.view textarea::placeholder,
.modal-card input::placeholder,
.modal-card textarea::placeholder { color: #8290a5; opacity: 1; }

.view label,
.modal-card label,
.user-modal-card label { color: #b5c1d2; }

.view table { color: #dce5f0; }
.view th { color: #aebbd0; }
.view td { color: #dce5f0; }

.button img,
.icon-button img,
.icon-action img,
.table-action img,
.filter-button img { opacity: .92; }

@media (max-width: 900px) {
  .sidebar,
  body.home-mode .sidebar,
  body.price-mode .sidebar,
  body.conference-mode .sidebar,
  body.emissions-mode .sidebar {
    position: sticky;
    width: 100%;
    height: auto;
    padding: 9px 12px;
  }
  .sidebar .brand > div,
  .sidebar .sidebar-footer > span { display: none; }
  .context-nav .nav-button,
  body.price-mode .context-nav .nav-button { min-height: 38px; padding: 8px 10px; }
  body.price-mode .app,
  body.conference-mode .app,
  body.emissions-mode .app,
  body.admin-mode .app,
  body.activity-mode .app { padding: 20px 16px 40px; }
}

@media (max-width: 640px) {
  .sidebar .brand { display: none; }
  .sidebar-footer { margin-left: 4px; }
  .sidebar .sidebar-icon-button { font-size: 0; min-width: 38px; padding: 8px 10px; }
}

/* Ajustes encontrados na inspeção de todas as telas */
body.admin-mode .admin-view .home-topbar,
body.activity-mode .admin-view .home-topbar { display: none; }

.button.primary,
body.price-mode .button.primary,
body.conference-mode .button.primary,
.price-new-tabs button.active {
  background: #1d4ed8;
  border-color: #3b82f6;
  color: #ffffff;
}

.button.danger.filled,
body.price-mode .button.danger.filled {
  background: #b91c1c;
  border-color: #ef4444;
  color: #ffffff;
}

body.price-mode .status.pending {
  background: #142747;
  color: #93c5fd;
}

.template-card p,
.inline-label,
.view .muted,
.view .hint { color: #9aa8bc; }

.view img[src^="/icons/"],
.user-modal-overlay img[src^="/icons/"],
.date-picker-overlay img[src^="/icons/"] {
  filter: brightness(0) invert(1);
  opacity: .9;
}

.view .button.primary img,
.view .button.danger img { opacity: 1; }
.automation-modal-card{width:min(920px,calc(100vw - 32px));max-height:92vh;overflow:auto}.automation-settings-card{width:min(980px,calc(100vw - 32px))}.automation-eyebrow{display:block;color:#1677ff;font-size:11px;font-weight:800;letter-spacing:.12em;margin-bottom:6px}.automation-tabs{display:flex;border-bottom:1px solid #e6eaf0;margin:20px 0}.automation-tabs button{border:0;background:none;padding:12px 4px;color:#526174;font-weight:700;border-bottom:3px solid #1677ff}.automation-integration-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.automation-integration-card{display:flex;align-items:center;gap:14px;border:1px solid #e3e8f0;border-radius:16px;padding:16px;background:#fff}.automation-integration-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#eef5ff;color:#1677ff;font-weight:800}.automation-integration-info{min-width:0;flex:1}.automation-integration-info strong,.automation-integration-info small{display:block}.automation-integration-info small{color:#6b788b;margin-top:4px}.automation-status{font-size:11px;font-weight:800;padding:5px 9px;border-radius:999px;background:#eef1f5;color:#687588}.automation-status.configured{background:#e8f8ef;color:#16864b}.automation-security-note{margin:18px 0 0;padding:12px 14px;border-radius:12px;background:#f5f8fc;color:#607086;font-size:13px}.automation-section-title{display:flex;align-items:center;justify-content:space-between;margin:22px 0 10px}.automation-section-title small{display:block;color:#708096;margin-top:3px}.button.small{padding:8px 11px;font-size:12px}.import-passenger-list{display:grid;gap:10px}.import-passenger-row{display:grid;grid-template-columns:1.3fr 1fr 1fr auto;gap:10px;align-items:end;padding:12px;border:1px solid #e5eaf1;border-radius:14px;background:#f9fbfd}.import-passenger-row label{margin:0}.import-passenger-row .remove-import-passenger{height:40px}.credential-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.credential-profile{border:1px solid #e4e9f1;border-radius:14px;padding:12px;margin-bottom:10px}.credential-profile strong{display:block;margin-bottom:8px}@media(max-width:760px){.automation-integration-list,.credential-grid{grid-template-columns:1fr}.import-passenger-row{grid-template-columns:1fr}}
.automation-queue-panel{margin:18px 0;padding:0 18px 16px;border:1px solid #e3e8f0;border-radius:16px;background:#fff}.automation-import-queue{display:grid;gap:9px}.automation-import-item{display:grid;grid-template-columns:minmax(180px,1.4fr) 1fr auto auto auto;gap:14px;align-items:center;padding:12px 14px;border-radius:12px;background:#f7f9fc}.automation-import-item strong,.automation-import-item small{display:block}.automation-import-item small{color:#718095;margin-top:3px}.automation-import-route{font-weight:700;color:#354255}.automation-import-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:146px}.automation-import-empty{padding:18px;text-align:center;color:#7b8797}@media(max-width:760px){.automation-import-item{grid-template-columns:1fr}.automation-import-actions{justify-content:flex-start;min-width:0}}
.automation-integration-info strong{color:#1d2939}

/* ── Emissões: padronização completa do tema escuro ────────────────────── */
.emissions-view {
  --em-panel: #0b0f17;
  --em-panel-soft: #0f1622;
  --em-panel-raised: #121b29;
  --em-line: #263349;
  --em-line-strong: #354762;
  --em-text: #edf3fa;
  --em-muted: #9ba9bd;
  color-scheme: dark;
}

.emissions-view .view-header {
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(650px, 1.3fr);
  align-items: end;
  gap: 22px;
  padding: 4px 0 2px;
}

.emissions-view .view-actions {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(6, max-content);
  align-items: center;
  gap: 8px;
}

.emissions-view .view-actions .input { min-width: 0; width: 100%; }
.emissions-view .view-actions .button { min-height: 40px; white-space: nowrap; }

.emission-stats { gap: 14px; margin-bottom: 22px; }
.emission-stats .stat-card {
  position: relative;
  min-height: 92px;
  padding: 17px 20px;
  background: linear-gradient(145deg, #0e1521, #0a0f17);
  border: 1px solid var(--em-line);
  border-radius: 14px;
  overflow: hidden;
}
.emission-stats .stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #3b82f6;
}
.emission-stats .stat-card:nth-child(2)::before { background: #22c55e; }
.emission-stats .stat-card:nth-child(3)::before { background: #ef4444; }
.emission-stats .stat-value { color: var(--em-text); }
.emission-stats .stat-label { color: var(--em-muted); }

.automation-queue-panel {
  margin: 18px 0 22px;
  padding: 0 18px 16px;
  background: var(--em-panel);
  border: 1px solid var(--em-line);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .16);
}

.automation-section-title { color: var(--em-text); }
.automation-section-title strong { color: var(--em-text); }
.automation-section-title small { color: var(--em-muted); }

.automation-import-queue { gap: 9px; }
.automation-import-item {
  background: var(--em-panel-soft);
  border: 1px solid var(--em-line);
  color: var(--em-text);
}
.automation-import-item.importada { background: #0b1517; border-color: #24433e; }
.automation-import-item small { color: var(--em-muted); }
.automation-import-route { color: #c7d7ec; }
.automation-import-empty {
  min-height: 68px;
  display: grid;
  place-items: center;
  color: var(--em-muted);
  background: #0d131d;
  border: 1px dashed #2b3950;
  border-radius: 12px;
}
.automation-status.imported {
  color: #6ee7b7;
  background: rgba(16, 185, 129, .13);
  border: 1px solid rgba(16, 185, 129, .28);
}
.automation-import-actions { min-width: 230px; }

.emission-table-wrap {
  background: var(--em-panel);
  border-color: var(--em-line);
  border-radius: 14px;
}
.emission-table th { background: #0f1622; color: #aab7ca; border-color: var(--em-line); }
.emission-table td { color: #dce5f1; border-color: #1b2637; }
.table-empty { color: var(--em-muted); }

/* Janelas e formulários de Emissões */
.emissions-view .user-modal-overlay {
  background: rgba(1, 4, 10, .84);
  backdrop-filter: blur(5px);
}
.emissions-view .user-modal-card,
.emissions-view .automation-modal-card {
  background: #0a1019;
  border: 1px solid var(--em-line-strong);
  color: var(--em-text);
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .62);
  scrollbar-color: #3b4b64 #0a1019;
}
.emissions-view .emission-form-card:not(.automation-modal-card) {
  width: min(820px, calc(100vw - 32px));
  max-width: 820px;
}
.emissions-view .user-modal-card h2,
.emissions-view .automation-modal-card h2 { color: var(--em-text); line-height: 1.2; }
.emissions-view .modal-subtitle,
.emissions-view .user-modal-card > p { color: var(--em-muted); }
.emissions-view .modal-close { color: #dce6f3; border-radius: 8px; }
.emissions-view .modal-close:hover { background: #172235; color: #ffffff; }

.emissions-view .em-form-grid {
  padding: 14px;
  margin-bottom: 0;
  background: var(--em-panel-soft);
  border: 1px solid var(--em-line);
  border-radius: 12px;
}
.emissions-view .em-form-grid + .em-form-grid { margin-top: -4px; }
.emissions-view .em-form-grid label,
.emissions-view .automation-modal-card label,
.emissions-view .credential-grid label { color: #b8c5d7; }
.emissions-view .input,
.emissions-view select,
.emissions-view textarea,
.emissions-view .user-modal-card .input {
  background: #070c13;
  border-color: #34435a;
  color: #eef4fb;
}
.emissions-view .input:focus,
.emissions-view select:focus,
.emissions-view textarea:focus {
  border-color: #4f8cff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
  outline: none;
}
.emissions-view .input::placeholder,
.emissions-view textarea::placeholder { color: #7f8da2; opacity: 1; }
.emissions-view input:-webkit-autofill,
.emissions-view input:-webkit-autofill:hover,
.emissions-view input:-webkit-autofill:focus {
  -webkit-text-fill-color: #eef4fb;
  -webkit-box-shadow: 0 0 0 1000px #070c13 inset;
  caret-color: #eef4fb;
  transition: background-color 9999s ease-out 0s;
}

.import-passenger-list { gap: 10px; }
.import-passenger-row {
  background: var(--em-panel-soft);
  border: 1px solid var(--em-line);
  border-radius: 14px;
}
.import-passenger-row label { color: #b8c5d7; }
.import-passenger-row .remove-import-passenger {
  color: #fda4af;
  border-color: #5c2933;
  background: rgba(190, 24, 93, .1);
}

.import-airport-field,
.import-date-field { position: relative; }
.import-airport-options {
  position: absolute;
  z-index: 120;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid #344866;
  border-radius: 11px;
  background: #0d1623;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .48);
}
.import-airport-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #1d2b3f;
  background: transparent;
  color: #dce6f3;
  text-align: left;
  cursor: pointer;
}
.import-airport-option:last-child { border-bottom: 0; }
.import-airport-option:hover,
.import-airport-option.active { background: #162844; }
.import-airport-option strong { min-width: 34px; color: #7db2ff; }
.import-airport-option span { color: #b8c5d7; }

.import-calendar-popup {
  position: fixed;
  z-index: 125;
  width: min(570px, calc(100vw - 70px));
  padding: 14px;
  border: 1px solid #344866;
  border-radius: 14px;
  background: #0d1623;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .58);
}
.import-calendar-header {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #a9b8cc;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.import-calendar-header button {
  height: 30px;
  border: 1px solid #344866;
  border-radius: 8px;
  background: #111d2d;
  color: #dce6f3;
  cursor: pointer;
}
.import-calendar-months { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.import-calendar-month > strong {
  display: block;
  margin-bottom: 8px;
  color: #eef4fb;
  text-align: center;
  font-size: 12px;
}
.import-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.import-calendar-grid > span {
  color: #708096;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}
.import-calendar-grid > i { min-height: 29px; }
.import-calendar-day {
  min-width: 29px;
  height: 29px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #dce6f3;
  font-size: 11px;
  cursor: pointer;
}
.import-calendar-day:hover { border-color: #4f8cff; background: #162844; }
.import-calendar-day.dedicated {
  border-color: #2f72db;
  background: #173f7a;
  color: #fff;
  font-weight: 800;
}
.import-calendar-day.selected { background: #f59e0b; color: #111827; font-weight: 900; }
.import-calendar-day.disabled { opacity: .27; cursor: default; }
.import-calendar-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  color: #91a2b8;
}
.import-calendar-legend i { width: 11px; height: 11px; border-radius: 3px; background: #173f7a; border: 1px solid #2f72db; }

@media (max-width: 760px) {
  .import-calendar-popup { width: min(310px, calc(100vw - 54px)); }
  .import-calendar-months { grid-template-columns: 1fr; }
  .import-calendar-months .import-calendar-month + .import-calendar-month { display: none; }
}

/* Configurações e credenciais */
.automation-tabs { border-color: var(--em-line); }
.automation-tabs button {
  color: #b8c5d7;
  border-bottom-color: #3b82f6;
}
.automation-integration-list { gap: 12px; }
.automation-integration-card {
  background: var(--em-panel-soft);
  border: 1px solid var(--em-line);
  color: var(--em-text);
  border-radius: 14px;
  box-shadow: none;
}
.automation-integration-icon {
  background: #162844;
  border: 1px solid #284d82;
  color: #7db2ff;
}
.automation-integration-info strong { color: var(--em-text); }
.automation-integration-info small { color: var(--em-muted); }
.automation-status {
  background: #1a2432;
  border: 1px solid #344157;
  color: #b6c2d2;
}
.automation-status.configured {
  background: rgba(16, 185, 129, .13);
  border-color: #176c53;
  color: #6ee7b7;
}
.automation-security-note {
  background: #0e1724;
  border: 1px solid var(--em-line);
  color: #aab8ca;
}
.credential-profile {
  background: var(--em-panel-soft);
  border: 1px solid var(--em-line);
  border-radius: 14px;
}
.credential-profile strong { color: var(--em-text); }
.credential-grid { gap: 12px; }
.credential-password-field { position: relative; display: block; }
.credential-password-field .input { padding-right: 46px; }
.credential-password-field [data-toggle-password] {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 9px;
  background: transparent; color: #8fa0b5; cursor: pointer; font-size: 17px;
}
.credential-password-field [data-toggle-password]:hover,
.credential-password-field [data-toggle-password].showing { background: #182537; color: #70a9ff; }

.em-detail-grid,
.em-detail-obs {
  padding: 14px;
  background: var(--em-panel-soft);
  border: 1px solid var(--em-line);
  border-radius: 12px;
}
.em-detail-grid .k,
.em-detail-obs .k { color: var(--em-muted); }
.em-detail-grid .v,
.em-detail-obs p { color: var(--em-text); }
.em-detail-table th { background: #111a27; color: #aab7ca; border-color: var(--em-line); }
.em-detail-table td { color: #dce5f1; border-color: #1d293a; }

.em-actions .icon-btn {
  background: #101824;
  border-color: #2d3b50;
  color: #d5deeb;
}
.em-actions .icon-btn:hover { background: #18263a; color: #ffffff; }
.em-actions .icon-btn.danger:hover { background: #37151b; color: #fda4af; }

@media (max-width: 1180px) {
  .emissions-view .view-header { grid-template-columns: 1fr; align-items: stretch; }
  .emissions-view .view-actions { grid-template-columns: minmax(240px, 1fr) repeat(6, max-content); }
}

@media (max-width: 820px) {
  .emissions-view .view-actions { grid-template-columns: 1fr 1fr; }
  .emissions-view .view-actions .input { grid-column: 1 / -1; }
  .emissions-view .view-actions .button { width: 100%; }
  .automation-integration-list,
  .credential-grid { grid-template-columns: 1fr; }
  .import-passenger-row { grid-template-columns: 1fr; }
}

/* Automação de preços: filtros persistentes e colunas redimensionáveis */
.price-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.price-filter-header h2 { margin: 0; }
.price-filter-header .button img { width: 15px; height: 15px; }

.resizable-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}

.resizable-table th[data-col] {
  position: sticky;
}

.resizable-table td[data-col] {
  overflow-wrap: anywhere;
}

.column-resize-handle {
  position: absolute;
  z-index: 4;
  top: 0;
  right: -4px;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: 4px;
  width: 1px;
  background: transparent;
  transition: background .15s ease;
}

.column-resize-handle:hover::after,
body.is-resizing-column .column-resize-handle::after { background: #3b82f6; }
body.is-resizing-column { cursor: col-resize; user-select: none; }

body.price-mode .price-filter-panel {
  border-color: #263348;
  background: #0e1623;
}

body.price-mode .price-filter-header h2 { color: #eef4fb; }
body.price-mode .compare-row-selected td { background-color: #112b4b; }

body.price-mode #monitorClearFiltersBtn:disabled,
body.price-mode #compareClearFiltersBtn:disabled {
  opacity: .45;
  cursor: default;
}

@media (max-width: 640px) {
  .price-filter-header { align-items: stretch; flex-direction: column; }
}

/* Comparar preços: voos agrupados, descontos visíveis e linhas alternadas */
.compare-flight-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 22px;
  white-space: nowrap;
}

.compare-flight-line + .compare-flight-line {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #253146;
}

body.price-mode .compare-flight-line small {
  width: 30px;
  flex: 0 0 30px;
  color: #7890ad;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.compare-price-meta {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin-top: 5px !important;
  white-space: nowrap;
}

.compare-discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 2px 6px;
  border: 1px solid rgba(59, 130, 246, .34);
  border-radius: 999px;
  background: rgba(37, 99, 235, .14);
  color: #93c5fd !important;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
}

/* Monitor de buscas: filtros por coluna e ações contextuais */
#monitor .view-header {
  margin-bottom: 16px;
}

.monitor-header-actions {
  flex-wrap: nowrap;
}

.monitor-stats {
  grid-template-columns: repeat(5, minmax(145px, 1fr)) !important;
  gap: 12px !important;
}

body.price-mode .monitor-stats article {
  min-height: 88px;
  border-radius: 10px;
}

body.price-mode .monitor-stats article:nth-child(5) > img {
  filter: brightness(0) invert(1);
  opacity: .75;
}

.monitor-selection-bar {
  min-height: 52px;
  margin: 0 0 14px;
  padding: 8px 10px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #28518a;
  border-radius: 10px;
  background: #0f2038;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
}

.monitor-selection-bar > strong {
  color: #dbeafe;
  font-size: 13px;
  white-space: nowrap;
}

.monitor-more-actions {
  position: relative;
}

.monitor-more-actions > summary {
  list-style: none;
  user-select: none;
}

.monitor-more-actions > summary::-webkit-details-marker { display: none; }

.monitor-more-actions[open] > summary {
  border-color: #3b82f6;
  color: #ffffff;
  background: #17243a;
}

.monitor-more-menu {
  position: absolute;
  z-index: 210;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  padding: 8px;
  display: grid;
  gap: 6px;
  border: 1px solid #2c3b52;
  border-radius: 10px;
  background: #0e1623;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .42);
}

body.price-mode .monitor-more-menu .button {
  width: 100%;
  justify-content: flex-start;
  color: #fca5a5;
  background: transparent;
  border-color: transparent;
}

body.price-mode .monitor-more-menu .button:hover {
  color: #ffffff;
  background: #3a1720;
  border-color: #7f1d2d;
}

.monitor-filter-storage { display: none !important; }

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

.monitor-column-filter img {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  opacity: .42;
  filter: brightness(0) invert(1);
}

.monitor-column-filter:hover,
.monitor-column-filter.active {
  color: #7db8ff;
}

.monitor-column-filter.active img {
  opacity: 1;
  filter: invert(56%) sepia(98%) saturate(1680%) hue-rotate(190deg) brightness(105%);
}

.monitor-column-filter.active::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: -6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

.monitor-column-filter-menu {
  position: fixed;
  z-index: 230;
  width: 310px;
  max-height: min(500px, calc(100vh - 16px));
  overflow: auto;
  padding: 14px;
  border: 1px solid #33445e;
  border-radius: 12px;
  background: #0e1623;
  color: #eef4fb;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .52);
}

.monitor-filter-heading {
  margin-bottom: 13px;
  display: grid;
  gap: 2px;
}

.monitor-filter-heading span {
  color: #8292a8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.monitor-filter-heading strong {
  color: #f8fafc;
  font-size: 14px;
}

.monitor-filter-fields {
  display: grid;
  gap: 11px;
}

.monitor-filter-fields label {
  display: grid !important;
  gap: 6px;
  margin: 0 !important;
  color: #aebbd0 !important;
  font-size: 11px !important;
  text-transform: none !important;
}

body.price-mode .monitor-filter-fields .input {
  min-height: 38px;
  color: #eef4fb;
  background: #111c2b;
  border-color: #33445e;
}

body.price-mode .monitor-filter-fields .input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

.monitor-column-filter-menu .compare-filter-actions {
  border-color: #2b3950;
}

.monitor-column-filter-menu .compare-filter-sort {
  color: #c7d2e2;
}

.monitor-column-filter-menu .compare-filter-sort:hover,
.monitor-column-filter-menu .compare-filter-sort.active {
  color: #8fc3ff;
  background: #17243a;
}

.monitor-column-filter-menu .compare-filter-sort img {
  filter: brightness(0) invert(1);
  opacity: .82;
}

.monitor-column-filter-menu .compare-filter-divider {
  background: #2b3950;
}

@media (max-width: 1180px) {
  .monitor-stats { grid-template-columns: repeat(3, minmax(145px, 1fr)) !important; }
  .monitor-header-actions { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .monitor-stats { grid-template-columns: repeat(2, minmax(130px, 1fr)) !important; }
  .monitor-selection-bar { align-items: stretch; flex-direction: column; }
  .monitor-selection-bar .actions { align-items: stretch; flex-direction: column; }
  .monitor-selection-bar .button { width: 100%; }
}

.compare-price-cell[data-col="reais"] .compare-discount-badge {
  border-color: rgba(16, 185, 129, .34);
  background: rgba(5, 150, 105, .14);
  color: #6ee7b7 !important;
}

body.price-mode #compareTable tbody tr:nth-child(odd) td:not(.best-price-cell) {
  background: #070b11;
}

/* Resultados: cabeçalho compacto e ações secundárias agrupadas */
#compare .view-header {
  align-items: flex-start;
  margin-bottom: 16px;
}

.compare-header-actions {
  align-items: flex-end;
  flex-wrap: nowrap;
}

.compare-installment-control {
  display: grid;
  gap: 6px;
  min-width: 190px;
}

.compare-installment-control .inline-label {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
}

.compare-installment-control .input {
  width: 100%;
  min-width: 190px;
}

.compare-more-actions {
  position: relative;
}

.compare-more-actions > summary {
  list-style: none;
  user-select: none;
}

.compare-more-actions > summary::-webkit-details-marker { display: none; }

.compare-more-actions[open] > summary {
  border-color: #3b82f6;
  color: #ffffff;
  background: #17243a;
}

.compare-more-menu {
  position: absolute;
  z-index: 220;
  top: calc(100% + 8px);
  right: 0;
  width: 292px;
  padding: 10px;
  display: grid;
  gap: 6px;
  border: 1px solid #2c3b52;
  border-radius: 12px;
  background: #0e1623;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .46);
}

.compare-quick-search {
  display: grid;
  gap: 6px;
  padding: 2px 2px 6px;
}

.compare-quick-search > span {
  color: #9fb1c9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.compare-more-menu .compare-search {
  width: 100%;
  min-width: 0;
}

body.price-mode .compare-more-menu .button {
  width: 100%;
  justify-content: flex-start;
  color: #dce7f5;
  background: transparent;
  border-color: transparent;
}

body.price-mode .compare-more-menu .button:hover {
  color: #ffffff;
  background: #17243a;
  border-color: #2c4467;
}

body.price-mode .compare-more-menu .button.danger {
  color: #fca5a5;
}

body.price-mode .compare-more-menu .button.danger:hover {
  color: #ffffff;
  background: #3a1720;
  border-color: #7f1d2d;
}

.compare-more-divider {
  height: 1px;
  margin: 3px 0;
  background: #2b3950;
}

@media (max-width: 1180px) {
  .compare-header-actions { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  #compare .view-header { align-items: stretch; }
  .compare-header-actions { align-items: stretch; }
  .compare-installment-control { min-width: min(100%, 190px); }
  .compare-more-actions { margin-left: auto; }
}

body.price-mode #compareTable tbody tr:nth-child(even) td:not(.best-price-cell) {
  background: #0e1622;
}

body.price-mode #compareTable tbody tr:hover td:not(.best-price-cell) {
  background: #142033;
}

body.price-mode #compareTable tbody tr.compare-row-selected td {
  background: #112b4b;
}

.user-permission-help {
  margin: -4px 0 4px;
  color: var(--muted, #9ba9c0);
  font-size: .82rem;
  line-height: 1.45;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--border, #26354b);
  border-radius: 12px;
  padding: 14px;
}

.permission-grid legend { padding: 0 6px; color: var(--muted, #9ba9c0); font-size: .86rem; }
.permission-grid label { display: grid; gap: 6px; font-size: .84rem; }
@media (max-width: 640px) { .permission-grid { grid-template-columns: 1fr; } }

/* Tema claro: aplicado por usuário, sem alterar dados ou comportamento. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #172033;
  --muted: #60708a;
  --line: #d9e1ec;
  --primary: #1769d1;
  --primary-dark: #1055ad;
  --primary-soft: #e8f1ff;
  --green: #13845a;
  --red: #c33146;
  --yellow: #9a6500;
  --blue-soft: #e8f1ff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 16px 38px rgba(15, 23, 42, .12);
}

html[data-theme="light"] body,
html[data-theme="light"] body.home-mode,
html[data-theme="light"] body.price-mode,
html[data-theme="light"] body.conference-mode,
html[data-theme="light"] body.emissions-mode { background: var(--bg); color: var(--text); }

html[data-theme="light"] .sidebar,
html[data-theme="light"] body.home-mode .sidebar,
html[data-theme="light"] body.price-mode .sidebar,
html[data-theme="light"] body.conference-mode .sidebar,
html[data-theme="light"] body.emissions-mode .sidebar { background: #ffffff; color: var(--text); border-color: var(--line); }

html[data-theme="light"] .sidebar .brand,
html[data-theme="light"] body.price-mode .brand,
html[data-theme="light"] .home-topbar,
html[data-theme="light"] .admin-view .home-topbar,
html[data-theme="light"] .flight-topbar { background: #ffffff; border-color: var(--line); }

html[data-theme="light"] .context-nav .nav-button,
html[data-theme="light"] .sidebar .sidebar-icon-button,
html[data-theme="light"] .button,
html[data-theme="light"] .icon-button,
html[data-theme="light"] body.price-mode .button,
html[data-theme="light"] body.conference-mode .button { background: #ffffff; border-color: #ccd7e6; color: #26354a; }

html[data-theme="light"] .context-nav .nav-button:hover,
html[data-theme="light"] .sidebar .sidebar-icon-button:hover,
html[data-theme="light"] .button:hover,
html[data-theme="light"] .icon-button:hover { background: #f1f6fd; border-color: #9bb9df; color: #15253b; }

html[data-theme="light"] .context-nav .nav-button.active,
html[data-theme="light"] body.price-mode .context-nav .nav-button.active { background: #e8f1ff; border-color: #aac6ea; color: #1456a9; }

html[data-theme="light"] .panel,
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .stats article,
html[data-theme="light"] .hub-card,
html[data-theme="light"] .price-filter-panel,
html[data-theme="light"] .flight-form-card,
html[data-theme="light"] .flight-panel,
html[data-theme="light"] .admin-table-card,
html[data-theme="light"] .user-modal-card,
html[data-theme="light"] .emission-form-card,
html[data-theme="light"] .emission-detail-card,
html[data-theme="light"] .search-details-card,
html[data-theme="light"] .compare-filter-menu,
html[data-theme="light"] .monitor-more-menu { background: var(--panel); color: var(--text); border-color: var(--line); }

html[data-theme="light"] .input,
html[data-theme="light"] .textarea,
html[data-theme="light"] select,
html[data-theme="light"] body.conference-mode .input,
html[data-theme="light"] body.conference-mode .textarea { background: #ffffff; color: var(--text); border-color: #cbd7e6; }

html[data-theme="light"] table,
html[data-theme="light"] body.price-mode table,
html[data-theme="light"] .emission-table,
html[data-theme="light"] .users-access-table { color: var(--text); }

html[data-theme="light"] th,
html[data-theme="light"] body.price-mode th,
html[data-theme="light"] body.conference-mode th,
html[data-theme="light"] .emission-table th,
html[data-theme="light"] .users-access-table th { background: #eef4fb; color: #43546c; border-color: var(--line); }

html[data-theme="light"] td,
html[data-theme="light"] body.price-mode td,
html[data-theme="light"] body.conference-mode td,
html[data-theme="light"] .emission-table td,
html[data-theme="light"] .users-access-table td { border-color: #e0e7f0; }

html[data-theme="light"] tbody tr:hover,
html[data-theme="light"] body.conference-mode tbody tr:hover,
html[data-theme="light"] .emission-table tbody tr:hover { background: #f4f8fe; }

html[data-theme="light"] body.price-mode #compareTable tbody tr:nth-child(even) td:not(.best-price-cell) { background: #f4f7fb; }
html[data-theme="light"] body.price-mode #compareTable tbody tr:hover td:not(.best-price-cell) { background: #eaf3ff; }
html[data-theme="light"] body.price-mode #compareTable tbody tr.compare-row-selected td { background: #dcecff; }

html[data-theme="light"] .login-screen { background: #edf3fa; color: var(--text); }
html[data-theme="light"] .login-card { background: #ffffff; border-color: #d7e1ee; box-shadow: 0 24px 70px rgba(33, 58, 90, .16); }
html[data-theme="light"] .login-card label,
html[data-theme="light"] .login-brand small,
html[data-theme="light"] .login-help { color: #586980; }

/* Links de pagamento ------------------------------------------------------- */
.payment-links-panel {
  margin: 22px 0;
  padding: 20px;
  background: var(--em-panel, var(--panel));
  border: 1px solid var(--em-line, var(--line));
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .18);
}
.payment-links-manager {
  width: min(1800px, calc(100vw - 34px));
  max-width: none;
  max-height: calc(100vh - 34px);
  margin: 0;
  overflow: auto;
}
.emissions-subpage { max-width: none; }
.subpage-header {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  margin: 2px 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--em-line, var(--line));
}
.subpage-header h1 { margin: 2px 0 5px; color: var(--text); font-size: 28px; }
.subpage-header p { margin: 0; color: var(--muted); }
.subpage-form {
  width: min(1040px, 100%);
  max-width: none;
  max-height: none;
  margin: 0 auto;
  padding: 24px;
  overflow: visible;
  background: var(--em-panel);
  border: 1px solid var(--em-line);
  border-radius: 16px;
}
.subpage-form > label { display: block; margin-top: 16px; }
.payment-links-page-panel { margin-top: 0; }
.payment-links-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.payment-links-heading h2 { margin: 3px 0 5px; color: var(--text); font-size: 20px; }
.payment-links-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.payment-links-toolbar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.payment-links-toolbar .input { width: min(320px, 100%); }
.payment-archive-toggle { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; font-size: 12px; white-space: nowrap; }
.payment-archive-toggle input { accent-color: var(--primary); }
.payment-link-stats { display: grid; grid-template-columns: repeat(3, minmax(110px, 180px)); gap: 10px; margin: 18px 0 14px; }
.payment-link-stats > div { padding: 12px 14px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 11px; }
.payment-link-stats strong, .payment-link-stats span { display: block; }
.payment-link-stats strong { color: var(--text); font-size: 20px; }
.payment-link-stats span { margin-top: 2px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.payment-links-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.payment-links-table { width: 100%; min-width: 1680px; border-collapse: collapse; color: var(--text); }
.payment-links-table th { padding: 11px 12px; background: #0f1622; color: #aab7ca; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .055em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.payment-links-table td { padding: 12px; border-bottom: 1px solid #1b2637; vertical-align: middle; font-size: 12px; }
.payment-links-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .018); }
.payment-links-table tbody tr:hover { background: #0f1621; }
.payment-links-table td strong, .payment-links-table td small { display: block; }
.payment-links-table td small { margin-top: 4px; color: var(--muted); line-height: 1.35; }
.payment-links-table code { color: #b9c9dd; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.payment-link-row.archived, .payment-link-row.deactivated { opacity: .72; }
.payment-status { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; background: #172235; color: #bdc9d9; font-size: 10px; font-weight: 800; white-space: nowrap; }
.payment-status.paid { background: rgba(16, 185, 129, .14); color: #5ee0ac; border: 1px solid rgba(16, 185, 129, .3); }
.payment-status.pending, .payment-status.unpaid, .payment-status.authorized { background: rgba(59, 130, 246, .14); color: #81adff; border: 1px solid rgba(59, 130, 246, .3); }
.payment-status.denied, .payment-status.canceled, .payment-status.chargeback, .payment-status.deactivated { background: rgba(244, 63, 94, .13); color: #fb8ca0; border: 1px solid rgba(244, 63, 94, .28); }
.payment-status.archived, .payment-status.expired { background: rgba(148, 163, 184, .12); color: #bac4d2; border: 1px solid rgba(148, 163, 184, .25); }
.payment-row-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.payment-link-form { width: min(650px, calc(100vw - 32px)); }
.payment-link-form > label { display: block; margin-top: 14px; }
.payment-link-notice { margin-top: 14px; padding: 11px 13px; color: #a9bad0; background: #101a29; border: 1px solid #26364d; border-radius: 10px; font-size: 12px; }
.cielo-notification-setup { display: grid; gap: 9px; margin: 15px 0; padding: 14px; background: #0d1521; border: 1px solid #27364b; border-radius: 12px; }
.cielo-notification-setup > strong { color: var(--text); }
.cielo-notification-setup > p { margin: 0 0 3px; color: var(--muted); font-size: 12px; }
.cielo-notification-setup label { margin: 0; }

html[data-theme="light"] .payment-links-panel,
html[data-theme="light"] .payment-link-stats > div { background: #ffffff; border-color: #d7e1ee; box-shadow: none; }
html[data-theme="light"] .payment-links-table-wrap { border-color: #d7e1ee; }
html[data-theme="light"] .payment-links-table { color: #172235; }
html[data-theme="light"] .payment-links-table th { background: #eef4fb; color: #43546c; border-color: #d7e1ee; }
html[data-theme="light"] .payment-links-table td { border-color: #e0e7f0; }
html[data-theme="light"] .payment-links-table tbody tr:nth-child(even) { background: #f7f9fc; }
html[data-theme="light"] .payment-links-table tbody tr:hover { background: #edf5ff; }
html[data-theme="light"] .payment-links-table code { color: #36506f; }
html[data-theme="light"] .payment-archive-toggle { background: #fff; color: #53657c; border-color: #cbd7e6; }
html[data-theme="light"] .payment-link-notice { background: #eef5ff; color: #425a78; border-color: #c8daf2; }
html[data-theme="light"] .cielo-notification-setup { background: #f5f8fc; border-color: #d5e0ee; }
html[data-theme="light"] .emissions-view {
  --em-panel: #ffffff;
  --em-panel-soft: #f5f8fc;
  --em-panel-raised: #eef4fb;
  --em-line: #d7e1ee;
  --em-line-strong: #becde0;
  --em-text: #172235;
  --em-muted: #5c6d83;
  color-scheme: light;
}
html[data-theme="light"] .subpage-form { background: #ffffff; box-shadow: 0 16px 42px rgba(34, 60, 91, .08); }
html[data-theme="light"] .automation-import-item.importada { background: #effaf5; border-color: #b7e4d1; }
html[data-theme="light"] .automation-import-route { color: #334a67; }
html[data-theme="light"] .automation-import-item small,
html[data-theme="light"] .automation-section-title small { color: #64758b; }
html[data-theme="light"] .emissions-view .em-form-grid label,
html[data-theme="light"] .emissions-view .automation-modal-card label,
html[data-theme="light"] .import-passenger-row label { color: #43546c; }
html[data-theme="light"] .automation-import-empty { color: #64758b; background: #f7f9fc; border-color: #c9d5e4; }

@media (max-width: 1050px) {
  .payment-links-heading { flex-direction: column; }
  .payment-links-toolbar { width: 100%; justify-content: flex-start; }
}
@media (max-width: 680px) {
  .subpage-header { grid-template-columns: 1fr; }
  .payment-links-panel { padding: 14px; }
  .payment-link-stats { grid-template-columns: repeat(3, 1fr); }
  .payment-links-toolbar .input { width: 100%; }
}

/* Computadores autorizados ----------------------------------------------- */
.extension-devices-page { max-width: 1560px; }
.extension-auth-rollout {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 12px;
}
.extension-auth-rollout strong { flex: 0 0 auto; font-size: 12px; text-transform: uppercase; letter-spacing: .045em; }
.extension-auth-rollout span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.extension-auth-rollout.gradual { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .3); }
.extension-auth-rollout.gradual strong { color: #fbbf24; }
.extension-auth-rollout.enforced { background: rgba(16, 185, 129, .08); border-color: rgba(16, 185, 129, .3); }
.extension-auth-rollout.enforced strong { color: #5ee0ac; }
.extension-device-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 240px));
  gap: 12px;
  margin-bottom: 18px;
}
.extension-device-stats article {
  padding: 15px 17px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.extension-device-stats span,
.extension-device-stats strong { display: block; }
.extension-device-stats span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .045em; }
.extension-device-stats strong { margin-top: 5px; color: var(--text); font-size: 24px; }
.extension-devices-table-card { overflow-x: auto; }
.extension-devices-table { min-width: 1180px; }
.extension-devices-table td strong,
.extension-devices-table td small { display: block; }
.extension-devices-table td small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.extension-devices-table code { color: #a9c6ec; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.extension-device-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.extension-device-status.active { color: #5ee0ac; background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .3); }
.extension-device-status.revoked { color: #fb8ca0; background: rgba(244, 63, 94, .11); border-color: rgba(244, 63, 94, .28); }
.extension-device-revoked-row { opacity: .72; }
.extension-device-empty { color: var(--muted); }
.extension-device-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.extension-device-form-card,
.extension-device-key-card { width: min(620px, calc(100vw - 32px)); }
.extension-device-key-value { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin: 16px 0 12px; }
.extension-device-key-value .input { min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.extension-device-key-warning {
  padding: 12px 14px;
  color: #f6cd78;
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .27);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}
html[data-theme="light"] .extension-auth-rollout span { color: #52657d; }
html[data-theme="light"] .extension-device-stats article { background: #fff; border-color: #d7e1ee; }
html[data-theme="light"] .extension-devices-table code { color: #365b88; }
html[data-theme="light"] .extension-device-key-warning { color: #8a5a00; background: #fff8e8; border-color: #eed59d; }
@media (max-width: 720px) {
  .extension-auth-rollout { align-items: flex-start; flex-direction: column; }
  .extension-device-stats { grid-template-columns: 1fr; }
  .extension-device-key-value { grid-template-columns: 1fr 1fr; }
  .extension-device-key-value .input { grid-column: 1 / -1; }
}

.theme-toggle { white-space: nowrap; }
