/* ============================================================
   في الحال — Shared UI kit
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(700px 480px at 12% 8%, var(--bg-glow-1), transparent 62%),
    radial-gradient(600px 460px at 88% 92%, var(--bg-glow-2), transparent 60%),
    var(--bg);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 26px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, p {
  margin: 0;
}

button {
  font-family: inherit;
}

a {
  color: inherit;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24;
  -webkit-font-smoothing: antialiased;
  flex: none;
}

.ms.fill {
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

/* ---------- device ---------- */

.phone {
  position: relative;
  width: var(--phone-w);
  height: var(--phone-h);
  background: var(--bg);
  border-radius: 44px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.phone::after {
  content: '';
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 122px;
  height: 4px;
  border-radius: 99px;
  background: var(--text);
  opacity: 0.22;
  z-index: 90;
  pointer-events: none;
}

.statusbar {
  position: relative;
  height: 46px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 24px 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 800;
  direction: ltr;
  z-index: 85;
}

.statusbar::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 104px;
  height: 27px;
  border-radius: 99px;
  background: #04060F;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.statusbar .status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.statusbar .status-icons .ms {
  font-size: 15px;
}

.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 20px 26px;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.screen.flush {
  padding: 0 0 26px;
}

.screen.no-tabbar {
  padding-bottom: 26px;
}

/* ---------- typography ---------- */

.h1 {
  font-size: 25px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.h2 {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
}

.h3 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.body {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

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

.tiny {
  font-size: 11px;
  font-weight: 600;
}

.small {
  font-size: 12px;
  font-weight: 600;
}

.bold {
  font-weight: 800;
}

.price {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.price-lg {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1px;
}

.primary-text {
  color: var(--primary);
}

.success-text {
  color: var(--success);
}

.danger-text {
  color: var(--danger);
}

/* ---------- layout helpers ---------- */

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

.between {
  justify-content: space-between;
}

.wrap {
  flex-wrap: wrap;
}

.grow {
  flex: 1;
  min-width: 0;
}

.col {
  display: flex;
  flex-direction: column;
}

.center {
  align-items: center;
  justify-content: center;
}

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

.w-full {
  width: 100%;
}

.relative {
  position: relative;
}

.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-14 { gap: 14px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

.mt-2 { margin-top: 2px; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

.p-14 { padding: 14px; }
.p-16 { padding: 16px; }
.p-18 { padding: 18px; }
.p-20 { padding: 20px; }

.divider {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 0;
}

/* theme-only helpers */
[data-theme='dark'] .only-light { display: none !important; }
html:not([data-theme='dark']) .only-dark { display: none !important; }

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: 16px;
}

.card-flat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.brand-card {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, #1B4BEA 0%, #1233AB 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-primary);
}

[data-theme='dark'] .brand-card {
  background: linear-gradient(135deg, #274FD6 0%, #142B84 100%);
}

.brand-card::after {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  top: -90px;
  inset-inline-end: -50px;
}

.brand-card::before {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  bottom: -70px;
  inset-inline-start: -20px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  padding: 15px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.975);
}

.btn .ms {
  font-size: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border-strong);
}

.btn-dark {
  background: var(--text);
  color: var(--surface);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 10px 22px rgba(14, 167, 106, 0.3);
}

.btn-lg {
  padding: 17px 22px;
  font-size: 16px;
  border-radius: 18px;
}

.btn-sm {
  padding: 10px 14px;
  font-size: 12.5px;
  border-radius: 12px;
}

.btn-sm .ms {
  font-size: 17px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.icon-btn .ms {
  font-size: 22px;
}

.icon-btn .dot {
  position: absolute;
  top: 10px;
  inset-inline-end: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--surface);
}

/* ---------- inputs ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.label .ms {
  font-size: 16px;
  color: var(--text-3);
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  min-height: 52px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-shell:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.input-shell > .ms {
  color: var(--text-3);
  font-size: 21px;
}

.input-shell .suffix {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  padding: 14px 0;
}

.input::placeholder {
  color: var(--text-3);
  font-weight: 500;
}

textarea.input {
  resize: none;
  padding: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  min-height: 88px;
  width: 100%;
}

textarea.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

/* ---------- chips / badges / tabs ---------- */

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip .ms {
  font-size: 15px;
}

.chip.active,
.chip:hover {
  background: var(--primary-soft);
  border-color: transparent;
  color: var(--primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.badge .ms {
  font-size: 13px;
}

.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: var(--surface-3); color: var(--text-2); }

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 15px;
  border: 1px solid var(--border);
}

.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 9px 8px;
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.segmented button.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 10px;
}

.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

.logo-dark { display: none; }
[data-theme='dark'] .logo-light { display: none; }
[data-theme='dark'] .logo-dark { display: block; }

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
}

.location-pill .ms {
  color: var(--primary);
  font-size: 18px;
}

.location-pill small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
}

