:root {
  color-scheme: dark;
  --page: #20201f;
  --surface: #302f2d;
  --surface-strong: #262624;
  --line: #55534f;
  --text: #f5f4f1;
  --muted: #bdbab4;
  --blue: #b7dcf7;
  --blue-strong: #91c9ee;
  --yellow: #ffd84d;
  --red: #ff898f;
  --green: #8fdda6;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  background: var(--page);
}

body {
  margin: 0;
  min-width: 300px;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  line-height: 1.35;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--blue);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #44423f;
  background: rgba(32, 32, 31, 0.98);
}

.brand {
  display: flex;
  align-items: center;
  width: min(100%, 720px);
  min-height: 82px;
  margin: 0 auto;
  padding: 10px 18px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: contain;
}

.brand span {
  min-width: 0;
  margin-left: 14px;
  overflow-wrap: anywhere;
  font-size: 1.55rem;
  font-weight: 800;
}

.portal {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 14px 14px 38px;
}

.alert,
.driver-line,
.assignment,
.empty-state,
.login-panel,
.section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.alert {
  margin-bottom: 12px;
  padding: 13px 15px;
  font-weight: 700;
}

.alert-ok {
  border-color: #4f9663;
  color: var(--green);
}

.alert-error {
  border-color: #9c565a;
  color: #ffb2b6;
}

.driver-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 13px 15px;
}

.driver-line div {
  min-width: 0;
}

.driver-line span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.driver-line strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1.1rem;
}

.driver-line form {
  flex: 0 0 auto;
}

.link-button {
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section {
  margin: 0 0 12px;
  overflow: hidden;
}

.assignment {
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--surface-strong);
}

.assignment > .section {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.assignment-head {
  padding: 13px 16px;
  color: var(--yellow);
  font-size: 1.05rem;
  font-weight: 800;
}

.section > summary,
.faq details > summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 12px 48px 12px 16px;
  cursor: pointer;
  list-style: none;
  font-size: 1.08rem;
  font-weight: 800;
}

.section > summary::-webkit-details-marker,
.faq details > summary::-webkit-details-marker {
  display: none;
}

.section > summary i,
.faq details > summary i {
  position: absolute;
  top: 50%;
  right: 18px;
  color: var(--blue);
  font-size: 1.7rem;
  font-style: normal;
  line-height: 1;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 120ms ease;
}

.section[open] > summary i,
.faq details[open] > summary i {
  transform: translateY(-50%) rotate(90deg);
}

.section[open] > summary {
  border-bottom: 1px solid var(--line);
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  margin-left: 10px;
  padding: 0 8px;
  border-radius: 15px;
  background: var(--yellow);
  color: #1f1f1d;
  font-size: 0.88rem;
}

.section-body {
  padding: 14px 16px;
}

.section-body p {
  margin: 0 0 12px;
}

.section-body p:last-child {
  margin-bottom: 0;
}

.warning-list p {
  padding-bottom: 11px;
  border-bottom: 1px solid #4c4a47;
}

.warning-list p:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.key-values {
  display: grid;
  grid-template-columns: minmax(112px, 0.8fr) minmax(0, 1.45fr);
  gap: 10px 16px;
}

.key-values > span {
  color: var(--muted);
  font-weight: 700;
}

.key-values b,
.key-values a {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.key-values small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.contacts a {
  color: var(--blue);
}

.documents {
  margin: -14px -16px 14px;
}

.document {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.document > div {
  min-width: 0;
}

.document strong,
.document span {
  display: block;
  overflow-wrap: anywhere;
}

.document span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.document a {
  min-height: 44px;
  padding: 10px 0 10px 12px;
  font-weight: 700;
}

.document-warning strong,
.document-warning > div span {
  color: var(--red);
}

.document .muted,
.muted {
  color: var(--muted);
}

.split-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.split-form label,
.login-panel label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-weight: 700;
}

input {
  width: 100%;
  min-width: 0;
  height: 54px;
  border: 1px solid #67645f;
  border-radius: 7px;
  padding: 0 14px;
  background: #3b3936;
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: var(--blue-strong);
  box-shadow: 0 0 0 2px rgba(145, 201, 238, 0.2);
}

button[type="submit"],
.primary-button {
  min-height: 54px;
  border: 0;
  border-radius: 7px;
  padding: 8px 14px;
  background: var(--blue);
  color: #151514;
  cursor: pointer;
  font-weight: 800;
  overflow-wrap: anywhere;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.payment p {
  color: var(--muted);
}

.payment-form input {
  font-size: 1.08rem;
  font-weight: 700;
}

.payment-form button {
  background: var(--yellow);
}

.faq > .section-body {
  padding: 0;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 0;
}

.faq details > summary {
  min-height: 54px;
  font-size: 1rem;
}

.faq details p {
  margin: 0;
  padding: 0 16px 16px;
  color: #e2e0db;
}

.empty-state {
  margin-bottom: 14px;
  padding: 16px;
}

.empty-state p {
  margin: 0;
}

.login-panel {
  width: min(100%, 520px);
  margin: 12px auto 0;
  padding: 20px;
}

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

.login-panel .primary-button {
  width: 100%;
}

.login-phone {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
}

.pin-label {
  text-align: center;
}

.pin-display {
  width: 160px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.5rem;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  justify-content: center;
  gap: 12px;
}

.pin-pad button {
  width: 76px;
  height: 76px;
  border: 1px solid #77746e;
  border-radius: 50%;
  background: #44423f;
  color: var(--text);
  cursor: pointer;
  font-size: 1.45rem;
  font-weight: 700;
}

.pin-pad button:active {
  background: var(--blue);
  color: #151514;
}

.secondary-action {
  margin-top: 8px;
  text-align: center;
}

.secondary-action .link-button {
  margin: 0 auto;
}

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

@media (max-width: 480px) {
  :root {
    font-size: 17px;
  }

  .brand {
    min-height: 72px;
    padding: 8px 12px;
  }

  .brand img {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .brand span {
    margin-left: 10px;
    font-size: 1.35rem;
  }

  .portal {
    padding: 10px 9px 28px;
  }

  .section > summary,
  .faq details > summary {
    padding-left: 14px;
  }

  .section-body {
    padding: 13px 14px;
  }

  .documents {
    margin: -13px -14px 13px;
  }

  .document {
    padding-right: 14px;
    padding-left: 14px;
  }

  .key-values {
    grid-template-columns: minmax(98px, 0.75fr) minmax(0, 1.4fr);
    gap: 9px 12px;
  }

  .login-panel {
    padding: 16px 13px;
  }

  .pin-pad {
    grid-template-columns: repeat(3, 68px);
    gap: 10px;
  }

  .pin-pad button {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 350px) {
  .split-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .key-values {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .key-values b,
  .key-values a {
    margin-bottom: 8px;
  }
}
