:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f9fbfd;
  --surface-blue: #f3f7ff;
  --text: #202733;
  --muted: #697586;
  --subtle: #98a2b3;
  --line: #e6ebf2;
  --primary: #0f4c97;
  --primary-dark: #0b3f7f;
  --primary-soft: #e9f2ff;
  --danger: #b42318;
  --warning: #b7791f;
  --success: #1f7a4d;
  --shadow: 0 14px 42px rgba(18, 38, 63, 0.08);
  --shadow-soft: 0 8px 24px rgba(18, 38, 63, 0.06);
  --radius: 8px;
  --sidebar-width: 286px;
}

.segment-detail-block,
.segment-form-block {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}

.segment-detail-block h4,
.segment-form-block h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.segment-list {
  display: grid;
  gap: 10px;
}

.segment-item {
  padding: 12px;
  border: 1px solid rgba(15, 76, 151, 0.14);
  border-radius: var(--radius-sm);
  background: #fff;
}

.compact-form {
  gap: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 76, 151, 0.08), transparent 320px),
    var(--bg);
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(15, 76, 151, 0.08), rgba(255, 255, 255, 0.7)),
    #f7f9fc;
}

.login-panel {
  width: min(480px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(230, 235, 242, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 38px;
  backdrop-filter: blur(18px);
}

.login-logo {
  display: block;
  width: 220px;
  max-width: 76%;
  height: auto;
  margin-bottom: 26px;
}

.login-panel h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 10px;
  letter-spacing: 0;
}

.login-panel p {
  margin: 0 0 26px;
  color: var(--muted);
}

.login-help {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 76, 151, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 76, 151, 0.1);
}

.primary,
.secondary,
.ghost,
.danger {
  min-height: 40px;
  border-radius: var(--radius);
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 76, 151, 0.18);
}

.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.secondary {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid #d5e6ff;
}

.secondary:hover {
  background: #dfeeff;
}

.ghost {
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
}

.ghost:hover {
  border-color: #cfd8e5;
  color: var(--text);
}

.danger {
  background: #fff1f0;
  color: var(--danger);
  border: 1px solid #ffd4d1;
}

.login-help {
  margin-top: 18px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
  display: grid;
  gap: 6px;
}

.language-select {
  max-width: 160px;
  margin-top: 16px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
}

.sidebar {
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--line);
  color: var(--text);
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  backdrop-filter: blur(18px);
}

.sidebar-brand {
  display: grid;
  gap: 14px;
  padding: 6px 8px 22px;
  border-bottom: 1px solid var(--line);
}

.sidebar-logo {
  width: 174px;
  max-width: 100%;
  height: auto;
  display: block;
}

.sidebar-title strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.sidebar-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.nav-list button {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  text-align: left;
  font-weight: 600;
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--subtle);
  font-size: 17px;
  line-height: 1;
}

.nav-list button:hover {
  background: #f4f7fb;
  color: var(--text);
}

.nav-list button.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-list button.active .nav-icon {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-soft);
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 750;
}

.topbar h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-actions .language-select {
  margin: 0;
}