/* ---------- internal page header (back far left · title group far right) ---------- */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 14px;
}

.page-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.page-heading .head-ico {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.page-heading .head-ico .ms {
  font-size: 22px;
}

.page-heading h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.4;
  white-space: nowrap;
}

.page-heading p {
  margin: 1px 0 0;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* phone fields: country code on the LEFT */

.phone-shell {
  direction: ltr;
}

.phone-shell .prefix {
  flex: none;
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  padding-right: 10px;
  margin-right: 10px;
  border-right: 1.5px solid var(--border);
  line-height: 1.2;
}

.phone-shell .input {
  text-align: left;
}

/* ---------- avatars ---------- */

.avatar {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #5B7BFF, #1747E5);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.avatar.xl { width: 88px; height: 88px; font-size: 28px; }

.avatar.ring {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--primary-soft);
}

/* ---------- service cards ---------- */

.service-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.service {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.service .ico {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
}

.service .ico .ms {
  font-size: 25px;
}

.service.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: 0 6px 18px var(--primary-soft);
}

.tint-blue { background: var(--primary-soft); color: var(--primary); }
.tint-amber { background: var(--warning-soft); color: var(--warning); }
.tint-green { background: var(--success-soft); color: var(--success); }
.tint-pink { background: var(--pink-soft); color: var(--pink); }

/* ---------- route box ---------- */

.route-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 6px 14px;
  box-shadow: var(--shadow-sm);
}

.route-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.route-dot {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.route-dot .ms {
  font-size: 19px;
}

.route-dot.from { background: var(--primary-soft); color: var(--primary); }
.route-dot.to { background: var(--success-soft); color: var(--success); }

.route-info {
  flex: 1;
  min-width: 0;
}

.route-info small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
}

.route-info b {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-inline-start: 16px;
}

.route-sep::before {
  content: '';
  width: 1.5px;
  height: 12px;
  border-inline-start: 1.5px dashed var(--border-strong);
  margin-inline-start: -1px;
}

.route-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.route-box .edit {
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- map ---------- */

.map {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.map > img.map-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.map .map-btn {
  position: absolute;
  inset-inline-end: 14px;
  bottom: 16px;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 5;
}

.map .map-btn .ms {
  font-size: 23px;
}

.map-gradient {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 90px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 78%, transparent), transparent);
  pointer-events: none;
  z-index: 2;
}

.map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pin-bubble {
  width: 46px;
  height: 46px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(23, 71, 229, 0.4);
}

.pin-bubble .ms {
  transform: rotate(45deg);
  font-size: 23px;
}

.pin-shadow {
  width: 18px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: rgba(10, 20, 45, 0.28);
  filter: blur(1.5px);
}

.pin-pulse,
.radar {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(23, 71, 229, 0.14);
  animation: radarPulse 2.4s ease-out infinite;
  pointer-events: none;
  z-index: 1;
}

.radar::after {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: rgba(23, 71, 229, 0.18);
}

@keyframes radarPulse {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.9; }
  70% { transform: translate(-50%, -50%) scale(1.9); opacity: 0; }
  100% { opacity: 0; }
}

.map-driver {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  z-index: 5;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.map-driver .ms {
  font-size: 20px;
}

.map-label {
  position: absolute;
  background: var(--surface);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
  z-index: 4;
  white-space: nowrap;
}

/* route path strokes */
.route-path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
  opacity: 0.9;
}

/* ---------- bottom sheet / overlay ---------- */

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 26, 0.48);
  backdrop-filter: blur(3px);
  z-index: 40;
}

