:root {
  --background: #494975;
  --background-soft: #f4efe8;
  --surface: rgba(255, 255, 255, 0.96);
  --secondary-surface: #efe5d8;
  --primary-text: #1d1b18;
  --secondary-text: #5b5248;
  --accent: #f05a28;
  --accent-strong: #d9481c;
  --highlight: #ffb000;
  --success: #2e8b57;
  --error: #c0392b;
  --shadow: 0 22px 40px rgba(29, 27, 24, 0.12);
  --shadow-soft: 0 10px 24px rgba(29, 27, 24, 0.08);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --page-gradient:
    radial-gradient(circle at top left, rgba(255, 176, 0, 0.18), transparent 28%),
    linear-gradient(180deg, #403f6b 0%, #595988 38%, #f4efe8 100%);
  --chrome-gradient: linear-gradient(135deg, #313157, #494975);
  --accent-gradient: linear-gradient(90deg, #ff7a3d, #e14b1f);
  --border: rgba(73, 73, 117, 0.12);
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--primary-text);
  background: var(--page-gradient);
}

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

img {
  max-width: 100%;
  display: block;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 92px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 20px 16px 16px;
  background: var(--chrome-gradient);
  color: white;
  box-shadow: var(--shadow-soft);
}

.topbar__brand {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.eyebrow,
.card-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.74);
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 4vw, 2rem);
  line-height: 1.05;
}

.page {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 28px 16px 32px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: grid;
  gap: 20px;
}

.stack {
  display: grid;
  gap: 18px;
}

.card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.card h2,
.empty-state h2,
.detail-sheet h2 {
  margin: 0;
  font-size: 1.25rem;
}

.card p,
.empty-state p,
.detail-sheet p {
  margin: 0;
}

.muted {
  color: var(--secondary-text);
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 700;
  color: var(--primary-text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(29, 27, 24, 0.08);
  border-radius: var(--radius-md);
  background: var(--secondary-surface);
  padding: 14px 16px;
  color: var(--primary-text);
  outline: none;
  transition: box-shadow 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.field input,
.field select {
  min-height: 54px;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(240, 90, 40, 0.35);
  box-shadow: 0 0 0 4px rgba(240, 90, 40, 0.12);
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 15px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
}

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

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button--primary {
  color: white;
  background: var(--accent-gradient);
  box-shadow: 0 16px 28px rgba(217, 72, 28, 0.22);
}

.feedback-message {
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 600;
}

.feedback-message--success {
  background: rgba(46, 139, 87, 0.14);
  color: var(--success);
}

.feedback-message--error {
  background: rgba(192, 57, 43, 0.12);
  color: var(--error);
}

.feedback-message--info {
  background: rgba(240, 90, 40, 0.1);
  color: var(--accent-strong);
}

.is-hidden {
  display: none !important;
}

.photo-preview,
.detail-image {
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  background: white;
}

.photo-preview {
  max-height: 280px;
  object-fit: cover;
  width: 100%;
}

.photo-meta {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 176, 0, 0.14);
  color: var(--secondary-text);
  font-size: 0.94rem;
  font-weight: 600;
}

.results-grid {
  display: grid;
  gap: 14px;
}

.result-card {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.result-card__header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.result-card__title {
  font-size: 1.1rem;
  font-weight: 800;
}

.result-card__count {
  white-space: nowrap;
  color: var(--accent-strong);
  font-weight: 800;
}

.result-card__bike-box {
  margin-top: 8px;
  font-weight: 600;
  color: var(--secondary-text);
}

.result-card__notes {
  margin-top: 10px;
  color: var(--secondary-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-card__date {
  margin-top: 12px;
  color: rgba(91, 82, 72, 0.8);
  font-size: 0.92rem;
  font-weight: 600;
}

.empty-state {
  text-align: center;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), var(--max-width));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px;
  background: rgba(49, 49, 87, 0.92);
  border-radius: 26px;
  box-shadow: 0 18px 34px rgba(29, 27, 24, 0.28);
  backdrop-filter: blur(16px);
}

.tabbar__item {
  border: 0;
  padding: 13px 10px;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.tabbar__item.is-active {
  color: white;
  background: linear-gradient(90deg, rgba(255, 122, 61, 0.95), rgba(225, 75, 31, 0.95));
}

.detail-dialog {
  border: 0;
  padding: 0;
  width: min(calc(100% - 24px), 720px);
  border-radius: 28px;
  background: transparent;
}

.detail-dialog::backdrop {
  background: rgba(20, 19, 35, 0.56);
  backdrop-filter: blur(6px);
}

.detail-sheet {
  background: #fffaf5;
  color: var(--primary-text);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.detail-sheet__header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.detail-sheet__content {
  margin-top: 20px;
}

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

.detail-label {
  margin-bottom: 6px !important;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-link {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.detail-link:hover {
  text-decoration: underline;
}

.detail-image {
  margin-top: 14px;
}

.icon-button {
  border: 0;
  background: var(--secondary-surface);
  color: var(--primary-text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (min-width: 760px) {
  .page {
    padding-top: 40px;
  }

  .stack {
    gap: 20px;
  }

  .card {
    padding: 24px;
  }
}

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

  .topbar {
    padding-top: 16px;
  }
}


.robot-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
