/* styles.css */
:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --card-soft: #f8fafc;
  --text: #182230;
  --muted: #667085;
  --border: #dde3ec;
  --accent: #315efb;
  --accent-soft: rgba(49, 94, 251, 0.12);
  --topbar: #111827;
  --topbar-text: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --overlay: rgba(3, 10, 24, 0.62);

  --status-slate-bg: rgba(100, 116, 139, 0.16);
  --status-slate-text: #334155;

  --status-sand-bg: rgba(245, 158, 11, 0.14);
  --status-sand-text: #92400e;

  --status-teal-bg: rgba(20, 184, 166, 0.14);
  --status-teal-text: #0f766e;

  --status-emerald-bg: rgba(16, 185, 129, 0.14);
  --status-emerald-text: #047857;

  --status-rose-bg: rgba(244, 63, 94, 0.14);
  --status-rose-text: #be123c;

  --positive-bg: rgba(16, 185, 129, 0.12);
  --positive-text: #047857;
  --negative-bg: rgba(244, 63, 94, 0.12);
  --negative-text: #be123c;
}

body.dark {
  --bg: #0b1220;
  --card: #101827;
  --card-soft: #152033;
  --text: #edf2f7;
  --muted: #9aa8bd;
  --border: #223148;
  --accent: #79a6ff;
  --accent-soft: rgba(121, 166, 255, 0.16);
  --topbar: #060c18;
  --topbar-text: #f8fafc;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  --overlay: rgba(0, 0, 0, 0.72);

  --status-slate-bg: rgba(148, 163, 184, 0.14);
  --status-slate-text: #dbe4ef;

  --status-sand-bg: rgba(250, 204, 21, 0.14);
  --status-sand-text: #fde68a;

  --status-teal-bg: rgba(45, 212, 191, 0.14);
  --status-teal-text: #99f6e4;

  --status-emerald-bg: rgba(52, 211, 153, 0.14);
  --status-emerald-text: #a7f3d0;

  --status-rose-bg: rgba(251, 113, 133, 0.14);
  --status-rose-text: #fecdd3;

  --positive-bg: rgba(52, 211, 153, 0.16);
  --positive-text: #a7f3d0;
  --negative-bg: rgba(251, 113, 133, 0.16);
  --negative-text: #fecdd3;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
}

