:root {
  --stz-dark: #3d4a45;
  --stz-dark-2: #333e3a;
  --stz-red: #c1272d;
  --stz-red-light: #e63946;
  --stz-white: #ffffff;
  --stz-bg: #f4f5f4;
  --stz-border: #dcdfdd;
  --stz-text: #2b2f2e;
  --stz-muted: #767f7b;
  --font: 'Segoe UI', Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--stz-bg);
  color: var(--stz-text);
}

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

/* ---------- Login page ---------- */
.login-wrap {
  display: flex;
  min-height: 100vh;
}

.login-brand {
  flex: 0 0 40%;
  background: linear-gradient(160deg, var(--stz-dark), var(--stz-dark-2));
  color: var(--stz-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 48px 32px;
  text-align: center;
}

.login-brand img { max-width: 240px; filter: brightness(0) invert(1); }

.login-tagline {
  font-style: italic;
  font-weight: 700;
  letter-spacing: 1px;
  border-top: 1px solid var(--stz-red);
  padding-top: 16px;
  width: 80%;
  font-size: 13px;
}

.login-contact { font-size: 12px; line-height: 2; opacity: 0.9; }
.login-contact .row { display: flex; align-items: center; gap: 8px; justify-content: center; }
.login-footer { font-size: 11px; opacity: 0.6; }

.login-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--stz-white);
}

.login-form {
  width: 100%;
  max-width: 340px;
}

.login-form h1 {
  font-size: 28px;
  margin-bottom: 24px;
}

.login-form input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--stz-border);
  border-radius: 4px;
  font-size: 14px;
}

.login-form button {
  width: 100%;
  padding: 12px;
  background: var(--stz-dark);
  color: var(--stz-white);
  border: none;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.15s;
}

.login-form button:hover { background: var(--stz-red); }

.login-error {
  background: #fbeaea;
  color: var(--stz-red);
  border: 1px solid var(--stz-red);
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ---------- App shell ---------- */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  flex: 0 0 210px;
  background: var(--stz-dark);
  color: var(--stz-white);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.sidebar .brand { padding: 0 20px 20px; }
.sidebar .brand img { width: 100%; max-width: 140px; filter: brightness(0) invert(1); }

.sidebar nav { margin-top: 10px; }

.sidebar nav a {
  display: block;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #e6e8e7;
  border-left: 3px solid transparent;
}

.sidebar nav a:hover { background: rgba(255,255,255,0.06); }

.sidebar nav a.active {
  background: rgba(193,39,45,0.18);
  border-left-color: var(--stz-red);
  color: var(--stz-white);
}

.main { flex: 1; display: flex; flex-direction: column; }

.topbar {
  height: 60px;
  background: var(--stz-white);
  border-bottom: 1px solid var(--stz-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.topbar .page-title { font-size: 18px; font-weight: 700; }
.topbar .user-info { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--stz-muted); }
.topbar .logout-btn { color: var(--stz-dark); font-weight: 700; cursor: pointer; }
.topbar .logout-btn:hover { color: var(--stz-red); }

.content { padding: 28px; flex: 1; }

/* ---------- Buttons / forms ---------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 4px;
  border: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.3px;
}
.btn-primary { background: var(--stz-dark); color: var(--stz-white); }
.btn-primary:hover { background: var(--stz-red); }
.btn-outline { background: transparent; border: 1px solid var(--stz-dark); color: var(--stz-dark); }
.btn-outline:hover { background: var(--stz-dark); color: var(--stz-white); }
.btn-danger { background: var(--stz-red); color: var(--stz-white); }
.btn-danger:hover { background: #a01f24; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.card {
  background: var(--stz-white);
  border: 1px solid var(--stz-border);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 22px;
}

.card h2 { margin-top: 0; font-size: 16px; }

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

.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--stz-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--stz-border);
  border-radius: 4px;
  font-size: 14px;
  font-family: var(--font);
}

.form-group textarea { resize: vertical; min-height: 60px; }

.vehicle-row {
  border: 1px dashed var(--stz-border);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}

.vehicle-row .remove-vehicle {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--stz-red);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Table ---------- */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f0f1f0;
  color: var(--stz-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--stz-border);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--stz-border);
  vertical-align: top;
}

.data-table tr:hover { background: #fafafa; }

.vehicle-chip {
  display: inline-block;
  background: #eef0ef;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  margin: 2px 4px 2px 0;
}

.badge-count {
  background: var(--stz-dark);
  color: var(--stz-white);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--stz-dark);
  color: var(--stz-white);
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.toast.error { background: var(--stz-red); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--stz-muted);
  font-size: 14px;
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--stz-border);
  border-radius: 4px;
  font-size: 14px;
}

@media (max-width: 800px) {
  .login-wrap { flex-direction: column; }
  .login-brand { flex: none; }
  .form-grid { grid-template-columns: 1fr; }
}