.user-pill {
  display: grid;
  gap: 1px;
  min-width: 144px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.user-pill small {
  color: var(--muted);
}

.notification-widget {
  position: relative;
}

.notification-bell {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.notification-bell.has-new {
  animation: notificationBellPulse 1.8s ease-in-out infinite;
  box-shadow: 0 10px 24px rgba(15, 76, 151, 0.15);
}

.bell-icon {
  font-size: 18px;
  line-height: 1;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d92d20;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(217, 45, 32, 0.28);
}

@keyframes notificationBellPulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  35% {
    transform: scale(1.04) rotate(-5deg);
  }

  70% {
    transform: scale(1.04) rotate(5deg);
  }
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(380px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 120px));
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notification-head,
.notification-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.notification-list {
  display: grid;
  gap: 9px;
}

.notification-item {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.notification-item.unread {
  border-color: rgba(15, 76, 151, 0.32);
  background: #f5f9ff;
}

.notification-item.urgent {
  border-color: rgba(217, 45, 32, 0.35);
  background: #fff7f5;
}

.notification-item-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-item small,
.notification-hint {
  color: var(--muted);
  font-size: 12px;
}

.notification-sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.notification-card-host {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 160;
  display: grid;
  gap: 12px;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}

.notification-alert-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 18px 18px 16px 20px;
  border: 1px solid rgba(15, 76, 151, 0.14);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 22px 54px rgba(20, 34, 52, 0.16);
  pointer-events: auto;
  animation: notificationCardIn 0.22s ease-out;
}

.notification-alert-card.urgent {
  border-color: rgba(217, 72, 15, 0.2);
  border-left-color: #e85d2a;
  background: linear-gradient(90deg, rgba(232, 93, 42, 0.08), #ffffff 22%);
}

.notification-alert-card h3 {
  margin: 4px 34px 12px 0;
  font-size: 20px;
  line-height: 1.2;
}

.notification-alert-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.notification-alert-card.urgent .notification-alert-kicker {
  color: #c2410c;
}

.notification-alert-close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 30px;
  width: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f3f6fb;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.notification-alert-details {
  display: grid;
  gap: 8px;
}

.notification-alert-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 13px;
}

.notification-alert-row span {
  color: var(--muted);
}

.notification-alert-row strong {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.notification-alert-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.notification-overflow-card p {
  margin: 0;
  color: var(--muted);
}

@keyframes notificationCardIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }

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

.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  padding: 24px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 76, 151, 0.1), rgba(255, 255, 255, 0.92)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.dashboard-hero h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.hero-date {
  margin: 8px 0 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card,
.panel,
.day-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.kpi-card {
  padding: 18px;
  display: grid;
  gap: 12px;
  min-height: 120px;
}

.kpi-card span {
  color: var(--muted);
  font-size: 13px;
}

.kpi-card strong {
  font-size: 30px;
  line-height: 1;
  color: var(--text);
}

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

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.split-grid.wide-left {
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
}

.panel {
  padding: 20px;
}

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

.panel h3 {
  margin: 0;
  font-size: 16px;
}

.list {
  display: grid;
  gap: 10px;
}

.compact-list {
  gap: 8px;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: var(--surface-soft);
  display: grid;
  gap: 7px;
}

.compact-list .list-item {
  background: #fff;
}

.list-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-weight: 700;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.region-overview {
  display: grid;
  gap: 10px;
}

.region-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.region-card strong {
  display: block;
  font-size: 18px;
}

.region-card span {
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-soft);
}

.badge.pending {
  color: #8a5200;
  background: #fff4d8;
}

.badge.approved,
.badge.available,
.badge.completed {
  color: var(--success);
  background: #e8f7ef;
}

.badge.in_use,
.badge.booked,
.badge.on_trip {
  color: var(--primary);
  background: var(--primary-soft);
}

.badge.maintenance,
.badge.repair,
.badge.on_leave {
  color: var(--warning);
  background: #fff4d8;
}

.badge.rejected,
.badge.cancelled,
.badge.disabled {
  color: var(--danger);
  background: #fff1f0;
}

.badge.high,
.badge.urgent {
  color: var(--danger);
  background: #fff1f0;
}

.toolbar,
.actions-row,
.report-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.toolbar {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.toolbar label {
  min-width: 154px;
  flex: 1 1 154px;
}

.calendar-range-title {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-content: start;
}

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

.checkbox-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  color: var(--text);
}

.checkbox-line input {
  width: auto;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-weight: 700;
  background: var(--surface-soft);
}

tbody tr:hover td {
  background: #fbfdff;
}

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

.table-actions button {
  min-height: 32px;
  padding: 6px 10px;
}

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

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

.calendar-week {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.day-card {
  min-height: 150px;
  padding: 15px;
}

.day-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.booking-card {
  border-left: 4px solid var(--primary);
}

.booking-card.status-pending {
  border-left-color: #d59216;
}

.booking-card.status-approved,
.booking-card.status-completed {
  border-left-color: var(--success);
}

.booking-card.status-rejected,
.booking-card.status-cancelled {
  border-left-color: var(--danger);
}

.booking-card.status-in_use {
  border-left-color: var(--primary);
}

.conflict-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 6px;
  background: #fff;
}

.conflict-box strong {
  font-size: 13px;
}

.conflict-box div {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.conflict-box small {
  color: var(--subtle);
  line-height: 1.5;
}

.conflict-box.warning {
  border-color: #ffd38a;
  background: #fffaf0;
}

.conflict-box.ok {
  border-color: #d9efe3;
  background: #f7fcf9;
}

.report-panel {
  display: grid;
  gap: 20px;
  max-width: 1120px;
}

.report-actions .secondary {
  min-width: 168px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.1fr);
  gap: 18px;
}

.settings-info-panel {
  display: grid;
  gap: 12px;
}