body.modal-open {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.mobile-only {
  display: none;
}

.page {
  min-height: 100vh;
}

.topbar {
  height: 68px;
  background: var(--topbar);
  color: var(--topbar-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.brand {
  font-size: 22px;
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.auth-card {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.dashboard {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.sidebar-col,
.content-col {
  min-width: 0;
}

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

h1,
h2,
h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

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

.label {
  display: block;
  margin: 18px 0 8px;
  font-weight: 700;
}

.input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  background: var(--card-soft);
  color: var(--text);
  border-radius: 14px;
  padding: 0 14px;
  font-size: 16px;
  outline: none;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.select-input {
  min-width: 260px;
}

.row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn {
  height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5b7cff);
  color: white;
}

.btn-secondary {
  background: var(--card-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--topbar-text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.message {
  margin-top: 14px;
  min-height: 20px;
  color: var(--muted);
}

.error-text {
  color: #ef4444 !important;
}

.profile-card {
  background:
    radial-gradient(circle at top right, rgba(49, 94, 251, 0.14), transparent 36%),
    linear-gradient(180deg, var(--card) 0%, var(--card) 100%);
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 8px;
}

.profile-since {
  color: var(--muted);
  margin-bottom: 16px;
}

.profile-hero-name {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 6px;
}

.profile-hero-phone {
  color: var(--muted);
  margin-bottom: 18px;
}

.profile-note {
  margin-top: 14px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mini-stat {
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.mini-stat-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.mini-stat-value {
  font-size: 18px;
  font-weight: 800;
}

.bonus-card {
  background:
    radial-gradient(circle at top right, rgba(91, 124, 255, 0.16), transparent 35%),
    linear-gradient(180deg, var(--card) 0%, var(--card) 100%);
}

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

.bonus-tier {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
}

.bonus-value {
  font-size: 38px;
  font-weight: 900;
  margin-top: 18px;
  margin-bottom: 12px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.profile-row:last-child {
  border-bottom: none;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-head-tight {
  margin-bottom: 14px;
}

.orders-head {
  align-items: flex-start;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.orders-list,
.vehicles-list,
.bonus-history-list {
  display: grid;
  gap: 14px;
}

.order-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  background: var(--card-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.order-card:hover,
.vehicle-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(91, 124, 255, 0.45);
}

.order-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.order-number {
  font-size: 18px;
  font-weight: 800;
}

.order-status {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid transparent;
}

.status-slate {
  background: var(--status-slate-bg);
  color: var(--status-slate-text);
}

.status-sand {
  background: var(--status-sand-bg);
  color: var(--status-sand-text);
}

.status-teal {
  background: var(--status-teal-bg);
  color: var(--status-teal-text);
}

.status-emerald {
  background: var(--status-emerald-bg);
  color: var(--status-emerald-text);
}

.status-rose {
  background: var(--status-rose-bg);
  color: var(--status-rose-text);
}

.order-chip-row {
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.order-chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.photo-chip {
  background: rgba(49, 94, 251, 0.12);
  color: var(--accent);
}

.order-meta {
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.45;
}

.order-summary {
  color: var(--text);
  margin: 10px 0 14px;
  line-height: 1.5;
}

.order-preview-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.order-preview-photo-link {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  min-height: 92px;
}

.order-preview-photo {
  width: 100%;
  height: 92px;
  object-fit: cover;
  display: block;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.order-price {
  font-weight: 800;
  font-size: 18px;
}

.vehicle-card {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  color: var(--text);
  text-align: left;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.vehicle-card * {
  color: inherit;
}

.vehicle-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.vehicle-name {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}

.vehicle-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.vehicle-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.vehicle-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vehicle-meta-box {
  padding: 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
}

.vehicle-meta-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.vehicle-meta-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.bonus-history-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: var(--card-soft);
  border: 1px solid var(--border);
}

.bonus-history-main {
  min-width: 0;
}

.bonus-history-title {
  font-weight: 800;
  margin-bottom: 5px;
}

.bonus-history-meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.bonus-history-amount {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
}

.bonus-positive {
  background: var(--positive-bg);
  color: var(--positive-text);
}

.bonus-negative {
  background: var(--negative-bg);
  color: var(--negative-text);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  margin: 12px auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  background: var(--card);
  padding-bottom: 10px;
  z-index: 2;
}

.modal-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-head-left h2 {
  margin: 0;
}

.modal-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.detail-grid {
  display: grid;
  gap: 16px;
}

.detail-box {
  background: var(--card-soft);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  border-left: 3px solid var(--border);
  padding-left: 12px;
}

.timeline-item.done {
  border-color: #22c55e;
}

.timeline-item.active {
  border-color: var(--accent);
}

.positions {
  display: grid;
  gap: 10px;
}

.position-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.position-item:last-child {
  border-bottom: none;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.photo-link {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}

.order-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-link {
  min-width: 220px;
}

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

.vehicle-order-item {
  padding: 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
}

.vehicle-order-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.vehicle-order-number {
  font-weight: 800;
}

.vehicle-order-date {
  color: var(--muted);
  font-size: 13px;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

.detail-comment {
  margin-top: 10px;
}

.mobile-welcome {
  padding: 18px;
}

.mobile-welcome-name {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 4px;
}

.mobile-welcome-phone {
  color: var(--muted);
}

@media (max-width: 700px) {
  .mobile-only {
    display: block;
  }

  .topbar {
    height: auto;
    min-height: 62px;
    padding: 10px 12px;
    align-items: flex-start;
    gap: 10px;
  }

  .brand {
    font-size: 20px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
  }

  .topbar-link {
    display: none;
  }

  .container {
    padding: 14px 10px 28px;
  }

  .card {
    padding: 16px;
    border-radius: 18px;
    margin-bottom: 14px;
  }

  .auth-card {
    margin-top: 6px;
  }

  .stats-grid,
  .vehicle-meta-grid {
    grid-template-columns: 1fr;
  }

  .bonus-head,
  .section-head,
  .orders-head {
    align-items: flex-start;
  }

  .bonus-value {
    font-size: 32px;
  }

  .toolbar {
    width: 100%;
  }

  .select-input,
  .toolbar .btn {
    min-width: 100%;
    width: 100%;
  }

  .quick-actions .btn,
  .quick-actions a,
  .row .btn {
    width: 100%;
  }

  .profile-card {
    padding-top: 18px;
  }

  .profile-hero-name {
    font-size: 24px;
  }

  .profile-hero-phone {
    margin-bottom: 14px;
  }

  .profile-note {
    margin-bottom: 16px;
  }

  .order-card {
    padding: 14px;
    border-radius: 18px;
  }

  .order-number {
    font-size: 16px;
  }

  .order-status {
    min-height: 34px;
    font-size: 12px;
    padding: 7px 12px;
  }

  .order-preview-photos {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .order-preview-photo-link,
  .order-preview-photo {
    min-height: 78px;
    height: 78px;
  }

  .order-footer {
    align-items: stretch;
  }

  .order-footer .btn {
    width: 100%;
  }

  .bonus-history-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .bonus-history-amount {
    align-self: flex-start;
  }

  .vehicle-card {
    padding: 14px;
  }

  .vehicle-card-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
  }

  .modal-dialog {
    width: calc(100vw - 10px);
    margin: 5px auto;
    max-height: calc(100vh - 10px);
    padding: 14px;
    border-radius: 18px;
  }

  .modal-head {
    align-items: flex-start;
    flex-wrap: wrap;
    padding-bottom: 8px;
  }

  .modal-head-actions,
  .modal-head-left {
    width: 100%;
  }

  .modal-head .btn {
    width: 100%;
  }

  .detail-box {
    padding: 14px;
    border-radius: 14px;
  }

  .photo-grid {
    grid-template-columns: 1fr 1fr;
  }

  .action-link {
    width: 100%;
    min-width: 100%;
  }

  .position-item,
  .profile-row,
  .vehicle-order-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* call_auth_ui_patch_v1 */
.call-instruction {
  margin: 14px 0 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(49, 94, 251, 0.18);
  background: rgba(49, 94, 251, 0.08);
}

.call-instruction-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 10px;
}

.call-phone-link {
  display: inline-block;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
  margin-bottom: 10px;
}

.call-instruction-hint {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

@media (max-width: 700px) {
  .call-phone-link {
    font-size: 32px;
  }

  .call-instruction {
    padding: 16px;
  }
}


/* phone_prefix_fix_v1 */
.phone-input-wrap {
  display: flex !important;
  align-items: center !important;
}

.phone-prefix {
  flex: 0 0 62px !important;
  width: 62px !important;
  min-width: 62px !important;
  height: 100% !important;
  align-self: stretch !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.phone-input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  padding-left: 14px !important;
}


/* login_ui_restore_v2 */
.auth-card {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 24px;
  border: 1px solid rgba(49, 94, 251, 0.14);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

.login-panel-head {
  margin-bottom: 8px;
}

.login-panel-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(49, 94, 251, 0.10);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
}

.phone-input-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  height: 52px;
  border: 1px solid var(--border);
  background: var(--card-soft);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
}

.phone-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.12);
}

.phone-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 62px;
  width: 62px;
  min-width: 62px;
  height: 100%;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  background: rgba(49, 94, 251, 0.08);
  border-right: 1px solid var(--border);
}

.phone-input {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  height: 100%;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 14px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.login-main-btn {
  min-height: 50px;
  font-size: 16px;
}

.auth-helper-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 700px) {
  .auth-card {
    border-radius: 20px;
  }

  .call-phone-link {
    font-size: 30px;
  }
}


/* login_look_restore_v3 */
body {
  background:
    radial-gradient(circle at top left, rgba(49, 94, 251, 0.08), transparent 28%),
    linear-gradient(180deg, #f3f6fb 0%, #eef2f8 100%);
}

#loginScreen.auth-card,
#codeScreen.auth-card,
#profileSetupScreen.auth-card {
  max-width: 580px;
  margin: 18px auto 0;
  border-radius: 28px;
  border: 1px solid rgba(49, 94, 251, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  backdrop-filter: blur(10px);
}

body.dark #loginScreen.auth-card,
body.dark #codeScreen.auth-card,
body.dark #profileSetupScreen.auth-card {
  background: rgba(16, 24, 39, 0.92);
  border-color: rgba(121, 166, 255, 0.18);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.30);
}

#loginScreen h1,
#codeScreen h2,
#profileSetupScreen h2 {
  font-size: 34px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.login-panel-head .muted {
  font-size: 15px;
  line-height: 1.5;
}

#loginScreen .label,
#codeScreen .label,
#profileSetupScreen .label {
  margin-top: 20px;
}

#loginScreen .message,
#codeScreen .message,
#profileSetupScreen .message {
  margin-top: 16px;
}

#loginScreen .btn,
#codeScreen .btn,
#profileSetupScreen .btn {
  min-height: 46px;
}

.call-instruction {
  margin: 14px 0 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(49, 94, 251, 0.18);
  background: rgba(49, 94, 251, 0.08);
}

.call-instruction-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 10px;
}

.call-phone-link {
  display: inline-block;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
  margin-bottom: 10px;
}

.call-instruction-hint {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

@media (max-width: 700px) {
  #loginScreen.auth-card,
  #codeScreen.auth-card,
  #profileSetupScreen.auth-card {
    margin-top: 8px;
    border-radius: 22px;
    padding: 18px;
  }

  #loginScreen h1,
  #codeScreen h2,
  #profileSetupScreen h2 {
    font-size: 28px;
  }

  .call-phone-link {
    font-size: 32px;
  }
}


/* full_login_restore_v4 */
body {
  background:
    radial-gradient(circle at top left, rgba(49, 94, 251, 0.08), transparent 28%),
    linear-gradient(180deg, #f3f6fb 0%, #eef2f8 100%);
}

body.dark {
  background:
    radial-gradient(circle at top left, rgba(121, 166, 255, 0.10), transparent 28%),
    linear-gradient(180deg, #0b1220 0%, #0f1728 100%);
}

.login-panel-wrap {
  display: flex;
  justify-content: center;
}

.login-panel {
  width: 100%;
}

#loginScreen.auth-card,
#codeScreen.auth-card,
#profileSetupScreen.auth-card {
  max-width: 580px;
  margin: 18px auto 0;
  border-radius: 28px;
  border: 1px solid rgba(49, 94, 251, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  backdrop-filter: blur(10px);
}

body.dark #loginScreen.auth-card,
body.dark #codeScreen.auth-card,
body.dark #profileSetupScreen.auth-card {
  background: rgba(16, 24, 39, 0.92);
  border-color: rgba(121, 166, 255, 0.18);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.30);
}

.login-panel-head {
  margin-bottom: 8px;
}

.login-panel-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(49, 94, 251, 0.10);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  cursor: default;
  user-select: none;
}

#loginScreen h1,
#codeScreen h2,
#profileSetupScreen h2 {
  font-size: 34px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.login-panel-head .muted {
  font-size: 15px;
  line-height: 1.5;
}

.phone-input-wrap {
  display: flex !important;
  align-items: center !important;
  width: 100%;
  height: 52px;
  border: 1px solid var(--border);
  background: var(--card-soft);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
}

.phone-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.12);
}

.phone-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 62px;
  width: 62px;
  min-width: 62px;
  height: 100%;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  background: rgba(49, 94, 251, 0.08);
  border-right: 1px solid var(--border);
  line-height: 1;
}

.phone-input {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  height: 100%;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 14px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.login-main-btn {
  min-height: 50px;
  font-size: 16px;
}

.call-instruction {
  margin: 14px 0 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(49, 94, 251, 0.18);
  background: rgba(49, 94, 251, 0.08);
}

.call-instruction-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 10px;
}

.call-phone-link {
  display: inline-block;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
  margin-bottom: 10px;
}

.call-instruction-hint {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

@media (max-width: 700px) {
  #loginScreen.auth-card,
  #codeScreen.auth-card,
  #profileSetupScreen.auth-card {
    margin-top: 8px;
    border-radius: 22px;
    padding: 18px;
  }

  #loginScreen h1,
  #codeScreen h2,
  #profileSetupScreen h2 {
    font-size: 28px;
  }

  .call-phone-link {
    font-size: 32px;
  }
}


/* auth_landing_exact_v2 */
body.auth-landing-visible {
  background:
    radial-gradient(circle at top center, rgba(45, 94, 255, 0.10), transparent 24%),
    linear-gradient(180deg, #020816 0%, #06122b 100%);
}

body.auth-landing-visible .topbar {
  background: rgba(2, 8, 22, 0.92);
  border-bottom: 1px solid rgba(121, 166, 255, 0.08);
  box-shadow: none;
}

body.auth-landing-visible .container {
  max-width: 1180px;
  padding-top: 30px;
}

#authLanding {
  display: block;
}

.auth-landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(360px, 414px);
  gap: 26px;
  align-items: stretch;
}

.auth-hero {
  min-height: 390px;
  padding: 8px 2px 0 2px;
  color: #f4f7fb;
  background:
    linear-gradient(180deg, rgba(4, 12, 28, 0.18), rgba(4, 12, 28, 0.18)),
    radial-gradient(circle at center, rgba(121, 166, 255, 0.06), transparent 50%);
  border-radius: 28px;
}

.auth-hero-badge,
body.auth-landing-visible .login-panel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(105, 124, 151, 0.22);
  color: #e9eef8;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

body.auth-landing-visible .login-panel-badge {
  background: rgba(62, 104, 197, 0.28);
  color: #8eb4ff;
  border: none;
}

.auth-hero h1 {
  margin: 0 0 18px;
  font-size: 64px;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -1.3px;
  color: #f7f9fc;
  max-width: 660px;
}

.auth-hero-text {
  max-width: 700px;
  margin: 0 0 24px;
  color: rgba(240, 245, 255, 0.88);
  font-size: 18px;
  line-height: 1.5;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.auth-feature-card {
  min-height: 114px;
  padding: 16px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.auth-feature-title {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.auth-feature-text {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(237, 242, 248, 0.85);
}

body.auth-landing-visible .auth-side-card {
  margin: 0;
  border-radius: 28px;
  padding: 22px 22px 20px;
  background: rgba(15, 28, 58, 0.94);
  border: 1px solid rgba(90, 130, 220, 0.38);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
}

body.auth-landing-visible .auth-side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
  color: #f8fbff;
}

body.auth-landing-visible .auth-side-text,
body.auth-landing-visible .auth-side-card .muted,
body.auth-landing-visible .auth-side-card .label,
body.auth-landing-visible .auth-side-card .message {
  color: rgba(219, 228, 243, 0.9);
}

body.auth-landing-visible .auth-side-card .label {
  margin-top: 18px;
  margin-bottom: 10px;
}

body.auth-landing-visible .phone-input-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  overflow: hidden;
  background: #d7dfea;
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 14px;
}

body.auth-landing-visible .phone-prefix {
  width: 56px;
  min-width: 56px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #203760;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

body.auth-landing-visible .phone-input {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  height: 48px !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #0f172a !important;
  font-size: 16px;
  padding: 0 14px !important;
}

body.auth-landing-visible .phone-input::placeholder {
  color: #405068;
}

body.auth-landing-visible .login-main-btn {
  min-height: 46px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(90deg, #7da5ff 0%, #5f82f6 100%);
  color: #fff;
}

body.auth-landing-visible #loginMessage {
  min-height: 22px;
  margin-top: 12px;
}

body.auth-landing-visible .promo-card {
  margin-top: 26px;
  border-radius: 26px;
  padding: 28px 24px;
  background: rgba(21, 31, 60, 0.94);
  border: 1px solid rgba(91, 124, 255, 0.16);
  color: #edf2f8;
}

body.auth-landing-visible .promo-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 124, 255, 0.12);
  font-size: 20px;
  margin-bottom: 16px;
}

body.auth-landing-visible .promo-card h3 {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.35;
  color: #ffffff;
}

body.auth-landing-visible .promo-card p {
  margin: 0 0 10px;
  color: rgba(227, 235, 246, 0.76);
  line-height: 1.6;
}

@media (max-width: 980px) {
  .auth-landing-grid {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: auto;
    padding: 0;
  }

  .auth-hero h1 {
    font-size: 48px;
    max-width: none;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body.auth-landing-visible .container {
    padding-top: 18px;
  }

  .auth-hero h1 {
    font-size: 34px;
    line-height: 1.05;
  }

  .auth-hero-text {
    font-size: 16px;
  }

  .auth-feature-card {
    min-height: auto;
  }

  body.auth-landing-visible .auth-side-card,
  body.auth-landing-visible .promo-card {
    border-radius: 22px;
    padding: 18px;
  }
}


/* auth_landing_stability_fix_v1 */
body.auth-landing-visible #authLanding .auth-hero {
  color: #f4f7fb !important;
}

body.auth-landing-visible #authLanding .auth-hero h1,
body.auth-landing-visible #authLanding .auth-feature-title,
body.auth-landing-visible #authLanding .promo-card h3 {
  color: #ffffff !important;
}

