:root {
  --bg-body: #f0f4f8;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.92);
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-light: rgba(13, 148, 136, 0.08);
  --accent-glow: rgba(13, 148, 136, 0.15);
  --danger: #ef4444;
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.12);
  --success: #059669;
  --success-light: rgba(5, 150, 105, 0.12);
  --footer-bg-start: #0f172a;
  --footer-bg-mid: #0f766e;
  --footer-bg-end: #0891b2;
  --footer-highlight: #99f6e4;
  --footer-text: rgba(240, 253, 250, 0.94);
  --footer-muted: rgba(204, 251, 241, 0.72);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 26px -8px rgba(0, 0, 0, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text-primary);
  background:
    radial-gradient(circle at 92% 5%, rgba(13, 148, 136, 0.28), transparent 45%),
    radial-gradient(circle at 12% 0%, rgba(2, 132, 199, 0.22), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(14, 165, 233, 0.18), transparent 50%),
    var(--bg-body);
}

body.site-shell {
  display: flex;
  flex-direction: column;
}

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

input,
select,
button,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-primary);
  padding: 10px 12px;
  outline: none;
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

button.secondary {
  background: var(--bg-white);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

button.secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

button.btn-cancel {
  background: var(--bg-white);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
}

button.btn-cancel:hover {
  color: #fff;
  border-color: var(--danger);
  background: var(--danger);
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.auth-body {
  min-height: 100vh;
}

.auth-main {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-container {
  width: 100%;
  max-width: 420px;
  perspective: 1000px;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 26px;
}

.login-header img {
  height: 72px;
  width: auto;
  margin-bottom: 10px;
}

.login-header h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
}

.login-header p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.form-group {
  margin: 0;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.form-control {
  padding-left: 36px;
}

.btn-submit {
  margin-top: 6px;
  padding: 12px 16px;
  width: 100%;
  font-size: 0.95rem;
}

.auth-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-weight: 600;
}

.auth-warning {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
  color: #9a3412;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.auth-warning[hidden] {
  display: none !important;
}

.remember-row {
  margin-top: -4px;
}

.remember-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.remember-check input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.site-footer {
  position: relative;
  overflow: hidden;
  color: var(--footer-text);
  background:
    radial-gradient(circle at top left, rgba(153, 246, 228, 0.16), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(34, 211, 238, 0.18), transparent 28%),
    linear-gradient(140deg, var(--footer-bg-start) 0%, #12384b 34%, var(--footer-bg-mid) 68%, var(--footer-bg-end) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.06) 46%, transparent 100%);
  opacity: 0.6;
  pointer-events: none;
}

.site-footer__wrap,
.site-footer__bar {
  position: relative;
  z-index: 1;
}

.site-footer__wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 18px 16px;
  display: grid;
  grid-template-columns: 0.95fr 0.9fr 1.15fr 1.15fr;
  gap: 16px;
}

.site-footer__section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.site-footer__section--compact {
  align-self: start;
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 7px;
}

.site-footer__eyebrow,
.site-footer__section h3 {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--footer-highlight);
}

.site-footer__section p {
  margin: 0;
  color: var(--footer-text);
  line-height: 1.5;
  font-size: 0.88rem;
}

.site-footer__address {
  line-height: 1.75;
}

.site-footer__company-copy a {
  color: #ffd1d9;
}

.site-footer__company-copy a:hover {
  color: #ffffff;
}

.site-footer__support-copy {
  font-size: 0.74rem !important;
  line-height: 1.32 !important;
  color: rgba(240, 253, 250, 0.68) !important;
}

.site-footer__socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer__social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fffe;
  font-size: 0.92rem;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-footer__social-btn:hover {
  background: rgba(255, 209, 217, 0.18);
  border-color: rgba(255, 209, 217, 0.34);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.site-footer__meta-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.site-footer__meta-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: rgba(240, 253, 250, 0.84);
  line-height: 1.28;
  font-size: 0.72rem;
}

.site-footer__meta-list i {
  width: 14px;
  margin-top: 1px;
  color: var(--footer-highlight);
  font-size: 0.7rem;
}

.site-footer__bar {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 18px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
}

.site-footer__bar small {
  color: var(--footer-muted);
  font-size: 0.76rem;
}

@media print {
  .site-footer {
    display: none !important;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-xs);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.brand img {
  height: 42px;
  width: auto;
}

.brand span {
  display: grid;
  line-height: 1.1;
}

.brand span strong {
  font-size: 0.98rem;
}

.brand span small {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.menu a,
.menu button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.menu a:hover,
.menu button:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.menu a.active {
  color: var(--accent);
  font-weight: 600;
  border-color: rgba(13, 148, 136, 0.3);
  background: var(--accent-light);
}

.menu .link-logout {
  color: var(--danger);
}

.menu-btn {
  display: none;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 18px 42px;
}

.site-shell .operator-main {
  width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header-text h1 {
  margin: 0;
  font-size: 1.85rem;
}

.page-header-text p {
  margin: 6px 0 0;
  color: var(--text-secondary);
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-liquid-glass {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--accent-hover);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 4px 14px 0 rgba(13, 148, 136, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-liquid-glass i {
  color: var(--accent);
}

.btn-liquid-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.4) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: skewX(-25deg);
  transition: none;
}

.btn-liquid-glass:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px 0 rgba(13, 148, 136, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--accent-hover);
}

.btn-liquid-glass:hover::before {
  animation: liquidShine 0.8s ease-out forwards;
}

@keyframes liquidShine {
  100% {
    left: 200%;
  }
}

.page-content {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.panel {
  background:
    url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20.5V18H0v-2h20v-2H0v-2h20v-2H0V8h20V6H0V4h20V2H0V0h22v20h2V0h2v20h2V0h2v20h2V0h2v20h2V0h2v20h2v2H20v-1.5zM0 20h2v20H0V20zm4 0h2v20H4V20zm4 0h2v20H8V20zm4 0h2v20h-2V20zm4 0h2v20h-2V20zm4 4h20v2H20v-2zm0 4h20v2H20v-2zm0 4h20v2H20v-2zm0 4h20v2H20v-2z' fill='%230f766e' fill-opacity='0.02' fill-rule='evenodd'/%3E"),
    var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  overflow: hidden;
}

.panel h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.panel h3 i {
  color: var(--accent);
}

.toolbar {
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar small {
  color: var(--text-secondary);
  font-weight: 500;
}

.toolbar-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar-group label {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
}

.toolbar-group input[type="search"] {
  min-width: 290px;
}

.nowrap-group {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.toolbar-group input[type="date"],
.toolbar-group input[type="search"],
.toolbar-group input[type="number"],
.toolbar-group select {
  max-width: 260px;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.02);
}

.filter-tag {
  font-size: 0.76rem;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--accent-light);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 999px;
  padding: 4px 9px;
}

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

.form-grid label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

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

.hint {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

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

.kpi-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  background:
    url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%230d9488' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(37, 99, 235, 0.02)) no-repeat,
    var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.kpi-card span {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.7rem;
  color: var(--text-primary);
}

.kpi-card[data-kpi] {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.kpi-card[data-kpi]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(13, 148, 136, 0.18);
  border-color: rgba(13, 148, 136, 0.3);
}

.kpi-card[data-kpi]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%);
  transform: skewX(-25deg);
  transition: none;
}

.kpi-card[data-kpi]:hover::before {
  animation: liquidShine 1.5s ease-out forwards;
}

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

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th,
.table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: middle;
}

.table th {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tr:hover td {
  background: rgba(13, 148, 136, 0.03);
}

.table th[data-sort] {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.table th[data-sort]:hover {
  color: var(--accent);
}

.table th[data-sort] i {
  margin-left: 4px;
  font-size: 0.65rem;
  vertical-align: middle;
  opacity: 0.5;
}

.table th[data-sort]:hover i,
.table th[data-sort] i.fa-sort-up,
.table th[data-sort] i.fa-sort-down {
  opacity: 1;
  color: var(--accent);
}

.table tfoot td {
  background: linear-gradient(180deg, #f7fafc 0%, #eef4fb 100%);
  font-weight: 700;
  font-size: 0.82rem;
  border-top: 2px solid var(--border-color);
  color: var(--text-primary);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.truck-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.truck-card.is-creating {
  border-style: dashed;
  border-color: rgba(13, 148, 136, 0.45);
}

.truck-card.is-creating .thumb {
  position: relative;
}

.truck-card.is-creating .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(13, 148, 136, 0.08), rgba(255, 255, 255, 0));
  animation: cardShimmer 1.1s linear infinite;
}

.truck-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

@keyframes cardShimmer {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

.truck-card .thumb {
  height: 170px;
  background: linear-gradient(180deg, #f7fafc 0%, #eef4fb 100%);
  border-bottom: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  padding: 8px;
}

.truck-card .thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.truck-card .content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 6px;
  padding: 14px;
}

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

.plate-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.plate-badge i {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.btn-delete-truck-inline {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.btn-delete-truck-inline:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.truck-model {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: block;
  padding-right: 150px;
}

.truck-model-row {
  position: relative;
  min-height: 22px;
}

.truck-brand-logo {
  width: 96px;
  max-width: 96px;
  height: 24px;
  max-height: 24px;
  object-fit: contain;
  object-position: right center;
  opacity: 0.78;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 0;
}

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

.brand-row span {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.6px;
}

.truck-color {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.truck-color i {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.truck-error {
  font-size: 0.75rem;
  color: #b45309;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.card-actions button {
  font-size: 0.76rem;
  padding: 6px 8px;
  gap: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-success {
  color: var(--success);
  background: var(--success-light);
}

.badge-warning {
  color: var(--warning);
  background: var(--warning-light);
}

.badge-danger {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

.badge-info {
  color: var(--accent);
  background: var(--accent-light);
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.check-inline input {
  width: auto;
}

.truck-select-preview {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f7fafc 0%, #eef4fb 60%, rgba(13, 148, 136, 0.04) 100%);
  padding: 10px;
  margin-top: 8px;
  overflow: hidden;
  animation: previewSlideIn 0.28s ease;
}

@keyframes previewSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.truck-select-preview .preview-thumb {
  height: 90px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #f7fafc 0%, #eef4fb 100%);
  border: 1px solid var(--border-light);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.truck-select-preview .preview-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.truck-select-preview .preview-thumb.is-generating::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(13, 148, 136, 0.08), rgba(255, 255, 255, 0));
  animation: cardShimmer 1.1s linear infinite;
}

.truck-select-preview .preview-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.truck-select-preview .preview-info .plate-badge {
  align-self: flex-start;
}

.truck-select-preview .preview-model {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.truck-select-preview .preview-brand {
  display: flex;
  align-items: center;
  gap: 6px;
}

.truck-select-preview .preview-brand span {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.6px;
}

.truck-select-preview .preview-brand img {
  width: 84px;
  max-width: 84px;
  height: 22px;
  object-fit: contain;
  object-position: left center;
  opacity: 0.7;
}

.truck-brand-logo.brand-logo-iveco {
  width: 48px;
  max-width: 48px;
  height: 24px;
}

.truck-brand-logo.brand-logo-daf {
  width: 174px;
  max-width: 174px;
  height: 34px;
  max-height: 34px;
}

.truck-brand-logo.brand-logo-ford {
  width: 59px;
  max-width: 59px;
  height: 24px;
}

.truck-brand-logo.brand-logo-scania {
  width: 137px;
  max-width: 137px;
  height: 31px;
  max-height: 31px;
}

.truck-brand-logo.brand-logo-volvo {
  width: 142px;
  max-width: 142px;
  height: 31px;
  max-height: 31px;
}

.truck-select-preview .preview-brand img.brand-logo-iveco {
  width: 40px;
  max-width: 40px;
}

.truck-select-preview .preview-brand img.brand-logo-daf {
  width: 146px;
  max-width: 146px;
  height: 34px;
}

.truck-select-preview .preview-brand img.brand-logo-ford {
  width: 50px;
  max-width: 50px;
}

.truck-select-preview .preview-brand img.brand-logo-scania {
  width: 115px;
  max-width: 115px;
  height: 29px;
}

.truck-select-preview .preview-brand img.brand-logo-volvo {
  width: 120px;
  max-width: 120px;
  height: 29px;
}

.truck-select-preview .preview-color {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.truck-select-preview .preview-color i {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.operator-card .truck-select-preview {
  grid-template-columns: 140px 1fr;
}

.operator-card .truck-select-preview .preview-thumb {
  height: 105px;
}

.pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-container {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 8px;
  z-index: 3000;
}

.toast {
  min-width: 260px;
  max-width: 380px;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 0.88rem;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast.error {
  border-left-color: var(--danger);
}

.feedback-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 4000;
  padding: 16px;
  animation: feedbackOverlayIn 0.2s ease;
}

.feedback-overlay.feedback-out {
  animation: feedbackOverlayOut 0.25s ease forwards;
}

.feedback-modal {
  width: min(360px, 90vw);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.25);
  text-align: center;
  padding: 32px 24px 20px;
  position: relative;
  overflow: hidden;
  animation: feedbackIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feedback-out .feedback-modal {
  animation: feedbackModalOut 0.25s ease forwards;
}

.feedback-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
}

.feedback-modal.success .feedback-icon {
  background: var(--success-light);
  color: var(--success);
}

.feedback-modal.error .feedback-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.feedback-message {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 20px;
  line-height: 1.4;
}

.feedback-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.feedback-modal.success .feedback-progress {
  background: var(--success);
}

.feedback-modal.error .feedback-progress {
  background: var(--danger);
}

@keyframes feedbackOverlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes feedbackOverlayOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes feedbackIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes feedbackModalOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.85);
  }
}

@keyframes feedbackProgressShrink {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

@media (max-width: 480px) {
  .feedback-modal {
    padding: 24px 20px 16px;
  }

  .feedback-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .feedback-message {
    font-size: 0.92rem;
  }
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 4050;
  padding: 16px;
  animation: feedbackOverlayIn 0.2s ease;
}

.confirm-overlay.confirm-out {
  animation: feedbackOverlayOut 0.2s ease forwards;
}

.confirm-modal {
  width: min(420px, 92vw);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.25);
  padding: 24px 22px 18px;
  text-align: center;
  outline: none;
  animation: feedbackIn 0.2s ease;
}

.confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}

.confirm-title {
  margin: 0 0 8px;
  font-size: 1.04rem;
  color: var(--text-primary);
}

.confirm-message {
  margin: 0 0 18px;
  white-space: pre-line;
  line-height: 1.45;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-actions .btn-cancel,
.confirm-actions .btn-confirm {
  min-width: 120px;
}

.confirm-actions .btn-confirm {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.confirm-actions .btn-confirm:hover {
  filter: brightness(1.03);
}

pre.inline-json {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-x: auto;
  overflow-y: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
}

.audit-detail-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-expand-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(13, 148, 136, 0.35);
  background: rgba(13, 148, 136, 0.1);
  color: var(--accent-hover);
  font-weight: 800;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
}

.audit-expand-btn:hover {
  background: rgba(13, 148, 136, 0.2);
  border-color: rgba(13, 148, 136, 0.6);
}

.audit-expand-btn.is-open {
  background: rgba(13, 148, 136, 0.18);
  color: #0b5f59;
}

.audit-detail-row td {
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
  border-top: 1px solid var(--border-color);
  white-space: normal !important;
}

.audit-expanded {
  display: grid;
  gap: 10px;
}

.audit-summary-card,
.audit-facts-card,
.audit-warning-action-card,
.audit-context-card,
.audit-truck-card-wrap,
.audit-json-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
}

.audit-summary-card h4,
.audit-facts-card h4,
.audit-warning-action-card h4,
.audit-context-card h4,
.audit-truck-card-wrap h4,
.audit-json-card h5 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--text-secondary);
}

.audit-truck-card-wrap .truck-select-preview {
  margin-top: 0;
}

.audit-retro-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  font-size: 0.68rem;
  border-radius: 999px;
  padding: 2px 8px;
  color: #9a3412;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  vertical-align: middle;
}

.audit-truck-missing {
  border: 1px dashed rgba(13, 148, 136, 0.35);
  background: rgba(13, 148, 136, 0.06);
  border-radius: 10px;
  padding: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.audit-context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.audit-context-item {
  border: 1px solid var(--border-light);
  background: #fbfdff;
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 3px;
}

.audit-context-item span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.audit-context-item strong {
  font-size: 0.86rem;
  color: var(--text-primary);
}

.audit-summary-card p {
  margin: 0;
  line-height: 1.45;
  color: var(--text-primary);
}

.audit-warning-action-card {
  display: grid;
  gap: 10px;
}

.audit-warning-action-card.is-disabled {
  opacity: 0.9;
}

.audit-warning-action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.audit-warning-action-head p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.4;
}

.audit-warning-action-footer {
  display: flex;
  justify-content: flex-end;
}

.audit-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.audit-fact-item {
  border: 1px solid var(--border-light);
  background: #fbfdff;
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 3px;
}

.audit-fact-item span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.audit-fact-item strong {
  font-size: 0.86rem;
  color: var(--text-primary);
}

.audit-json-grid {
  display: grid;
  gap: 8px;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
  z-index: 2100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  width: min(760px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow-x: hidden;
  animation: modalIn 0.22s ease;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.modal-header h3 {
  margin: 0;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
}

.modal-body {
  padding: 16px;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 12px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #fcfdff;
}

.operator-body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text-primary);
  background:
    radial-gradient(circle at 92% 5%, rgba(13, 148, 136, 0.28), transparent 45%),
    radial-gradient(circle at 12% 0%, rgba(2, 132, 199, 0.22), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(14, 165, 233, 0.18), transparent 50%),
    var(--bg-body);
  display: flex;
  flex-direction: column;
}

.operator-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
}

.operator-topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.operator-topbar .brand img {
  height: 36px;
  width: auto;
}

.operator-topbar .brand span {
  display: flex;
  flex-direction: column;
}

.operator-topbar .brand strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.operator-topbar .brand small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.operator-logout {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.operator-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.operator-card {
  width: 100%;
  max-width: 640px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 32px;
}

.operator-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.operator-card-header i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.operator-card-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.operator-card-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.operator-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.operator-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.operator-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.operator-field label i {
  font-size: 0.75rem;
  color: var(--accent);
}

.operator-field input,
.operator-field select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: var(--font);
  background: rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.operator-field input:focus,
.operator-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.operator-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.operator-submit {
  margin-top: 8px;
  padding: 14px;
  font-size: 1rem;
  width: 100%;
}

.panel-header-clickable {
  cursor: pointer;
  transition: color 0.2s ease;
}

.panel-header-clickable:hover {
  color: var(--accent);
}

.panel-chart-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
  transition: color 0.2s ease;
}

.panel-header-clickable:hover .panel-chart-hint {
  color: var(--accent);
}

.clickable-table tbody tr.clickable-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.clickable-table tbody tr.clickable-row:hover td {
  background: var(--accent-light);
}

.detail-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail-kpi {
  flex: 1;
  min-width: 100px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-align: center;
}

.detail-kpi span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.detail-kpi strong {
  font-size: 1.1rem;
  color: var(--text-primary);
}

@media (max-width: 1024px) {
  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .menu {
    position: absolute;
    right: 12px;
    top: 62px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    align-items: stretch;
    min-width: 260px;
    padding: 6px;
  }

  .menu.open {
    display: flex;
  }

  .menu a,
  .menu button {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .login-container {
    perspective: none;
  }

  .login-card {
    background: var(--bg-white);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    padding: 24px 18px;
  }

  .page {
    padding: 14px 10px 32px;
  }

  .auth-main {
    padding: 18px 10px 28px;
  }

  .site-footer__wrap {
    grid-template-columns: 1fr 1fr;
    padding: 22px 14px 14px;
    gap: 12px;
  }

  .site-footer__bar {
    padding-left: 14px;
    padding-right: 14px;
    justify-content: flex-start;
  }

  .page-header-text h1 {
    font-size: 1.4rem;
  }

  .toolbar-group input[type="search"] {
    min-width: 0;
    width: 100%;
  }

  .toolbar-group input[type="date"],
  .toolbar-group input[type="number"],
  .toolbar-group select {
    max-width: 100%;
    width: 100%;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

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

  .kpi-card strong {
    font-size: 1.3rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-box {
    width: 100%;
    border-radius: var(--radius-md);
  }

  .detail-summary {
    flex-direction: column;
  }

  .chart-container {
    height: 220px;
  }

  .table {
    font-size: 0.78rem;
  }

  .table th,
  .table td {
    padding: 8px 6px;
    white-space: nowrap;
  }

  .panel {
    padding: 12px;
    border-radius: var(--radius-md);
  }

  .panel h3 {
    font-size: 0.9rem;
  }

  .operator-card {
    padding: 24px 18px;
  }

  .operator-row-2 {
    grid-template-columns: 1fr;
  }

  .operator-topbar {
    padding: 10px 14px;
  }

  .operator-topbar .brand strong {
    font-size: 0.8rem;
  }

  .operator-topbar .brand small {
    font-size: 0.68rem;
  }

  .operator-card-header h1 {
    font-size: 1.2rem;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-group {
    flex-wrap: wrap;
    width: 100%;
  }

  .nowrap-group {
    flex-wrap: wrap;
    width: 100%;
  }

  .nowrap-group input,
  .nowrap-group select {
    flex: 1;
    min-width: 0;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .truck-brand-logo {
    width: 86px;
    max-width: 86px;
    height: 22px;
    max-height: 22px;
  }

  .truck-select-preview .preview-brand img {
    width: 76px;
    max-width: 76px;
    height: 20px;
  }

  .truck-brand-logo.brand-logo-iveco {
    width: 42px;
    max-width: 42px;
    height: 22px;
  }

  .truck-brand-logo.brand-logo-daf {
    width: 153px;
    max-width: 153px;
    height: 31px;
    max-height: 31px;
  }

  .truck-brand-logo.brand-logo-ford {
    width: 54px;
    max-width: 54px;
    height: 22px;
  }

  .truck-brand-logo.brand-logo-scania {
    width: 120px;
    max-width: 120px;
    height: 29px;
    max-height: 29px;
  }

  .truck-brand-logo.brand-logo-volvo {
    width: 125px;
    max-width: 125px;
    height: 29px;
    max-height: 29px;
  }

  .truck-select-preview .preview-brand img.brand-logo-iveco {
    width: 35px;
    max-width: 35px;
  }

  .truck-select-preview .preview-brand img.brand-logo-daf {
    width: 125px;
    max-width: 125px;
    height: 29px;
  }

  .truck-select-preview .preview-brand img.brand-logo-ford {
    width: 45px;
    max-width: 45px;
  }

  .truck-select-preview .preview-brand img.brand-logo-scania {
    width: 98px;
    max-width: 98px;
    height: 26px;
  }

  .truck-select-preview .preview-brand img.brand-logo-volvo {
    width: 103px;
    max-width: 103px;
    height: 26px;
  }

  .card-actions {
    grid-template-columns: 1fr 1fr;
  }

  .badge {
    font-size: 0.68rem;
    padding: 3px 7px;
  }

  .filter-tag {
    font-size: 0.7rem;
  }

  .check-inline {
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card strong {
    font-size: 1.1rem;
  }

  .page {
    padding: 10px 8px 28px;
  }

  .site-footer__wrap {
    grid-template-columns: 1fr;
  }

  .site-footer__section--compact {
    padding: 8px 10px;
  }

  .site-footer__social-btn {
    width: 34px;
    height: 34px;
  }

  .page-header-text h1 {
    font-size: 1.2rem;
  }

  .topbar-inner {
    padding: 8px 10px;
  }

  .brand img {
    height: 34px;
  }

  .brand span strong {
    font-size: 0.85rem;
  }

  .table {
    font-size: 0.72rem;
  }

  .table th,
  .table td {
    padding: 6px 4px;
  }

  .chart-container {
    height: 180px;
  }

  .detail-kpi {
    padding: 8px 10px;
  }

  .detail-kpi span {
    font-size: 0.65rem;
  }

  .detail-kpi strong {
    font-size: 0.95rem;
  }

  .btn-liquid-glass {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .operator-card {
    padding: 20px 14px;
  }

  .operator-card-header i {
    font-size: 1.6rem;
  }

  .toolbar small {
    font-size: 0.75rem;
  }

  .modal-body {
    padding: 12px;
  }

  .modal-header {
    padding: 10px 12px;
  }

  .modal-footer {
    padding: 10px 12px;
  }
}

.modal-box.modal-wide {
  width: min(1100px, 96vw);
  max-height: 90vh;
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

.picker-card {
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.picker-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.25);
}

.picker-card-orphan {
  border-style: dashed;
  border-color: #60a5fa;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
}

.picker-card-orphan:hover {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
}

.plate-badge-orphan {
  background: #dbeafe;
  color: #1d4ed8;
}

.picker-card .thumb {
  height: 140px;
}

.selected-image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 10px;
}

.selected-image-preview img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border-color);
}

.selected-image-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.selected-image-info span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-remove-selection {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-remove-selection:hover {
  background: var(--danger);
  color: #fff;
}

.modal-upload-refine {
  width: min(900px, 96vw);
}

.modal-upload-refine-body {
  display: grid;
  gap: 12px;
}

.upload-refine-preview-wrap {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.upload-refine-preview-wrap img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
}

#truckUploadRefineInstruction {
  width: 100%;
  resize: vertical;
  min-height: 90px;
}

#truckUploadRefineStatus {
  min-height: 18px;
}

.upload-refine-badge {
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 4px 10px;
  width: fit-content;
}

.upload-refine-badge.is-uploaded {
  background: #eef6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.upload-refine-badge.is-refined {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.upload-refine-badge.is-fallback {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

@media (max-width: 600px) {
  .picker-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .picker-card .thumb {
    height: 100px;
  }

  .modal-box.modal-wide {
    width: 100%;
  }

  .selected-image-preview {
    flex-direction: column;
    align-items: flex-start;
  }

  .upload-refine-preview-wrap {
    min-height: 180px;
  }
}