.sheet {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 10px 20px 26px;
  box-shadow: 0 -20px 50px rgba(4, 10, 30, 0.22);
  animation: sheetUp 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 99px;
  background: var(--border-strong);
  margin: 0 auto 16px;
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ---------- tab bar ---------- */

.tabbar {
  flex: none;
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 78px;
  padding: 8px 12px 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 30;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 14px;
}

.tab .ms {
  font-size: 23px;
  padding: 3px 14px;
  border-radius: 11px;
  transition: background 0.2s, color 0.2s;
}

.tab.active {
  color: var(--primary);
}

.tab.active .ms {
  background: var(--primary-soft);
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

/* ---------- price rows ---------- */

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  padding: 4px 0;
}

.kv b {
  color: var(--text);
  font-weight: 800;
}

.kv.total {
  border-top: 1.5px dashed var(--border-strong);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 14px;
}

.kv.total b {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
}

/* ---------- steps timeline ---------- */

.steps {
  display: flex;
  flex-direction: column;
}

.step {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
}

.step:last-child {
  padding-bottom: 0;
}

.step:not(:last-child)::before {
  content: '';
  position: absolute;
  inset-inline-start: 13px;
  top: 30px;
  bottom: 2px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}

.step .dot {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-3);
  border: 2px solid var(--border);
  z-index: 1;
}

.step .dot .ms {
  font-size: 15px;
}

.step.done .dot {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}

.step.current .dot {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}

.step b {
  font-size: 13px;
  font-weight: 800;
  display: block;
}

.step small {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}

/* ---------- chat ---------- */

.chat-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
}

.chat-day {
  align-self: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-3);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 999px;
}

.msg {
  max-width: 80%;
  align-self: flex-start;
  padding: 10px 13px;
  border-radius: 16px 16px 16px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--text);
}

.msg .time {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-3);
  text-align: end;
}

.msg.me {
  align-self: flex-end;
  border-radius: 16px 16px 6px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: transparent;
  color: #fff;
}

.msg.me .time {
  color: rgba(255, 255, 255, 0.7);
}

.msg.photo {
  padding: 4px;
  overflow: hidden;
}

.msg.photo img {
  border-radius: 12px;
  width: 190px;
  height: 130px;
  object-fit: cover;
  display: block;
}

.voice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 195px;
}

.voice .play {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  border: 0;
  cursor: pointer;
}

.msg.me .voice .play {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.voice .play .ms {
  font-size: 17px;
}

.wave {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 2px;
  height: 24px;
}

.wave i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.5;
}

.wave i.h1 { height: 6px; }
.wave i.h2 { height: 12px; }
.wave i.h3 { height: 18px; }
.wave i.h4 { height: 24px; }
.wave i.h5 { height: 10px; }

.voice .dur {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.65;
}

.chat-inputbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.chat-inputbar .plus,
.chat-inputbar .mic {
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.chat-inputbar .plus {
  background: var(--surface-2);
  color: var(--text-2);
}

.chat-inputbar .mic {
  background: var(--danger-soft);
  color: var(--danger);
}

.chat-inputbar .send {
  background: var(--primary);
  color: #fff;
}

.chat-inputbar .input-shell {
  flex: 1;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--surface-2);
  border-color: transparent;
}

.chat-inputbar .input {
  padding: 11px 0;
  font-size: 13px;
}

/* ---------- rating ---------- */

.stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  color: var(--star);
}

.stars .ms {
  font-size: 38px;
  cursor: pointer;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 40;
  transition: transform 0.15s ease;
}

.stars .ms.on {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 40;
}

.stars.sm .ms {
  font-size: 15px;
}

/* ---------- lists ---------- */

.list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 0;
  width: 100%;
  font-family: inherit;
  text-align: start;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
}

.list-item + .list-item {
  border-top: 1px solid var(--border);
}

.list-ico {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--primary);
}

.list-ico .ms {
  font-size: 21px;
}

.list-item .chev {
  margin-inline-start: auto;
  color: var(--text-3);
  font-size: 20px;
}

.list-item .value {
  margin-inline-start: auto;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
}

/* ---------- order progress stepper ---------- */

.order-progress {
  display: flex;
  align-items: flex-start;
  padding: 10px 0 4px;
  margin-bottom: 8px;
}

.op-step {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 1;
  text-align: center;
  font-size: 8.5px;
  font-weight: 800;
  color: var(--text-3);
  line-height: 1.4;
}

.op-step:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 13px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: -1;
}

.op-step.done::before {
  background: var(--success);
}

.op-dot {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 2px solid var(--border);
  color: var(--text-3);
}

.op-dot .ms {
  font-size: 15px;
}

.op-step.done .op-dot {
  background: var(--success-soft);
  border-color: transparent;
  color: var(--success);
}

.op-step.current {
  color: var(--primary);
}