body.auth-landing-visible #authLanding .auth-hero-text,
body.auth-landing-visible #authLanding .auth-feature-text,
body.auth-landing-visible #authLanding .promo-card p {
  color: rgba(237, 242, 248, 0.86) !important;
}

body.auth-landing-visible #authLanding .auth-side-card,
body.auth-landing-visible.dark #authLanding .auth-side-card {
  background: rgba(15, 28, 58, 0.94) !important;
  border: 1px solid rgba(90, 130, 220, 0.38) !important;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28) !important;
  color: #f8fbff !important;
}

body.auth-landing-visible #authLanding .auth-side-card h2,
body.auth-landing-visible.dark #authLanding .auth-side-card h2 {
  color: #f8fbff !important;
}

body.auth-landing-visible #authLanding .auth-side-card .muted,
body.auth-landing-visible #authLanding .auth-side-card .label,
body.auth-landing-visible #authLanding .auth-side-card .message,
body.auth-landing-visible.dark #authLanding .auth-side-card .muted,
body.auth-landing-visible.dark #authLanding .auth-side-card .label,
body.auth-landing-visible.dark #authLanding .auth-side-card .message {
  color: rgba(219, 228, 243, 0.9) !important;
}

body.auth-landing-visible #authLanding .login-panel-badge,
body.auth-landing-visible.dark #authLanding .login-panel-badge {
  background: rgba(62, 104, 197, 0.28) !important;
  color: #8eb4ff !important;
  border: none !important;
}

