:root {
  --color-primary: #e93525;
  --color-ink: #242424;
  --color-light-gray: #9fa3a7;
  --color-dark-gray: #4e4e4e;
  --color-background: #ffffff;
  --color-muted: #f6f7f8;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Ubuntu', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-muted);
}

.container {
  width: min(1100px, 90vw);
  margin: 0 auto;
  padding: 1.5rem 0;
}

.app-header {
  background: var(--color-background);
  border-bottom: 1px solid #ececec;
}

.app-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

.logo-subtitle {
  margin: 0;
  color: var(--color-light-gray);
  font-size: 0.8rem;
}

nav a {
  margin-left: 1rem;
  text-decoration: none;
  font-weight: 500;
  color: var(--color-dark-gray);
}

.app-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.session-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-chip {
  background: #f4f4f4;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.user-chip .badge {
  background: var(--color-primary);
  color: #fff;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link-button {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

main.container {
  min-height: calc(100vh - 140px);
}

.hero {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
  align-items: center;
  margin: 2rem 0;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--color-dark-gray);
  line-height: 1.6;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-light-gray);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.hero-stats {
  display: grid;
  gap: 1rem;
}

.stat-card {
  background: var(--color-background);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  box-shadow: 0 8px 24px rgba(36, 36, 36, 0.08);
  border: none;
  width: 100%;
  text-align: left;
}

.stat-card.link-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-ink);
  text-decoration: none;
}

.stat-card.link-card .chevron {
  font-size: 1.4rem;
}

.stat-label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-light-gray);
}

.stat-value {
  margin: 0;
  font-size: 2rem;
  font-family: var(--font-heading);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.settings-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #e8e8e8;
  text-align: left;
}

.data-table th {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td.actions {
  white-space: nowrap;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.data-table .muted {
  color: var(--color-light-gray);
  font-size: 0.8rem;
}

.data-table td.actions form {
  margin: 0;
}

.list-card header h2 {
  margin-bottom: 0.3rem;
}

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #efefef;
  padding: 0.9rem 0;
}

.item-list li:first-child {
  border-top: none;
}

.item-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.item-info span {
  color: var(--color-dark-gray);
  font-size: 0.85rem;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.item-actions .link,
.item-actions .btn,
.item-actions form {
  display: inline-flex;
}

.item-actions .link {
  background: none;
  border: none;
  padding: 0;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}

.item-actions .link.danger {
  color: #bf1e14;
}

.inline-form {
  margin: 0;
}

.card {
  background: var(--color-background);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 12px 32px rgba(36, 36, 36, 0.08);
}

.card header h2 {
  margin-top: 0;
  font-family: var(--font-heading);
}

.reservation-list,
.vehicle-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reservation-list li,
.vehicle-list li {
  border-bottom: 1px solid #efefef;
  padding: 0.9rem 0;
}

.vehicle-list strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
}

.vehicle-text,
.vehicle-list select,
.vehicle-actions button,
.status-line {
  font-family: var(--font-body);
}

.reservation-list li:last-child,
.vehicle-list li:last-child {
  border-bottom: none;
}

.reservation-list strong {
  font-family: var(--font-heading);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--color-primary);
  color: var(--color-background);
  margin-right: 0.5rem;
}

.vehicle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-dark-gray);
}

.vehicle-actions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.vehicle-assign-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.vehicle-assign-form select {
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  padding: 0.4rem 0.6rem;
}

.status {
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--color-light-gray);
  color: var(--color-background);
  text-transform: uppercase;
  font-size: 0.75rem;
}

.status.available {
  background: #1c8c3a;
}

.status.maintenance {
  background: #c48a16;
}

.status.default {
  display: none;
}

.status.free {
  background: #1c8c3a;
}

.status.warning {
  background: #c48a16;
}

.status.danger {
  background: #d7263d;
}

.notes {
  margin: 0.5rem 0 0;
  color: var(--color-light-gray);
}

.status-line {
  margin: 0.3rem 0 0;
  display: flex;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--color-ink);
}

.status-line .label {
  font-weight: 600;
}

.empty-state {
  color: var(--color-light-gray);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  background: var(--color-primary);
  color: var(--color-background);
}

.btn.ghost {
  border: 1px solid var(--color-light-gray);
  color: var(--color-dark-gray);
  background: transparent;
}

