body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #f1f5f9;
  color: #334155;
}

* {
  box-sizing: border-box;
}

a {
  color: inherit;
}

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

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 24px;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.brand-subtitle {
  font-size: 13px;
  color: #64748b;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 82px 340px minmax(0, 1fr);
}

.icon-sidebar {
  background: linear-gradient(180deg, #1557d5 0%, #1248b6 100%);
  color: #fff;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.icon-brand {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 10px;
  color: #85a9ff;
}

.icon-brand svg,
.section-link svg {
  width: 23px;
  height: 23px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  align-items: center;
}

.section-link {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  position: relative;
}

.section-link.active,
.section-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.section-link.active::after {
  content: '';
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: #f4f5f7;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.submenu-panel {
  background: #f4f5f7;
  border-right: 1px solid #e2e8f0;
  padding: 28px 24px 26px;
}

.submenu-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 42px;
}

.submenu-brand-mark {
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  position: absolute;
}

.submenu-brand-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.submenu-brand-subtitle {
  font-size: 12px;
  color: #64748b;
}

.submenu-heading {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
}

.submenu-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.submenu-link {
  display: block;
  padding: 6px 0;
  border-radius: 0;
  text-decoration: none;
  color: #60656f;
  font-size: 13px;
  font-weight: 700;
}

.submenu-link.active {
  color: #1658d3;
  background: transparent;
}

.submenu-link:hover {
  color: #1658d3;
  background: transparent;
}

.main-panel {
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 30px 0;
}

.page-title {
  margin: 0;
  font-size: 32px;
  color: #0f172a;
}

.page-subtitle {
  margin-top: 6px;
  color: #64748b;
}

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

.icon-button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.icon-button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.session-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 18px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.session-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.session-name {
  font-weight: 700;
  color: #0f172a;
}

.session-role {
  font-size: 13px;
  color: #64748b;
}

.content-area {
  padding: 16px 24px 32px;
}