body.auth-landing-visible #authLanding .phone-input-wrap,
body.auth-landing-visible.dark #authLanding .phone-input-wrap {
  background: #d7dfea !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
}

body.auth-landing-visible #authLanding .phone-prefix,
body.auth-landing-visible.dark #authLanding .phone-prefix {
  background: #203760 !important;
  color: #ffffff !important;
}

body.auth-landing-visible #authLanding .phone-input,
body.auth-landing-visible.dark #authLanding .phone-input {
  color: #0f172a !important;
  background: transparent !important;
}

body.auth-landing-visible #authLanding .login-main-btn,
body.auth-landing-visible.dark #authLanding .login-main-btn {
  background: linear-gradient(90deg, #7da5ff 0%, #5f82f6 100%) !important;
  color: #fff !important;
}

body.auth-landing-visible #authLanding .promo-card,
body.auth-landing-visible.dark #authLanding .promo-card {
  background: rgba(21, 31, 60, 0.94) !important;
  border: 1px solid rgba(91, 124, 255, 0.16) !important;
  color: #edf2f8 !important;
}


/* auth_theme_fix_v1 */
body.auth-landing-visible:not(.dark) {
  background:
    radial-gradient(circle at top center, rgba(49, 94, 251, 0.10), transparent 24%),
    linear-gradient(180deg, #f3f6fb 0%, #eef3fa 100%) !important;
}

body.auth-landing-visible:not(.dark) .topbar {
  background: rgba(255, 255, 255, 0.86) !important;
  color: #182230 !important;
  border-bottom: 1px solid rgba(49, 94, 251, 0.08) !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
}

body.auth-landing-visible:not(.dark) .btn-ghost {
  color: #182230 !important;
  border-color: rgba(24, 34, 48, 0.14) !important;
}

body.auth-landing-visible:not(.dark) .auth-hero {
  color: #182230 !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
    radial-gradient(circle at center, rgba(49, 94, 251, 0.08), transparent 50%) !important;
}

body.auth-landing-visible:not(.dark) .auth-hero-badge {
  background: rgba(49, 94, 251, 0.10) !important;
  color: #315efb !important;
  border: 1px solid rgba(49, 94, 251, 0.12) !important;
}

body.auth-landing-visible:not(.dark) .auth-hero h1,
body.auth-landing-visible:not(.dark) .auth-feature-title,
body.auth-landing-visible:not(.dark) .promo-card h3 {
  color: #182230 !important;
}

body.auth-landing-visible:not(.dark) .auth-hero-text,
body.auth-landing-visible:not(.dark) .auth-feature-text,
body.auth-landing-visible:not(.dark) .promo-card p {
  color: #475467 !important;
}

body.auth-landing-visible:not(.dark) .auth-feature-card {
  background: rgba(255, 255, 255, 0.82) !important;
  border: 1px solid rgba(49, 94, 251, 0.10) !important;
}

body.auth-landing-visible:not(.dark) .auth-side-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(49, 94, 251, 0.12) !important;
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.10) !important;
  color: #182230 !important;
}

