:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sidebar-width: 248px;
  --topbar-height: 64px;
  --bg: #eef1f4;
  --panel: #ffffff;
  --panel-soft: #f7f8fa;
  --sidebar: #2f3f52;
  --sidebar-2: #273546;
  --sidebar-border: #415267;
  --sidebar-text: #e4ebf2;
  --sidebar-muted: #a8b6c5;
  --text: #1f2937;
  --text-muted: #6b7280;
  --heading: #111827;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --accent-soft: #e8f1ff;
  --border: #d6dde5;
  --border-strong: #c4ced8;
  --topbar-bg: #f8fafc;
  --scrollbar-track: #e7edf3;
  --scrollbar-thumb: #9aa9bb;
  --scrollbar-thumb-hover: #7e91a8;
  --danger: #c2413a;
  --success: #15803d;
  --shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  --radius: 8px;
  --radius-sm: 6px;
  --table-bg: #ffffff;
  --table-bg-alt: #fcfcfd;
  --table-head-bg: #f7f8fa;
  --table-head-text: #344054;
  --table-border-color: #e6ebf2;
  --table-soft-bg: #fafcff;
  --table-row-hover-bg: #eef6ff;
  --table-summary-bg: #eef1f5;
  --table-group-bg: #eef3f8;
  --table-group-text: #435468;
  --field-readonly-bg: #eef3f8;
  --field-readonly-border: #c6d1dc;
  --field-disabled-bg: #e9eef5;
  --field-disabled-border: #c2ccd8;
  --overview-chart-bg-start: #ffffff;
  --overview-chart-bg-end: #f8fbff;
  --overview-chart-plot-fill: #ffffff;
  --overview-chart-plot-opacity: 0.62;
  --overview-chart-axis-stroke: #8fa3ba;
  --overview-chart-grid-stroke: #e2e8f0;
  --overview-chart-axis-text: #5f6f83;
  --overview-chart-body-text: #334155;
  --overview-chart-shadow-color: #0f172a;
  --overview-chart-shadow-opacity: 0.14;
  --overview-chart-income-badge-fill: #eff6ff;
  --overview-chart-income-badge-stroke: #2563eb;
  --overview-chart-outgoing-badge-fill: #fff7ed;
  --overview-chart-outgoing-badge-stroke: #ea580c;
  --overview-chart-badge-text: #0f172a;
  --overview-chart-income-start: #60a5fa;
  --overview-chart-income-end: #1d4ed8;
  --overview-chart-expense-start: #f97316;
  --overview-chart-expense-end: #ea580c;
  --overview-chart-commission-start: #fb7185;
  --overview-chart-commission-end: #e11d48;
  --overview-chart-fee-start: #c084fc;
  --overview-chart-fee-end: #7c3aed;
  --overview-chart-flight-start: #38bdf8;
  --overview-chart-flight-end: #0284c7;
  --overview-chart-crew-start: #34d399;
  --overview-chart-crew-end: #059669;
  --select-arrow-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.5L8 10L12 6.5' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Former classic theme:
   --sidebar: #2f3f52;
*/