.panel-head.spaced {
  margin-top: 10px;
}

.settings-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.info-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 13px;
  display: grid;
  gap: 6px;
}

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

.info-tile strong {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

.info-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.public-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(15, 76, 151, 0.12), transparent 360px),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
}

.public-topbar {
  min-height: 82px;
  padding: 18px clamp(18px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid rgba(230, 235, 242, 0.86);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.public-brand img {
  width: 156px;
  max-width: 36vw;
  height: auto;
  display: block;
}

.public-brand strong {
  display: block;
  font-size: 16px;
  color: var(--text);
}

.public-brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.public-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.public-actions .language-select {
  margin: 0;
}

.public-main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(24px, 5vw, 58px) 0;
}

.public-view {
  display: none;
}

.public-view.active {
  display: block;
}

.public-hero {
  min-height: calc(100vh - 210px);
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid rgba(230, 235, 242, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.public-hero img {
  width: min(300px, 72vw);
  height: auto;
  margin-bottom: 8px;
}

.public-hero h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: 0;
  max-width: 860px;
}

.public-hero p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.7;
}

.public-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.public-hero-actions button {
  min-height: 50px;
  padding: 13px 18px;
}

.public-page-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.public-page-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 38px);
}

.public-page-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.public-form {
  margin-bottom: 16px;
}

.form-section-title {
  margin: 4px 0 0;
  padding-top: 6px;
  color: var(--text);
  font-size: 15px;
}

.public-result-row {
  width: 100%;
  text-align: left;
  color: inherit;
}

.public-result-row:hover {
  border-color: rgba(15, 76, 151, 0.28);
  background: #fff;
}

.human-question {
  align-self: end;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--primary);
  font-weight: 700;
  padding: 0 4px 2px;
}

.public-result {
  display: grid;
  gap: 12px;
  border-color: rgba(15, 76, 151, 0.18);
  background: #fbfdff;
}

.public-result h3 {
  margin: 0;
  font-size: 20px;
}

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

.result-code {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.result-code span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.result-code strong {
  font-size: 24px;
  letter-spacing: 0;
}

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

.public-detail-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.public-detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.public-detail-item strong {
  color: var(--text);
}

.public-vehicle-status {
  margin-top: 18px;
}

.login-back {
  margin-bottom: 18px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: 420px;
  padding: 13px 15px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid rgba(15, 76, 151, 0.16);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.toast.error {
  border-left-color: #d92d20;
  background: #fff7f5;
  color: #9f1d17;
}

.empty {
  color: var(--muted);
  padding: 13px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

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

  .sidebar {
    position: relative;
    height: auto;
  }

  .sidebar-brand {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .sidebar-logo {
    width: 150px;
  }

  .nav-list {
    grid-template-columns: repeat(auto-fit, minmax(174px, 1fr));
  }

  .dashboard-grid,
  .split-grid,
  .split-grid.wide-left,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 18px;
  }

  .login-panel {
    padding: 28px;
  }

  .login-logo {
    width: 190px;
  }

  .topbar,
  .dashboard-hero {
    display: grid;
  }

  .top-actions,
  .hero-actions {
    justify-content: stretch;
  }

  .top-actions > *,
  .hero-actions > * {
    flex: 1 1 140px;
  }

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

  .dashboard-hero h3,
  .topbar h2 {
    font-size: 24px;
  }

  .sidebar {
    padding: 16px;
  }

  .toolbar label {
    flex-basis: 100%;
  }

  .notification-card-host {
    top: auto;
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .notification-alert-card {
    padding: 16px;
  }

  .notification-alert-row {
    grid-template-columns: 82px 1fr;
  }

  .notification-alert-actions {
    justify-content: stretch;
  }

  .notification-alert-actions button {
    flex: 1 1 0;
  }

  .calendar-grid,
  .calendar-week,
  .calendar-day {
    grid-template-columns: 1fr;
  }

  .public-topbar,
  .public-page-head {
    display: grid;
  }

  .public-brand {
    align-items: flex-start;
  }

  .public-brand img {
    width: 132px;
  }

  .public-actions,
  .public-hero-actions {
    justify-content: stretch;
  }

  .public-actions > *,
  .public-hero-actions > * {
    flex: 1 1 100%;
  }

  .public-main {
    width: min(100% - 24px, 1180px);
  }

  .public-hero {
    min-height: auto;
    padding: 26px;
    border-radius: 14px;
  }
}