.btn.small {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.btn.danger {
  border: 1px solid #bf1e14;
  color: #bf1e14;
  background: transparent;
}

.form-wrapper {
  margin: 2rem 0 4rem;
}

.form-wrapper.narrow {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.form .field {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.field-group {
  border-top: 1px solid #f0f0f0;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-dark-gray);
  margin-bottom: 0.5rem;
}

.form label {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.form input,
.form select,
.form textarea {
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  padding: 0.8rem;
  font-size: 1rem;
  font-family: var(--font-body);
}

.help-text {
  font-size: 0.8rem;
  color: var(--color-light-gray);
  margin-top: 0.2rem;
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inline-field .muted {
  color: var(--color-light-gray);
  font-weight: 600;
}

.inline-field input {
  flex: 1;
}

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

.management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.error {
  color: var(--color-primary);
  font-size: 0.85rem;
  margin: 0.2rem 0 0;
}

.flash-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, 92vw);
  z-index: 20;
  display: grid;
  gap: 0.75rem;
  pointer-events: none;
}

.flash {
  padding: 1rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
  border-radius: 12px;
  background: var(--color-primary);
  color: var(--color-background);
  box-shadow: 0 12px 28px rgba(36, 36, 36, 0.16);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
  animation: flash-in 0.25s ease-out;
}

.flash-success {
  background: #0f6a37;
  border-left: 4px solid #72ffb4;
  color: #e8fff2;
}

.flash-error {
  background: #d7263d;
  border-left: 4px solid #ffbdb1;
}

.flash-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.flash-hide {
  opacity: 0;
  transform: translateY(-10px);
}

@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-footer {
  background: var(--color-ink);
  color: var(--color-background);
}

.app-footer small {
  color: var(--color-light-gray);
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .app-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .app-header nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .management-grid,
  .settings-lists,
  .hero-stats,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-assign-form {
    flex-direction: column;
    align-items: stretch;
  }

  .vehicle-assign-form select,
  .vehicle-assign-form button {
    width: 100%;
  }
}

@media (max-width: 500px) {
  .stat-card {
    padding: 1rem;
  }

  .card {
    padding: 1.2rem;
  }

  .vehicle-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-header nav a {
    margin-left: 0;
  }
}

.mobile-claim {
  background: radial-gradient(circle at 18% 18%, #40201b, #0c0d11 38%), #0b0c10;
  color: #f7f8fb;
}

.mobile-claim .app-header,
.mobile-claim .app-footer {
  display: none;
}

.mobile-claim main.container {
  width: min(520px, 94vw);
  min-height: 100vh;
  padding: 1.5rem 0 2.5rem;
  display: flex;
  align-items: stretch;
}

.claim-shell {
  position: relative;
  width: 100%;
  background: linear-gradient(145deg, rgba(32, 21, 21, 0.82), rgba(14, 17, 24, 0.9));
  border-radius: 26px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(5, 7, 12, 0.55);
  overflow: hidden;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.3s ease;
}

.claim-shell.mounted {
  transform: translateY(0);
  opacity: 1;
}

.claim-shell.success {
  background: linear-gradient(145deg, #0f4f33, #0a3221);
  box-shadow: 0 18px 60px rgba(12, 107, 70, 0.35);
}

.claim-shell.disabled {
  filter: grayscale(0.2);
  opacity: 0.9;
}

.claim-ambient,
.claim-ambient::before {
  position: absolute;
  inset: -22% 10% auto -22%;
  height: 60%;
  background: radial-gradient(circle, rgba(233, 53, 37, 0.35), transparent 55%);
  filter: blur(42px);
  animation: drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

.claim-ambient::before {
  content: "";
  inset: auto -20% -25% 20%;
  background: radial-gradient(circle, rgba(79, 54, 208, 0.35), transparent 60%);
  animation-delay: 4s;
}

.claim-hero {
  position: relative;
  text-align: center;
  margin-bottom: 1.2rem;
  z-index: 1;
}

.logo-orb {
  width: 92px;
  height: 92px;
  margin: 0 auto 0.6rem;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(233, 53, 37, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.logo-orb img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  animation: floaty 4s ease-in-out infinite;
}

.orb-glow {
  position: absolute;
  inset: -8px;
  border-radius: 24px;
  background: radial-gradient(circle at 30% 30%, rgba(233, 53, 37, 0.8), transparent 60%);
  filter: blur(18px);
  animation: pulse 3s ease-in-out infinite;
}

.claim-shell h1 {
  font-family: var(--font-heading);
  margin: 0.2rem 0 0.3rem;
  color: #fdfdfd;
}

.claim-shell h2 {
  color: #fdfdfd;
  margin: 0.2rem 0 0;
}

.claim-shell .lede {
  color: #cfd1d8;
  line-height: 1.5;
  margin: 0.3rem 0 0.8rem;
}

.private-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #e8e9ee;
  font-size: 0.85rem;
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.private-tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #72ffb4;
  box-shadow: 0 0 0 0 rgba(114, 255, 180, 0.35);
  animation: pulseDot 2.4s infinite;
}

.claim-grid {
  display: grid;
  gap: 1rem;
  z-index: 1;
  position: relative;
}

.claim-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.claim-card.accent {
  background: linear-gradient(145deg, rgba(233, 53, 37, 0.12), rgba(255, 255, 255, 0.04));
}

.claim-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.status-chip {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(233, 53, 37, 0.16);
  color: #ffdacd;
  font-size: 0.85rem;
  border: 1px solid rgba(233, 53, 37, 0.3);
}

.status-chip.muted {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e6ed;
  border-color: rgba(255, 255, 255, 0.14);
}

.claim-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.select-field select {
  width: 100%;
  padding: 1rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  color: #fdfdfd;
  font-size: 1rem;
  appearance: none;
}

.select-field select:focus {
  outline: 2px solid rgba(233, 53, 37, 0.5);
  box-shadow: 0 0 0 3px rgba(233, 53, 37, 0.2);
}

.btn-claim {
  width: 100%;
  justify-content: center;
  gap: 0.7rem;
  background: linear-gradient(120deg, #ff715b, #e93525 65%, #ffaf8a);
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(233, 53, 37, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-claim .btn-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.btn-claim small {
  font-weight: 400;
  font-size: 0.85rem;
  opacity: 0.8;
}

.btn-claim .pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  animation: pulse 2.2s infinite;
  pointer-events: none;
}

.btn-claim:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(233, 53, 37, 0.45);
}

.btn-claim.pressed {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 10px 24px rgba(233, 53, 37, 0.32);
}

.claim-alert {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fdfdfd;
  margin: 1rem 0;
}

.claim-alert.danger {
  border-color: rgba(233, 53, 37, 0.35);
  background: rgba(233, 53, 37, 0.12);
}

.mobile-claim .vehicle-meta {
  display: grid;
  gap: 0.35rem;
  color: #f5f6f9;
  font-size: 0.95rem;
}

.mobile-claim .meta-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mobile-claim .meta-line .bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffb199;
  box-shadow: 0 0 12px rgba(255, 177, 153, 0.6);
}

.mobile-claim .meta-line .bullet.live {
  background: #72ffb4;
  box-shadow: 0 0 12px rgba(114, 255, 180, 0.7);
}

.mobile-claim .meta-line .bullet.glow {
  animation: pulseDot 2.2s infinite;
}

.mobile-claim .micro-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
  margin-top: 0.6rem;
}

.mobile-claim .micro-timeline span {
  text-align: center;
  padding: 0.4rem 0.3rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #e7e9f0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: shimmer 6s linear infinite;
  background-size: 200% 200%;
}

.claim-success {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  display: grid;
  gap: 0.4rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(114, 255, 180, 0.14), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(114, 255, 180, 0.5);
  color: #e9fff4;
  animation: success-pop 0.4s ease, success-pulse 1.6s ease-in-out 0.4s infinite alternate;
}

.success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #72ffb4;
  color: #0c0f11;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(114, 255, 180, 0.35);
  animation: glow 1.8s ease-in-out infinite alternate;
}

.mobile-claim .note {
  color: #e5e7ee;
}

.mobile-claim .error {
  color: #ffbdb1;
}

@keyframes floaty {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse {
  0% { opacity: 0.45; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0.45; transform: scale(0.98); }
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(114, 255, 180, 0.35); }
  70% { box-shadow: 0 0 0 12px rgba(114, 255, 180, 0); }
  100% { box-shadow: 0 0 0 0 rgba(114, 255, 180, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(12px, -10px, 0) scale(1.1); }
}

@keyframes success-pop {
  0% { transform: translateY(6px) scale(0.97); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes success-pulse {
  from { box-shadow: 0 0 0 0 rgba(114, 255, 180, 0.25); }
  to { box-shadow: 0 0 0 12px rgba(114, 255, 180, 0); }
}

@keyframes glow {
  from { box-shadow: 0 12px 22px rgba(114, 255, 180, 0.35); }
  to { box-shadow: 0 20px 30px rgba(114, 255, 180, 0.5); }
}