body[data-theme="dark"] {
  color-scheme: dark;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #131313;
  --panel: #212121;
  --panel-soft: #181818;
  --sidebar: #0d0d0d;
  --sidebar-2: #101010;
  --sidebar-border: #282828;
  --sidebar-text: #ededed;
  --sidebar-muted: #afafaf;
  --text: #dcdcdc;
  --text-muted: #afafaf;
  --heading: #ffffff;
  --primary: #3b82f6;
  --primary-strong: #2563eb;
  --accent-soft: #1c1c1c;
  --border: #303030;
  --border-strong: #414141;
  --topbar-bg: #0d0d0d;
  --scrollbar-track: #181818;
  --scrollbar-thumb: #4f4f4f;
  --scrollbar-thumb-hover: #767676;
  --danger: #f87171;
  --success: #34d399;
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  --radius-sm: 6px;
  --table-bg: #212121;
  --table-bg-alt: #181818;
  --table-head-bg: #181818;
  --table-head-text: #dcdcdc;
  --table-border-color: #303030;
  --table-soft-bg: #282828;
  --table-row-hover-bg: #303030;
  --table-summary-bg: #1c1c1c;
  --table-group-bg: #1c1c1c;
  --table-group-text: #dcdcdc;
  --field-readonly-bg: #1c1c1c;
  --field-readonly-border: #393939;
  --field-disabled-bg: #181818;
  --field-disabled-border: #303030;
  --overview-chart-bg-start: #181818;
  --overview-chart-bg-end: #212121;
  --overview-chart-plot-fill: #181818;
  --overview-chart-plot-opacity: 0.88;
  --overview-chart-axis-stroke: #767676;
  --overview-chart-grid-stroke: #303030;
  --overview-chart-axis-text: #afafaf;
  --overview-chart-body-text: #dcdcdc;
  --overview-chart-shadow-color: #000000;
  --overview-chart-shadow-opacity: 0.28;
  --overview-chart-income-badge-fill: #1c1c1c;
  --overview-chart-income-badge-stroke: #60a5fa;
  --overview-chart-outgoing-badge-fill: #281105;
  --overview-chart-outgoing-badge-stroke: #fb923c;
  --overview-chart-badge-text: #ffffff;
  --overview-chart-income-start: #315a9e;
  --overview-chart-income-end: #1b3d78;
  --overview-chart-expense-start: #b8611d;
  --overview-chart-expense-end: #7c3b0a;
  --overview-chart-commission-start: #b85c83;
  --overview-chart-commission-end: #7a294f;
  --overview-chart-fee-start: #8662c9;
  --overview-chart-fee-end: #50309a;
  --overview-chart-flight-start: #2f8fbb;
  --overview-chart-flight-end: #175974;
  --overview-chart-crew-start: #2f9e8a;
  --overview-chart-crew-end: #155f54;
  --select-arrow-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.5L8 10L12 6.5' stroke='%23dcdcdc' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.type-pill-collection {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

body[data-theme="light"] {
  color-scheme: light;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; /* Former ilja font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif */
  --bg: #e2e5e9;
  --panel: #ffffff;
  --panel-soft: #fafbfd;
  --sidebar: #ffffff; /* Former classic sidebar background: #2f3f52 */
  --sidebar-2: #ffffff;
  --sidebar-border: #e8ecf4;
  --sidebar-text: #111827;
  --sidebar-muted: #6b7280;
  --text: #111827;
  --text-muted: #6b7280;
  --heading: #111827;
  --primary: #0d6efd;
  --primary-strong: #0b5ed7;
  --accent-soft: #e8f1ff;
  --border: #e8ecf4;
  --border-strong: #d8dfec;
  --topbar-bg: #ffffff;
  --scrollbar-track: #edf1f7;
  --scrollbar-thumb: #aab4c3;
  --scrollbar-thumb-hover: #8d99ab;
  --danger: #dc2626;
  --success: #059669;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 4px 16px rgba(17, 24, 39, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --field-readonly-bg: #f0f4fb;
  --field-readonly-border: #d8dfec;
  --field-disabled-bg: #edf2f9;
  --field-disabled-border: #d2dbea;
  --overview-chart-bg-start: #ffffff;
  --overview-chart-bg-end: #f7faff;
  --overview-chart-plot-fill: #ffffff;
  --overview-chart-plot-opacity: 0.7;
  --overview-chart-axis-stroke: #a9b7ca;
  --overview-chart-grid-stroke: #e5ebf4;
  --overview-chart-axis-text: #708099;
  --overview-chart-body-text: #344054;
  --overview-chart-shadow-color: #111827;
  --overview-chart-shadow-opacity: 0.12;
  --overview-chart-income-badge-fill: #edf4ff;
  --overview-chart-income-badge-stroke: #0d6efd;
  --overview-chart-outgoing-badge-fill: #fff3e9;
  --overview-chart-outgoing-badge-stroke: #ea580c;
  --overview-chart-badge-text: #111827;
  --overview-chart-income-start: #58a8ff;
  --overview-chart-income-end: #0d6efd;
  --overview-chart-expense-start: #ff9b52;
  --overview-chart-expense-end: #ea580c;
  --overview-chart-commission-start: #ff8aa2;
  --overview-chart-commission-end: #e11d48;
  --overview-chart-fee-start: #cf9bff;
  --overview-chart-fee-end: #7c3aed;
  --overview-chart-flight-start: #5ac9ff;
  --overview-chart-flight-end: #0284c7;
  --overview-chart-crew-start: #48d5bd;
  --overview-chart-crew-end: #059669;
  --select-arrow-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.5L8 10L12 6.5' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body[data-theme="dark"] .side-nav {
  color-scheme: dark;
}

body[data-theme="light"] .side-nav {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
}

html[data-theme="light"] {
  scrollbar-color: #b8c1cd #edf1f7;
  scrollbar-width: auto;
}

html[data-theme="dark"] {
  scrollbar-color: #4f4f4f #181818;
  scrollbar-width: auto;
}

body {
  line-height: 1.45;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

* {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

a {
  color: inherit;
  text-decoration: none;
}

body.is-authenticated {
  background: var(--bg);
}

body.is-authenticated .app-shell {
  min-height: 100vh;
  padding: calc(var(--topbar-height) + 22px) 22px 22px calc(var(--sidebar-width) + 22px);
}

body.is-guest .app-shell {
  min-height: 100vh;
  padding: 20px;
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--topbar-height);
  padding: 0 22px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  z-index: 30;
}

body.is-authenticated .app-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
}

body.is-guest .app-topbar {
  position: static;
  margin: -20px -20px 20px;
}

.app-pagehead strong,
.app-usercopy strong {
  display: block;
  color: var(--heading);
  font-size: 0.95rem;
}

.app-pagehead {
  flex: 0 1 auto;
  min-width: 180px;
}

.app-topbar-subtitle,
.app-usercopy span {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.app-usercopy {
  cursor: pointer;
}

.app-topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.app-topbar-search-slot {
  flex: 1 1 560px;
  display: flex;
  justify-content: center;
  min-width: 280px;
}

.topbar-global-search {
  position: relative;
  width: min(100%, 580px);
}

.topbar-global-search-field {
  position: relative;
}

.topbar-global-search-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transform: translateY(-50%);
  pointer-events: none;
  fill: currentColor;
}

.topbar-global-search-input {
  width: 100%;
  min-height: 42px;
  padding: 8px 14px 8px 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.topbar-global-search-input:focus {
  border-color: var(--primary-soft);
  background: var(--surface);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.list-search-field {
  position: relative;
}

.list-search-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transform: translateY(-50%);
  pointer-events: none;
  fill: currentColor;
}

.list-search-input {
  padding-left: 38px;
}

.topbar-global-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.topbar-global-search-panel[hidden] {
  display: none;
}

.topbar-global-search-empty {
  padding: 14px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.topbar-global-search-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  justify-content: flex-start;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.topbar-global-search-option:first-child {
  border-top: 0;
}

.topbar-global-search-option:hover,
.topbar-global-search-option:focus-visible,
.topbar-global-search-option.is-active {
  background: var(--panel-soft);
  outline: none;
}

body[data-theme="light"] button.topbar-global-search-option:not(.button-link),
body[data-theme="dark"] button.topbar-global-search-option:not(.button-link) {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

body[data-theme="light"] button.topbar-global-search-option:not(.button-link):hover,
body[data-theme="light"] button.topbar-global-search-option:not(.button-link):focus-visible,
body[data-theme="light"] button.topbar-global-search-option:not(.button-link).is-active,
body[data-theme="dark"] button.topbar-global-search-option:not(.button-link):hover,
body[data-theme="dark"] button.topbar-global-search-option:not(.button-link):focus-visible,
body[data-theme="dark"] button.topbar-global-search-option:not(.button-link).is-active {
  border-color: var(--border);
  background: var(--panel-soft);
  color: var(--text);
}

.topbar-global-search-type {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-global-search-title {
  color: var(--heading);
  font-size: 0.92rem;
  font-weight: 600;
}

.topbar-global-search-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.topbar-global-search-highlight {
  padding: 0 2px;
  border-radius: 3px;
  background: #fff3a3;
  color: inherit;
}

body[data-theme="dark"] .topbar-global-search-highlight {
  background: #8a5a0a;
  color: #fff4d0;
}

.app-locale-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-theme-menu {
  position: relative;
  display: flex;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.app-theme-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 240px;
  height: 12px;
}

.app-theme-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0.38rem 0.8rem 0.32rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.app-theme-menu-trigger:hover,
.app-theme-menu-trigger:focus-visible {
  border-color: var(--primary-soft);
  background: rgba(37, 99, 235, 0.08);
  color: var(--heading);
}

.app-theme-menu-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-theme-menu-current {
  color: var(--heading);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.app-theme-menu-panel {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  z-index: 60;
  min-width: 240px;
  display: none;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.app-theme-menu:not(.is-js):hover .app-theme-menu-panel,
.app-theme-menu:not(.is-js):focus-within .app-theme-menu-panel,
.app-theme-menu.is-open .app-theme-menu-panel {
  display: block;
}

.app-theme-menu.is-open .app-theme-menu-trigger {
  border-color: var(--primary-soft);
  background: rgba(37, 99, 235, 0.08);
  color: var(--heading);
}

.app-theme-menu-form {
  display: block;
}

.app-theme-menu-option {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.app-theme-menu-option::before {
  content: "";
  width: 12px;
  flex: 0 0 12px;
}

.app-theme-menu-option:hover,
.app-theme-menu-option:focus-visible {
  border: 0;
  background: var(--panel-soft);
  color: var(--heading);
  outline: none;
}

.app-theme-menu-option.is-active {
  border: 0;
  background: transparent;
  color: var(--text);
}

.app-theme-menu-option.is-active::before {
  content: "✓";
  color: var(--primary);
}

.app-locale-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0.72;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.app-locale-link svg {
  display: block;
  width: 24px;
  height: 16px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.12);
}

.app-locale-link:hover {
  opacity: 1;
  color: var(--heading);
}

.app-locale-link.is-active {
  color: var(--heading);
  opacity: 1;
}

.app-userbox {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.app-userbox.is-guest {
  justify-content: flex-end;
}

.app-profile-menu {
  position: relative;
  display: flex;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.app-profile-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.app-profile-trigger:hover,
.app-profile-trigger:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  outline: none;
}

.app-profile-trigger svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.app-profile-dropdown {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  z-index: 60;
  min-width: 240px;
  display: none;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.app-userbox:hover .app-profile-dropdown,
.app-userbox:focus-within .app-profile-dropdown {
  display: block;
}

.app-profile-link,
.app-profile-link--button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.app-profile-link:hover,
.app-profile-link:focus-visible,
.app-profile-link--button:hover,
.app-profile-link--button:focus-visible {
  background: var(--panel-soft);
  color: var(--heading);
  outline: none;
}

.app-profile-link--button {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  box-shadow: none;
}

.app-profile-dropdown form {
  margin: 0;
}

body[data-theme="dark"] .app-profile-dropdown .app-profile-link--button {
  border: 0;
  background: transparent;
  color: var(--text);
}

body[data-theme="dark"] .app-profile-dropdown .app-profile-link--button:hover,
body[data-theme="dark"] .app-profile-dropdown .app-profile-link--button:focus-visible {
  border: 0;
  background: var(--panel-soft);
  color: var(--heading);
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
  gap: 16px;
  margin-bottom: 16px;
}

.header-copy,
.card,
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
  transition: box-shadow 0.18s ease;
}

.header-copy:hover,
.header-copy:focus-within,
.card:hover,
.card:focus-within,
.kpi:hover,
.kpi:focus-within {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.header-copy,
.card,
.kpi {
  padding: 16px;
}

.header-copy h1 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.header-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.header-panel h2,
.card h2,
.stack-item h3 {
  margin: 0 0 10px;
  color: var(--heading);
}

.lead,
.muted,
.header-panel p,
.stack-item p {
  color: var(--text-muted);
  line-height: 1.58;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.login-card {
  width: 100%;
  max-width: 480px;
  margin-top: 32px;
  margin-inline: auto;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions form {
  margin: 0;
}

.table-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--table-bg);
  color: var(--primary);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.table-icon-action svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.table-icon-action:hover,
.table-icon-action:focus-visible {
  border-color: var(--primary);
  background: var(--table-soft-bg);
  outline: none;
}

.table-toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 8px 4px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--table-bg);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.table-toggle-switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 0.18s ease;
}

.table-toggle-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.24);
  transition: transform 0.18s ease;
}

.table-toggle-switch.is-on {
  color: #047857;
}

.table-toggle-switch.is-on .table-toggle-switch-track {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
}

.table-toggle-switch.is-on .table-toggle-switch-thumb {
  transform: translateX(20px);
}

body[data-theme="light"] .main-layout button.table-toggle-switch:not(.button-link),
body[data-theme="dark"] button.table-toggle-switch:not(.button-link) {
  border-color: var(--border);
  background: var(--table-bg);
  color: var(--text-muted);
}

body[data-theme="light"] .main-layout button.table-toggle-switch.is-on:not(.button-link),
body[data-theme="dark"] button.table-toggle-switch.is-on:not(.button-link) {
  color: #047857;
}

body[data-theme="dark"] button.table-toggle-switch.is-on:not(.button-link) {
  color: #86efac;
}

body[data-theme="light"] .main-layout button.table-toggle-switch:not(.button-link):hover,
body[data-theme="light"] .main-layout button.table-toggle-switch:not(.button-link):focus-visible,
body[data-theme="dark"] button.table-toggle-switch:not(.button-link):hover,
body[data-theme="dark"] button.table-toggle-switch:not(.button-link):focus-visible {
  border-color: var(--primary);
  background: var(--table-soft-bg);
}

body[data-theme="dark"] .table-icon-action {
  border-color: #393939;
  background: #181818;
  color: #dcdcdc;
}

body[data-theme="dark"] .table-icon-action:hover,
body[data-theme="dark"] .table-icon-action:focus-visible {
  border-color: #767676;
  background: #282828;
  color: #ffffff;
}

.password-toggle-field {
  position: relative;
}

.password-toggle-field input {
  padding-right: 40px;
}

.password-toggle-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-toggle-button svg {
  width: 18px;
  height: 18px;
  display: block;
}

.password-toggle-button:hover,
.password-toggle-button:focus-visible {
  background: transparent !important;
  background-image: none !important;
  color: var(--text);
}

.mission-linked-actions-col {
  width: 220px;
  min-width: 220px;
  white-space: nowrap;
}

form > .card + .card {
  margin-top: 16px;
}

.account-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.account-theme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.account-theme-card:hover,
.account-theme-card:focus-within {
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.account-theme-card.is-selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, var(--panel));
}

.account-theme-card input[type="radio"] {
  position: absolute;
  top: 14px;
  right: 14px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.account-theme-preview {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.96));
  overflow: hidden;
}

.account-theme-swatch {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.account-theme-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.account-theme-copy strong {
  color: var(--heading);
  font-size: 0.95rem;
}

.account-theme-copy span {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.table-row-link {
  cursor: pointer;
}

.table-row-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.main-layout {
  display: block;
}

.overview-month-chart {
  width: 100%;
  overflow-x: auto;
}

.overview-month-chart .report-chart-svg--monthly {
  display: block;
  width: 100%;
  min-width: 920px;
  height: auto;
}

.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  padding: 18px 16px;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  border-right: 1px solid var(--sidebar-border);
  z-index: 40;
}

.side-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.side-nav-brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.side-nav-brand-mark--svg {
  padding: 0;
  overflow: hidden;
}

.side-nav-brand-mark--svg svg {
  display: block;
  width: 100%;
  height: 100%;
}

.side-nav-brand-copy strong {
  display: block;
  color: #ffffff;
  font-size: 0.96rem;
}

.side-nav-brand-copy span {
  display: block;
  color: var(--sidebar-muted);
  font-size: 0.78rem;
}

.side-nav-panel {
  margin-bottom: 10px;
}

.side-nav-label {
  margin-bottom: 8px;
  color: var(--sidebar-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tabs,
.side-nav-links {
  display: grid;
  gap: 5px;
}

.tab-btn,
.sub-nav-link,
.side-nav-toggle {
  display: block;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  background: transparent;
}

.tab-btn,
.side-nav-toggle {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.side-nav-toggle {
  width: 100%;
  cursor: pointer;
  list-style: none;
  grid-template-columns: 18px minmax(0, 1fr) 12px;
}

.side-nav-toggle::-webkit-details-marker {
  display: none;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-muted);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.nav-label,
.sub-nav-link {
  font-weight: 700;
  font-size: 0.92rem;
}

.side-nav-group {
  margin: 0;
}

.side-nav-group[open] {
  margin-bottom: 2px;
}

.nav-caret {
  width: 10px;
  height: 10px;
  position: relative;
}

.nav-caret::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--sidebar-muted);
  border-bottom: 2px solid var(--sidebar-muted);
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.side-nav-group[open] .nav-caret::before {
  transform: rotate(225deg);
  top: 4px;
}

.tab-btn:hover,
.sub-nav-link:hover,
.side-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active,
.sub-nav-link.active,
.side-nav-toggle.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
  color: #ffffff;
}

.tab-btn.active .nav-icon,
.side-nav-toggle.active .nav-icon,
.tab-btn:hover .nav-icon,
.side-nav-toggle:hover .nav-icon {
  color: #ffffff;
}

.side-nav-toggle.active .nav-caret::before,
.side-nav-toggle:hover .nav-caret::before,
.side-nav-group[open] .nav-caret::before {
  border-color: rgba(255, 255, 255, 0.9);
}

.side-nav-links {
  margin-top: 4px;
  padding: 2px 0 0;
  border-radius: 0;
  background: transparent;
}

.sub-nav-link {
  display: block;
  width: 100%;
  padding: 9px 12px 9px 40px;
  border-radius: 6px;
  color: var(--sidebar-muted);
  font-size: 0.8rem;
  font-weight: 500;
  background: transparent;
}

.sub-nav-link:hover,
.sub-nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

body[data-theme="light"] .side-nav {
  background: var(--panel);
  border-right-color: var(--border);
}

body[data-theme="light"] .side-nav-brand {
  border-bottom: 1px solid var(--border);
}

body[data-theme="light"] .side-nav-brand-mark {
  border-radius: 12px;
  background: linear-gradient(135deg, #0d6efd, #4f8ef7);
}

body[data-theme="light"] .side-nav-brand-copy strong {
  color: var(--heading);
}

body[data-theme="light"] .side-nav-brand-copy span,
body[data-theme="light"] .side-nav-label {
  color: var(--text-muted);
}

body[data-theme="light"] .nav-icon {
  color: #98a2b3;
}

body[data-theme="light"] .tab-btn,
body[data-theme="light"] .sub-nav-link,
body[data-theme="light"] .side-nav-toggle {
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

body[data-theme="light"] .tab-btn:hover,
body[data-theme="light"] .sub-nav-link:hover,
body[data-theme="light"] .side-nav-toggle:hover {
  background: var(--panel-soft);
  color: var(--text);
}

body[data-theme="light"] .tab-btn.active,
body[data-theme="light"] .sub-nav-link.active,
body[data-theme="light"] .side-nav-toggle.active {
  background: var(--accent-soft);
  color: var(--primary);
}

body[data-theme="light"] .tab-btn.active .nav-icon,
body[data-theme="light"] .side-nav-toggle.active .nav-icon,
body[data-theme="light"] .tab-btn:hover .nav-icon,
body[data-theme="light"] .side-nav-toggle:hover .nav-icon {
  color: var(--primary);
}

body[data-theme="light"] .side-nav-toggle.active .nav-caret::before,
body[data-theme="light"] .side-nav-toggle:hover .nav-caret::before,
body[data-theme="light"] .side-nav-group[open] .nav-caret::before {
  border-color: var(--primary);
}

.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.content-area {
  min-width: 0;
  width: 100%;
}

.view {
  display: grid;
  gap: 16px;
}

.stats-grid,
.grid-2,
.dashboard-layout {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  align-items: start;
}

.dashboard-main,
.dashboard-aside {
  display: grid;
  gap: 16px;
}

.kpi {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.kpi-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.kpi-link .kpi {
  height: 100%;
}

.kpi-delta-row {
  margin-top: auto;
  padding-top: 10px;
}

.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.26rem 0.52rem 0.2rem calc(0.52rem + 2px);
  border-radius: 5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.kpi-delta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 0;
  font-size: 0.92rem;
  line-height: 1;
  transform-origin: 50% 50%;
}

.kpi-delta-arrow--up {
  transform: rotate(-90deg) translateX(1px);
}

.kpi-delta-arrow--down {
  transform: rotate(90deg) translateX(-1px);
}

.kpi-delta-arrow--flat {
  transform: rotate(0deg);
}

.kpi-delta--success {
  color: #0f6a3d;
  background: #ddf7e7;
  border: 1px solid #98d9b0;
}

.kpi-delta--danger {
  color: #8d2435;
  background: #fde7eb;
  border: 1px solid #f4b5c1;
}

.kpi-delta--neutral {
  color: #475467;
  background: #eef2f6;
  border: 1px solid #cfd8e3;
}

body[data-theme="dark"] .kpi-delta--success {
  color: #c5f3d4;
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(74, 222, 128, 0.34);
}

body[data-theme="dark"] .kpi-delta--danger {
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(251, 113, 133, 0.34);
}

body[data-theme="dark"] .kpi-delta--neutral {
  color: #d0d9e6;
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.28);
}

body[data-theme="light"] .kpi-delta--success {
  color: #0c6d41;
  background: linear-gradient(180deg, #ebfaf0 0%, #d2eedb 100%);
  border-color: #8ad0a1;
}

body[data-theme="light"] .kpi-delta--danger {
  color: #8f3043;
  background: linear-gradient(180deg, #feedf1 0%, #f6d3dc 100%);
  border-color: #f0adba;
}

body[data-theme="light"] .kpi-delta--neutral {
  color: #4b5563;
  background: linear-gradient(180deg, #f4f7fb 0%, #e1e7ef 100%);
  border-color: #cbd5e1;
}

.label {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.77rem;
}

.value {
  color: var(--heading);
  font-size: 1.2rem;
  font-weight: 800;
}

.value.success {
  color: var(--success);
}

.value.danger {
  color: var(--danger);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.feature-list,
.stack-list {
  display: grid;
  gap: 10px;
}

.feature-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.table-meta {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.table-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.table-meta-row .table-meta {
  margin: 0;
}

.table-count-form {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
}

.table-count-label {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.table-count-form select {
  min-width: 90px;
}

.dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 999px;
  background: #93a3b8;
  flex: 0 0 auto;
}

.stack-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.entry-layout > * {
  min-width: 0;
}

.expense-form-layout {
  display: grid;
  gap: 16px;
  grid-column: 1;
  min-width: 0;
}

.admin-role-form-layout {
  display: grid;
  gap: 16px;
  grid-column: 1;
  min-width: 0;
}

.expense-entry-layout {
  grid-auto-flow: row dense;
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, 0.55fr);
}

.expense-entry-card-documents {
  grid-column: 1;
}

.expense-entry-card-side {
  grid-column: 2;
  grid-row: 1;
}

.expense-entry-card-wide {
  grid-column: 1 / -1;
}

.mission-form-layout {
  display: grid;
  gap: 16px;
}

.mission-show-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mission-show-side-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.mission-show-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mission-card-wide {
  grid-column: 1 / -1;
}

.mission-document-upload {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.mission-document-actions {
  display: flex;
  justify-content: flex-start;
}

.mission-upload-dropzone {
  position: relative;
  display: block;
  min-height: 184px;
  padding: 0;
  border: 1px dashed color-mix(in srgb, var(--primary) 30%, var(--border));
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel-soft) 82%, var(--panel));
  cursor: pointer;
  outline: none;
}

.mission-upload-dropzone:hover,
.mission-upload-dropzone:focus-visible {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--panel-soft) 64%, var(--panel));
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.mission-upload-dropzone.is-dragover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, color-mix(in srgb, var(--panel-soft) 60%, var(--panel)));
  transform: translateY(-1px);
}

.mission-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.mission-upload-visual {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 20px;
}

.mission-upload-visual strong {
  color: var(--heading);
  font-size: 1rem;
}

.mission-upload-visual p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.mission-upload-limit {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.mission-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.mission-upload-icon svg {
  width: 22px;
  height: 22px;
}

.mission-upload-trigger {
  pointer-events: none;
}

.mission-upload-paste {
  position: relative;
  z-index: 1;
}

.mission-upload-selection {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #475467;
  font-size: 0.84rem;
  font-weight: 600;
}

.mission-upload-selection.has-file {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.mission-upload-previews {
  display: none;
  width: 100%;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.mission-upload-previews.has-files {
  display: grid;
}

.mission-upload-preview-item {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.mission-upload-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.mission-upload-preview-remove:hover,
.mission-upload-preview-remove:focus-visible {
  background: color-mix(in srgb, var(--primary) 10%, var(--panel));
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
}

.mission-upload-preview-image,
.mission-upload-preview-icon {
  display: block;
  width: 100%;
  height: 112px;
  border-radius: 10px;
}

.mission-upload-preview-image {
  object-fit: cover;
  background: var(--panel-soft);
}

.mission-upload-preview-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 14%, var(--panel)), color-mix(in srgb, var(--primary) 8%, var(--panel-soft)));
  color: var(--primary);
}

.mission-upload-preview-icon svg {
  width: 40px;
  height: 40px;
}

.mission-upload-preview-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mission-upload-preview-meta strong,
.mission-upload-preview-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-upload-preview-meta strong {
  color: var(--heading);
  font-size: 0.88rem;
}

.mission-upload-preview-meta span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

body[data-theme="dark"] .mission-upload-selection.has-file {
  background: rgba(30, 64, 175, 0.22);
  color: #bfdbfe;
}

body[data-theme="dark"] .mission-upload-preview-item {
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(71, 85, 105, 0.52);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.22);
}

body[data-theme="dark"] .mission-upload-preview-remove {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(71, 85, 105, 0.6);
  color: #cbd5e1;
}

body[data-theme="dark"] .mission-upload-preview-remove:hover,
body[data-theme="dark"] .mission-upload-preview-remove:focus-visible {
  background: rgba(30, 41, 59, 0.98);
  border-color: rgba(59, 130, 246, 0.45);
  color: #dbeafe;
}

body[data-theme="dark"] .mission-upload-preview-image {
  background: rgba(30, 41, 59, 0.95);
}

body[data-theme="dark"] .mission-upload-preview-icon {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  color: #93c5fd;
}

.mission-upload-preview-description {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
}

.admin-logo-upload {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.admin-logo-dropzone {
  min-height: 0;
  height: 100%;
}

.admin-logo-preview-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 14px;
}

.admin-logo-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-logo-preview-head strong {
  font-size: 0.9rem;
}

.admin-logo-preview-frame {
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.025) 75%),
    linear-gradient(45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.025) 75%);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
  overflow: hidden;
}

.admin-logo-preview-frame svg {
  display: block;
  width: 96px;
  height: 96px;
  max-width: 100%;
  max-height: 100%;
}

body[data-theme="dark"] .admin-logo-preview-card {
  background: rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .admin-logo-preview-frame {
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.03) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.03) 75%);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
}

@media (max-width: 980px) {
  .admin-logo-upload {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  display: grid;
  gap: 6px;
}

.stat-card-link {
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card-link:hover,
.stat-card-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

#mission-legs,
#mission-expenses,
#mission-revenues,
#mission-documents,
#mission-crew {
  scroll-margin-top: 16px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.stat-value {
  color: var(--heading);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-value.is-zero {
  color: var(--danger);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.expense-items-editor {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.expense-items-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.expense-items-editor-head h3 {
  margin: 0;
  color: var(--heading);
  font-size: 1rem;
  font-weight: 700;
}

.expense-item-grid-head,
.expense-item-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1.15fr)
    minmax(0, 1.1fr)
    minmax(0, 0.9fr)
    minmax(0, 0.78fr)
    minmax(0, 0.9fr)
    minmax(0, 0.88fr)
    minmax(0, 0.72fr)
    minmax(0, 0.88fr)
    172px;
  gap: 8px;
  align-items: center;
}

.expense-item-grid-head {
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.expense-item-rows {
  display: grid;
  gap: 10px;
}

.expense-items-editor-actions {
  display: flex;
  justify-content: flex-end;
}

.expense-item-row {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-soft);
}

.expense-item-cell {
  min-width: 0;
}

.expense-item-cell input,
.expense-item-cell select {
  width: 100%;
}

.expense-item-inline-status,
.expense-inline-status,
.expense-card-status {
  margin-top: 6px;
}

.expense-item-cell--checkbox {
  display: flex;
  justify-content: center;
}

.expense-item-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-bottom: 0;
}

.expense-item-checkbox input[type="checkbox"] {
  margin: 0;
}

.expense-item-checkbox span {
  color: var(--text-muted);
  font-size: 0.79rem;
  font-weight: 600;
  white-space: nowrap;
}

.expense-item-cell--actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

.expense-item-cell--actions .button-link[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.expense-form-submit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.revenue-form-submit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  box-sizing: border-box;
  flex-wrap: wrap;
}

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

.field {
  min-width: 0;
}

.form-advanced {
  margin-top: 8px;
}

.form-advanced > summary {
  cursor: pointer;
  color: #475467;
  font-size: 0.84rem;
  font-weight: 600;
}

.form-advanced[open] > summary {
  margin-bottom: 14px;
}

.form-advanced .row + .row {
  margin-top: 12px;
}

.expense-vendor-mode,
.revenue-customer-mode {
  margin-top: 0;
}

.expense-vendor-mode-head,
.revenue-customer-mode-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.expense-vendor-mode-title,
.revenue-customer-mode-title {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.revenue-customer-mode-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.expense-vendor-mode-toggle,
.revenue-customer-mode-toggle {
  align-items: center;
  display: inline-flex;
  flex-shrink: 0;
  gap: 8px;
}

.expense-vendor-mode-input,
.revenue-customer-mode-input {
  display: inline-block;
  margin: 0;
  width: auto;
  vertical-align: middle;
}

.expense-vendor-mode-label,
.revenue-customer-mode-label {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  margin: 0;
  vertical-align: middle;
}

.expense-vendor-select-wrap,
.expense-vendor-quick-wrap,
.revenue-customer-select-wrap,
.revenue-customer-quick-wrap {
  margin-top: 6px;
}

.revenue-quick-customer-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  line-height: 1;
  box-shadow: none;
}

.revenue-quick-customer-trigger span {
  display: block;
  width: 8px;
  height: 8px;
  background: currentColor;
  font-size: 0;
  line-height: 0;
  mask: linear-gradient(#000 0 0) center / 2px 100% no-repeat, linear-gradient(#000 0 0) center / 100% 2px no-repeat;
  -webkit-mask: linear-gradient(#000 0 0) center / 2px 100% no-repeat, linear-gradient(#000 0 0) center / 100% 2px no-repeat;
}

body[data-theme="light"] .main-layout button.revenue-quick-customer-trigger:not(.button-link),
body[data-theme="dark"] button.revenue-quick-customer-trigger:not(.button-link) {
  border-color: color-mix(in srgb, var(--border) 78%, var(--text-muted) 22%);
  background: transparent;
  color: var(--text-muted);
}

body[data-theme="light"] .main-layout button.revenue-quick-customer-trigger:not(.button-link):hover,
body[data-theme="light"] .main-layout button.revenue-quick-customer-trigger:not(.button-link):focus-visible,
body[data-theme="dark"] button.revenue-quick-customer-trigger:not(.button-link):hover,
body[data-theme="dark"] button.revenue-quick-customer-trigger:not(.button-link):focus-visible {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  color: var(--primary);
}

.revenue-quick-customer-summary {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.expense-vendor-quick-wrap,
.revenue-customer-quick-wrap {
  display: none;
}

.revenue-quick-customer-overlay,
.revenue-quick-customer-modal-head,
.revenue-quick-customer-modal-actions {
  display: none;
}

.expense-vendor-mode.is-modal-enhanced .expense-vendor-mode-toggle,
.revenue-customer-mode.is-modal-enhanced .revenue-customer-mode-toggle {
  display: none;
}

.expense-vendor-mode.is-modal-enhanced .revenue-quick-customer-modal-head,
.expense-vendor-mode.is-modal-enhanced .revenue-quick-customer-modal-actions,
.revenue-customer-mode.is-modal-enhanced .revenue-quick-customer-modal-head,
.revenue-customer-mode.is-modal-enhanced .revenue-quick-customer-modal-actions {
  display: flex;
}

.expense-vendor-mode.is-modal-enhanced .expense-vendor-quick-wrap,
.revenue-customer-mode.is-modal-enhanced .revenue-customer-quick-wrap {
  display: none;
}

.expense-vendor-mode.is-modal-enhanced .revenue-quick-customer-modal-head,
.revenue-customer-mode.is-modal-enhanced .revenue-quick-customer-modal-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.expense-vendor-mode.is-modal-enhanced .revenue-quick-customer-modal-head strong,
.revenue-customer-mode.is-modal-enhanced .revenue-quick-customer-modal-head strong {
  display: block;
  color: var(--heading);
  font-size: 1rem;
  margin-bottom: 4px;
}

.expense-vendor-mode.is-modal-enhanced .revenue-quick-customer-modal-head span,
.revenue-customer-mode.is-modal-enhanced .revenue-quick-customer-modal-head span {
  display: block;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.expense-vendor-mode.is-modal-enhanced .expense-vendor-quick-wrap,
.revenue-customer-mode.is-modal-enhanced .revenue-customer-quick-wrap {
  margin-top: 0;
}

.expense-vendor-mode.is-modal-enhanced.is-modal-open .revenue-quick-customer-overlay,
.revenue-customer-mode.is-modal-enhanced.is-modal-open .revenue-quick-customer-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  z-index: 70;
}

.expense-vendor-mode.is-modal-enhanced.is-modal-open .expense-vendor-quick-wrap,
.revenue-customer-mode.is-modal-enhanced.is-modal-open .revenue-customer-quick-wrap {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 71;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 18px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  transform: translate(-50%, -50%);
}

.expense-vendor-mode.is-modal-enhanced.is-modal-open .expense-vendor-quick-wrap .row,
.revenue-customer-mode.is-modal-enhanced.is-modal-open .revenue-customer-quick-wrap .row {
  margin: 0;
}

.party-quick-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px 16px;
}

.party-quick-form-grid .field {
  min-width: 0;
}

.expense-vendor-mode.is-modal-enhanced .revenue-quick-customer-modal-actions,
.revenue-customer-mode.is-modal-enhanced .revenue-quick-customer-modal-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

body.modal-open {
  overflow: hidden;
}

body[data-theme="dark"] .expense-vendor-mode.is-modal-enhanced.is-modal-open .revenue-quick-customer-overlay,
body[data-theme="dark"] .revenue-customer-mode.is-modal-enhanced.is-modal-open .revenue-quick-customer-overlay {
  background: rgba(2, 6, 23, 0.62);
}

@media (max-width: 760px) {
  .party-quick-form-grid .span-6 {
    grid-column: span 12;
  }
}

.filter-panel {
  margin: -18px;
}

.filter-panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  color: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.filter-panel-summary::-webkit-details-marker {
  display: none;
}

.filter-panel-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.filter-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #1d4ed8;
  flex: 0 0 24px;
}

.filter-panel-icon::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16l-6.5 7.25V19l-3 1v-6.75z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16l-6.5 7.25V19l-3 1v-6.75z' fill='black'/%3E%3C/svg%3E\");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.filter-panel-summary::after {
  content: '+';
  color: #667085;
  font-size: 1.2rem;
  font-weight: 600;
}

.filter-panel[open] .filter-panel-summary {
  border-bottom: 1px solid var(--border);
}

.filter-panel[open] .filter-panel-summary::after {
  content: '-';
}

.filter-panel-body {
  padding: 18px 20px 20px;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }

@media (max-width: 1400px) {
  .expense-item-grid-head {
    display: none;
  }

  .expense-item-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .expense-items-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .expense-item-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expense-item-cell--actions,
  .expense-item-cell--checkbox {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .expense-item-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.field:has(> input[required]) > label::after,
.field:has(> select[required]) > label::after,
.field:has(> textarea[required]) > label::after,
.field:has(.checkbox-field input[required]) > label::after,
.field:has(.checkbox-field input[required]) .checkbox-field span::after {
  content: " *";
  color: #c62828;
  font-weight: 700;
}

input,
select,
textarea,
button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font-size: 0.94rem;
}

select:not([multiple]):not([size]) {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: var(--select-arrow-icon);
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

input:required:invalid,
select:required:invalid,
textarea:required:invalid {
  border-color: #dc96a1;
  box-shadow: inset 0 0 0 1px rgba(198, 40, 40, 0.14);
}

input:focus:required:invalid,
select:focus:required:invalid,
textarea:focus:required:invalid {
  border-color: #d14357;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.12);
}

input[readonly],
textarea[readonly] {
  border-color: var(--field-readonly-border);
  border-style: dashed;
  background: var(--field-readonly-bg);
  color: var(--text-muted);
  box-shadow: none;
  cursor: default;
}

input[readonly]:focus,
textarea[readonly]:focus {
  border-color: var(--field-readonly-border);
  box-shadow: none;
}

input:disabled,
select:disabled,
textarea:disabled {
  border-color: var(--field-disabled-border);
  border-style: dashed;
  background: var(--field-disabled-bg);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

input:disabled::placeholder,
textarea:disabled::placeholder {
  color: color-mix(in srgb, var(--text-muted) 78%, transparent);
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  padding: 9px 13px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-sizing: border-box;
  min-height: 40px;
  cursor: pointer;
}

.button-link.secondary {
  border-color: var(--border-strong);
  background: #ffffff;
  color: var(--text);
}

.button-link.success {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
}

.button-link.success:hover,
.button-link.success:focus-visible {
  border-color: #15803d;
  background: #15803d;
}

.button-link.danger {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

.button-link.danger:hover,
.button-link.danger:focus-visible {
  border-color: #b91c1c;
  background: #b91c1c;
}

.button-link.compact {
  padding: 5px 8px;
  font-size: 0.78rem;
  font-weight: 600;
}

body[data-theme="light"] .card,
body[data-theme="light"] .kpi,
body[data-theme="light"] .header-copy {
  border-color: var(--border);
}

body[data-theme="light"] .eyebrow,
body[data-theme="light"] .filter-panel-icon {
  color: var(--primary);
}

body[data-theme="light"] .main-layout .button-link.secondary {
  background: linear-gradient(180deg, #ffffff 0%, #edf2f7 100%);
}

body[data-theme="light"] .main-layout .button-link.success {
  border-color: #1ea574;
  background: linear-gradient(180deg, #28b781 0%, #188f66 100%);
}

body[data-theme="light"] .main-layout .button-link.success:hover,
body[data-theme="light"] .main-layout .button-link.success:focus-visible {
  border-color: #168963;
  background: linear-gradient(180deg, #21a974 0%, #137d59 100%);
}

body[data-theme="light"] .main-layout .button-link.danger {
  border-color: #dc2626;
  background: linear-gradient(180deg, #eb4b4b 0%, #c92525 100%);
}

body[data-theme="light"] .main-layout .button-link.danger:hover,
body[data-theme="light"] .main-layout .button-link.danger:focus-visible {
  border-color: #b91c1c;
  background: linear-gradient(180deg, #de3f3f 0%, #af1f1f 100%);
}

body[data-theme="light"] .main-layout .button-link.warning {
  border-color: #d97706;
  background: linear-gradient(180deg, #f5a623 0%, #d97706 100%);
  color: #ffffff;
}

body[data-theme="light"] .main-layout .button-link.warning:hover,
body[data-theme="light"] .main-layout .button-link.warning:focus-visible {
  border-color: #b45309;
  background: linear-gradient(180deg, #e99516 0%, #b45309 100%);
}

body[data-theme="light"] .main-layout button:not(.button-link),
body[data-theme="light"] .main-layout .button-link:not(.secondary):not(.success):not(.danger):not(.warning) {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

body[data-theme="light"] .main-layout button:not(.button-link):hover,
body[data-theme="light"] .main-layout button:not(.button-link):focus-visible,
body[data-theme="light"] .main-layout .button-link:not(.secondary):not(.success):not(.danger):not(.warning):hover,
body[data-theme="light"] .main-layout .button-link:not(.secondary):not(.success):not(.danger):not(.warning):focus-visible {
  background: linear-gradient(180deg, #3077eb 0%, #1f57cf 100%);
}

body[data-theme="dark"] button,
body[data-theme="dark"] .button-link {
  border-color: #414141;
  background: #303030;
  color: #ffffff;
}

body[data-theme="dark"] button:hover,
body[data-theme="dark"] button:focus-visible,
body[data-theme="dark"] .button-link:hover,
body[data-theme="dark"] .button-link:focus-visible {
  border-color: #5d5d5d;
  background: #393939;
}

body[data-theme="dark"] .button-link.secondary {
  border-color: #393939;
  background: #181818;
  color: var(--text);
}

body[data-theme="dark"] .button-link.secondary:hover,
body[data-theme="dark"] .button-link.secondary:focus-visible {
  border-color: #4f4f4f;
  background: #282828;
}

body[data-theme="dark"] .button-link.success {
  border-color: #2f8a57;
  background: #2f8a57;
}

body[data-theme="dark"] .button-link.success:hover,
body[data-theme="dark"] .button-link.success:focus-visible {
  border-color: #389f65;
  background: #389f65;
}

body[data-theme="dark"] .button-link.danger {
  border-color: #b45353;
  background: #b45353;
}

body[data-theme="dark"] .button-link.danger:hover,
body[data-theme="dark"] .button-link.danger:focus-visible {
  border-color: #c56565;
  background: #c56565;
}

body[data-theme="dark"] .button-link.warning {
  border-color: #8a6424;
  background: #7a5318;
  color: #fff3d0;
}

body[data-theme="dark"] .button-link.warning:hover,
body[data-theme="dark"] .button-link.warning:focus-visible {
  border-color: #a8792b;
  background: #8d631d;
  color: #fff7dc;
}

body[data-theme="dark"] .quality-pill.bg-success,
body[data-theme="dark"] .quality-pill.bg-info {
  background: #181818;
  border-color: #393939;
  color: var(--text);
}

body[data-theme="dark"] .quality-pill.bg-warning {
  background: #211a10;
  border-color: #5d4a2c;
  color: #ffe8c4;
}

body[data-theme="dark"] .quality-pill.bg-danger {
  background: #271719;
  border-color: #704047;
  color: #ffd9dd;
}

body[data-theme="dark"] .quality-pill:hover,
body[data-theme="dark"] .quality-pill:focus-visible {
  border-color: #5d5d5d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .mission-activity-card {
  background: #212121;
  border-color: #303030;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .mission-activity-card--tag-owner .mission-act-head {
  box-shadow: inset 4px 0 0 0 #f59e0b;
}

body[data-theme="dark"] .mission-activity-card--tag-owner .row-tag {
  background: #3f2b10;
  border-color: #6b4a16;
  color: #fbbf24;
}

body[data-theme="dark"] .mission-activity-card--tag-empty .mission-act-head {
  box-shadow: inset 4px 0 0 0 #8f8f8f;
}

body[data-theme="dark"] .mission-activity-card--tag-empty .row-tag {
  background: #282828;
  border-color: #4f4f4f;
  color: #dcdcdc;
}

body[data-theme="dark"] .mission-act-head {
  background: linear-gradient(180deg, #282828, #212121);
  border-bottom-color: #303030;
}

body[data-theme="dark"] .mission-act-col--exp {
  background: linear-gradient(180deg, #1c1c1c 0%, #212121 55%);
  border-right-color: #303030;
}

body[data-theme="dark"] .mission-act-col--rev {
  background: linear-gradient(180deg, #1c1c1c 0%, #212121 55%);
}

body[data-theme="dark"] .mission-act-item {
  background: #181818;
  border-color: #303030;
}

body[data-theme="dark"] .mission-act-item .amt,
body[data-theme="dark"] .mission-act-col--exp .mission-act-item .amt,
body[data-theme="dark"] .mission-act-col--rev .mission-act-item .amt {
  color: #f8fafc;
}

body[data-theme="dark"] .month-switch-link {
  background: #181818;
  border-color: #393939;
  color: var(--text);
}

body[data-theme="dark"] .month-switch-link:hover,
body[data-theme="dark"] .month-switch-link:focus-visible {
  background: #282828;
  border-color: #4f4f4f;
}

body[data-theme="dark"] .month-switch-link.active {
  background: #303030;
  border-color: #767676;
  color: #ffffff;
}

body[data-theme="dark"] .dashboard-month-breakdown-item {
  border-top-color: #393939;
}

body[data-theme="light"] .account-theme-preview {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 246, 251, 0.98));
}

body[data-theme="light"] .bg-success {
  background: #eefbf3;
  border-color: #ccefd9;
  color: #065f46;
}

body[data-theme="light"] .bg-warning {
  background: #fff7ed;
  border-color: #fde0b5;
  color: #9a3412;
}

body[data-theme="light"] .bg-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

body[data-theme="light"] .dashboard-month-meta-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 252, 0.98));
}

body[data-theme="light"] .dashboard-comparison-bar {
  background: #e9eef7;
}

body[data-theme="light"] .mission-act-head {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

body[data-theme="light"] .cell-count-exp {
  color: #b45309;
}

body[data-theme="light"] .cell-count-rev {
  color: var(--success);
}

body[data-theme="light"] .mission-act-col--exp {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 55%);
}

body[data-theme="light"] .mission-act-col--rev {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 55%);
}

body[data-theme="light"] .mission-act-col--exp h4 {
  color: #b45309;
}

body[data-theme="light"] .mission-act-col--rev h4 {
  color: #047857;
}

body[data-theme="light"] .mission-act-col--exp .mission-act-item .amt {
  color: #b45309;
}

body[data-theme="light"] .mission-act-col--rev .mission-act-item .amt {
  color: var(--success);
}

body[data-theme="light"] .type-pill--hotel {
  background: linear-gradient(180deg, #fff6da 0%, #f7e6ad 100%);
  color: #92400e;
}

body[data-theme="light"] .type-pill--maint {
  background: linear-gradient(180deg, #edf1ff 0%, #cfd8ff 100%);
  color: #3730a3;
}

body[data-theme="light"] .type-pill--handling {
  background: linear-gradient(180deg, #ebfbff 0%, #cdefff 100%);
  color: #0f6e8c;
}

body[data-theme="light"] .type-pill--catering {
  background: linear-gradient(180deg, #fff0f7 0%, #f8d2e7 100%);
  color: #9d174d;
}

body[data-theme="light"] .type-pill--status-active {
  background: linear-gradient(180deg, #f0fbf3 0%, #d9f0df 100%);
  color: #246a40;
}

body[data-theme="light"] .type-pill--status-inactive {
  background: linear-gradient(180deg, #fff5f4 0%, #f7dcda 100%);
  color: #a23838;
}

body[data-theme="light"] .type-pill--fuel {
  background: linear-gradient(180deg, #fff3e3 0%, #ffd8b3 100%);
  color: #9a3412;
}

body[data-theme="light"] .type-pill--default {
  background: linear-gradient(180deg, #eef1f5 0%, #d4d9e1 100%);
  color: #374151;
}

body[data-theme="light"] .type-pill--blue {
  background: linear-gradient(180deg, #edf2ff 0%, #c7d7ff 100%);
  color: #1d4ed8;
}

body[data-theme="light"] .type-pill--teal {
  background: linear-gradient(180deg, #e1fff8 0%, #b7f2e4 100%);
  color: #0f766e;
}

body[data-theme="light"] .type-pill--amber {
  background: linear-gradient(180deg, #fff6d6 0%, #ffe28e 100%);
  color: #a16207;
}

body[data-theme="light"] .type-pill--rose {
  background: linear-gradient(180deg, #fff0f7 0%, #ffc9e2 100%);
  color: #be185d;
}

body[data-theme="light"] .type-pill--slate {
  background: linear-gradient(180deg, #e6ebf2 0%, #c8d2df 100%);
  color: #263546;
}

body[data-theme="light"] .row-tag {
  border-radius: 7px;
}

body[data-theme="light"] .mission-activity-card--tag-owner .mission-act-head {
  box-shadow: inset 4px 0 0 0 #f59e0b;
}

body[data-theme="light"] .mission-activity-card--tag-owner .row-tag {
  background: linear-gradient(180deg, #fff3dd 0%, #ffe0a8 100%);
  border-color: #f3c36a;
  color: #b45309;
}

body[data-theme="light"] .mission-activity-card--tag-empty .mission-act-head {
  box-shadow: inset 4px 0 0 0 #38bdf8;
}

body[data-theme="light"] .mission-activity-card--tag-empty .row-tag {
  background: linear-gradient(180deg, #eef9ff 0%, #cfeeff 100%);
  border-color: #8fd4f8;
  color: #0369a1;
}

body[data-theme="light"] .route-codes {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 0;
}

body[data-theme="light"] .route-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 7px 11px;
  border-radius: 9px;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  color: #0f172a;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

body[data-theme="light"] .route-code--endpoint {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
}

body[data-theme="light"] .route-code--via {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #0f172a;
}

body[data-theme="light"] .route-separator {
  display: inline-flex;
  align-items: center;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 5px;
  user-select: none;
}

body[data-theme="light"] .route-separator::before {
  content: "\2192";
}

.mission-legs-editor {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

.mission-crew-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.mission-crew-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-soft);
  cursor: pointer;
}

.mission-crew-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.mission-crew-option span {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.mission-leg-grid-head,
.mission-leg-row {
  display: grid;
  grid-template-columns:
    32px
    minmax(64px, 0.6fr)
    minmax(64px, 0.6fr)
    minmax(102px, 0.9fr)
    minmax(74px, 0.66fr)
    minmax(70px, 0.46fr)
    minmax(80px, 0.66fr)
    164px;
  gap: 8px;
  align-items: center;
  padding: 10px 8px;
}

.mission-leg-grid-head > *,
.mission-leg-row > * {
  min-width: 0;
}

.mission-leg-grid-head {
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.mission-leg-rows {
  display: grid;
}

.mission-leg-row + .mission-leg-row {
  border-top: 1px solid var(--border);
}

.mission-leg-row-actions,
.actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

.mission-leg-row-actions .button-link.compact {
  padding-left: 6px;
  padding-right: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.aircraft-pool-actions-cell {
  justify-content: flex-start;
}

.mission-airport-index {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.mission-leg-row input,
.mission-leg-row select {
  width: 100%;
}

.mission-crew-grid-head,
.mission-crew-row {
  display: grid;
  grid-template-columns:
    32px
    minmax(200px, 1.1fr)
    minmax(150px, 0.8fr)
    minmax(96px, 0.56fr)
    164px;
  gap: 8px;
  align-items: center;
  padding: 10px 8px;
}

.mission-crew-grid-head > *,
.mission-crew-row > * {
  min-width: 0;
}

.mission-crew-grid-head {
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.mission-crew-rows {
  display: grid;
}

.mission-crew-row + .mission-crew-row {
  border-top: 1px solid var(--border);
}

.mission-crew-row select,
.mission-crew-row input {
  width: 100%;
}

.mission-crew-index {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.mission-crew-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

.mission-crew-row-actions .button-link.compact {
  padding-left: 6px;
  padding-right: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.mission-form-submit-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 8px;
}

.crew-form-submit-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 8px;
}

.settings-form-submit-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 8px;
}

.mission-airport-input-wrap {
  position: relative;
}

.mission-airport-input-wrap::after {
  content: "\22EE";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1;
  pointer-events: none;
}

.mission-airport-input-wrap input[data-mission-airport-input] {
  padding-right: 34px;
}

.mission-airport-autocomplete {
  position: absolute;
  top: calc(100% + 6px);
  bottom: auto;
  left: 0;
  right: auto;
  width: 480px;
  max-width: calc(100vw - 24px);
  z-index: 20;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.mission-airport-autocomplete.is-above {
  top: auto;
  bottom: calc(100% + 6px);
}

.mission-airport-autocomplete[hidden] {
  display: none;
}

.mission-airport-option {
  display: grid;
  gap: 2px;
  justify-items: start;
  align-items: start;
  justify-content: start;
  width: 100%;
  padding: 10px 12px;
  min-height: 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}

.mission-airport-option:first-child {
  border-top: 0;
}

.mission-airport-option > * {
  text-align: left;
}

.mission-airport-option:hover,
.mission-airport-option.is-active {
  background: var(--panel-soft);
}

body[data-theme="dark"] .mission-airport-option {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

body[data-theme="dark"] .mission-airport-option:hover,
body[data-theme="dark"] .mission-airport-option.is-active {
  border-color: var(--border);
  background: var(--panel-soft);
}

body[data-theme="light"] .main-layout button.mission-airport-option:not(.button-link),
body[data-theme="dark"] button.mission-airport-option:not(.button-link) {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

body[data-theme="light"] .main-layout button.mission-airport-option:not(.button-link):hover,
body[data-theme="light"] .main-layout button.mission-airport-option:not(.button-link):focus-visible,
body[data-theme="light"] .main-layout button.mission-airport-option:not(.button-link).is-active,
body[data-theme="dark"] button.mission-airport-option:not(.button-link):hover,
body[data-theme="dark"] button.mission-airport-option:not(.button-link):focus-visible,
body[data-theme="dark"] button.mission-airport-option:not(.button-link).is-active {
  border-color: var(--border);
  background: var(--panel-soft);
  color: var(--text);
}

.mission-airport-option-title {
  color: var(--heading);
  font-size: 0.92rem;
  font-weight: 600;
}

.mission-airport-option-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.select-autocomplete {
  position: relative;
}

.select-autocomplete::after {
  content: "\22EE";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1;
  pointer-events: none;
}

.select-autocomplete-native {
  display: none !important;
}

.select-autocomplete-input {
  width: 100%;
  padding-right: 34px;
}

.select-autocomplete.is-disabled .select-autocomplete-input {
  cursor: not-allowed;
}

.select-autocomplete.is-disabled::after {
  opacity: 0.55;
}

.select-autocomplete-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.select-autocomplete-panel.is-above {
  top: auto;
  bottom: calc(100% + 6px);
}

.select-autocomplete-panel[hidden] {
  display: none;
}

.select-autocomplete-option {
  display: grid;
  gap: 2px;
  justify-items: start;
  align-items: start;
  justify-content: start;
  width: 100%;
  min-height: 0;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}

.select-autocomplete-option:first-child {
  border-top: 0;
}

.select-autocomplete-option > * {
  text-align: left;
}

.select-autocomplete-option:hover,
.select-autocomplete-option.is-active {
  background: var(--panel-soft);
}

body[data-theme="light"] .main-layout button.select-autocomplete-option:not(.button-link),
body[data-theme="dark"] button.select-autocomplete-option:not(.button-link) {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

body[data-theme="light"] .main-layout button.select-autocomplete-option:not(.button-link):hover,
body[data-theme="light"] .main-layout button.select-autocomplete-option:not(.button-link):focus-visible,
body[data-theme="light"] .main-layout button.select-autocomplete-option:not(.button-link).is-active,
body[data-theme="dark"] button.select-autocomplete-option:not(.button-link):hover,
body[data-theme="dark"] button.select-autocomplete-option:not(.button-link):focus-visible,
body[data-theme="dark"] button.select-autocomplete-option:not(.button-link).is-active {
  border-color: var(--border);
  background: var(--panel-soft);
  color: var(--text);
}

.select-autocomplete-option:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.select-autocomplete-option-title {
  color: var(--heading);
  font-size: 0.92rem;
  font-weight: 600;
}

.select-autocomplete-option-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 1400px) {
  .mission-leg-grid-head,
  .mission-leg-row {
    grid-template-columns:
      32px
      minmax(62px, 0.58fr)
      minmax(62px, 0.58fr)
      minmax(98px, 0.84fr)
      minmax(72px, 0.62fr)
      minmax(68px, 0.44fr)
      minmax(78px, 0.62fr)
      160px;
      gap: 8px;
    }

  .mission-leg-row-actions .button-link.compact {
    padding-left: 6px;
    padding-right: 6px;
  }

  .mission-crew-grid-head,
  .mission-crew-row {
    grid-template-columns:
      32px
      minmax(164px, 1.05fr)
      minmax(132px, 0.76fr)
      minmax(88px, 0.52fr)
      160px;
    gap: 8px;
  }
}

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

.checkbox-field {
  display: flex;
  align-items: center;
}

.checkbox-field label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.checkbox-field span {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.permission-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.permission-group {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-raised);
}

.permission-group strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 0.9rem;
}

.permission-group-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.permission-checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.35;
  cursor: pointer;
}

.permission-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  flex: 0 0 auto;
}

body[data-theme="dark"] .map-style-option input[type="radio"],
body[data-theme="dark"] .account-theme-card input[type="radio"],
body[data-theme="dark"] .checkbox-field input[type="checkbox"],
body[data-theme="dark"] .mission-crew-option input[type="checkbox"] {
  color-scheme: dark;
  accent-color: #6ea8ff;
}

body[data-theme="light"] .map-style-option input[type="radio"],
body[data-theme="light"] .account-theme-card input[type="radio"],
body[data-theme="light"] .checkbox-field input[type="checkbox"],
body[data-theme="light"] .mission-crew-option input[type="checkbox"] {
  color-scheme: light;
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea,
body[data-theme="light"] button {
  color-scheme: light;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] button {
  color-scheme: dark;
}

body[data-theme="dark"] input[type="date"],
body[data-theme="dark"] input[type="month"] {
  position: relative;
  color-scheme: dark;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dbe7f5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2' ry='2'/%3E%3Cline x1='16' y1='3' x2='16' y2='7'/%3E%3Cline x1='8' y1='3' x2='8' y2='7'/%3E%3Cline x1='3' y1='11' x2='21' y2='11'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

body[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
body[data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

body[data-theme="dark"] .app-theme-menu-form {
  background: transparent;
}

body[data-theme="dark"] .topbar-global-search-input {
  background: #181818;
  border-color: #393939;
}

body[data-theme="dark"] .topbar-global-search-input:focus {
  background: #212121;
  border-color: #767676;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .app-theme-menu-trigger {
  background: #181818;
  border-color: #393939;
}

body[data-theme="dark"] .app-theme-menu-panel .app-theme-menu-option {
  border: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

body[data-theme="dark"] .app-theme-menu-panel .app-theme-menu-option:hover,
body[data-theme="dark"] .app-theme-menu-panel .app-theme-menu-option:focus-visible {
  border: 0;
  background: var(--panel-soft);
  color: var(--heading);
  outline: none;
}

body[data-theme="dark"] .app-theme-menu-panel .app-theme-menu-option.is-active {
  border: 0;
  background: transparent;
  color: var(--text);
}

body[data-theme="dark"] .app-theme-menu-trigger:hover,
body[data-theme="dark"] .app-theme-menu-trigger:focus-visible,
body[data-theme="dark"] .app-theme-menu.is-open .app-theme-menu-trigger {
  background: #282828;
  border-color: #767676;
}

body[data-theme="light"] .app-theme-menu-trigger {
  background: #f3f6fb;
  border-color: #d2dbe8;
}

body[data-theme="light"] .topbar-global-search-input {
  background: #f3f6fb;
  border-color: #d2dbe8;
}

body[data-theme="light"] .topbar-global-search-input:focus {
  background: #ffffff;
  border-color: rgba(13, 110, 253, 0.24);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

body[data-theme="light"] .app-theme-menu-trigger:hover,
body[data-theme="light"] .app-theme-menu-trigger:focus-visible,
body[data-theme="light"] .app-theme-menu.is-open .app-theme-menu-trigger {
  background: rgba(13, 110, 253, 0.09);
  border-color: rgba(13, 110, 253, 0.24);
}

body[data-theme="light"] .app-theme-menu-option:hover,
body[data-theme="light"] .app-theme-menu-option:focus-visible,
body[data-theme="light"] .app-profile-link:hover,
body[data-theme="light"] .app-profile-link:focus-visible,
body[data-theme="light"] .app-profile-link--button:hover,
body[data-theme="light"] .app-profile-link--button:focus-visible {
  background: rgba(13, 110, 253, 0.095);
  color: var(--heading);
}

body[data-theme="light"] .app-theme-menu-option.is-active {
  background: transparent;
  border: 0;
  color: var(--text);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.table-pagination-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.table-pagination-side {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.table-pagination-row .pagination-bar {
  margin-top: 0;
}

.table-pagination-summary {
  margin: 0;
  text-align: right;
}

.pagination-bar .button-link.is-current {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
  color: var(--primary);
}

body[data-theme="dark"] .pagination-bar .button-link.is-current {
  background: #282828;
  border-color: #767676;
  color: #ffffff;
}

.alert {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 6px;
  background: #ffffff;
}

.alert-success {
  border-left-color: var(--success);
  background: #f5fbf6;
  color: #176534;
}

.alert-danger {
  border-left-color: var(--danger);
  background: #fff7f7;
  color: #8f2f2a;
}

body[data-theme="light"] .alert {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-color: #cfd8e3;
  color: #203044;
}

body[data-theme="light"] .alert-success {
  border-left-color: #2f9e5b;
  border-color: #b7dec4;
  background: linear-gradient(180deg, #f7fcf8 0%, #ebf7ef 100%);
  color: #1f6b3c;
}

body[data-theme="light"] .alert-danger {
  border-left-color: #cf4f49;
  border-color: #ebc8c6;
  background: linear-gradient(180deg, #fff9f8 0%, #fdeeee 100%);
  color: #8f2f2a;
}

body[data-theme="dark"] .alert {
  background: #212121;
  border-color: #393939;
  color: #dcdcdc;
}

body[data-theme="dark"] .alert-success {
  border-left-color: #3ebd73;
  border-color: #274838;
  background: #16281d;
  color: #9de0b6;
}

body[data-theme="dark"] .alert-danger,
body[data-theme="dark"] .alert-error {
  border-left-color: #e16b65;
  border-color: #4d2b2b;
  background: #28191b;
  color: #f2b3ae;
}

.message-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.flash-notification-stack {
  position: fixed;
  top: 82px;
  right: 24px;
  z-index: 2400;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.alert.flash-notification {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 16px 50px 16px 18px;
  border-left-width: 1px;
  border-radius: 18px;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18), 0 8px 20px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(20px) saturate(1.22);
  -webkit-backdrop-filter: blur(20px) saturate(1.22);
  pointer-events: auto;
  opacity: 0;
  transform: translate3d(18px, -8px, 0) scale(0.98);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.alert.flash-notification.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.alert.flash-notification.is-leaving {
  opacity: 0;
  transform: translate3d(18px, -8px, 0) scale(0.98);
}

.flash-notification-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52) !important;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.flash-notification-close:hover,
.flash-notification-close:focus-visible {
  background: rgba(255, 255, 255, 0.82) !important;
  border-color: rgba(100, 116, 139, 0.36);
  outline: none;
}

body[data-theme="light"] .alert.flash-notification {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(203, 213, 225, 0.78);
  color: #182233;
}

body[data-theme="light"] .alert-success.flash-notification {
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.88), rgba(255, 255, 255, 0.72));
  border-color: rgba(134, 239, 172, 0.78);
  color: #166534;
}

body[data-theme="light"] .alert-danger.flash-notification,
body[data-theme="light"] .alert-error.flash-notification {
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.9), rgba(255, 255, 255, 0.74));
  border-color: rgba(252, 165, 165, 0.82);
  color: #991b1b;
}

body[data-theme="dark"] .alert.flash-notification {
  background: rgba(23, 32, 49, 0.78);
  border-color: rgba(71, 85, 105, 0.78);
  color: #e5edf7;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), 0 8px 22px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .alert-success.flash-notification {
  background: linear-gradient(135deg, rgba(20, 83, 45, 0.72), rgba(23, 32, 49, 0.78));
  border-color: rgba(74, 222, 128, 0.42);
  color: #bbf7d0;
}

body[data-theme="dark"] .alert-danger.flash-notification,
body[data-theme="dark"] .alert-error.flash-notification {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.72), rgba(23, 32, 49, 0.78));
  border-color: rgba(248, 113, 113, 0.44);
  color: #fecaca;
}

body[data-theme="dark"] .flash-notification-close {
  background: rgba(15, 23, 42, 0.52) !important;
  border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .flash-notification-close:hover,
body[data-theme="dark"] .flash-notification-close:focus-visible {
  background: rgba(30, 41, 59, 0.84) !important;
  border-color: rgba(148, 163, 184, 0.38);
}

@media (max-width: 720px) {
  .flash-notification-stack {
    top: 72px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-soft);
  color: #475467;
  font-size: 0.76rem;
  font-weight: 700;
  margin: 2px 6px 2px 0;
}

.route-codes {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 0;
}

.route-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 7px;
  border: 1px solid #d8dee8;
  background: #f8fafc;
  color: #334155;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

.route-code--endpoint {
  background: #eef4ff;
  border-color: #c7d7f2;
  color: #36517a;
}

.route-code--via {
  background: #f7f8fb;
  border-color: #dde3eb;
  color: #475467;
}

.route-code[data-tooltip],
.route-code[data-tooltip-html] {
  cursor: help;
}

.route-separator {
  display: inline-flex;
  align-items: center;
  color: #98a2b3;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 5px;
  user-select: none;
}

.route-separator::before {
  content: "\2192";
}

body[data-theme="dark"] .route-code {
  background: #172033;
  border-color: #344256;
  color: #e2e8f0;
  box-shadow: none;
}

body[data-theme="dark"] .route-code--endpoint {
  background: #122033;
  border-color: #33527a;
  color: #93c5fd;
}

body[data-theme="dark"] .route-code--via {
  background: #1a2334;
  border-color: #3a4658;
  color: #cbd5e1;
}

body[data-theme="dark"] .route-separator {
  color: #64748b;
}

.quality-pills {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quality-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  transition: transform 120ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.quality-pill:hover,
.quality-pill:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  filter: saturate(1.03);
  outline: none;
}

.dashboard-aircraft-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-aircraft-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #c7d3e2;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-soft) 100%);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.dashboard-aircraft-button:hover,
.dashboard-aircraft-button:focus-visible {
  border-color: #8aa9d6;
  background: linear-gradient(180deg, var(--panel) 0%, #eef5ff 100%);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  outline: none;
}

.dashboard-aircraft-main,
.dashboard-aircraft-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-aircraft-code {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
}

.dashboard-aircraft-name {
  font-size: 0.82rem;
  color: var(--muted);
}

.dashboard-aircraft-meta {
  align-items: flex-end;
  flex-shrink: 0;
}

.dashboard-aircraft-model {
  font-size: 0.82rem;
  color: var(--text);
}

.dashboard-aircraft-type {
  font-size: 0.74rem;
  color: var(--muted);
}

.dashboard-aircraft-count {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
}

body[data-theme="light"] .dashboard-aircraft-button {
  border-color: #d7e3f4;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  box-shadow: 0 12px 28px rgba(21, 74, 145, 0.12);
}

body[data-theme="light"] .dashboard-aircraft-button:hover,
body[data-theme="light"] .dashboard-aircraft-button:focus-visible {
  border-color: #9fc2ef;
  background: linear-gradient(180deg, #ffffff 0%, #e9f4ff 100%);
  box-shadow: 0 16px 32px rgba(21, 74, 145, 0.16);
}

body[data-theme="dark"] .dashboard-aircraft-button {
  border-color: #393939;
  background: linear-gradient(180deg, #212121 0%, #181818 100%);
}

body[data-theme="dark"] .dashboard-aircraft-button:hover,
body[data-theme="dark"] .dashboard-aircraft-button:focus-visible {
  border-color: #5d5d5d;
  background: linear-gradient(180deg, #282828 0%, #1c1c1c 100%);
}

.dashboard-quality-value {
  font-weight: 700;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.bg-success {
  background: #f8fafc;
  border: 1px solid #d0d5dd;
  color: var(--text);
}

.bg-warning {
  background: #f8fafc;
  border: 1px solid #d0d5dd;
  color: var(--text);
}

.bg-danger {
  background: #fdf2f2;
  border: 1px solid #f3d0d0;
  color: #7f1d1d;
}

.bg-info {
  background: #f8fafc;
  border: 1px solid #d0d5dd;
  color: var(--text);
}

.dashboard-activity-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-activity-panel:hover,
.dashboard-activity-panel:focus-within {
  box-shadow: none;
}

.dashboard-activity-panel > .card-head,
.dashboard-activity-panel > .mission-dash-actions {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dashboard-activity-panel > .card-head {
  margin-bottom: 16px;
}

.dashboard-activity-panel > .mission-dash-actions {
  margin-top: 16px;
}

.mission-activity-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mission-activity-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 2px 12px rgba(17, 24, 39, 0.05);
}

.mission-activity-divider {
  height: 2px;
  margin: 12px 20px;
  background: #2563eb;
  border-radius: 999px;
  opacity: 1;
}

.mission-act-head {
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, #fbfcfd, #ffffff);
  border-bottom: 1px solid var(--border);
}

.mission-act-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
}

.mission-act-code {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.mission-act-code a:hover {
  color: var(--primary);
}

.mission-act-counts {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.cell-count-exp {
  color: #526071;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cell-count-rev {
  color: #374151;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cell-count-rev.cell-count-rev--zero {
  color: var(--text-muted);
  font-weight: 600;
}

.mission-act-route {
  margin-top: 10px;
}

.modern-table-card .mission-act-route {
  margin-top: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.modern-table-card .mission-act-route .route-codes {
  display: inline-flex;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow: hidden;
  vertical-align: middle;
  white-space: nowrap;
}

.modern-table-card .mission-act-route .route-code,
.modern-table-card .mission-act-route .route-separator {
  flex: 0 0 auto;
}

.modern-table-card .type-pill-collection {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.modern-table-card .type-pill-collection .type-pill {
  flex: 0 0 auto;
}

.modern-table-card .table-actions {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.modern-table-card .table-actions > * {
  flex: 0 0 auto;
}

.mission-act-client {
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 500;
}

.mission-act-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 0;
}

.mission-act-col {
  padding: 12px 14px 14px;
  min-width: 0;
}

.mission-act-col--exp {
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 55%);
  border-right: 1px solid var(--border);
}

.mission-act-col--rev {
  background: linear-gradient(180deg, #fcfcfd 0%, #ffffff 55%);
}

.mission-act-col h4 {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.mission-act-col--exp h4 {
  color: #667085;
}

.mission-act-col--rev h4 {
  color: #667085;
}

.mission-act-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mission-act-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 10px;
  font-size: 0.84rem;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.mission-act-item .amt {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
  color: #1f2937;
}

.mission-act-col--exp .mission-act-item .amt {
  color: #1f2937;
}

.mission-act-col--rev .mission-act-item .amt {
  color: #1f2937;
}

.mission-act-item .meta {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.mission-act-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.5rem 0.18rem;
  border: 1px solid var(--pill-border, var(--border));
  border-radius: 7px;
  background: var(--pill-background, color-mix(in srgb, var(--panel-soft) 88%, #ffffff 12%));
  font-size: 0.8rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--pill-text, inherit);
}

.type-pill--hotel {
  border-color: #d7c8b0;
  background: #f6f2ea;
  color: #5f4a2d;
}

.type-pill--maint {
  border-color: #c9d1ee;
  background: #eef2ff;
  color: #4853a6;
}

.type-pill--handling {
  border-color: #b6dff5;
  background: #eefaff;
  color: #1f6f96;
}

.type-pill--catering {
  border-color: #e7bfd4;
  background: #fcf0f6;
  color: #8e4566;
}

.type-pill--fuel {
  border-color: #ecd0bc;
  background: #fff3ea;
  color: #9a5730;
}

.type-pill--default {
  border-color: #d5dce5;
  background: #f5f7fa;
  color: #475467;
}

.type-pill--blue {
  border-color: #b7caf7;
  background: #eef2ff;
  color: #2448c7;
}

.type-pill--teal {
  border-color: #b7ddd6;
  background: #eefaf7;
  color: #16665f;
}

.type-pill--amber {
  border-color: #ead8a3;
  background: #fff7e6;
  color: #9c640c;
}

.type-pill--rose {
  border-color: #efbdd9;
  background: #ffeef6;
  color: #bf2f7a;
}

.type-pill--slate {
  border-color: #c2ccd9;
  background: #edf2f7;
  color: #334155;
}

.type-pill--status-active {
  border-color: #b7dfc2;
  background: #ecfbf0;
  color: #16703a;
}

.type-pill--status-inactive {
  border-color: #efb8b8;
  background: #fff1f1;
  color: #aa2626;
}

body[data-theme="dark"] .type-pill {
  border-color: var(--pill-border, var(--border-strong));
  background: var(--pill-background, color-mix(in srgb, var(--panel-soft) 92%, #0b1220 8%));
  color: var(--pill-text, var(--text));
}

body[data-theme="dark"] .type-pill--hotel {
  border-color: #67553a;
  background: #211b13;
  color: #d7c09b;
}

body[data-theme="dark"] .type-pill--maint {
  border-color: #47518b;
  background: #161b34;
  color: #c6d0ff;
}

body[data-theme="dark"] .type-pill--handling {
  border-color: #2c6178;
  background: #10252c;
  color: #9fe7ff;
}

body[data-theme="dark"] .type-pill--catering {
  border-color: #73415b;
  background: #271620;
  color: #f0bfd4;
}

body[data-theme="dark"] .type-pill--fuel {
  border-color: #7b563f;
  background: #291b13;
  color: #f0c5ac;
}

body[data-theme="dark"] .type-pill--default {
  border-color: #46556a;
  background: #172133;
  color: #d2dbe8;
}

body[data-theme="dark"] .type-pill--status-active {
  border-color: #2d6e45;
  background: #15231a;
  color: #7ee0a0;
}

body[data-theme="dark"] .type-pill--status-inactive {
  border-color: #814646;
  background: #2b1717;
  color: #ff9d9d;
}

body[data-theme="dark"] .type-pill--blue {
  border-color: #3a4f93;
  background: #131c39;
  color: #b7c9ff;
}

body[data-theme="dark"] .type-pill--teal {
  border-color: #2b5f58;
  background: #112421;
  color: #9de1d9;
}

body[data-theme="dark"] .type-pill--amber {
  border-color: #7f651f;
  background: #2b220a;
  color: #f4d66f;
}

body[data-theme="dark"] .type-pill--rose {
  border-color: #8c3566;
  background: #2b1221;
  color: #ffb8df;
}

body[data-theme="dark"] .type-pill--slate {
  border-color: #536273;
  background: #1b2330;
  color: #c0cedc;
}

.entity-badge-modal-overlay,
.entity-badge-modal {
  display: none;
}

[data-entity-badge-editor].is-modal-open .entity-badge-modal-overlay {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.48);
}

[data-entity-badge-editor].is-modal-open .entity-badge-modal {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 71;
  width: min(526px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 18px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  overflow: auto;
  transform: translate(-50%, -50%);
}

.entity-badge-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.entity-badge-modal-head strong {
  display: block;
  color: var(--heading);
  font-size: 1rem;
  margin-bottom: 4px;
}

.entity-badge-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.field-label-like {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.entity-badge-color-picker-ui {
  display: grid;
  grid-template-columns: 200px 24px 24px;
  gap: 14px;
  align-items: stretch;
}

.entity-badge-color-picker-square-wrap,
.entity-badge-color-picker-hue-wrap,
.entity-badge-color-picker-intensity-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.entity-badge-color-picker-square-wrap canvas,
.entity-badge-color-picker-hue-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.entity-badge-color-picker-intensity-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 200px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.24) 0%, rgba(148, 163, 184, 0.12) 50%, rgba(148, 163, 184, 0.04) 100%),
    var(--panel);
}

.entity-badge-color-picker-intensity-wrap input[type="range"] {
  width: 176px;
  height: 24px;
  margin: 0;
  transform: rotate(-90deg);
  accent-color: var(--primary);
  cursor: pointer;
}

.entity-badge-color-picker-intensity-wrap input[type="range"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.entity-badge-color-picker-square-wrap {
  width: 200px;
  height: 200px;
}

.entity-badge-color-picker-hue-wrap,
.entity-badge-color-picker-intensity-wrap {
  width: 24px;
  height: 200px;
}

.entity-badge-preview-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.entity-badge-preview-surface {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.entity-badge-preview-surface--light {
  background: linear-gradient(180deg, #f6f8fb 0%, #edf1f7 100%);
}

.entity-badge-preview-surface--dark {
  background: linear-gradient(180deg, #162131 0%, #101926 100%);
  border-color: #314255;
}

.entity-badge-main-preview {
  margin-bottom: 14px;
}

.entity-badge-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.entity-badge-modal .entity-badge-modal-head {
  margin-bottom: 18px;
}

.entity-badge-modal-body {
  display: grid;
  gap: 18px;
}

.entity-badge-modal-config {
  display: grid;
  grid-template-columns: max-content 194px;
  gap: 18px;
  align-items: stretch;
}

.entity-badge-modal-preview {
  grid-template-columns: minmax(0, 1fr);
  align-content: stretch;
  gap: 12px;
}

.entity-badge-modal-preview .entity-badge-preview-surface {
  min-height: 94px;
  padding: 12px;
}

.aircraft-pool-members-card {
  overflow: hidden;
}

.aircraft-pool-members-table {
  min-width: 620px;
}

@media (max-width: 760px) {
  .entity-badge-modal-config {
    grid-template-columns: minmax(0, 1fr);
  }

  .entity-badge-modal-preview .entity-badge-preview-surface {
    min-height: 72px;
  }
}

@media (max-width: 720px) {
  .table-pagination-row {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .table-pagination-side {
    justify-content: flex-start;
  }

  .table-pagination-summary {
    text-align: left;
  }

  .entity-badge-preview-stack {
    grid-template-columns: 1fr;
  }
}

.row-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #eef2f6;
  color: #475467;
}

.mission-activity-card--tag-owner .mission-act-head {
  box-shadow: inset 4px 0 0 0 #d97706;
}

.mission-activity-card--tag-empty .mission-act-head {
  box-shadow: inset 4px 0 0 0 #2563eb;
}

.mission-dash-actions {
  margin-top: 16px;
}

.mission-dash-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-month-summary {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dashboard-month-progress-card {
  margin-top: 18px;
}

.dashboard-month-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-month-meta-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fcfcfd;
}

.dashboard-month-meta-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-comparison-bar {
  display: flex;
  width: 100%;
  min-height: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef2f6;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.dashboard-comparison-segment {
  display: block;
  min-width: 4px;
  height: 22px;
}

.dashboard-month-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 14px;
}

.dashboard-month-breakdown-item {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid #eef2f6;
  font-size: 0.84rem;
}

@media (max-width: 1200px) {
  .dashboard-month-breakdown-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dashboard-month-breakdown-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
}

.dashboard-month-breakdown-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 10px;
}

.dashboard-segment--revenue {
  background: linear-gradient(90deg, #059669 0%, #34d399 100%);
}

.dashboard-segment--costs {
  background: linear-gradient(90deg, #fb923c 0%, #fdba74 100%);
}

.dashboard-segment--flight {
  background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 100%);
}

.dashboard-segment--crew {
  background: linear-gradient(90deg, #7c3aed 0%, #c4b5fd 100%);
}

.dashboard-segment--commission {
  background: linear-gradient(90deg, #db2777 0%, #f9a8d4 100%);
}

.dashboard-segment--management {
  background: linear-gradient(90deg, #0ea5e9 0%, #7dd3fc 100%);
}

.month-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.month-switch-tooltip-target {
  display: inline-flex;
}

.month-switch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.48rem 0.78rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

button.month-switch-link {
  width: auto;
  font-family: inherit;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

body[data-theme="light"] .main-layout button.month-switch-link,
body[data-theme="dark"] button.month-switch-link {
  background: #f8fafc;
  color: var(--text);
}

.month-switch-link:hover,
.month-switch-link:focus-visible {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.month-switch-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.18);
}

.month-switch-link[disabled] {
  background: #f1f5f9;
  border-color: #dbe3ee;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.month-switch-link[disabled]:hover,
.month-switch-link[disabled]:focus-visible,
body[data-theme="light"] .main-layout button.month-switch-link[disabled],
body[data-theme="light"] .main-layout button.month-switch-link[disabled]:hover,
body[data-theme="light"] .main-layout button.month-switch-link[disabled]:focus-visible,
body[data-theme="dark"] button.month-switch-link[disabled],
body[data-theme="dark"] button.month-switch-link[disabled]:hover,
body[data-theme="dark"] button.month-switch-link[disabled]:focus-visible {
  background: #f1f5f9;
  border-color: #dbe3ee;
  color: #94a3b8;
  box-shadow: none;
}

body[data-theme="dark"] .month-switch-link[disabled],
body[data-theme="dark"] .month-switch-link[disabled]:hover,
body[data-theme="dark"] .month-switch-link[disabled]:focus-visible,
body[data-theme="dark"] button.month-switch-link[disabled],
body[data-theme="dark"] button.month-switch-link[disabled]:hover,
body[data-theme="dark"] button.month-switch-link[disabled]:focus-visible {
  background: #181818;
  border-color: #303030;
  color: #767676;
  box-shadow: none;
}

.schema-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--table-bg);
}

.modern-table-card {
  position: relative;
}

.modern-table-form {
  margin: 14px 0 16px;
}

.modern-table-toolbar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.modern-table-menu {
  position: relative;
  flex: 0 0 auto;
}

.modern-table-tool-button {
  min-height: 42px;
  border-color: var(--border);
  background: var(--table-bg);
  color: var(--heading);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

body[data-theme="light"] .main-layout button.modern-table-tool-button:not(.button-link),
body[data-theme="dark"] button.modern-table-tool-button:not(.button-link) {
  border-color: var(--border);
  background: var(--table-bg);
  color: var(--heading);
}

body[data-theme="light"] .main-layout button.modern-table-tool-button:not(.button-link):hover,
body[data-theme="light"] .main-layout button.modern-table-tool-button:not(.button-link):focus-visible,
body[data-theme="dark"] button.modern-table-tool-button:not(.button-link):hover,
body[data-theme="dark"] button.modern-table-tool-button:not(.button-link):focus-visible {
  border-color: var(--primary);
  background: var(--table-soft-bg);
}

.modern-table-tool-button-columns {
  width: 48px;
  padding-inline: 0;
}

.modern-table-tool-icon {
  display: inline-flex;
  position: relative;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
}

.modern-table-tool-icon-columns::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M3 6.75c0-2.071 1.679-3.75 3.75-3.75h6.5c2.071 0 3.75 1.679 3.75 3.75v6.5c0 2.071-1.679 3.75-3.75 3.75h-6.5c-2.071 0-3.75-1.679-3.75-3.75v-6.5Zm3.75-2.25c-1.243 0-2.25 1.007-2.25 2.25v6.5c0 1.243 1.007 2.25 2.25 2.25h.5v-11h-.5Zm4.5 11h-2.5v-11h2.5v11Zm1.5 0h.5c1.243 0 2.25-1.007 2.25-2.25v-6.5c0-1.243-1.007-2.25-2.25-2.25h-.5v11Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M3 6.75c0-2.071 1.679-3.75 3.75-3.75h6.5c2.071 0 3.75 1.679 3.75 3.75v6.5c0 2.071-1.679 3.75-3.75 3.75h-6.5c-2.071 0-3.75-1.679-3.75-3.75v-6.5Zm3.75-2.25c-1.243 0-2.25 1.007-2.25 2.25v6.5c0 1.243 1.007 2.25 2.25 2.25h.5v-11h-.5Zm4.5 11h-2.5v-11h2.5v11Zm1.5 0h.5c1.243 0 2.25-1.007 2.25-2.25v-6.5c0-1.243-1.007-2.25-2.25-2.25h-.5v11Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.modern-table-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 70;
  width: min(330px, calc(100vw - 48px));
  max-height: min(520px, calc(100vh - 220px));
  overflow: auto;
  padding: 16px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.22);
}

.modern-table-menu-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px 12px;
}

.modern-table-menu-action {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
}

body[data-theme="light"] .main-layout button.modern-table-menu-action:not(.button-link),
body[data-theme="dark"] button.modern-table-menu-action:not(.button-link),
body[data-theme="light"] .main-layout button.modern-table-menu-action:not(.button-link):hover,
body[data-theme="dark"] button.modern-table-menu-action:not(.button-link):hover {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
}

.modern-table-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 18px;
  color: var(--heading);
  font-size: 0.92rem;
  font-weight: 600;
}

.modern-table-check-row:hover {
  background: var(--table-soft-bg);
}

.modern-table-check-row input {
  width: 18px;
  height: 18px;
  accent-color: #0891a5;
}

.modern-table-active-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex: 1 1 420px;
  flex-wrap: wrap;
}

.modern-table-filter-control {
  display: block;
  width: 160px;
  min-width: 160px;
}

.modern-table-filter-control[data-filter-control="q"] {
  width: 240px;
  min-width: 240px;
}

.modern-table-filter-control input,
.modern-table-filter-control select {
  min-height: 42px;
}

.modern-table-search-field {
  position: relative;
  display: block;
}

.modern-table-search-field input {
  padding-left: 38px;
}

.modern-table-reset {
  align-self: flex-end;
}

.modern-choice {
  position: relative;
}

.modern-choice-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.modern-choice-trigger {
  justify-content: space-between;
  min-width: 0;
  width: 100%;
  min-height: 42px;
  padding-right: 36px;
  border-color: var(--border);
  background: var(--table-bg);
  color: var(--text);
  font-weight: 500;
  position: relative;
}

.modern-choice-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 14px;
  height: 14px;
  background: var(--text-muted);
  transform: translateY(-50%);
  -webkit-mask: var(--select-arrow-icon) center / contain no-repeat;
  mask: var(--select-arrow-icon) center / contain no-repeat;
}

body[data-theme="light"] .main-layout button.modern-choice-trigger:not(.button-link),
body[data-theme="dark"] button.modern-choice-trigger:not(.button-link) {
  border-color: var(--border);
  background: var(--table-bg);
  color: var(--text);
}

body[data-theme="light"] .main-layout button.modern-choice-trigger:not(.button-link):hover,
body[data-theme="light"] .main-layout button.modern-choice-trigger:not(.button-link):focus-visible,
body[data-theme="dark"] button.modern-choice-trigger:not(.button-link):hover,
body[data-theme="dark"] button.modern-choice-trigger:not(.button-link):focus-visible {
  border-color: var(--primary);
  background: var(--table-soft-bg);
}

.modern-choice-panel {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 72;
  min-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
}

.modern-choice-option {
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-weight: 600;
}

body[data-theme="light"] .main-layout button.modern-choice-option:not(.button-link),
body[data-theme="dark"] button.modern-choice-option:not(.button-link) {
  border: 0;
  background: transparent;
  color: var(--text);
}

body[data-theme="light"] .main-layout button.modern-choice-option:not(.button-link):hover,
body[data-theme="light"] .main-layout button.modern-choice-option:not(.button-link):focus-visible,
body[data-theme="light"] .main-layout button.modern-choice-option:not(.button-link).is-selected,
body[data-theme="dark"] button.modern-choice-option:not(.button-link):hover,
body[data-theme="dark"] button.modern-choice-option:not(.button-link):focus-visible,
body[data-theme="dark"] button.modern-choice-option:not(.button-link).is-selected {
  background: var(--table-soft-bg);
  color: var(--heading);
}

.modern-table-wrap th,
.modern-table-wrap td {
  position: relative;
  left: 0;
}

.modern-table-wrap th {
  user-select: none;
}

.modern-table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.modern-table-wrap th,
.modern-table-wrap td {
  border-right: 1px solid color-mix(in srgb, var(--table-border-color) 78%, transparent);
  white-space: nowrap;
}

.modern-table-wrap td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.modern-table-wrap th {
  overflow: visible;
}

.modern-table-wrap th:last-child,
.modern-table-wrap td:last-child {
  border-right: 0;
}

.modern-table-dummy-column {
  padding: 0;
  color: transparent;
}

.modern-table-wrap tbody tr[data-modern-row-href] {
  cursor: pointer;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.modern-table-wrap tbody tr[data-modern-row-href]:hover td,
.modern-table-wrap tbody tr[data-modern-row-href]:focus-visible td {
  background: var(--table-row-hover-bg);
}

.modern-table-wrap tbody tr[data-modern-row-href]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.modern-table-sortable {
  padding: 0;
}

.modern-table-sortable a {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 100%;
  padding: 10px 20px 10px 12px;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

.modern-table-sortable.table-number a {
  justify-content: flex-end;
}

.modern-table-sort-indicator::before {
  content: "↕";
  color: var(--text-muted);
  font-size: 0.78rem;
}

.modern-table-sortable.is-sorted-asc .modern-table-sort-indicator::before {
  content: "↑";
  color: var(--primary);
}

.modern-table-sortable.is-sorted-desc .modern-table-sort-indicator::before {
  content: "↓";
  color: var(--primary);
}

.modern-table-wrap th[data-modern-fixed-column="false"] {
  cursor: grab;
  touch-action: none;
}

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

.modern-table-wrap th:last-child .modern-table-column-resize {
  right: 0;
}

.modern-table-column-resize::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 3px;
  bottom: 9px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  transition: background-color 0.14s ease;
}

.modern-table-wrap th:hover .modern-table-column-resize::after,
.modern-table-wrap th.is-resizing .modern-table-column-resize::after {
  background: var(--primary);
}

.modern-table-wrap th.is-dragging {
  cursor: grabbing;
}

.modern-table-wrap .is-modern-column-drag-source {
  z-index: 3;
  pointer-events: none;
}

.modern-table-wrap .is-modern-column-drag-preview {
  transition: left 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: left;
}

.modern-table-wrap th.is-drag-target {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.modern-table-column-drag-active {
  cursor: grabbing;
  user-select: none;
}

.modern-table-column-resize-active {
  cursor: col-resize;
  user-select: none;
}

.is-modern-column-animating {
  will-change: transform;
}

.is-modern-column-hidden,
.is-hidden {
  display: none !important;
}

.modern-table-empty {
  margin: 18px 0 0;
}

.scale-cell {
  transition: background-color 0.18s ease;
}

.report-chart {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--table-bg);
  padding: 10px;
}

.report-chart-svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

.report-chart-tooltip-target {
  cursor: pointer;
}

.ui-tooltip {
  --ui-tooltip-bg: #ffffee;
  --ui-tooltip-border: var(--border);
  position: fixed;
  z-index: 9999;
  max-width: min(320px, calc(100vw - 24px));
  padding: 8px 10px;
  border: 1px solid var(--ui-tooltip-border);
  border-radius: 8px;
  background: var(--ui-tooltip-bg);
  color: var(--text);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
  font-size: 0.8rem;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.ui-tooltip::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.ui-tooltip::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.ui-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ui-tooltip[data-placement="top"] {
  transform-origin: bottom center;
}

.ui-tooltip[data-placement="top"]::before {
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-color: var(--ui-tooltip-border) transparent transparent transparent;
}

.ui-tooltip[data-placement="top"]::after {
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-color: var(--ui-tooltip-bg) transparent transparent transparent;
}

.ui-tooltip[data-placement="bottom"] {
  transform-origin: top center;
}

.ui-tooltip[data-placement="bottom"]::before {
  left: 50%;
  top: -7px;
  transform: translateX(-50%);
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent var(--ui-tooltip-border) transparent;
}

.ui-tooltip[data-placement="bottom"]::after {
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent var(--ui-tooltip-bg) transparent;
}

.ui-tooltip[data-placement="left"] {
  transform-origin: center right;
}

.ui-tooltip[data-placement="left"]::before {
  top: 50%;
  right: -7px;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent var(--ui-tooltip-border);
}

.ui-tooltip[data-placement="left"]::after {
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent var(--ui-tooltip-bg);
}

.ui-tooltip[data-placement="right"] {
  transform-origin: center left;
}

.ui-tooltip[data-placement="right"]::before {
  top: 50%;
  left: -7px;
  transform: translateY(-50%);
  border-width: 6px 6px 6px 0;
  border-color: transparent var(--ui-tooltip-border) transparent transparent;
}

.ui-tooltip[data-placement="right"]::after {
  top: 50%;
  left: -6px;
  transform: translateY(-50%);
  border-width: 6px 6px 6px 0;
  border-color: transparent var(--ui-tooltip-bg) transparent transparent;
}

body[data-theme="dark"] .ui-tooltip {
  --ui-tooltip-bg: #282828;
  --ui-tooltip-border: #4f4f4f;
  background: var(--ui-tooltip-bg);
  color: #dcdcdc;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

body[data-theme="dark"] .ui-tooltip[data-placement="top"]::after {
  border-top-color: var(--ui-tooltip-bg);
}

body[data-theme="dark"] .ui-tooltip[data-placement="bottom"]::after {
  border-bottom-color: var(--ui-tooltip-bg);
}

body[data-theme="dark"] .ui-tooltip[data-placement="left"]::after {
  border-left-color: var(--ui-tooltip-bg);
}

body[data-theme="dark"] .ui-tooltip[data-placement="right"]::after {
  border-right-color: var(--ui-tooltip-bg);
}

.ui-tooltip-title {
  font-weight: 700;
  color: var(--heading);
}

.ui-tooltip-desc {
  margin-top: 2px;
  color: var(--text-muted);
}

.ui-tooltip-value {
  margin-top: 6px;
  font-weight: 400;
  color: var(--text-muted);
}

.ui-tooltip-table {
  margin-top: 8px;
  min-width: 180px;
  width: auto;
  min-width: 0;
  border-collapse: collapse;
  background: transparent;
}

.ui-tooltip-table td {
  padding: 2px 0;
  border: 0;
  background: transparent !important;
  color: inherit;
}

.ui-tooltip-table td:last-child {
  padding-left: 18px;
  text-align: right;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: var(--table-bg);
}

.table-row-owner td {
  background: #d9f2d0 !important;
}

.table-row-empty-leg td {
  background: #fbe3d6 !important;
}

body[data-theme="dark"] .table-row-owner td {
  background: #163224 !important;
  color: #d6f5e5;
}

body[data-theme="dark"] .table-row-empty-leg td {
  background: #3a2317 !important;
  color: #fde7d8;
}

.table-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.2rem 0.55rem;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.table-status-open {
  color: #b91c1c;
  background: linear-gradient(180deg, #fff6f6 0%, #f9dfdf 100%);
  border-color: #fecaca;
}

.table-status-paid {
  color: #166534;
  background: linear-gradient(180deg, #f5fef8 0%, #def2e4 100%);
  border-color: #bbf7d0;
}

body[data-theme="dark"] .table-status-open {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.38);
  border-color: rgba(248, 113, 113, 0.45);
}

body[data-theme="dark"] .table-status-paid {
  color: #bbf7d0;
  background: rgba(20, 83, 45, 0.42);
  border-color: rgba(74, 222, 128, 0.4);
}

.table-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mission-airport-leg-row td {
  padding: 6px 12px;
  color: #667085;
  font-size: 0.78rem;
  text-align: center;
  background: var(--table-soft-bg);
}

.table-wrap-fit {
  overflow-x: visible;
}

.table-fit {
  min-width: 0;
  table-layout: fixed;
}

.table-fit-info th {
  width: 35%;
}

.table-fit-info td {
  width: 65%;
}

.table-fit-compact th,
.table-fit-compact td {
  padding: 8px 10px;
  font-size: 0.84rem;
}

.table-fit-compact th {
  font-size: 0.75rem;
}

.table-fit-compact th:nth-child(1),
.table-fit-compact td:nth-child(1) {
  width: 36px;
  white-space: nowrap;
}

.table-fit-compact th:nth-child(2),
.table-fit-compact td:nth-child(2),
.table-fit-compact th:nth-child(3),
.table-fit-compact td:nth-child(3),
.table-fit-compact th:nth-child(4),
.table-fit-compact td:nth-child(4) {
  white-space: nowrap;
}

.table-fit-compact th:nth-child(5),
.table-fit-compact td:nth-child(5),
.table-fit-compact th:nth-child(6),
.table-fit-compact td:nth-child(6) {
  width: 92px;
  white-space: nowrap;
}

.table-fit-crew th,
.table-fit-crew td {
  padding: 8px 10px;
  font-size: 0.84rem;
}

.table-fit-crew th {
  font-size: 0.75rem;
}

.table-fit-crew th:nth-child(1),
.table-fit-crew td:nth-child(1) {
  width: 72px;
  white-space: nowrap;
}

.table-fit-crew th:nth-child(2),
.table-fit-crew td:nth-child(2) {
  width: auto;
}

.table-fit-crew th:nth-child(3),
.table-fit-crew td:nth-child(3) {
  width: 128px;
}

.table-fit-crew th:nth-child(4),
.table-fit-crew td:nth-child(4) {
  width: 92px;
  white-space: nowrap;
}

.mission-legs-row {
  transition: background-color 0.14s ease;
}

.mission-legs-row:hover td,
.mission-legs-row:focus-within td {
  background: #fff7ed !important;
}

body[data-theme="dark"] .mission-legs-row:hover td,
body[data-theme="dark"] .mission-legs-row:focus-within td {
  background: #1f2937 !important;
  color: #e5e7eb;
}

.mission-route-map {
  position: relative;
  z-index: 0;
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #dbe7f3;
}

.mission-route-map .leaflet-pane,
.mission-route-map .leaflet-top,
.mission-route-map .leaflet-bottom {
  z-index: 1 !important;
}

.mission-route-map .leaflet-tile-pane {
  z-index: 1 !important;
}

.mission-route-map .leaflet-overlay-pane {
  z-index: 2 !important;
}

.mission-route-map .leaflet-shadow-pane {
  z-index: 3 !important;
}

.mission-route-map .leaflet-marker-pane {
  z-index: 4 !important;
}

.mission-route-map .leaflet-tooltip-pane {
  z-index: 5 !important;
}

.mission-route-map .leaflet-popup-pane {
  z-index: 6 !important;
}

.mission-route-map .leaflet-top,
.mission-route-map .leaflet-bottom {
  z-index: 7 !important;
}

.mission-route-map .leaflet-popup-content {
  margin: 10px 12px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.mission-route-map .leaflet-popup-content strong {
  display: block;
  margin-bottom: 2px;
  color: var(--heading);
}

.mission-route-map .leaflet-tooltip.mission-route-map-tooltip {
  --map-tooltip-bg: color-mix(in srgb, var(--panel) 96%, transparent);
  --map-tooltip-border: var(--border);
  padding: 6px 8px;
  border: 1px solid var(--map-tooltip-border);
  border-radius: 8px;
  background: var(--map-tooltip-bg);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: nowrap;
}

.mission-route-map .leaflet-tooltip.mission-route-map-tooltip::before {
  position: absolute;
  margin: 0;
  border: 0;
}

.mission-route-map .leaflet-tooltip.mission-route-map-tooltip::after {
  content: "";
  position: absolute;
  margin: 0;
  width: 0;
  height: 0;
  border-style: solid;
}

.mission-route-map .leaflet-tooltip-top.mission-route-map-tooltip::before {
  left: 50%;
  bottom: -7px;
  margin-left: 0;
  transform: translateX(-50%);
  border-style: solid;
  border-width: 6px 6px 0 6px;
  border-color: var(--map-tooltip-border) transparent transparent transparent;
}

.mission-route-map .leaflet-tooltip-top.mission-route-map-tooltip::after {
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-color: var(--map-tooltip-bg) transparent transparent transparent;
}

.mission-route-map .leaflet-tooltip-bottom.mission-route-map-tooltip::before {
  left: 50%;
  top: -7px;
  margin-left: 0;
  transform: translateX(-50%);
  border-style: solid;
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent var(--map-tooltip-border) transparent;
}

.mission-route-map .leaflet-tooltip-bottom.mission-route-map-tooltip::after {
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent var(--map-tooltip-bg) transparent;
}

.mission-route-map .leaflet-tooltip-left.mission-route-map-tooltip::before {
  top: 50%;
  right: -7px;
  margin-top: 0;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent var(--map-tooltip-border);
}

.mission-route-map .leaflet-tooltip-left.mission-route-map-tooltip::after {
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent var(--map-tooltip-bg);
}

.mission-route-map .leaflet-tooltip-right.mission-route-map-tooltip::before {
  top: 50%;
  left: -7px;
  margin-top: 0;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 6px 6px 6px 0;
  border-color: transparent var(--map-tooltip-border) transparent transparent;
}

.mission-route-map .leaflet-tooltip-right.mission-route-map-tooltip::after {
  top: 50%;
  left: -6px;
  transform: translateY(-50%);
  border-width: 6px 6px 6px 0;
  border-color: transparent var(--map-tooltip-bg) transparent transparent;
}

.mission-route-map .leaflet-tooltip.mission-route-map-tooltip strong {
  display: block;
  margin-bottom: 2px;
  color: var(--heading);
}

body[data-theme="dark"] .mission-route-map .leaflet-tooltip.mission-route-map-tooltip {
  --map-tooltip-bg: #282828;
  --map-tooltip-border: #4f4f4f;
  background: var(--map-tooltip-bg);
  border-color: var(--map-tooltip-border);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

.mission-route-map .leaflet-control-attribution {
  font-size: 0.7rem;
}

.flight-radar-map {
  height: 460px;
  border-radius: 18px;
  overflow: hidden;
  margin-top: 1rem;
}

.flight-radar-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.flight-radar-legend-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-soft);
}

.flight-radar-legend-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.flight-radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.25rem;
}

.flight-radar-grid .card-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.flight-radar-grid .card-head-actions form {
  margin: 0;
}

.flight-radar-aircraft-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  gap: 0.9rem;
}

.flight-radar-aircraft-cards--top {
  margin: 0 0 1.25rem;
}

.flight-radar-aircraft-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #c7d3e2;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-soft) 100%);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.flight-radar-aircraft-card:hover,
.flight-radar-aircraft-card:focus-visible {
  border-color: #8aa9d6;
  background: linear-gradient(180deg, var(--panel) 0%, #eef5ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  outline: none;
}

.flight-radar-aircraft-card.is-selected {
  border-color: #7ea1d5;
  background: linear-gradient(180deg, var(--panel) 0%, #e8f1ff 100%);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.flight-radar-aircraft-card-main,
.flight-radar-aircraft-card-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.flight-radar-aircraft-card-code {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
}

.flight-radar-aircraft-card-meta {
  align-items: flex-end;
  flex-shrink: 0;
}

.flight-radar-aircraft-card-model {
  font-size: 0.82rem;
  color: var(--text);
}

.flight-radar-aircraft-card-count {
  margin-top: 4px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

body[data-theme="light"] .flight-radar-aircraft-card {
  border-color: #d7e3f4;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  box-shadow: 0 12px 28px rgba(21, 74, 145, 0.12);
}

body[data-theme="light"] .flight-radar-aircraft-card:hover,
body[data-theme="light"] .flight-radar-aircraft-card:focus-visible {
  border-color: #9fc2ef;
  background: linear-gradient(180deg, #ffffff 0%, #e9f4ff 100%);
  box-shadow: 0 16px 32px rgba(21, 74, 145, 0.16);
}

body[data-theme="light"] .flight-radar-aircraft-card.is-selected {
  border-color: #7fb0eb;
  background: linear-gradient(180deg, #ffffff 0%, #e0efff 100%);
  box-shadow: 0 18px 34px rgba(21, 74, 145, 0.18);
}

body[data-theme="dark"] .flight-radar-aircraft-card {
  border-color: #393939;
  background: linear-gradient(180deg, #212121 0%, #181818 100%);
}

body[data-theme="dark"] .flight-radar-aircraft-card:hover,
body[data-theme="dark"] .flight-radar-aircraft-card:focus-visible {
  border-color: #5d5d5d;
  background: linear-gradient(180deg, #282828 0%, #1c1c1c 100%);
}

body[data-theme="dark"] .flight-radar-aircraft-card.is-selected {
  border-color: #767676;
  background: linear-gradient(180deg, #303030 0%, #212121 100%);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
}

@media (max-width: 960px) {
  .flight-radar-grid {
    grid-template-columns: 1fr;
  }

  .flight-radar-map {
    height: 380px;
  }

  .flight-radar-aircraft-card {
    align-items: flex-start;
  }

  .flight-radar-aircraft-card-meta {
    align-items: flex-start;
  }

  .flight-radar-aircraft-cards {
    grid-template-columns: 1fr;
  }
}

.map-style-switcher {
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}

.map-style-switcher legend {
  margin: 0 0 8px;
  padding: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--heading);
}

.map-style-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.map-style-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.84rem;
  cursor: pointer;
}

.map-style-option input {
  margin: 0;
}

.settlement-table {
  width: max-content;
  min-width: 1880px;
  max-width: none;
}

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

.metric-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--table-bg);
}

.metric-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--heading);
  font-size: 1.2rem;
}

.expense-split-table {
  width: 100%;
  min-width: 980px;
}

.expense-split-table th,
.expense-split-table td {
  border-right: 1px solid var(--table-border-color);
}

.expense-split-table th:last-child,
.expense-split-table td:last-child {
  border-right: 0;
}

.expense-split-group-row th,
.expense-split-group-row td {
  border-top: 2px solid var(--border-strong);
}

.settlement-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.settlement-summary-group {
  min-width: 0;
}

.settlement-summary-group h3 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.settlement-sheet-table {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.settlement-sheet-table th,
.settlement-sheet-table td {
  padding: 10px 12px;
  font-size: 0.92rem;
}

.settlement-sheet-table th {
  background: var(--table-bg);
  font-weight: 600;
}

.settlement-sheet-table td {
  background: var(--table-bg);
}

.settlement-sheet-row-total th,
.settlement-sheet-row-total td {
  font-weight: 700;
}

.settlement-sheet-row-result th,
.settlement-sheet-row-result td {
  background: var(--table-summary-bg);
  font-weight: 800;
}

.settlement-summary-table {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.settlement-summary-table th,
.settlement-summary-table td {
  padding: 9px 12px;
  font-size: 0.88rem;
}

.settlement-summary-table th {
  width: 65%;
  background: var(--table-head-bg);
  font-weight: 600;
}

.settlement-summary-table td {
  background: var(--table-bg);
}

.settlement-summary-basis {
  margin-top: 18px;
}

.settlement-summary-basis h3 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.settlement-summary-note {
  margin-top: 10px;
}

.settlement-group-row th {
  background: var(--table-group-bg);
  color: var(--table-group-text);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.settlement-table thead tr:last-child th:nth-child(2),
.settlement-table thead tr:last-child th:nth-child(5),
.settlement-table thead tr:last-child th:nth-child(8),
.settlement-table thead tr:last-child th:nth-child(11),
.settlement-table tbody tr > :nth-child(2),
.settlement-table tbody tr > :nth-child(5),
.settlement-table tbody tr > :nth-child(8),
.settlement-table tbody tr > :nth-child(11) {
  border-left: 2px solid var(--border-strong);
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--table-border-color);
  text-align: left;
  vertical-align: middle;
  font-size: 0.89rem;
}

th {
  background: var(--table-head-bg);
  color: var(--table-head-text);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

tr:nth-child(even) td {
  background: var(--table-bg-alt);
}

.number-cell {
  text-align: right;
  white-space: nowrap;
}

.hint {
  color: var(--text-muted);
  font-size: 0.84rem;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.style-guide-page {
  gap: 18px;
}

.style-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.style-guide-row,
.style-guide-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.style-guide-stack {
  align-items: stretch;
  flex-direction: column;
}

.style-guide-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.style-guide-swatch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.style-guide-swatch span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.style-guide-swatch strong {
  overflow: hidden;
  color: var(--heading);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-guide-quality-pills {
  margin-top: 14px;
}

.style-guide-notification-preview .flash-notification-stack {
  position: relative;
  top: auto;
  right: auto;
  width: 100%;
  pointer-events: auto;
}

.style-guide-notification-preview .alert.flash-notification {
  opacity: 1;
  transform: none;
}

.style-guide-tooltip-preview {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.style-guide-tooltip-preview .ui-tooltip {
  position: relative;
  inset: auto;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.style-guide-modal-preview {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.style-guide-modal-preview .revenue-quick-customer-modal-head,
.style-guide-modal-preview .revenue-quick-customer-modal-actions {
  display: flex;
}

.style-guide-modal-preview .revenue-quick-customer-modal-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.style-guide-modal-preview .revenue-quick-customer-modal-head strong {
  display: block;
  color: var(--heading);
  font-size: 1rem;
  margin-bottom: 4px;
}

.style-guide-modal-preview .revenue-quick-customer-modal-head span {
  display: block;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.style-guide-modal-preview .revenue-quick-customer-modal-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.style-guide-map-demo {
  position: relative;
  min-height: 220px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 24% 34%, color-mix(in srgb, var(--primary) 20%, transparent) 0 9px, transparent 10px),
    radial-gradient(circle at 72% 58%, color-mix(in srgb, var(--success) 20%, transparent) 0 11px, transparent 12px),
    linear-gradient(135deg, color-mix(in srgb, var(--panel-soft) 86%, var(--primary) 14%), var(--panel));
}

.style-guide-map-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--border) 56%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border) 56%, transparent) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.42;
}

.style-guide-map-marker {
  position: absolute;
  z-index: 1;
  width: 14px;
  height: 14px;
  border: 3px solid var(--panel);
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.style-guide-map-marker-a {
  top: 76px;
  left: 28%;
}

.style-guide-map-marker-b {
  right: 24%;
  bottom: 56px;
}

.style-guide-map-demo .leaflet-tooltip.mission-route-map-tooltip {
  position: absolute;
  top: 58px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  opacity: 1;
}

.style-guide-map-demo .leaflet-tooltip.mission-route-map-tooltip::before {
  content: "";
}

@media (max-width: 1280px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .settlement-summary-grid,
  .expense-split-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.is-authenticated .app-shell,
  body.is-guest .app-shell {
    padding: 0 14px 14px;
  }

  body.is-authenticated .app-topbar,
  body.is-guest .app-topbar {
    position: static;
    margin: 0 -14px 16px;
    padding: 12px 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .header,
  .grid-2,
  .stats-grid,
  .entry-layout,
  .dashboard-layout,
  .style-guide-grid,
  .settlement-summary-grid,
  .expense-split-summary-grid {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    width: auto;
    margin-bottom: 16px;
    border-radius: 0 0 8px 8px;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-topbar-search-slot {
    width: 100%;
    min-width: 0;
  }

  .topbar-global-search {
    width: 100%;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-8,
  .span-12 {
    grid-column: span 1;
  }

  .app-locale-switch {
    order: 3;
    width: 100%;
    justify-content: flex-end;
  }
}
