:root {
  --navy: #172b45;
  --navy-soft: #28415f;
  --line: #d7dee8;
  --muted: #64748b;
  --text: #07111f;
  --page: #f7f9fb;
  --panel: #ffffff;
  --blue: #0f3a6f;
  --login-bg-start: #0f3a6f;
  --login-bg-end: #172b45;
  --green: #16a34a;
  --orange: #d97706;
  --red: #dc2626;
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 1100px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--login-bg-start), var(--login-bg-end));
}
.login-card {
  width: min(420px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  display: grid;
  gap: 16px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(0,0,0,.24);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.login-brand-logo {
  width: 58px;
  height: 58px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.login-brand strong {
  display: block;
  font-weight: 800;
  line-height: 1.2;
}
.login-brand span, .login-hint {
  color: var(--muted);
}
.login-card h1 {
  margin-top: 8px;
}
.login-copyright {
  position: absolute;
  right: 22px;
  bottom: 16px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 700;
}
.login-hint {
  margin: -8px 0 6px;
  font-size: 14px;
}
.login-error {
  min-height: 20px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}
.login-submit {
  width: 100%;
  min-height: 42px;
}
.system-info-widget {
  position: relative;
  min-width: 0;
}
.login-system-info {
  position: absolute;
  left: 22px;
  bottom: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, .8);
}
.login-system-version {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}
.system-info-trigger {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 900;
}
.system-info-trigger span {
  display: block;
  line-height: 1;
}
.system-info-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: none;
  width: min(280px, calc(100vw - 32px));
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}
.login-system-info .system-info-popover {
  top: auto;
  right: auto;
  bottom: calc(100% + 10px);
  left: 0;
}
.system-info-widget:hover .system-info-popover,
.system-info-widget:focus-within .system-info-popover {
  display: grid;
}
.system-info-popover strong,
.system-info-popover span,
.sidebar-system-info strong,
.sidebar-system-info small {
  display: block;
}
.system-info-popover strong {
  font-size: 14px;
}
.system-info-popover span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.theme-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.color-field {
  width: 100%;
  min-height: 44px;
  padding: 4px;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: #eef5ff;
  min-height: 100vh;
}
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: background 0.2s ease;
}