body.auth-landing-visible:not(.dark) .auth-side-card h2 {
  color: #182230 !important;
}

body.auth-landing-visible:not(.dark) .auth-side-card .muted,
body.auth-landing-visible:not(.dark) .auth-side-card .label,
body.auth-landing-visible:not(.dark) .auth-side-card .message {
  color: #667085 !important;
}

body.auth-landing-visible:not(.dark) .login-panel-badge {
  background: rgba(49, 94, 251, 0.10) !important;
  color: #315efb !important;
}

body.auth-landing-visible:not(.dark) .promo-card {
  background: rgba(255,255,255,0.96) !important;
  border: 1px solid rgba(49, 94, 251, 0.10) !important;
  color: #182230 !important;
}


/* session_refresh_stable_v1 */
body:not(.app-ready) #authLanding,
body:not(.app-ready) #loginScreen,
body:not(.app-ready) #codeScreen,
body:not(.app-ready) #profileSetupScreen,
body:not(.app-ready) #cabinetScreen {
  visibility: hidden !important;
}


/* mobile_login_first_v1 */
@media (max-width: 700px) {
  body.auth-landing-visible .container {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  body.auth-landing-visible .login-panel-wrap,
  body.auth-landing-visible #authLanding {
    width: 100%;
    max-width: 100%;
  }

  body.auth-landing-visible .login-panel-wrap {
    order: 1;
  }

  body.auth-landing-visible #authLanding {
    order: 2;
  }
}


/* review_button_orange_v1 */
.btn.btn-review {
  background: linear-gradient(180deg, #ffb347 0%, #ff8c1a 100%) !important;
  border: 1px solid #ff9a2f !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(255, 140, 26, 0.28);
}

.btn.btn-review:hover {
  background: linear-gradient(180deg, #ffbf5e 0%, #ff961f 100%) !important;
  border-color: #ffa53d !important;
  color: #ffffff !important;
}

.btn.btn-review:active {
  background: linear-gradient(180deg, #f5a53a 0%, #f07f00 100%) !important;
  color: #ffffff !important;
}

.btn.btn-review:focus-visible {
  outline: 2px solid rgba(255, 153, 51, 0.45);
  outline-offset: 2px;
}


/* dark_only_mobile_login_top_v1 */
body {
  background: #0b1220 !important;
  color: #edf2f7 !important;
}

#themeToggleBtn {
  display: none !important;
}

@media (max-width: 700px) {
  body.auth-landing-visible .container {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  body.auth-landing-visible .login-panel-wrap {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.auth-landing-visible #authLanding {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
