:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #333333;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background: #333333;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(100vw, 393px);
  min-height: min(100vh, 852px);
  position: relative;
  overflow: hidden;
  background: #f2f4f8;
  border: 12px solid #111111;
  border-radius: 38px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.auth-view {
  min-height: calc(100vh - 16px);
  max-height: 836px;
  padding: 18px;
  background: #f2f4f8;
  color: #172033;
}

.auth-brand {
  margin-top: 58px;
  padding: 22px 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e3e8f0;
}

.auth-brand h1 {
  margin: 12px 0 10px;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-brand p:last-child {
  max-width: 300px;
  margin: 0;
  color: #6b7890;
  font-size: 13px;
  line-height: 1.45;
}

.auth-form {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid #e3e8f0;
  border-radius: 18px;
  background: #ffffff;
  color: #172033;
}

.auth-form .btn {
  width: 100%;
}

.auth-hint {
  margin: 14px 0 0;
  color: #7b8799;
  font-size: 12px;
  line-height: 1.35;
}

.auth-error {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.app-view {
  min-height: min(100vh, 852px);
}

.topbar {
  height: 62px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #243f98;
  color: #fff;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff;
  color: #243f98;
  font-size: 18px;
  font-weight: 500;
}

#screen-title {
  margin: 0;
  max-width: 240px;
  font-size: 24px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
}

.top-icons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 25px;
  line-height: 1;
  font-weight: 700;
  padding: 0;
  position: relative;
}

#logout {
  font-size: 24px;
  letter-spacing: 1px;
}

.bell-button::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  width: 14px;
  height: 15px;
  border: 3px solid #fff;
  border-bottom: 0;
  border-radius: 12px 12px 4px 4px;
}

.bell-button::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 22px;
  width: 7px;
  height: 3px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 3px -3px 0 -1px #fff, -3px -3px 0 -1px #fff;
}

.content {
  height: calc(100vh - 62px - 72px - 24px);
  max-height: 694px;
  overflow: auto;
  padding: 24px 24px 86px;
  background: #f1f3f8;
}

.card {
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: none;
}

.card.accent {
  border-left: 3px solid var(--accent, #263f99);
}

.label {
  margin: 0 0 6px;
  color: #6d7b93;
  font-size: 11px;
  font-weight: 800;
}

.title {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
}

.muted {
  margin: 8px 0 0;
  color: #6d7b93;
  font-size: 12px;
  line-height: 1.35;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  min-height: 74px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 10px;
}

.metric strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
}

.metric span {
  display: block;
  margin-top: 6px;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.btn {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: #263f99;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(38, 63, 153, 0.18);
}

.btn.green {
  background: #263f99;
}

.btn.ghost {
  background: #eef2ff;
  color: #263f99;
}

.field {
  margin-bottom: 16px;
}

.field input,
.field select {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  font-weight: 700;
}

.notice {
  padding: 14px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  background: #fff7df;
  color: #9a5b00;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 16px;
}

.counter {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 10px;
}

.counter span {
  font-weight: 800;
}

.counter button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #eef2ff;
  color: #263f99;
  font-weight: 900;
}

.status {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  font-size: 11px;
  font-weight: 800;
}

.pending {
  background: #fff4d6;
  color: #92400e;
}

.approved {
  background: #ecfdf3;
  color: #166534;
}

.rejected,
.error {
  background: #fee2e2;
  color: #b91c1c;
}

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 10px 17px 10px;
  border: 0;
  border-top: 1px solid #e1e6ef;
  border-radius: 0;
  background: #fff;
}

.tab {
  border: 0;
  outline: none;
  border-radius: 10px;
  background: transparent;
  color: #8ea0bd;
  font-size: 14px;
  font-weight: 600;
  padding-top: 28px;
  position: relative;
}

.tab.active {
  background: transparent;
  color: #263f99;
}

.tab:focus,
.tab:focus-visible {
  outline: none;
  box-shadow: none;
}

.tab::before {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  color: currentColor;
  font-size: 24px;
  line-height: 1;
  font-weight: 500;
}

.tab[data-view="home"]::before {
  content: "⌂";
}

.tab[data-view="cars"]::before {
  content: "▭";
}