.sidebar .brand:hover {
  background: rgba(255,255,255,.05);
  border-radius: 8px;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 9px;
  background: #f8fafc;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}
svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-icon svg { color: #b6c2d1; width: 28px; height: 28px; }
.brand strong, .account strong { display: block; font-weight: 700; }
.brand span, .account span { color: #a8bdd4; }
.sidebar-system-info {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  margin: 10px 16px 0;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  color: #eaf2ff;
}
.sidebar-system-info strong {
  font-size: 12px;
  line-height: 1.1;
}
.sidebar-system-info .system-info-trigger {
  width: 24px;
  height: 24px;
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: #eaf2ff;
  font-size: 11px;
}
.sidebar-system-info small {
  margin-top: 1px;
  color: #a8bdd4;
  font-size: 10px;
  font-weight: 700;
}
.sidebar-system-info .system-info-popover {
  top: 100%;
  left: 0;
  right: auto;
  margin-top: 10px;
}
.nav {
  display: grid;
  gap: 8px;
  padding: 22px 16px;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  background: transparent;
  color: #b7c6d8;
  font-weight: 650;
  text-align: left;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-item.active, .nav-item:hover {
  background: var(--navy-soft);
  color: #fff;
}
.nav-item:active {
  transform: translateY(1px);
}
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  border-radius: 999px;
  padding: 0 7px;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.account {
  margin-top: auto;
  padding: 20px 20px 24px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.account-profile {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.account-profile:hover {
  background: rgba(255,255,255,.05);
}
.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy-soft);
  font-weight: 800;
  overflow: hidden;
}
.avatar img,
.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logout {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #a8bdd4;
  padding: 12px 0 0;
}
.content {
  padding: 38px 32px 60px;
}
.view { display: none; }
.view.active {
  display: block;
  animation: viewFadeIn .18s ease-out;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.1;
}
.subtitle {
  color: var(--muted);
  font-size: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  font-weight: 650;
}
.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.btn.success {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.btn:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.field:disabled,
.textarea:disabled,
.select:disabled,
.file-input:disabled + .file-upload-box {
  cursor: not-allowed;
  background: #f1f5f9;
  color: #64748b;
}
.btn.ghost {
  border: 0;
  background: transparent;
  color: #001b3d;
}
.btn.danger {
  color: var(--red);
  border-color: #fecaca;
}
.btn.danger:hover {
  background: #fef2f2;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  position: relative;
  min-height: 116px;
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.stat-card span {
  display: block;
  color: #607391;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 38px;
  line-height: 1;
}
.stat-card.compact-value strong {
  max-width: calc(100% - 72px);
  font-size: 28px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.stat-icon {
  position: absolute;
  top: 24px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 9px;
}
.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.navy { background: #e8eef7; color: #0f3a6f; }
.stat-icon.green { background: #dcfce7; color: var(--green); }
.stat-icon.orange { background: #ffedd5; color: var(--orange); }
.dashboard-date-panel {
  margin-bottom: 20px;
}
.dashboard-tabs {
  margin-bottom: 18px;
}
.dashboard-date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}
.dashboard-date-head strong,
.dashboard-date-head span {
  display: block;
}
.dashboard-date-head strong {
  margin-top: 4px;
  font-size: 22px;
}
.dashboard-date-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.dashboard-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.dashboard-date-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 220px)) auto auto;
  align-items: end;
  gap: 12px;
  padding: 0 20px 20px;
  border-top: 1px solid var(--line);
}
.dashboard-date-form label {
  color: #526783;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.dashboard-date-form .field {
  margin-top: 6px;
}
.powerbi-panel {
  min-height: 680px;
}
.powerbi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.powerbi-frame-shell {
  height: min(78vh, 820px);
  min-height: 560px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}
.powerbi-frame-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.powerbi-frame-fallback {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.powerbi-empty {
  min-height: 360px;
  gap: 14px;
}
.dashboard-chart-stats {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.dashboard-chart-card {
  min-height: 330px;
}
.dashboard-chart-card.wide {
  grid-column: 1 / -1;
  min-height: 0;
}
.dashboard-chart-card .panel-header {
  padding: 18px 22px;
}
.dashboard-graph-shell {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.dashboard-svg-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
  fill: none;
  stroke: none;
}
.dashboard-svg-chart text,
.dashboard-donut-svg text {
  stroke: none;
  stroke-width: 0;
  paint-order: fill;
}
.dashboard-svg-grid {
  stroke: #e6edf5;
  stroke-width: 1;
}
.dashboard-svg-axis-line {
  stroke: #b8c7da;
  stroke-width: 1.2;
}
.dashboard-svg-axis {
  fill: #526783;
  font-size: 10.5px;
  font-weight: 400;
}
.dashboard-svg-label {
  fill: #172033;
  font-size: 10.5px;
  font-weight: 600;
}
.dashboard-svg-line {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dashboard-svg-area {
  opacity: .14;
  stroke: none;
}
.dashboard-svg-point {
  stroke: #fff;
  stroke-width: 2;
}
.dashboard-svg-bar {
  filter: none;
  stroke: none;
}
.dashboard-svg-bar-bg {
  fill: #edf3f9;
  stroke: none;
}
.dashboard-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 8px 4px 0;
}
.dashboard-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #526783;
  font-size: 12px;
  font-weight: 650;
}
.dashboard-chart-legend i,
.dashboard-donut-legend i {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 999px;
}
.dashboard-donut-layout {
  display: grid;
  grid-template-columns: minmax(210px, 260px) 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.dashboard-donut-svg {
  display: block;
  width: min(250px, 100%);
  justify-self: center;
  fill: none;
  stroke: none;
}
.dashboard-donut-segment {
  transition: stroke-width .16s ease;
}
.dashboard-donut-segment:hover {
  stroke-width: 39;
}
.dashboard-donut-total {
  fill: #172033;
  font-size: 27px;
  font-weight: 700;
}
.dashboard-donut-caption {
  fill: #64748b;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.dashboard-donut-legend {
  display: grid;
  gap: 10px;
}
.dashboard-donut-legend > div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dashboard-donut-legend strong,
.dashboard-donut-legend span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.dashboard-donut-legend strong {
  color: #172033;
}
.dashboard-donut-legend span {
  color: #64748b;
  font-weight: 600;
  text-align: right;
}
.dashboard-bar-chart {
  display: grid;
  grid-template-columns: repeat(var(--bar-count), minmax(46px, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 250px;
  overflow-x: auto;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
}
.dashboard-bar-item {
  display: grid;
  grid-template-rows: 24px 1fr 20px;
  align-items: end;
  gap: 8px;
  min-width: 46px;
  height: 218px;
}
.dashboard-bar-item strong,
.dashboard-bar-item small {
  display: block;
  overflow: hidden;
  color: #526783;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-bar-track {
  position: relative;
  height: 160px;
  border-radius: 8px 8px 4px 4px;
  background: #eef4fb;
  overflow: hidden;
}
.dashboard-bar-track span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  border-radius: inherit;
  background: linear-gradient(180deg, #22c55e, #2563eb);
}
.dashboard-hbar-list {
  display: grid;
  gap: 14px;
  padding: 4px 20px 22px;
  border-top: 1px solid var(--line);
}
.dashboard-hbar-row {
  display: grid;
  gap: 8px;
}
.dashboard-hbar-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.dashboard-hbar-label strong,
.dashboard-hbar-label span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.dashboard-hbar-label strong {
  color: #172033;
  font-size: 14px;
}
.dashboard-hbar-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}
.dashboard-hbar-track {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}
.dashboard-hbar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f3a6f, #22c55e);
}
.dashboard-chart-table th,
.dashboard-chart-table td {
  padding: 12px 18px;
}
.dashboard-chart-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 230px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}
.dashboard-chart-empty svg {
  width: 26px;
  height: 26px;
  color: #94a3b8;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px;
}
.panel-title {
  margin: 0;
  font-size: 20px;
}
.route-map-panel {
  margin-bottom: 30px;
}
.route-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 0;
  border-top: 1px solid var(--line);
}
.route-map {
  position: relative;
  height: 320px;
  min-height: 320px;
  overflow: hidden;
  background: #edf4fb;
}
.route-map.leaflet-container,
.route-map .leaflet-container {
  font: inherit;
}
.route-map.leaflet-container {
  isolation: isolate;
  outline: 0;
}
.route-map .leaflet-pane,
.route-map .leaflet-tile,
.route-map .leaflet-marker-icon,
.route-map .leaflet-marker-shadow,
.route-map .leaflet-tile-container,
.route-map .leaflet-pane > svg,
.route-map .leaflet-pane > canvas,
.route-map .leaflet-zoom-box,
.route-map .leaflet-image-layer,
.route-map .leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}
.route-map .leaflet-tile-pane { z-index: 200; }
.route-map .leaflet-overlay-pane { z-index: 400; }
.route-map .leaflet-shadow-pane { z-index: 500; }
.route-map .leaflet-marker-pane { z-index: 600; }
.route-map .leaflet-tooltip-pane { z-index: 650; }
.route-map .leaflet-popup-pane { z-index: 700; }
.route-map .leaflet-container svg,
.route-map.leaflet-container svg {
  width: auto;
  height: auto;
}
.route-map .leaflet-tile {
  width: 256px;
  height: 256px;
  max-width: none !important;
  user-select: none;
}
.route-map .leaflet-control-container {
  display: none;
}
.route-map .leaflet-interactive {
  cursor: pointer;
}
.route-map .leaflet-popup {
  position: absolute;
  margin-bottom: 18px;
  text-align: center;
}
.route-map .leaflet-popup-content-wrapper {
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .22);
}
.route-map .leaflet-popup-content {
  margin: 10px 12px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}
.route-map .leaflet-popup-tip-container {
  position: absolute;
  left: 50%;
  width: 34px;
  height: 18px;
  margin-left: -17px;
  overflow: hidden;
  pointer-events: none;
}
.route-map .leaflet-popup-tip {
  width: 14px;
  height: 14px;
  margin: -8px auto 0;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
}
.route-map .leaflet-popup-close-button {
  position: absolute;
  top: 4px;
  right: 6px;
  color: #475569;
  text-decoration: none;
}
.route-map-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
  z-index: 1;
}
.route-map-loading svg {
  width: 28px;
  height: 28px;
  color: #94a3b8;
}
.route-map-fallback {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f4ff 0%, #f8fbff 100%);
}
.route-map-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.route-map-water {
  fill: #eaf5ff;
}
.route-map-brazil {
  fill: #f6faf4;
  stroke: #b8c7b1;
  stroke-width: 3;
}
.route-map-region-label {
  fill: #7a8b77;
  font-size: 22px;
  font-weight: 800;
  text-anchor: middle;
  opacity: .72;
  pointer-events: none;
}
.route-map-svg-route line {
  stroke: var(--route-color);
  stroke-width: 4;
  stroke-linecap: round;
  opacity: .72;
}
.route-map-svg-points circle {
  stroke: var(--route-color);
  stroke-width: 3;
}
.route-map-origin {
  fill: #fff;
}
.route-map-destination {
  fill: var(--route-color);
}
.route-map-code-label {
  fill: #172033;
  font-size: 20px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 5;
  stroke-linejoin: round;
  pointer-events: none;
}
.route-map-fallback-note {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 28px);
  border: 1px solid rgba(148, 163, 184, .45);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  color: #475569;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .12);
}
.route-map-fallback-note svg {
  width: 16px;
  height: 16px;
  color: #d97706;
  flex: 0 0 auto;
}
.route-map-list {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 320px;
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  border-left: 1px solid var(--line);
  background: #f8fafc;
}
.route-item {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  color: var(--text);
  text-align: left;
}
.route-item:hover {
  border-color: #9eb1c9;
  background: #fdfefe;
}
.route-item strong,
.route-item span,
.route-item small {
  display: block;
}
.route-item span {
  color: #334155;
  font-size: 13px;
}
.route-item small {
  color: var(--muted);
  font-size: 12px;
}
.route-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 150px;
  color: var(--muted);
  text-align: center;
}
.route-empty svg {
  width: 26px;
  height: 26px;
  color: #94a3b8;
}
.route-summary {
  border-top: 1px solid var(--line);
  background: #fff;
}
.route-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
}
.route-summary-head strong {
  display: block;
  font-size: 16px;
}
.route-summary-table th,
.route-summary-table td {
  padding: 12px 22px;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.table th {
  color: #64748b;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.table td:last-child, .table th:last-child { text-align: right; }
.table tbody tr[data-order-id],
.table tbody tr[data-expense-id],
.table tbody tr[data-finance-expense-row],
.table tbody tr[data-finance-stay-row] {
  cursor: pointer;
}
.table tbody tr:hover {
  background: #f8fafc;
}
.report-filter-panel {
  margin-bottom: 20px;
}
.report-filter-form {
  padding: 20px;
}
.report-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.report-filter-head strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}
.report-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.report-filter-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 14px;
  align-items: end;
}
.report-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.report-table tbody tr[data-report-target] {
  cursor: pointer;
}
.report-table th:nth-child(6),
.report-table td:nth-child(6) {
  text-align: right;
}
.report-table th:last-child,
.report-table td:last-child {
  text-align: left;
}
.finance-row-alert {
  background: #fff7ed;
}
.table-alert-note {
  display: block;
  margin-top: 6px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}
