:root {
  --navy: #06264b;
  --navy-soft: #123a65;
  --orange: #f7a313;
  --green: #16a36b;
  --red: #e05252;
  --amber: #f1a431;
  --ink: #13243a;
  --muted: #657386;
  --line: #dbe3ee;
  --bg: #f4f7fb;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(340px, 430px);
  gap: 28px;
  align-items: start;
  max-width: 1180px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 24px;
}

.sidebar {
  position: sticky;
  top: 32px;
}

.brand {
  display: grid;
  place-items: center;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.brand img {
  width: min(180px, 100%);
  height: auto;
  display: block;
}

.role-switch,
.nav-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.role-switch {
  grid-template-columns: 1fr 1fr;
}

.role-button,
.nav-item,
.secondary-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--navy);
  font-weight: 700;
}

.role-button.active,
.nav-item.active {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}

.app-version {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
}

.phone-frame {
  min-height: 740px;
  overflow: hidden;
  background: #fdfefe;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 22px 55px rgba(6, 38, 75, 0.14);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 28px 24px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: 1.55rem;
}

h2 {
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 1.15rem;
}

.score-pill {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 4px solid var(--orange);
  border-radius: 50%;
  color: var(--navy);
  font-weight: 900;
  background: white;
}

.view {
  display: none;
  padding: 20px;
}

.view.active {
  display: block;
}

.status-strip,
.primary-card,
.score-hero,
.request-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.status-strip strong,
.status-strip span {
  display: block;
}

.muted {
  color: var(--muted);
  font-size: 0.84rem;
}

.chance-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.chance-green {
  background: var(--green);
}

.chance-orange {
  background: var(--amber);
}

.chance-red {
  background: var(--red);
}

.primary-card {
  padding: 18px;
  margin-bottom: 14px;
}

.next-ride-card {
  border-color: rgba(22, 163, 107, 0.42);
}

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

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.approved {
  color: #0c6d49;
  background: #dff5eb;
}

.pending {
  color: #8a5b10;
  background: #fff1d5;
}

.counter {
  color: #0a5488;
  background: #dcefff;
}

.declined {
  color: #9a2c2c;
  background: #ffe0e0;
}

.ride-info {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
}

.ride-info div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf1f6;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.chance-block {
  padding: 14px;
  border-radius: 8px;
  background: #eff8f4;
}

.chance-block.orange {
  background: #fff5e5;
}

.chance-block.red {
  background: #fff0f0;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.meter-label span {
  color: var(--muted);
}

.meter {
  height: 12px;
  overflow: hidden;
  background: #d9e2ed;
  border-radius: 999px;
}

.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  border-radius: inherit;
  transition: width 220ms ease;
}

.chance-block.orange .meter span {
  background: var(--amber);
}

.chance-block.red .meter span {
  background: var(--red);
}

.request-list {
  display: grid;
  gap: 10px;
}

.section-title {
  margin: 18px 0 10px;
  font-size: 1rem;
}

.request-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
}

.request-item strong,
.request-item span {
  display: block;
}

.request-date {
  color: var(--navy);
  font-size: 1.02rem;
}

.request-hour {
  margin: 2px 0 4px;
  color: var(--orange);
  font-size: 1.35rem;
  font-weight: 900;
}

.cancel-button {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #ffd1d1;
  border-radius: 8px;
  color: #9a2c2c;
  background: #fff7f7;
  font-weight: 800;
}

.next-ride-cancel {
  margin-top: 12px;
}

.request-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: white;
}

textarea {
  resize: vertical;
}

.primary-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--orange);
  font-weight: 900;
}

.result-card {
  margin-top: 18px;
}

.score-hero {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 26px 18px;
  margin-bottom: 14px;
}

.score-hero strong {
  color: var(--navy);
  font-size: 3.6rem;
  line-height: 1;
}

.score-hero span,
.body-copy {
  color: var(--muted);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.score-grid div {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 16px 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.score-grid strong {
  color: var(--navy);
  font-size: 1.8rem;
}

.score-grid span {
  color: var(--muted);
}

.secondary-button:hover,
.primary-button:hover {
  filter: brightness(0.97);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .sidebar {
    position: static;
  }

  .phone-frame {
    min-height: 680px;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding: 12px;
    gap: 14px;
  }

  .phone-frame {
    border-radius: 18px;
  }

  .topbar,
  .view {
    padding-left: 16px;
    padding-right: 16px;
  }

}