.tab[data-view="requests"]::before {
  content: "▤";
}

.tab[data-view="profile"]::before {
  content: "♙";
}

.figma-action:disabled,
.btn:disabled {
  opacity: 0.48;
}

.car-card {
  min-height: 108px;
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #dce3ee;
  border-radius: 20px;
  background: #fff;
}

.car-card.busy {
  background: #f8fafc;
}

.car-card .btn {
  min-height: 42px;
}

.agree-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dce3ee;
  border-radius: 14px;
  background: #fff;
  color: #172033;
  font-weight: 700;
}

.agree-row input {
  width: 20px;
  height: 20px;
}

.profile-large {
  grid-template-columns: 70px 1fr;
}

.figma-profile-card,
.figma-request-card,
.figma-action {
  width: 100%;
  background: #fff;
  border: 1px solid #dce3ee;
  border-radius: 27px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.figma-profile-card {
  height: 82px;
  display: grid;
  grid-template-columns: 70px 1fr 126px;
  align-items: center;
  padding: 13px 15px 13px 14px;
  margin-bottom: 13px;
}

.avatar {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #263f99;
  color: #fff;
  font-size: 24px;
  font-weight: 500;
}

.max-id {
  color: #95a2b8;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.current-car {
  align-self: center;
  text-align: right;
}

.current-car span {
  display: block;
  margin-bottom: 5px;
  color: #95a2b8;
  font-size: 15px;
  font-weight: 600;
}

.current-car strong {
  color: #243f98;
  font-size: 17px;
  font-weight: 500;
}

.figma-request-card {
  min-height: 132px;
  position: relative;
  padding: 20px 29px 18px;
  margin-bottom: 14px;
}

.request-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.request-head h2 {
  margin: 0;
  color: #687792;
  font-size: 18px;
  font-weight: 600;
}

.blue-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 28px;
  padding: 0 15px;
  border-radius: 19px;
  background: #dce9ff;
  color: #1747c7;
  font-size: 15px;
  font-weight: 500;
}

.request-meta {
  position: absolute;
  right: 31px;
  top: 74px;
  color: #95a2b8;
  font-size: 17px;
  font-weight: 700;
}

.figma-request-card p {
  margin: 27px 0 6px;
  color: #95a2b8;
  font-size: 16px;
  font-weight: 500;
}

.odometer {
  color: #121a33;
  font-size: 36px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
}

.odometer span {
  color: #95a2b8;
  font-size: 16px;
  font-weight: 600;
}

.trip-pill {
  position: absolute;
  right: 29px;
  bottom: 21px;
  min-width: 82px;
}

.figma-actions {
  display: grid;
  gap: 13px;
}

.figma-action {
  height: 72px;
  display: grid;
  grid-template-columns: 56px 1fr 18px;
  align-items: center;
  column-gap: 18px;
  padding: 10px 24px 10px 24px;
  color: #95a2b8;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  border: 1px solid #dce3ee;
  box-shadow: none;
}

.figma-action span:nth-child(2) {
  white-space: normal;
}

.action-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 32px;
  font-weight: 300;
}

.action-icon.blue {
  background: #3d7cf4;
}

.action-icon.green {
  background: #16bf86;
}

.action-icon.orange {
  background: #f59e0b;
}

.action-icon.purple {
  background: #864df3;
}

.action-icon.cyan {
  background: #12b7ce;
  font-size: 25px;
}

.figma-action b {
  color: #95a2b8;
  font-size: 34px;
  font-weight: 300;
}

.figma-action i {
  position: absolute;
  right: 67px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #263f99;
  color: #fff;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
}

.role-segment {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.role-segment button {
  height: 31px;
  min-width: 72px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.role-segment button:first-child {
  background: #2563eb;
}

.role-segment button:last-child {
  background: #7c2ee8;
}

.auth-segment {
  top: 18px;
  right: 18px;
}

@media (max-width: 420px) {
  body {
    display: block;
    background: #f7f8fa;
  }

  .app-shell {
    width: 100vw;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-view,
  .app-view {
    min-height: 100vh;
  }

  .content {
    height: calc(100vh - 62px);
    max-height: none;
  }
}