.table-success-note {
  display: block;
  margin-top: 6px;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
}
.empty {
  display: grid;
  gap: 10px;
  place-items: center;
  min-height: 106px;
  color: #607391;
  font-size: 18px;
}
.empty svg {
  width: 28px;
  height: 28px;
  color: #94a3b8;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.search { flex: 1; }
.toolbar .select {
  flex: 0 0 210px;
  width: auto;
}
.request-command-center {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(320px, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.request-hero,
.request-mini-stats,
.request-lane,
.request-side-card,
.request-form-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.request-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
}
.request-hero h2 {
  margin: 4px 0;
  font-size: 28px;
}
.request-hero span,
.request-side-card p,
.request-card p,
.request-card-meta,
.request-card-foot,
.request-lane-head span,
.request-form-head span {
  color: var(--muted);
}
.request-hero-metrics {
  display: grid;
  place-items: center;
  width: 96px;
  min-width: 96px;
  height: 96px;
  border-radius: 8px;
  background: #edf4fb;
}
.request-hero-metrics strong {
  font-size: 32px;
  line-height: 1;
}
.request-hero-metrics span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.request-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}
.request-mini-stat {
  position: relative;
  padding: 18px;
  background: #fff;
}
.request-mini-stat span,
.request-side-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.request-mini-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}
.request-mini-stat .status-pill {
  position: absolute;
  right: 16px;
  bottom: 16px;
  min-width: 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
}
.request-deadline-banner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #fff7ed;
}
.request-deadline-banner > div {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 260px;
}
.request-deadline-banner svg {
  flex-shrink: 0;
  color: var(--orange);
}
.request-deadline-banner strong,
.request-deadline-banner span,
.request-deadline-banner small {
  display: block;
}
.request-deadline-banner span,
.request-deadline-banner small {
  margin-top: 3px;
  color: #7c2d12;
  font-size: 12px;
  font-weight: 700;
}
.request-deadline-banner ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}
.request-deadline-banner li {
  min-width: 155px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: #fff;
}
.request-batch-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #eff6ff;
}
.request-batch-panel > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}
.request-batch-panel svg {
  flex-shrink: 0;
  color: var(--blue);
}
.request-batch-panel strong,
.request-batch-panel span {
  display: block;
}
.request-batch-panel span {
  margin-top: 3px;
  color: #315981;
  font-size: 12px;
  font-weight: 750;
}
.request-batch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.loading-lot-command {
  margin-bottom: 18px;
}
.loading-lot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px;
}
.loading-lot-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.loading-lot-card.is-overdue {
  border-color: #fed7aa;
  border-left: 4px solid var(--orange);
}
.loading-lot-head {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
}
.loading-lot-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--blue);
}
.loading-lot-mark svg {
  width: 20px;
  height: 20px;
}
.loading-lot-head strong,
.loading-lot-head small {
  display: block;
}
.loading-lot-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.loading-lot-route {
  display: grid;
  gap: 5px;
  min-height: 54px;
  padding: 12px;
  border-radius: 7px;
  background: #f8fafc;
}
.loading-lot-route strong,
.loading-lot-route span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.loading-lot-route span {
  color: #315981;
  font-size: 13px;
  font-weight: 800;
}
.loading-lot-route svg {
  width: 15px;
  height: 15px;
}
.loading-lot-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.loading-lot-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #315981;
  font-size: 12px;
  font-weight: 800;
}
.loading-lot-meta svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}
.loading-lot-progress {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}
.loading-lot-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #315981;
  font-size: 12px;
  font-weight: 800;
}
.loading-lot-progress-label strong,
.loading-lot-progress-label span {
  min-width: 0;
}
.loading-lot-progress-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
}
.loading-lot-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #22c55e);
  transition: width 0.25s ease;
}
.loading-lot-progress.is-complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.loading-lot-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.linked-request-list {
  display: grid;
  gap: 10px;
}
.linked-request-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  text-align: left;
}
.linked-request-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.request-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.request-lane {
  min-height: 260px;
  overflow: hidden;
  box-shadow: none;
}
.request-lane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.request-lane-head strong,
.request-card h3,
.request-side-card strong {
  display: block;
}
.request-lane-head b {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e8eef7;
  color: var(--blue);
}
.request-lane-list {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
}
.request-lane-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: var(--muted);
  font-weight: 700;
}
.request-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
}
.request-card:hover {
  border-color: #9eb1c9;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}
.request-card-selectable {
  border-color: #bfdbfe;
}
.request-card-top,
.request-card-foot,
.request-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.request-card h3 {
  margin: 0;
  font-size: 16px;
}
.request-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.request-batch-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
}
.request-batch-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.request-batch-check span {
  width: 18px;
  height: 18px;
  border: 2px solid #93b4da;
  border-radius: 5px;
  background: #fff;
}
.request-batch-check input:checked + span {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: inset 0 0 0 3px #fff;
}
.request-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}
.request-card-meta {
  align-items: flex-start;
  flex-direction: column;
  font-size: 12px;
}
.request-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.request-card-meta svg {
  width: 14px;
  height: 14px;
}
.request-card-foot {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}
.request-editor {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.request-side-panel {
  display: grid;
  gap: 14px;
}
.request-side-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  box-shadow: none;
}
.request-side-card strong {
  margin-top: 4px;
  font-size: 18px;
}
.request-side-card p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
}
.request-checklist {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.request-checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-weight: 750;
}
.request-checklist li.done {
  color: #166534;
}
.request-checklist svg {
  width: 16px;
  height: 16px;
}
.request-form-panel {
  overflow: visible;
}
.request-form {
  padding: 22px;
}
.request-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.request-form-head h2 {
  margin: 4px 0;
}
.request-form-head label {
  min-width: 210px;
}
.request-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.request-form-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  box-shadow: none;
}
.request-form-card.wide {
  grid-column: 1 / -1;
}
.request-delete-actions {
  padding: 0 22px 22px;
}
.loading-order-analysis {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}
.loading-order-analysis svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.field, .textarea, .select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  padding: 8px 12px;
  color: var(--text);
}
.field.with-icon {
  padding-left: 36px;
}
.input-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
  transition: flex-basis .18s ease, flex-grow .18s ease, min-width .18s ease;
}
.input-wrap.expandable-search {
  cursor: text;
}
.input-wrap.search-expanded {
  flex: 8 1 520px;
  min-width: min(100%, 420px);
}
.input-wrap.search-expanded .field {
  border-color: #3b6ea8;
  box-shadow: 0 0 0 3px rgba(15, 58, 111, .08);
}
.input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
}
.field:focus, .textarea:focus, .select:focus {
  outline: 2px solid rgba(15, 58, 111, .2);
  border-color: #3b6ea8;
}
.file-upload {
  position: relative;
}
.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 14px;
  border: 1px dashed #9eb1c9;
  border-radius: 7px;
  background: #f8fafc;
  color: #0f3a6f;
}
.file-upload-box svg {
  width: 26px;
  height: 26px;
}
.file-upload-box strong,
.file-upload-box span {
  display: block;
}
.file-upload-box span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.attachment-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  background: #f0fdf4;
}
.attachment-preview > div,
.attachment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.attachment-preview strong,
.attachment-preview span {
  display: block;
}
.attachment-preview span {
  color: #166534;
  font-size: 12px;
}
.attachment-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.proof-readonly {
  display: grid;
  gap: 8px;
}
.proof-label {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}
.payment-proof-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
}
.payment-proof-empty svg {
  width: 22px;
  height: 22px;
  color: #94a3b8;
}
.textarea {
  min-height: 72px;
  resize: vertical;
}
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  min-height: 44px;
  padding: 0 14px;
  color: #93a3b7;
  font-weight: 650;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}