.op-step.current .op-dot {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

/* photo proof / big delivery code */
.proof {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  height: 112px;
  display: grid;
  place-items: center;
  color: var(--text-3);
}

.proof .scene {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120px 70px at 30% 25%, rgba(255, 255, 255, 0.7), transparent 60%),
    linear-gradient(135deg, #dfe8f7, #cdd9ee);
}

[data-theme='dark'] .proof .scene {
  background:
    radial-gradient(120px 70px at 30% 25%, rgba(91, 123, 255, 0.18), transparent 60%),
    linear-gradient(135deg, #182342, #101a33);
}

.proof .proof-tag {
  position: absolute;
  inset-inline-start: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(8, 16, 38, 0.62);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.proof .proof-tag .ms {
  font-size: 13px;
  color: #6ee7a8;
}

.delivery-code {
  text-align: center;
  padding: 18px;
  border-radius: 20px;
  border: 1.5px dashed color-mix(in srgb, var(--primary) 55%, var(--border));
  background: var(--primary-soft);
}

.delivery-code .digits {
  display: flex;
  justify-content: center;
  gap: 9px;
  direction: ltr;
  margin: 10px 0 6px;
}

.delivery-code .digits span {
  width: 48px;
  height: 56px;
  border-radius: 13px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ---------- notifications ---------- */

.notif-day {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 16px 2px 8px;
  font-size: 10.5px;
  font-weight: 900;
  color: var(--text-3);
}

.notif-day::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.notif {
  position: relative;
  display: flex;
  gap: 11px;
  padding: 13px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.notif.unread {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
  background: linear-gradient(180deg, var(--primary-soft), var(--surface) 78%);
}

.notif-ico {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  display: grid;
  place-items: center;
}

.notif-ico .ms {
  font-size: 22px;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.45;
}

.notif-time {
  margin-inline-start: auto;
  flex: none;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-3);
  white-space: nowrap;
}

.notif-body p {
  margin: 2px 0 0;
  font-size: 10.8px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--text-2);
}

.notif-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 900;
  color: var(--primary);
  text-decoration: none;
}

.notif-action .ms {
  font-size: 14px;
}

.notif-dot {
  position: absolute;
  top: 13px;
  left: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.notif-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 34px 20px;
  margin-top: 14px;
  border-radius: 18px;
  border: 1.5px dashed var(--border-strong);
  background: var(--surface-2);
  color: var(--text-3);
}

.notif-empty.show {
  display: flex;
}

.notif-empty .ms {
  font-size: 38px;
  color: var(--text-3);
}

.notif-empty b {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-2);
}

.notif-empty small {
  font-size: 10.5px;
  font-weight: 600;
}

/* ---------- switch ---------- */

.switch {
  appearance: none;
  -webkit-appearance: none;
  direction: ltr;
  width: 46px;
  height: 26px;
  flex: none;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
  margin: 0;
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transition: left 0.2s ease;
}

.switch:checked {
  background: var(--primary);
}

.switch:checked::after {
  left: 23px;
}

/* ---------- special: incoming order ---------- */

.offer-card {
  position: relative;
  border-radius: 24px;
  padding: 18px;
  background: var(--surface);
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 6px var(--primary-soft), var(--shadow-md);
  animation: offerGlow 1.6s ease-in-out infinite alternate;
}

@keyframes offerGlow {
  from { box-shadow: 0 0 0 4px var(--primary-soft), var(--shadow-md); }
  to { box-shadow: 0 0 0 12px transparent, var(--shadow-md); }
}

.countdown-ring {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--danger) 0 70%, var(--danger-soft) 70% 100%);
}

.countdown-ring span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 900;
  color: var(--danger);
}

.pulse-dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--success);
  opacity: 0.5;
  animation: dotPulse 1.6s ease-out infinite;
}

@keyframes dotPulse {
  0% { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ---------- toast ---------- */

.toast {
  position: absolute;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: var(--surface);
  padding: 11px 16px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  max-width: 320px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast .ms {
  font-size: 18px;
}

/* ---------- animations ---------- */

.rise {
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* details */
.hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.7;
}

.hint .ms {
  font-size: 17px;
  color: var(--primary);
  margin-top: 1px;
}

/* ---------- small screens / iframes in the gallery ---------- */

@media (max-width: 520px) {
  body {
    padding: 0;
    display: block;
    background: var(--bg);
  }

  .phone {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}