.mobile-submenu-card {
  display: none;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.mobile-submenu-title {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.mobile-submenu-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-submenu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.mobile-submenu-link.active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card,
.card {
  background: #fff;
  border-radius: 20px;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.metric-label {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.metric-value {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
}

.card + .card {
  margin-top: 14px;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: #0f172a;
}

h2 {
  font-size: 17px;
  margin-bottom: 14px;
}

form {
  display: grid;
  gap: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

label > div,
.field-label {
  margin-bottom: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

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

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d7e0ee;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
}

textarea {
  resize: vertical;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #2563eb;
  color: #fff;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

.button-secondary {
  background: #0f172a;
}

.button-light {
  background: #e2e8f0;
  color: #0f172a;
}

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

.cars-mobile-list {
  display: none;
}

.cars-mobile-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.cars-mobile-card + .cars-mobile-card {
  margin-top: 12px;
}

.cars-mobile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cars-mobile-id {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.cars-mobile-title {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.cars-mobile-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cars-mobile-meta-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}

.cars-mobile-meta-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.cars-mobile-stats {
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

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

.table th,
.table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid #edf2f7;
  vertical-align: top;
}

.table th {
  color: #64748b;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1658d3;
  font-size: 11px;
  font-weight: 700;
}

.badge-dark {
  background: #e2e8f0;
  color: #0f172a;
}

.notice {
  padding: 14px 16px;
  border-radius: 14px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.error {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.table-stats-cell {
  display: grid;
  gap: 6px;
  min-width: 190px;
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
}

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

.stats-summary-card {
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.stats-summary-label {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.stats-summary-value {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
}

.stats-poster-card {
  border: 1px solid #dbe4f0;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.stats-poster-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stats-poster-head h3 {
  margin: 0 0 6px;
}

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

.stats-inline-action {
  margin: 0;
  display: flex;
  justify-content: center;
}

.stats-delete-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

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

.table-action-buttons form {
  margin: 0;
}

.icon-action-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid #d7e0ee;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.icon-action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.icon-action-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-action-button-edit {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.icon-action-button-delete {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

.vehicle-request-detail-stack,
.vehicle-request-sidebar,
.vehicle-request-history-list,
.vehicle-requests-list {
  min-width: 0;
}

.vehicle-request-list-card,
.vehicle-request-list-main,
.vehicle-request-list-side,
.vehicle-request-list-top,
.vehicle-request-list-meta,
.vehicle-request-detail-layout,
.vehicle-request-info-grid,
.vehicle-request-card-grid,
.vehicle-request-meta-grid {
  min-width: 0;
}

.toast-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 3000;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.admin-toast {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.24s ease, transform 0.24s ease;
  pointer-events: auto;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.form-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.car-tabs-shell {
  padding: 10px;
}

.car-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.car-tab-button {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.car-tab-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.car-tab-button.is-active {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

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

.car-tab-panel.is-active {
  display: block;
}

.form-header-row h2 {
  margin-bottom: 0;
}

.locale-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.locale-switcher span {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.locale-switcher select {
  min-width: 180px;
}

.locale-panel {
  display: none;
}

.locale-panel.active {
  display: block;
}

.button-danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff5f5;
}

.media-manager-card {
  display: grid;
  gap: 18px;
}

.media-manager-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.media-upload-panel {
  display: grid;
  gap: 14px;
}

.media-dropzone {
  position: relative;
  border: 1px dashed #93c5fd;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #eff6ff);
  padding: 18px;
}

.media-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.media-dropzone-inner {
  min-height: 140px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  color: #1e3a8a;
}

.media-dropzone-inner strong {
  font-size: 18px;
  color: #0f172a;
}

.media-dropzone-inner span {
  font-size: 14px;
  color: #64748b;
}

.media-selected-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.media-file-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.media-item {
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.media-item.dragging {
  opacity: 0.55;
}

.media-item.is-main {
  border-color: #93c5fd;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.14);
}

.media-thumb-wrap {
  position: relative;
  background: #e2e8f0;
}

.media-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-main-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.media-item-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.media-item-name {
  font-size: 13px;
  line-height: 1.4;
  color: #475569;
  word-break: break-word;
}

.media-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-item-actions form {
  margin: 0;
}

.media-order-actions {
  justify-content: flex-end;
}

.widget-inline-link {
  font-size: 14px;
  line-height: 1.5;
  word-break: break-all;
}

.widget-inline-link a {
  color: #1658d3;
  text-decoration: none;
}

.widget-helper-text {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.widget-preview-shell {
  border: 1px solid #dbe4f0;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff, #eff6ff);
}

.widget-preview-frame {
  display: block;
  width: 100%;
  min-height: 760px;
  border: 0;
  background: #fff;
}

.widget-code-wrap {
  margin-top: 10px;
}

.widget-code-box {
  min-height: 230px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  background: #0f172a;
  color: #e2e8f0;
  border-color: #0f172a;
}

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

.module-tile {
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
}

.module-tile-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.module-tile-text {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  color: #64748b;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 500px) 1fr;
  background: #eff6ff;
}

.login-panel {
  background: #fff;
  padding: 54px;
  display: flex;
  align-items: center;
}

.login-card {
  width: 100%;
}

.login-aside {
  background: linear-gradient(145deg, #1658d3, #0f172a);
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-kicker {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

.login-title {
  margin: 14px 0;
  font-size: 44px;
  line-height: 1.08;
}

.login-text {
  max-width: 520px;
  color: rgba(255,255,255,0.82);
  line-height: 1.6;
}

.kpi-list {
  display: grid;
  gap: 14px;
}

.empty-state {
  padding: 26px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  color: #64748b;
  background: #f8fafc;
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 82px 280px minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 88px 1fr;
  }

  .submenu-panel {
    display: none;
  }

  .mobile-submenu-card {
    display: block;
  }

  .metrics-row,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .media-manager-header {
    flex-direction: column;
  }
}

@media (max-width: 840px) {
  .login-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .icon-sidebar {
    flex-direction: row;
    justify-content: space-between;
    padding: 14px;
  }

  .section-nav {
    flex-direction: row;
    width: auto;
  }

  .section-link.active::after {
    display: none;
  }

  .topbar {
    padding: 20px 20px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .content-area {
    padding: 20px;
  }

  .cars-table-desktop {
    display: none;
  }

  .cars-mobile-list {
    display: block;
  }

  .table-action-buttons {
    flex-wrap: wrap;
  }

  .vehicle-requests-header {
    align-items: stretch !important;
  }

  .vehicle-requests-header .button {
    width: 100%;
  }

  .vehicle-request-detail-layout {
    grid-template-columns: 1fr !important;
  }

  .vehicle-request-hero {
    padding: 18px !important;
    border-radius: 18px !important;
  }

  .vehicle-request-hero h2 {
    font-size: 26px !important;
  }

  .vehicle-request-meta-grid,
  .vehicle-request-card-grid,
  .vehicle-request-info-grid,
  .vehicle-request-list-top,
  .vehicle-request-list-meta,
  .vehicle-request-list-actions {
    grid-template-columns: 1fr !important;
  }

  .vehicle-request-source-card,
  .vehicle-request-section-card,
  .vehicle-request-comment-card,
  .vehicle-request-list-card,
  .vehicle-request-list-side {
    padding: 16px !important;
    border-radius: 18px !important;
  }

  .vehicle-request-list-card {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .vehicle-request-list-side form,
  .vehicle-request-list-actions form {
    margin: 0;
  }

  .vehicle-request-list-actions > * {
    width: 100%;
  }
  .login-panel,
  .login-aside {
    padding: 28px;
  }
}