.tab.active {
  color: var(--text);
  border-color: var(--blue);
}
.tab:hover {
  background: #f8fafc;
  color: var(--text);
}
.tab:active {
  transform: translateY(1px);
}
.tabs + .form-body,
.tabs ~ .form-body {
  animation: tabContentFadeIn .16s ease-out;
}
@keyframes viewFadeIn {
  from {
    opacity: .88;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes tabContentFadeIn {
  from {
    opacity: .9;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
.locked-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}
.locked-note.lock-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.flow-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 6px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.flow-status span,
.flow-status small {
  display: block;
  color: var(--muted);
}
.flow-status span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.flow-status strong {
  display: block;
  margin: 4px 0;
  font-size: 20px;
}
.flow-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.advance-request-card {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}
.advance-request-head,
.advance-request-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.advance-request-head span,
.advance-request-head strong,
.advance-request-total span,
.advance-request-total strong {
  display: block;
}
.advance-request-head > div > span,
.advance-request-total span,
.advance-request-actions small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.advance-request-head strong {
  margin-top: 4px;
  font-size: 18px;
}
.advance-request-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) repeat(2, minmax(140px, 180px));
  gap: 14px;
  align-items: end;
}
.advance-request-grid .wide {
  grid-column: 1 / -1;
}
.advance-request-total {
  min-height: 62px;
  padding: 12px;
  border: 1px solid #fdba74;
  border-radius: 7px;
  background: #fff;
}
.advance-request-total strong {
  margin-top: 5px;
  font-size: 20px;
}
.advance-request-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: #fff;
  color: #9a3412;
}
.advance-request-meta svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.advance-request-meta strong,
.advance-request-meta span {
  display: block;
}
.advance-request-meta span {
  margin-top: 2px;
  color: #7c2d12;
  font-size: 12px;
}
.bank-details-card {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
}
.bank-details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.bank-details-head span,
.bank-details-head strong {
  display: block;
}
.bank-details-head > div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.bank-details-head strong {
  margin-top: 4px;
  font-size: 18px;
}
.bank-details-grid {
  margin-bottom: 0;
}
.bank-details-summary-card {
  gap: 12px;
}
.bank-details-summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}
.bank-details-summary-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
}
.bank-details-summary-icon svg {
  width: 22px;
  height: 22px;
}
.bank-details-summary strong,
.bank-details-summary span {
  display: block;
}
.bank-details-summary strong {
  color: #0f172a;
  line-height: 1.35;
}
.bank-details-summary span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}
.bank-details-summary .btn {
  white-space: nowrap;
}
.modal.bank-details-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.bank-details-modal .modal-head {
  align-items: flex-start;
}
.bank-details-modal .section-label {
  margin: 0 0 4px;
}
.bank-details-modal-grid {
  margin-bottom: 0;
}
.bank-confirm {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #334155;
}
.bank-confirm input {
  margin-top: 2px;
  flex-shrink: 0;
}
.bank-confirm span {
  line-height: 1.35;
}
.bank-details-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}
.bank-details-meta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.form-body {
  padding: 22px;
}
.section-label {
  margin: 0 0 14px;
  color: #607391;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  margin-bottom: 24px;
}
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}
.field-hint {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}
.status-pill.aguardando { background: #ffedd5; color: #9a3412; }
.status-pill.transito { background: #dbeafe; color: #1d4ed8; }
.status-pill.entregue { background: #dcfce7; color: #166534; }
.status-pill.ocorrencia { background: #fee2e2; color: #991b1b; }
.company-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
}
.company-pill.own { background: #dcfce7; color: #166534; }
.company-pill.third-party { background: #ffedd5; color: #9a3412; }
.company-pill.unknown { background: #e2e8f0; color: #334155; }
.order-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
}
.order-type-pill.travel {
  background: #dbeafe;
  color: #1d4ed8;
}
.order-type-pill.stay-active {
  background: #ffedd5;
  color: #9a3412;
}
.order-type-pill.stay-resolved {
  background: #dcfce7;
  color: #166534;
}
.order-type-summary {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}
.order-type-summary.stay-active {
  border-color: #fed7aa;
  background: #fff7ed;
}
.order-type-summary.stay-resolved {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.order-type-summary span,
.order-type-summary strong {
  display: block;
}
.order-type-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.order-type-summary strong {
  margin-top: 4px;
  font-size: 22px;
}
.order-type-summary p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.muted-line {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.order-integration-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.order-integration-summary > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.order-integration-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.order-integration-summary strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.order-integration-summary .company-pill {
  display: inline-flex;
  margin-top: 0;
  font-size: 11px;
}
.order-integration-summary small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.cte-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.cte-document-actions .btn {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}
.payment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.payment-summary > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.payment-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.payment-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}
.payment-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.finance-alert-panel {
  margin-bottom: 22px;
  border-color: #fed7aa;
}
.finance-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
}
.finance-alert-head h2 {
  margin: 0;
  font-size: 20px;
}
.finance-alert-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  padding: 16px;
}
.finance-alert-item {
  display: grid;
  gap: 5px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  color: var(--text);
  text-align: left;
}
.finance-alert-item:hover {
  border-color: #fb923c;
  background: #fffbf7;
}
.finance-alert-item strong,
.finance-alert-item span,
.finance-alert-item small {
  display: block;
}
.finance-alert-item span {
  color: #334155;
}
.finance-alert-item small {
  color: var(--muted);
  font-size: 12px;
}
.finance-stay-panel {
  margin-bottom: 22px;
  border-color: #fed7aa;
}
.payment-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.payment-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.payment-box-head h3 {
  margin: 0;
  font-size: 16px;
}
.payment-box .form-grid {
  grid-template-columns: 1fr;
  margin: 0;
  padding: 16px;
}
.expense-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.occurrence-list {
  display: grid;
  gap: 12px;
}
.occurrence-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.occurrence-card > div:first-child {
  min-width: 0;
}
.occurrence-card.incident-card {
  align-items: flex-start;
}
.stay-occurrence-card {
  border-color: #fed7aa;
  background: #fffaf4;
}
.stay-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.stay-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}
.stay-origin-box {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fffaf4;
}
.stay-origin-box span,
.stay-lock-note {
  color: #9a3412;
  font-weight: 800;
}
.stay-lock-banner {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}
.occurrence-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.occurrence-card p {
  margin: 10px 0 6px;
  color: #334155;
}
.occurrence-card small {
  color: var(--muted);
}
.occurrence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.incident-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.incident-summary > div {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.incident-summary span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.incident-summary strong {
  font-size: 28px;
}
.incident-list {
  padding: 16px;
}
.placeholder-page {
  display: grid;
  place-items: center;
  min-height: 320px;
  color: var(--muted);
  text-align: center;
}
.filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  min-height: 30px;
  padding: 0 12px;
  color: #475569;
}
.chip.active {
  border-color: #3b6ea8;
  background: #eff6ff;
  color: #0f3a6f;
  font-weight: 800;
}
.support-status-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.support-status-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.support-status-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.support-status-card strong {
  font-size: 30px;
  line-height: 1;
}
.support-status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.ticket-list {
  display: grid;
  gap: 12px;
}
.ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.ticket-main {
  min-width: 0;
}
.ticket-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ticket-code {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}
.ticket-main small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.support-chat-panel {
  margin-top: 18px;
}
.support-attachments-panel {
  margin-top: 18px;
}
.support-attachment-list {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}
.support-attachment-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.support-attachment-preview {
  display: grid;
  place-items: center;
  width: 74px;
  height: 58px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eff6ff;
  color: #3b6ea8;
}
.support-attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.support-attachment-preview svg {
  width: 26px;
  height: 26px;
}
.support-attachment-item strong,
.support-attachment-item span,
.support-attachment-item small {
  display: block;
}
.support-attachment-item span,
.support-attachment-item small {
  color: var(--muted);
  font-size: 12px;
}
.support-attachment-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 110px;
  color: var(--muted);
  text-align: center;
}
.support-attachment-empty svg {
  width: 28px;
  height: 28px;
  color: #94a3b8;
}
.support-attachment-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.support-attachment-form .btn {
  justify-self: end;
}
.support-chat-list {
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: 360px;
  overflow: auto;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}
.support-chat-message {
  position: relative;
  display: grid;
  gap: 6px;
  width: min(76%, 720px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.support-chat-message.other {
  justify-self: start;
  border-bottom-left-radius: 2px;
}
.support-chat-message.own {
  justify-self: end;
  border-color: #bfdbfe;
  border-bottom-right-radius: 2px;
  background: #eff6ff;
}
.support-chat-message > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.support-chat-message strong {
  font-size: 14px;
}
.support-chat-message.own strong {
  color: #0f3a6f;
}
.support-chat-message span,
.support-chat-message small {
  color: var(--muted);
  font-size: 12px;
}
.support-chat-read {
  color: #3b6ea8;
  font-weight: 800;
}
.support-chat-message.own small {
  text-align: right;
}
.support-chat-message p {
  margin: 0;
  color: #1f2937;
  line-height: 1.5;
  white-space: pre-wrap;
}
.support-chat-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 130px;
  color: var(--muted);
  text-align: center;
}
.support-chat-empty svg {
  width: 28px;
  height: 28px;
  color: #94a3b8;
}
.support-chat-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.support-chat-form .btn {
  justify-self: end;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.76);
  z-index: 20;
}
.modal-backdrop[hidden] {
  display: none;
}
.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}
.toast {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
  animation: toast-in .18s ease-out;
}
.toast.warning {
  border-color: #fed7aa;
  border-left-color: var(--orange);
}
.toast.error {
  border-color: #fecaca;
  border-left-color: var(--red);
}
.toast.leaving {
  animation: toast-out .2s ease-in forwards;
}
.toast-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #dcfce7;
  color: var(--green);
}
.toast.warning .toast-icon {
  background: #ffedd5;
  color: var(--orange);
}
.toast.error .toast-icon {
  background: #fee2e2;
  color: var(--red);
}
.toast strong,
.toast span {
  display: block;
}
.toast span {
  margin-top: 2px;
  color: #334155;
  font-size: 13px;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px); }
}
.profile-drawer {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  justify-items: end;
}
.profile-drawer[hidden] {
  display: none !important;
}
.profile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.profile-drawer-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100vw);
  height: 100vh;
  overflow: auto;
  background: #fff;
  box-shadow: -20px 0 45px rgba(0,0,0,.22);
  padding: 24px;
}
.profile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.profile-drawer-head h2 {
  margin: 0;
}
.profile-form {
  display: grid;
  gap: 18px;
}
.profile-photo-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 16px;
}
.profile-photo-preview {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #e8eef7;
  color: var(--navy);
  font-size: 28px;
  font-weight: 800;
  overflow: hidden;
}
.profile-photo-upload {
  align-self: stretch;
  justify-content: center;
}
.profile-permissions {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.profile-permissions .permission-item {
  margin-top: 10px;
  border-color: #cbd5e1;
  background: #fff;
}
.profile-actions {
  justify-content: space-between;
}
.company-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 30;
}
.company-modal[hidden] {
  display: none !important;
}
.company-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.68);
}
.company-modal-content {
  position: relative;
  z-index: 1;
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
}
.modal {
  width: min(420px, calc(100vw - 32px));
  background: #fff;
  border-radius: 5px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal-head h2 {
  margin: 0;
  font-size: 17px;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #475569;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.user-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 20px;
  align-items: start;
}
.user-grid.single {
  grid-template-columns: 1fr;
}
.user-form {
  padding: 22px;
}
.users-table .clickable-row {
  cursor: pointer;
}
.users-table .clickable-row:hover {
  background: #f8fafc;
}
.users-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.users-table {
  min-width: 1080px;
}
.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-access-cell strong,
.user-access-cell span {
  display: block;
}
.user-access-cell strong {
  color: #1f2937;
  font-size: 13px;
}
.user-access-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.user-mini-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e8eef7;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}
img.user-mini-avatar {
  object-fit: cover;
}
.profile-avatar-content {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
img.profile-avatar-content {
  object-fit: cover;
}
.helper-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* Regras e Permissoes */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.role-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.role-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--navy);
  color: white;
}

