:root {
  --vp-primary: #0F6E6E;
  --vp-ink: #1A2332;
  --vp-paper: #F3F5F7;
  --vp-danger: #B42318;
  --vp-line: #D8DEE4;
  --vp-muted: #5B6673;
  --vp-header-h: 4.5rem;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--vp-ink);
  background: var(--vp-paper);
  min-height: 100vh;
  line-height: 1.45;
}
a { color: var(--vp-primary); }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--vp-header-h);
  padding: 0.65rem 1.75rem;
  background: linear-gradient(180deg, #243044 0%, var(--vp-ink) 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 8px 24px rgba(16, 24, 40, .18);
}
.section-server .top { box-shadow: 0 3px 0 #c4a35a, 0 8px 24px rgba(16, 24, 40, .18); }
.section-admin .top { box-shadow: 0 3px 0 var(--vp-primary), 0 8px 24px rgba(16, 24, 40, .18); }
.section-app .top { box-shadow: 0 3px 0 #3d7ea6, 0 8px 24px rgba(16, 24, 40, .18); }
.section-auth .top { box-shadow: 0 3px 0 var(--vp-primary), 0 8px 24px rgba(16, 24, 40, .18); }

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3.25rem;
  max-width: 13rem;
  padding: 0.28rem 0.45rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12);
  flex: 0 0 auto;
}
.brand-mark img {
  display: block;
  height: 2.7rem;
  width: auto;
  max-width: 12rem;
  object-fit: contain;
  object-position: left center;
}
.brand-name {
  font-weight: 650;
  font-size: 1.15rem;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.95rem;
}
.nav a {
  color: #e8edf2;
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-weight: 550;
}
.nav a:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.nav a.out {
  border: 1px solid rgba(255,255,255,.22);
  margin-left: 0.35rem;
}
.who {
  opacity: 0.72;
  font-size: 0.88rem;
  padding: 0 0.5rem;
  border-left: 1px solid rgba(255,255,255,.18);
  margin-left: 0.35rem;
}

.wrap { max-width: none; width: 100%; margin: 1.25rem auto 0; padding: 0 1.5rem 3rem; }
.card {
  background: #fff;
  padding: 1.6rem 1.7rem;
  border-radius: 12px;
  border: 1px solid var(--vp-line);
  box-shadow: 0 10px 30px rgba(16, 24, 40, .05);
}
.login-card { max-width: 420px; margin: 3.5rem auto; }
h1 { font-size: 1.55rem; font-weight: 650; margin: 0 0 0.4rem; letter-spacing: -.01em; }
label { display: block; margin: 0.8rem 0; font-size: 0.92rem; }
input[type=text], input[type=password], select {
  display: block; width: 100%; margin-top: 0.35rem; padding: 0.55rem 0.7rem;
  border: 1px solid var(--vp-line); border-radius: 8px; font: inherit;
  background: #fff;
}
input[type=text]:focus, input[type=password]:focus, select:focus {
  outline: 2px solid color-mix(in srgb, var(--vp-primary) 35%, transparent);
  border-color: var(--vp-primary);
}
button, .btn-secondary {
  background: var(--vp-primary); color: #fff; border: 0;
  padding: 0.6rem 1.15rem; border-radius: 8px; cursor: pointer;
  font-weight: 600; letter-spacing: .01em;
}
button:hover { filter: brightness(1.06); }
.err { color: var(--vp-danger); }
.warn { color: #8a5a00; background: #fff6e0; padding: 0.5rem 0.7rem; border-radius: 8px; }
.lede { color: var(--vp-muted); margin-top: 0; }
.stats { display: flex; gap: 0.75rem; list-style: none; padding: 0; flex-wrap: wrap; }
.stats li {
  background: #fff; padding: 0.85rem 1.05rem; border-radius: 10px;
  border: 1px solid var(--vp-line);
}
.grid-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.7rem; }
.grid-links span, .grid-links a {
  display: block; background: #fff; padding: 1.05rem 1.1rem; border-radius: 10px;
  border: 1px solid var(--vp-line); color: var(--vp-ink); text-decoration: none; font-weight: 600;
}
.grid-links a:hover { border-color: var(--vp-primary); box-shadow: 0 6px 16px rgba(16,24,40,.06); }
.hint { color: var(--vp-muted); font-size: 0.9rem; }
.foot { text-align: center; color: var(--vp-muted); font-size: 0.8rem; padding: 1.5rem; }
.ok { color: #0b6b3a; background: #e6f6ec; padding: 0.5rem 0.7rem; border-radius: 8px; }
.brand-form fieldset { border: 1px solid var(--vp-line); border-radius: 10px; margin: 1rem 0; padding: 0.8rem 1rem 1rem; }
.brand-form legend { padding: 0 0.3rem; font-weight: 650; }
.color-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.color-row input[type=color] { display: block; width: 3rem; height: 2rem; padding: 0; border: 0; background: none; }
.preview-chip { display: inline-block; margin-top: 0.6rem; padding: 0.4rem 0.8rem; border-radius: 6px; color: #fff; }
.logo-preview {
  height: 72px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  background: #fff;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--vp-line);
}
.check { display: flex; align-items: center; gap: 0.5rem; }
.subnav { display: flex; gap: 0.5rem; margin: 0 0 1.1rem; }
.subnav a {
  padding: 0.35rem 0.7rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--vp-line);
  text-decoration: none; color: var(--vp-ink); font-weight: 600; font-size: 0.9rem;
}
.subnav a:hover { border-color: var(--vp-primary); }
.table-card { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th, table.data td { text-align: left; padding: 0.55rem 0.45rem; border-bottom: 1px solid var(--vp-line); vertical-align: middle; }
table.data th { color: var(--vp-muted); font-weight: 600; }
.row-form { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.row-form select { width: auto; margin: 0; }
.inline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.6rem 1rem; align-items: end; }
.field-actions { display: flex; align-items: end; padding-bottom: 0.35rem; }
.check.tight { margin: 0; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.85rem; }
.member-list { list-style: none; padding: 0; margin: 0; }
.member-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--vp-line); }
.muted { color: var(--vp-muted); }
.tag-off { font-size: 0.75rem; color: var(--vp-danger); margin-left: 0.35rem; }
h2 { font-size: 1.05rem; margin: 0 0 0.7rem; }

