:root {
  --asphalt: #1c1f24;
  --asphalt-soft: #2a2e35;
  --paper: #f6f4ef;
  --lane-yellow: #f4b93e;
  --driver-blue: #2f6fed;
  --mechanic-orange: #e8622c;
  --ink: #1c1f24;
  --muted: #6b7280;
  --danger: #d64545;
  --radius: 14px;
}

ion-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--asphalt);
  background-image:
    radial-gradient(
      circle at 15% 20%,
      rgba(244, 185, 62, 0.06),
      transparent 40%
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(47, 111, 237, 0.08),
      transparent 40%
    );
  font-family: "Work Sans", sans-serif;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.page {
  width: 100%;
  max-width: 460px;
}

.brand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.brand-mark {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.5px;
  color: var(--paper);
}

.brand-tag {
  font-size: 12px;
  color: rgba(246, 244, 239, 0.55);
  letter-spacing: 0.3px;
}

.card {
  background: var(--paper);
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
}

.card-head h1 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 30px;
  margin: 0 0 4px;
  letter-spacing: 0.2px;
}

.card-head p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

/* Role lanes */

.lanes {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  margin-bottom: 6px;
}

.lane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 10px;
  background: #fff;
  border: 2px solid #e6e2d8;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.1s ease;
}

.lane:hover {
  transform: translateY(-1px);
}

.lane-icon {
  font-size: 26px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.lane-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.3px;
}

.lane-sub {
  font-size: 11.5px;
  color: var(--muted);
}

#lane-driver[aria-checked="true"] {
  border-color: var(--driver-blue);
  background: rgba(47, 111, 237, 0.06);
}
#lane-driver[aria-checked="true"] .lane-icon,
#lane-driver[aria-checked="true"] .lane-title {
  color: var(--driver-blue);
}

#lane-mechanic[aria-checked="true"] {
  border-color: var(--mechanic-orange);
  background: rgba(232, 98, 44, 0.06);
}
#lane-mechanic[aria-checked="true"] .lane-icon,
#lane-mechanic[aria-checked="true"] .lane-title {
  color: var(--mechanic-orange);
}

.lane-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
}

.lane-divider-line {
  width: 3px;
  height: 62%;
  background-image: linear-gradient(var(--lane-yellow) 55%, transparent 45%);
  background-size: 3px 14px;
  background-repeat: repeat-y;
  border-radius: 2px;
}

#role-error {
  display: none;
  margin: 6px 2px 14px;
}
#role-error.visible {
  display: block;
}

/* Form fields */

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

input {
  font-family: "Work Sans", sans-serif;
  font-size: 15px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1.5px solid #e0ddd3;
  background: #fff;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

input:focus {
  border-color: var(--driver-blue);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

input.invalid {
  border-color: var(--danger);
}

input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.12);
}

.input-with-icon {
  position: relative;
  display: flex;
}

.input-with-icon input {
  flex: 1;
  padding-right: 42px;
}

.icon-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  cursor: pointer;
  border-radius: 8px;
}

.icon-btn:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.field-error {
  display: none;
  font-size: 12.5px;
  color: var(--danger);
}

.field-error.visible {
  display: block;
}

#form-error,
#login-form-error {
  text-align: center;
  margin-top: 4px;
}

.submit-btn {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.4px;
  color: #fff;
  background: var(--ink);
  border: none;
  border-radius: 10px;
  padding: 13px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.1s ease;
}

.submit-btn:hover {
  background: #000;
  transform: translateY(-1px);
}

.submit-btn ion-icon {
  font-size: 18px;
}

.switch-auth {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin: 18px 0 0;
}

.switch-auth a {
  color: var(--driver-blue);
  font-weight: 500;
  text-decoration: none;
}

.switch-auth a:hover {
  text-decoration: underline;
}

@media (max-width: 420px) {
  .card {
    padding: 26px 20px 22px;
  }
  .lane-title {
    font-size: 17px;
  }
}
.btn-loading-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.btn-loading-dots span {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: btn-dot-bounce 1.2s infinite ease-in-out both;
}

.btn-loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.btn-loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes btn-dot-bounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}