.role-card-header strong {
  font-size: 16px;
}

.role-permissions {
  padding: 8px 0;
  max-height: 400px;
  overflow-y: auto;
}

.permission-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.permission-item input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.permission-item > span:first-of-type {
  flex: 1;
}

.permission-item:last-child {
  border-bottom: none;
}

.permission-item.locked {
  cursor: not-allowed;
  opacity: .78;
}

.permission-item.locked input {
  cursor: not-allowed;
}

.permission-item.allowed {
  background: rgba(16, 185, 129, 0.05);
}

.permission-item.denied {
  background: rgba(239, 68, 68, 0.05);
}

.permission-item .permission-icon {
  min-width: 46px;
  font-size: 11px;
  font-weight: bold;
  text-align: right;
  text-transform: uppercase;
}

.permission-item.allowed .permission-icon {
  color: var(--green);
}

.permission-item.denied .permission-icon {
  color: var(--orange);
}

.permission-note {
  margin: 10px 16px;
}

.backup-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.backup-action-row strong,
.backup-action-row span {
  display: block;
}
.backup-action-row strong {
  font-size: 18px;
}
.backup-action-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.backup-file-input {
  display: none;
}

.reset-role {
  width: calc(100% - 32px);
  margin: 8px 16px 14px;
}

.settings-tabs {
  padding-top: 0;
}