@media (max-width: 720px) {
  .top { flex-direction: column; align-items: flex-start; min-height: 0; padding: 0.75rem 1rem; }
  .brand-name { font-size: 1.05rem; }
  .who { border-left: 0; margin-left: 0; padding-left: 0.15rem; }
}

.tag-soon { color: #8a5a00; font-weight: 600; }
a.btn-secondary { display: inline-block; text-decoration: none; margin: 0 0 1rem; }
input[type=number], input[type=date] {
  display: block; width: 100%; margin-top: 0.35rem; padding: 0.55rem 0.7rem;
  border: 1px solid var(--vp-line); border-radius: 8px; font: inherit; background: #fff;
}

.vehicle-thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; background: #e8ecef; display: block; }
.vehicle-photo { max-width: 280px; max-height: 160px; width: auto; height: auto; object-fit: contain; border-radius: 8px; display: block; margin: 0.35rem 0; background: #e8ecef; }
.thumb-cell { width: 72px; }

.span-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem 0.8rem; margin: 0.4rem 0 0.8rem; }
input[type=time] {
  display: block; width: 100%; margin-top: 0.35rem; padding: 0.55rem 0.7rem;
  border: 1px solid var(--vp-line); border-radius: 8px; font: inherit; background: #fff;
}

.filter-bar { margin-bottom: 1rem; }
.filter-bar .field-actions { gap: 0.5rem; }

table.data .col-actions form { margin: 0; }
table.data button.btn, table.data .btn {
  display: inline-block;
  background: var(--vp-primary);
  color: #fff !important;
  text-decoration: none !important;
  border: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.vehicle-hero { text-align: center; margin: 0 0 1.25rem; }
.vehicle-hero img.vehicle-photo {
  display: block;
  margin: 0 auto;
  max-width: min(100%, 560px);
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  border-radius: 10px;
  background: #e8ecef;
}
.vehicle-photo-empty {
  margin: 0 auto 0.6rem;
  max-width: 280px;
  height: 140px;
  line-height: 140px;
  background: #e8ecef;
  color: #5B6673;
  border-radius: 10px;
}
.photo-file { display: inline-block; text-align: left; margin-top: 0.6rem; }
.vehicle-thumb { cursor: zoom-in; }
#img-lb {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16,24,40,.88);
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-out;
}
#img-lb.open { display: flex; }
#img-lb img { max-width: 95vw; max-height: 95vh; width: auto; height: auto; object-fit: contain; }

.car-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.7rem; margin: 0.8rem 0; }
.car-opt { display: flex; gap: 0.6rem; align-items: center; border: 1px solid var(--vp-line); border-radius: 10px; padding: 0.6rem; background: #fff; cursor: pointer; }
.car-opt img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; }
.car-opt input { flex: 0 0 auto; }

.photo-row { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.trip-thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; cursor: zoom-in; display: block; background: #e8ecef; }


tr.row-due td { background: #fff4cc; }
tr.row-late td { background: #f5c6c6; }

tr.row-ok td { background: #d8efd8; }
input.field-bad { background: #f5c6c6; border-color: #b42318; }

tr.row-out td { background: #d6e8f8; }

a.sort { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
a.sort:hover { color: var(--vp-primary); }

.legend { display: flex; flex-wrap: wrap; gap: 0.85rem 1.4rem; margin: 0 0 0.8rem; font-size: 0.92rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.swatch { width: 1.05rem; height: 1.05rem; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,.12); }
.swatch-out { background: #d6e8f8; }
.swatch-due { background: #fff4cc; }
.swatch-late { background: #f5c6c6; }
.swatch-ok { background: #d8efd8; }

tr.row-wait td { background: #fde6c8; }
.swatch-wait { background: #fde6c8; }

button.car-photo { border: 0; padding: 0; background: transparent; cursor: zoom-in; line-height: 0; }
button.car-photo img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }

input.field-soon { background: #fff4cc; border-color: #c9a227; }
