:root {
  --bg: #ecf7f8;
  --bg-strong: #d9f0ef;
  --text: #11313c;
  --muted: #4e6a73;
  --card: #ffffff;
  --line: #c7e0e2;
  --accent: #1a8a78;
  --accent-strong: #13675a;
  --accent-blue: #2269b4;
  --accent-blue-strong: #184d88;
  --danger: #9f3c4b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 18% 12%, rgba(34, 105, 180, 0.16) 0, transparent 38%),
    radial-gradient(circle at 86% 14%, rgba(26, 138, 120, 0.2) 0, transparent 34%),
    radial-gradient(circle at 78% 82%, rgba(26, 138, 120, 0.14) 0, transparent 40%),
    var(--bg);
  min-height: 100vh;
}

body[data-loading="true"] header,
body[data-loading="true"] main {
  visibility: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(to right, rgba(26, 138, 120, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 105, 180, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.brand-mark,
.page-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 18px;
  background: #fff;
  padding: 5px;
  box-shadow: 0 12px 26px rgba(17, 49, 60, 0.12);
}

.brand-subline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

h1, h2 {
  margin-top: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem;
  box-shadow: 0 14px 34px rgba(17, 49, 60, 0.08);
}

.auth-shell {
  max-width: 1080px;
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

.auth-shell > * {
  animation: floatIn 0.6s ease both;
}

.auth-shell > *:first-child {
  animation-delay: 0.04s;
}

.auth-shell > *:last-child {
  animation-delay: 0.1s;
}

.brand-panel {
  padding: 1rem;
}

.brand-panel h1,
.brand-panel p,
.brand-mark {
  animation: floatIn 0.62s ease both;
}

.auth-card {
  max-width: 460px;
  width: 100%;
  justify-self: center;
  overflow: hidden;
  animation: floatIn 0.55s ease both;
}

.tab-row {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}

.tab {
  border: 0;
  background: transparent;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  color: var(--muted);
  font: inherit;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.tab.active {
  color: var(--text);
  border-bottom: 2px solid var(--accent-blue);
  font-weight: 700;
}

.tab:hover {
  color: var(--accent-blue-strong);
  transform: translateY(-1px);
}

label {
  font-size: 0.9rem;
  margin-top: 0.6rem;
  display: block;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  background: #f9feff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(34, 105, 180, 0.12);
  transform: translateY(-1px);
}

#email-wrap {
  display: grid;
  gap: 0.3rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transform: translateY(-6px);
  transition: max-height 280ms ease, opacity 220ms ease, margin-top 280ms ease, transform 280ms ease;
}

#email-wrap.is-visible {
  max-height: 120px;
  opacity: 1;
  margin-top: 0.2rem;
  transform: translateY(0);
}

.form-grid {
  display: grid;
  gap: 0.3rem;
}

#submit-btn {
  margin-top: 0.8rem;
}

.form-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.ghost-link {
  border-radius: 10px;
  border: 1px solid transparent;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  padding: 0.58rem 0.85rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, color 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent));
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-blue-strong), var(--accent-strong));
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(26, 138, 120, 0.16);
}

.btn-secondary,
.ghost-link {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.ghost-link:hover,
.btn-secondary:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue-strong);
  transform: translateY(-1px);
}

.btn-danger {
  background: #ffe9e9;
  color: var(--danger);
  border-color: #f0b5b5;
}

.message {
  min-height: 1.2rem;
  color: var(--accent-strong);
  margin-top: 0.55rem;
}

.message.error {
  color: var(--danger);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
}

.top-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

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

.vehicle-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.vehicle-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
  background: linear-gradient(180deg, #ffffff, #f5fcfd);
}

.vehicle-item p {
  margin: 0.2rem 0;
  color: var(--muted);
}

.list-actions {
  display: grid;
  gap: 0.4rem;
}

.about-shell {
  max-width: 850px;
  margin: 2rem auto;
}

.about-shell.card {
  background: linear-gradient(180deg, #ffffff, #f5fbfc);
}

.about-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.page-footer-note {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 15;
  pointer-events: none;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(17, 49, 60, 0.78);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(199, 224, 226, 0.9);
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 18px rgba(17, 49, 60, 0.08);
  white-space: nowrap;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 920px) {
  .auth-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

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