.payment-method-form {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.payment-method-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.payment-method-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.payment-method-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.payment-method-name-control {
  flex: 1;
  min-width: 220px;
}

.payment-method-name-control label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.payment-method-name-control .field {
  max-width: 420px;
}

.payment-method-item span {
  display: block;
}

.payment-method-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.payment-method-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-method-item .icon-btn {
  flex: 0 0 auto;
  border: 1px solid transparent;
  color: #b91c1c;
  cursor: pointer;
}

.payment-method-item .icon-btn:hover:not(:disabled) {
  border-color: #fecaca;
  background: #fef2f2;
}

.payment-method-item .icon-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: .6;
}

.log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

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

.log-item {
  display: grid;
  grid-template-columns: 1fr minmax(170px, 220px);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.log-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.log-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.log-main p {
  margin: 8px 0 0;
  color: #334155;
}

.log-changes {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
}

.log-changes span {
  color: var(--muted);
}

.log-meta {
  display: grid;
  align-content: start;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.log-meta strong {
  color: var(--text);
  font-size: 13px;
}

.integration-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.integration-summary .stat-card {
  min-height: 104px;
  padding: 18px;
}

.integration-summary .stat-card strong {
  max-width: calc(100% - 58px);
  font-size: 26px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.integration-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.integration-action-row strong,
.integration-action-row span {
  display: block;
}

.integration-action-row strong {
  font-size: 18px;
}

.integration-action-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.inline-action-form {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(420px, 100%);
}

.inline-action-form .field {
  min-width: 210px;
}

.integration-message {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}

.integration-message.success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.integration-message.error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.integration-env-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.integration-env-grid > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.integration-env-grid span,
.integration-env-grid strong {
  display: block;
}

.integration-env-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.integration-env-grid strong {
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.integration-import-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.integration-import-copy strong,
.integration-import-copy span {
  display: block;
}

.integration-import-copy strong {
  font-size: 18px;
}

.integration-import-copy span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.integration-file-field {
  min-width: 0;
}

.integration-import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.integration-history {
  display: grid;
  gap: 12px;
}

.integration-history-item {
  display: grid;
  grid-template-columns: 1fr minmax(160px, 220px);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.integration-history-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.integration-history-item p {
  margin: 10px 0 0;
  color: #334155;
}

.integration-history-meta {
  display: grid;
  align-content: start;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.integration-history-meta strong {
  color: var(--text);
  font-size: 13px;
}

@media (max-width: 900px) {
  body { min-width: 0; }
  .login-screen { padding-bottom: 78px; }
  .login-system-info {
    left: 16px;
    bottom: 40px;
  }
  .system-info-popover {
    width: min(280px, calc(100vw - 24px));
  }
  .theme-color-grid { grid-template-columns: 1fr; }
  .login-copyright {
    right: 16px;
    left: 16px;
    text-align: center;
  }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; }
  .sidebar-system-info {
    margin: 12px 16px 0;
  }
  .nav { grid-template-columns: repeat(2, 1fr); }
  .account { display: none; }
  .page-header,
  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .page-actions .btn {
    width: 100%;
  }
  .toolbar { align-items: stretch; }
  .toolbar .input-wrap,
  .toolbar .input-wrap.search-expanded,
  .toolbar .select {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }
  .dashboard-date-head {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-preset-row {
    justify-content: flex-start;
  }
  .dashboard-date-form {
    grid-template-columns: 1fr;
  }
  .dashboard-date-form .btn {
    width: 100%;
  }
  .dashboard-chart-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-hbar-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .dashboard-hbar-label span {
    text-align: left;
  }
  .dashboard-donut-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-donut-legend > div {
    grid-template-columns: 10px minmax(0, 1fr);
  }
  .dashboard-donut-legend span {
    grid-column: 2;
    text-align: left;
  }
  .order-type-summary {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .order-type-summary .btn {
    width: 100%;
  }
  .powerbi-panel {
    min-height: 520px;
  }
  .powerbi-actions {
    justify-content: stretch;
  }
  .powerbi-actions .btn {
    width: 100%;
  }
  .powerbi-frame-shell {
    height: 72vh;
    min-height: 420px;
  }
  .report-filter-head {
    align-items: stretch;
    flex-direction: column;
  }
  .report-preset-row,
  .report-action-row {
    justify-content: stretch;
  }
  .report-filter-grid,
  .stats-grid, .form-grid, .form-grid.four { grid-template-columns: 1fr; }
  .request-command-center,
  .request-board,
  .request-editor,
  .request-form-grid,
  .request-mini-stats {
    grid-template-columns: 1fr;
  }
  .request-deadline-banner,
  .request-hero,
  .request-form-head,
  .request-card-top,
  .request-card-foot {
    align-items: stretch;
    flex-direction: column;
  }
  .request-deadline-banner ul {
    justify-content: stretch;
  }
  .request-deadline-banner li {
    flex: 1 1 100%;
  }
  .loading-lot-grid,
  .loading-lot-meta,
  .linked-request-row {
    grid-template-columns: 1fr;
  }
  .loading-lot-head {
    grid-template-columns: 24px 1fr;
  }
  .loading-lot-head .status-pill {
    justify-self: start;
    grid-column: 2;
  }
  .loading-lot-actions {
    justify-content: stretch;
  }
  .loading-lot-progress-label {
    align-items: flex-start;
    flex-direction: column;
  }
  .loading-lot-actions .btn {
    width: 100%;
  }
  .request-hero-metrics {
    width: 100%;
    height: auto;
    min-width: 0;
    padding: 18px;
  }
  .request-form-head label {
    min-width: 0;
  }
  .report-action-row .btn { width: 100%; }
  .user-grid, .two-cols, .payment-summary, .payment-dual-grid, .support-status-board, .order-integration-summary { grid-template-columns: 1fr; }
  .route-map-layout { grid-template-columns: 1fr; }
  .route-map-list {
    height: auto;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .route-summary-head { align-items: flex-start; flex-direction: column; }
  .flow-actions { align-items: stretch; flex-direction: column; }
  .expense-actions { align-items: stretch; flex-direction: column; }
  .expense-actions .btn { width: 100%; }
  .advance-request-head, .advance-request-actions, .bank-details-head, .finance-alert-head { align-items: stretch; flex-direction: column; }
  .advance-request-grid, .finance-alert-list { grid-template-columns: 1fr; }
  .bank-details-summary {
    grid-template-columns: 40px 1fr;
    align-items: start;
  }
  .bank-details-summary .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .flow-buttons { justify-content: stretch; }
  .flow-buttons .btn { width: 100%; }
  .advance-request-actions .btn { width: 100%; }
  .attachment-preview { align-items: stretch; flex-direction: column; }
  .attachment-actions { justify-content: stretch; }
  .attachment-actions .btn { width: 100%; }
  .ticket { align-items: stretch; flex-direction: column; }
  .support-attachment-item {
    grid-template-columns: 58px 1fr;
  }
  .support-attachment-preview {
    width: 58px;
    height: 52px;
  }
  .support-attachment-item .btn,
  .support-attachment-form .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .support-chat-message {
    width: min(88%, 720px);
  }
  .log-item { grid-template-columns: 1fr; }
  .log-meta { text-align: left; }
  .backup-action-row { align-items: stretch; flex-direction: column; }
  .backup-actions { justify-content: stretch; }
  .backup-actions .btn { width: 100%; }
  .payment-method-actions { justify-content: stretch; }
  .payment-method-actions .btn { width: 100%; }
  .payment-method-item { align-items: stretch; flex-direction: column; }
  .payment-method-name-control .field { max-width: none; }
  .payment-method-item-actions { justify-content: stretch; }
  .payment-method-item-actions .btn { flex: 1; }
  .payment-method-item .icon-btn { align-self: flex-end; }
  .incident-summary { grid-template-columns: 1fr; }
  .occurrence-card { align-items: stretch; flex-direction: column; }
  .occurrence-actions { justify-content: stretch; }
  .occurrence-actions .btn { width: 100%; }
  .support-chat-form .btn { width: 100%; }
  .integration-action-row { align-items: stretch; flex-direction: column; }
  .integration-action-row .btn { width: 100%; }
  .inline-action-form { align-items: stretch; flex-direction: column; min-width: 0; }
  .inline-action-form .field { min-width: 0; width: 100%; }
  .integration-env-grid, .integration-import-card, .integration-history-item { grid-template-columns: 1fr; }
  .integration-import-actions { justify-content: stretch; }
  .integration-import-actions .btn { width: 100%; }
  .integration-history-meta { text-align: left; }
  .content { padding: 24px 16px; }
  .table { min-width: 760px; }
  .panel { overflow-x: auto; }
}

/* Ticket Section Styles for Finance Payment View */
.ticket-section {
  margin-bottom: 24px;
}

.ticket-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

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

.ticket-info svg {
  width: 24px;
  height: 24px;
  color: var(--blue);
}

.ticket-info strong {
  display: block;
  font-size: 14px;
}

.ticket-info span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ticket-actions .btn {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.empty-ticket {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
}

.empty-ticket svg {
  width: 24px;
  height: 24px;
  color: #94a3b8;
}
