* { box-sizing: border-box; }

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at 20% 0%, #bfe3f5 0%, transparent 45%),
              radial-gradient(circle at 100% 10%, #cfe7f6 0%, transparent 40%),
              linear-gradient(180deg, #eaf3fb 0%, #f7ead9 45%, #f6d9c9 75%, #f3c9c9 100%);
  color: #1c1c1e;
  display: flex;
  justify-content: center;
}

.screen {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  padding: calc(28px + env(safe-area-inset-top)) 20px 40px;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.topbar-end {
  justify-content: flex-end;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #333;
}

.profile .avatar,
.profile-btn .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.logout-btn {
  border: none;
  background: transparent;
  color: #c0392b;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.banner {
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #2f6fa0, #0d2b52);
  color: #fff;
  padding: 20px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-size: cover;
  background-position: center;
  margin-bottom: 20px;
}

.banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.banner-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  margin-top: 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.banner-sub {
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0.9;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.card {
  background: #fff;
  border-radius: 22px;
  padding: 24px 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.card-label {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #333;
  margin-bottom: 16px;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #e2e2e6;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.input-wrap input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 15px;
  background: transparent;
  min-width: 0;
}

.input-wrap .icon {
  color: #9a9aa0;
  font-size: 16px;
}

.btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(180deg, #55c26b, #3fae57);
  color: #fff;
  box-shadow: 0 8px 18px rgba(63,174,87,0.35);
}

.btn-outline {
  background: #fff;
  border: 1.5px solid #e2e2e6;
  color: #1c1c1e;
}

.btn-secondary {
  background: #f3f4f6;
  color: #1c1c1e;
}

.admin-link {
  text-align: center;
  margin-top: 22px;
  color: #555;
  font-size: 14px;
  text-decoration: none;
  display: block;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 18px;
  color: #333;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
}

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

.profile-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.greeting-hi {
  font-size: 13px;
  color: #888;
}

.greeting-name {
  font-size: 16px;
  font-weight: 700;
  color: #1c1c1e;
}

.count-box {
  position: relative;
  z-index: 2;
  border-radius: 0 0 18px 18px;
  padding: calc(44px + env(safe-area-inset-top)) 20px 18px;
  background-color: #3fae57;
  background-size: cover;
  background-position: center;
  text-align: left;
  margin: calc(-28px - env(safe-area-inset-top)) -20px 0;
}

.count-box-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.count-box-greeting {
  display: flex;
  flex-direction: column;
  color: #fff;
}

.count-box-greeting .greeting-hi {
  font-size: 15px;
  color: #fff;
  opacity: 0.9;
}

.count-box-greeting .greeting-name {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
}

.count-box-more {
  background: none;
  border: none;
  color: #fff;
  opacity: 0.9;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  white-space: nowrap;
  margin-top: 2px;
  padding: 0;
}

.count-box-sub-row {
  position: relative;
}

.count-box-sub-label {
  font-size: 17px;
  color: #fff;
  font-weight: 600;
}

.count-box-coin {
  position: absolute;
  top: 0;
  right: 0;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.count-box-coin img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.count-box .count {
  font-size: 70px;
  font-weight: 800;
  margin: 2px 0 4px;
  color: #fff;
  background-image: linear-gradient(120deg, #ffffff 40%, #d6ffe4 50%, #ffffff 60%);
  background-size: 220% 100%;
  background-position: 200% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: count-shine 3.2s ease-in-out infinite;
}

@keyframes count-shine {
  0% { background-position: 200% 0; }
  55% { background-position: -60% 0; }
  100% { background-position: -60% 0; }
}

.count-box-stats-row {
  display: flex;
  gap: 0;
  margin: 16px 0 12px;
}

.count-box-stat {
  flex: 1;
  background: #fff;
  border-radius: 1px;
  padding: 16px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.count-box-stat:first-child {
  border-radius: 20px 1px 1px 20px;
}

.count-box-stat:last-child {
  border-radius: 1px 20px 20px 1px;
}

.count-box-stat:not(:first-child) {
  border-left: 1px solid rgba(0,0,0,0.08);
}

.count-box-stat-label {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 10px;
  color: #000;
  line-height: 1.3;
  font-weight: 600;
}

.count-box-stat-value {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: #4eb857;
  margin: 4px 0;
}

.count-box-stat-value-accent {
  color: #4eb857;
}

.count-box-date {
  text-align: center;
  font-size: 14px;
  color: #fff;
  opacity: 0.9;
}

.dashboard-content-card {
  margin: -18px -20px 0;
  border-radius: 0 0 22px 22px;
  padding-left: 20px;
  padding-right: 20px;
  position: relative;
  z-index: 1;
}

.delivery-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.delivery-stat-box {
  flex: 1;
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.04);
}

.delivery-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #333;
  font-weight: 600;
  margin-bottom: 10px;
}

.delivery-stat-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #3fae57;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.delivery-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #1c1c1e;
}

.delivery-stat-value .unit {
  font-size: 12px;
  font-weight: 600;
  color: #666;
}

.week-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px 8px;
  margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.04);
}

.week-row {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.week-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.week-day-letter {
  font-size: 13px;
  color: #555;
  font-weight: 600;
}

.week-day-num {
  font-size: 14px;
  font-weight: 800;
  color: #1c1c1e;
}

.week-day-letter.is-weekend,
.week-day-num.is-weekend {
  color: #e04b4b;
}

.week-bar-track {
  width: 18px;
  height: 80px;
  background: #eee;
  border-radius: 999px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.week-day-value {
  font-size: 11px;
  font-weight: 700;
  color: #444;
}

.week-bar-fill {
  width: 100%;
  background: #3fae57;
  border-radius: 999px;
}

.week-empty {
  text-align: center;
  color: #666;
  font-size: 13px;
  margin: 0 0 14px;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
}

.section-divider-line {
  flex: 1;
  border-top: 1.5px dashed #ccc;
}

.section-divider-text {
  font-size: 12px;
  font-weight: 800;
  color: #3fae57;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.error-text {
  color: #c0392b;
  font-size: 13px;
  text-align: center;
  margin: -6px 0 14px;
  min-height: 16px;
}

/* ---- Password strength widget ---- */
.pw-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  padding: 0;
  color: #9a9aa0;
  flex-shrink: 0;
}

.pw-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.pw-meter {
  display: flex;
  gap: 4px;
  margin: 8px 0 0;
}

.pw-meter span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #e2e2e6;
}

.pw-meter.weak span:nth-child(1) { background: #d92b3f; }
.pw-meter.medium span:nth-child(1) { background: #d92b3f; }
.pw-meter.medium span:nth-child(2) { background: #f5a623; }
.pw-meter.strong span:nth-child(1) { background: #d92b3f; }
.pw-meter.strong span:nth-child(2) { background: #f5a623; }
.pw-meter.strong span:nth-child(3) { background: #2f9e44; }

.pw-requirements {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: #9a9aa0;
}

.pw-requirements li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pw-requirements li::before {
  content: '\2715';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d9d9d9;
  color: #fff;
  font-size: 9px;
  flex-shrink: 0;
}

.pw-requirements li.ok {
  color: #1c1c1e;
}

.pw-requirements li.ok::before {
  content: '\2713';
  background: #2f9e44;
}

.hint-text {
  color: #555;
  font-size: 12.5px;
  text-align: center;
  margin: -6px 0 14px;
  min-height: 16px;
}

.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.otp-inputs input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 1.5px solid #e2e2e6;
  border-radius: 12px;
  outline: none;
}

.otp-inputs input:focus {
  border-color: #3fae57;
}

.info-banner {
  border-radius: 20px;
  width: 100%;
  aspect-ratio: 400 / 880;
  max-height: 70vh;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #2f6fa0, #0d2b52);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 40px;
  font-weight: 800;
}

.info-text {
  min-height: 160px;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.6;
  color: #222;
}

/* ---- Admin ---- */
.admin-screen {
  max-width: 640px;
}

.admin-section {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.05);
}

.admin-section h2 {
  font-size: 15px;
  margin: 0 0 14px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12.5px;
  color: #555;
  margin-bottom: 6px;
  font-weight: 600;
}

.field input[type="text"],
.field textarea,
.field input[type="password"] {
  width: 100%;
  border: 1.5px solid #e2e2e6;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 90px;
}

.field input[type="file"] {
  width: 100%;
  font-size: 13px;
}

.preview-img {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 8px;
  display: none;
}

.status-msg {
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
}

.status-msg.ok { color: #2f9e44; }
.status-msg.error { color: #c0392b; }

.stat-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.stat-box {
  flex: 1;
  min-width: 0;
  background: #f7f7f9;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}

.stat-box .num {
  font-size: 20px;
  font-weight: 800;
  overflow-wrap: break-word;
}

.stat-box .label {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.stat-box .mini-label {
  font-size: 11px;
  color: #666;
  font-weight: 600;
}

.top-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
}

/* ---- Leaderboard ---- */
.lb-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.podium-card {
  flex: 1;
  min-width: 0;
  max-width: 130px;
  border-radius: 16px;
  padding: 10px 8px 12px;
  text-align: center;
  background: #e9e9ee;
  position: relative;
}

.podium-card.is-self {
  flex: 1.45;
  max-width: 172px;
  animation-duration: 1.1s;
}

.podium-you-wrap {
  margin: -2px 0 4px;
}

.podium-card.rank-1 {
  padding-top: 4px;
  transform: translateY(-10px);
}

.podium-medal {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 6px;
}

.podium-avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  margin-bottom: 8px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.podium-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #1c1c1e;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.podium-count {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: #333;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  padding: 2px 8px;
}

.podium-card.is-self {
  box-shadow: 0 0 0 3px #ffb703, 0 12px 28px rgba(255,183,3,0.5);
  background: linear-gradient(180deg, #fff6e0, #ffe9b3);
  animation-name: self-glow-pulse-gold;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.podium-card.is-self.rank-1 {
  box-shadow: 0 0 0 3px #ffd700, 0 14px 34px rgba(255,215,0,0.6);
  background: linear-gradient(180deg, #fff8dc, #ffe066);
  animation-name: self-glow-pulse-gold;
}

.podium-card.is-self.rank-2 {
  box-shadow: 0 0 0 3px #b8bcc6, 0 14px 34px rgba(150,155,170,0.6);
  background: linear-gradient(180deg, #f4f5f7, #d6d9e0);
  animation-name: self-glow-pulse-silver;
}

.podium-card.is-self.rank-3 {
  box-shadow: 0 0 0 3px #cd7f32, 0 14px 34px rgba(205,127,50,0.6);
  background: linear-gradient(180deg, #ffe6cc, #e8a967);
  animation-name: self-glow-pulse-bronze;
}

@keyframes self-glow-pulse-gold {
  0%, 100% { box-shadow: 0 0 0 3px #ffd700, 0 14px 34px rgba(255,215,0,0.6); }
  50% { box-shadow: 0 0 0 7px #fff0a8, 0 18px 46px rgba(255,215,0,0.9); }
}

@keyframes self-glow-pulse-silver {
  0%, 100% { box-shadow: 0 0 0 3px #b8bcc6, 0 14px 34px rgba(150,155,170,0.6); }
  50% { box-shadow: 0 0 0 7px #e8eaee, 0 18px 46px rgba(150,155,170,0.9); }
}

@keyframes self-glow-pulse-bronze {
  0%, 100% { box-shadow: 0 0 0 3px #cd7f32, 0 14px 34px rgba(205,127,50,0.6); }
  50% { box-shadow: 0 0 0 7px #f0bd8a, 0 18px 46px rgba(205,127,50,0.9); }
}

.podium-card.sparkle .sparkle-emoji {
  position: absolute;
  font-size: 19px;
  animation: sparkle-twinkle 1.1s ease-in-out infinite;
  pointer-events: none;
}

.podium-card.sparkle .sparkle-emoji:nth-child(1) { top: -12px; left: -10px; animation-delay: 0s; }
.podium-card.sparkle .sparkle-emoji:nth-child(2) { top: -16px; right: -8px; animation-delay: 0.3s; }
.podium-card.sparkle .sparkle-emoji:nth-child(3) { bottom: 34%; left: -18px; animation-delay: 0.6s; }
.podium-card.sparkle .sparkle-emoji:nth-child(4) { bottom: 22%; right: -16px; animation-delay: 0.9s; }
.podium-card.sparkle .sparkle-emoji:nth-child(5) { top: 40%; left: -20px; animation-delay: 1.2s; }
.podium-card.sparkle .sparkle-emoji:nth-child(6) { top: 44%; right: -18px; animation-delay: 1.5s; }

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.7) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.3) rotate(15deg); }
}

.you-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  color: #fff;
  background: #ff8a00;
  border-radius: 999px;
  padding: 1px 6px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid #eee;
}

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

.lb-row.is-self {
  background: linear-gradient(90deg, rgba(255,183,3,0.35), rgba(255,183,3,0.08));
  border-radius: 10px;
  padding-left: 8px;
  border-left: 5px solid #ffb703;
  animation: self-row-pulse 1.1s ease-in-out infinite;
}

@keyframes self-row-pulse {
  0%, 100% {
    background: linear-gradient(90deg, rgba(255,183,3,0.35), rgba(255,183,3,0.08));
    box-shadow: 0 0 16px rgba(255,183,3,0.3);
  }
  50% {
    background: linear-gradient(90deg, rgba(255,183,3,0.6), rgba(255,183,3,0.18));
    box-shadow: 0 0 28px rgba(255,183,3,0.65);
  }
}

.lb-row.is-self .lb-row-name {
  font-weight: 800;
}

.lb-row-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #d9d9d9;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.lb-row-rank {
  font-size: 18px;
  font-weight: 800;
  width: 20px;
  flex-shrink: 0;
}

.lb-row-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.lb-row-count {
  font-size: 12.5px;
  color: #555;
  font-weight: 600;
  white-space: nowrap;
}

.lb-pinned {
  margin-top: 16px;
}

.lb-pinned-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, #cdd8f7, #e6ecfc);
  border-radius: 999px;
  padding: 10px 16px;
}

.lb-pinned-row .lb-row-rank {
  font-size: 20px;
}

.lb-empty {
  text-align: center;
  color: #666;
  font-size: 13px;
  padding: 20px 0;
}

/* ---- Profile edit ---- */
.profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 15px;
  color: #333;
}

.avatar-preview {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background-color: #eee;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.avatar-option {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 2.5px solid transparent;
  cursor: pointer;
}

.avatar-option.selected {
  border-color: #3fae57;
}

.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.color-option {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
}

.color-option.selected {
  border-color: #1c1c1e;
}

/* ---- Admin: profile options / promotions / surveys ---- */
.option-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.option-item {
  position: relative;
}

.option-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #eee;
}

.option-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #c0392b;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.btn-text-link {
  border: none;
  background: none;
  color: #2f6fa0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.promo-admin-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  position: relative;
}

.promo-admin-thumb {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #eee;
  flex-shrink: 0;
}

.promo-admin-info {
  flex: 1;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.promo-admin-item .option-remove {
  position: static;
  flex-shrink: 0;
}

.driver-picker {
  max-height: 220px;
  overflow-y: auto;
  border: 1.5px solid #e2e2e6;
  border-radius: 12px;
  padding: 8px 12px;
}

.driver-picker-item {
  display: block;
  padding: 6px 0;
  font-size: 13.5px;
}

/* ---- Survey modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-card .field label {
  font-weight: 700;
  color: #1c1c1e;
  margin-bottom: 8px;
}

/* ---- Promotions (driver) ---- */
.promo-list {
  display: flex;
  flex-direction: column;
}

.promo-item {
  position: relative;
  aspect-ratio: 2 / 1;
  background-size: cover;
  background-position: center;
  background-color: #eee;
  cursor: pointer;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 14px;
}

.promo-item:last-child {
  margin-bottom: 0;
}

.promo-item.expanded {
  aspect-ratio: 1 / 1;
}

.promo-more-link {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  display: none;
}

.promo-item.expanded .promo-more-link {
  display: inline-block;
}

/* ---- Manual orders (driver) ---- */
.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  white-space: nowrap;
}

.orders-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1.5px solid #ddd;
  color: #555;
  font-weight: 700;
}

.orders-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.orders-row {
  cursor: pointer;
}

.address-cell {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.address-cell.expanded {
  max-width: none;
  white-space: normal;
  text-decoration: underline;
}

/* ---- eBarimt guide (driver) ---- */
.ebarimt-step {
  margin-bottom: 22px;
}

.ebarimt-step:last-child {
  margin-bottom: 0;
}

.ebarimt-step-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  background-color: #eee;
  margin-bottom: 10px;
}

.ebarimt-step-caption {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  text-align: center;
}

/* ---- Pill nav buttons (Гарах / Буцах) ---- */
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 20px 6px 6px;
  font-weight: 800;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.pill-btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pill-btn-icon svg {
  width: 15px;
  height: 15px;
}

.pill-logout {
  color: #e02020;
  box-shadow: 0 0 32px rgba(224,32,32,0.4);
}

.pill-btn-sm {
  padding: 4px 14px 4px 4px;
  font-size: 11px;
  gap: 6px;
}

.pill-btn-sm .pill-btn-icon {
  width: 24px;
  height: 24px;
}

.pill-btn-sm .pill-btn-icon svg {
  width: 11px;
  height: 11px;
}

.pill-back {
  color: #6b6b6b;
  box-shadow: 0 0 32px rgba(130,130,130,0.28);
}

.pill-submit {
  color: #1c1c1e;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* ---- Admin Dashboard Shell (desktop) ---- */
.admin-shell {
  --admin-bg: #f7f8fa;
  --admin-accent: #34c759;
  --admin-card-bg: #ffffff;
  --admin-text: #1c1c1e;
  --admin-text-secondary: #6b6b6b;
  --admin-border: #e6e6ea;
  --admin-sidebar-bg: #ffffff;
  --admin-hover-bg: rgba(52,199,89,0.08);
  width: 100%;
  min-height: 100vh;
  display: flex;
  background: var(--admin-bg);
  color: var(--admin-text);
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.admin-shell[data-theme="night"] {
  --admin-bg: #0b373c;
  --admin-accent: #34c759;
  --admin-card-bg: #181a1b;
  --admin-text: #c9c9c9;
  --admin-text-secondary: #a69e93;
  --admin-border: #2b2d2e;
  --admin-sidebar-bg: #1c1e1f;
  --admin-hover-bg: rgba(52,199,89,0.15);
}

.admin-sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--admin-sidebar-bg);
  border-right: 1px solid var(--admin-border);
  padding: 20px 0;
  overflow-y: auto;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
  font-weight: 800;
  font-size: 16px;
}

.admin-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.admin-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 20px;
  border: none;
  border-left: 3px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--admin-text-secondary);
  font-weight: 600;
  font-family: inherit;
}

.admin-nav-item:hover {
  background: var(--admin-hover-bg);
}

.admin-nav-item.active {
  color: var(--admin-accent);
  border-left-color: var(--admin-accent);
  background: var(--admin-hover-bg);
}

.admin-nav-group-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--admin-text);
  font-family: inherit;
}

.admin-nav-group-toggle::after {
  content: '\25BE';
  font-size: 10px;
  transition: transform 0.15s;
}

.admin-nav-group.collapsed .admin-nav-group-toggle::after {
  transform: rotate(-90deg);
}

.admin-nav-group.collapsed .admin-nav-sub {
  display: none;
}

.admin-nav-sub .admin-nav-item {
  padding-left: 36px;
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-card-bg);
}

.admin-topbar-title {
  font-size: 18px;
  font-weight: 800;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.admin-profile-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text-secondary);
}

.admin-content {
  flex: 1;
  padding: 24px 32px 60px;
  overflow-y: auto;
}

.admin-view {
  display: none;
}

.admin-view.active {
  display: block;
}

.admin-shell .admin-section {
  background: var(--admin-card-bg);
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
}

.admin-shell .field label {
  color: var(--admin-text-secondary);
}

.admin-shell .field input[type="text"],
.admin-shell .field input[type="email"],
.admin-shell .field textarea,
.admin-shell .field input[type="password"],
.admin-shell .field input[type="date"],
.admin-shell .field select {
  background: var(--admin-bg);
  color: var(--admin-text);
  border-color: var(--admin-border);
}

.admin-shell .hint-text {
  color: var(--admin-text-secondary);
}

/* Theme toggle switch */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.theme-toggle input {
  display: none;
}

.theme-toggle-track {
  width: 52px;
  height: 28px;
  border-radius: 14px;
  background: #7ec8e3;
  position: relative;
  display: inline-block;
  transition: background 0.2s;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffd60a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: transform 0.2s, background 0.2s;
}

.theme-toggle input:checked + .theme-toggle-track {
  background: #1c2540;
}

.theme-toggle input:checked + .theme-toggle-track .theme-toggle-thumb {
  transform: translateX(24px);
  background: #2c2c2e;
}

/* Dashboard KPI tiles */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-tile {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 16px 18px;
}

.kpi-tile .kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--admin-text);
}

.kpi-tile .kpi-label {
  font-size: 12px;
  color: var(--admin-text-secondary);
  margin-top: 4px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table th {
  color: var(--admin-text-secondary);
  font-weight: 700;
}

.admin-table td {
  color: var(--admin-text);
}

@media (max-width: 860px) {
  .admin-shell {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--admin-border);
  }
  .admin-topbar, .admin-content {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ---- Role-select splash ---- */
.splash-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  gap: 10px;
}

.splash-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.splash-logo-img {
  height: 44px;
  width: auto;
}

.splash-welcome-title {
  font-size: 20px;
  font-weight: 800;
  color: #1c1c1e;
  margin-top: 18px;
}

.splash-welcome-subtitle {
  font-size: 12.5px;
  color: #666;
  line-height: 1.5;
  max-width: 300px;
  margin-top: 8px;
}

.splash-actions {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 28px;
}

.splash-actions .btn {
  flex: 1;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  white-space: pre-line;
}

/* ---- Login/register tabs ---- */
.auth-tabs {
  display: flex;
  gap: 8px;
  background: #f0f1f4;
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 20px;
}

.auth-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: #777;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-tab-btn.active {
  background: #fff;
  color: #1c1c1e;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #444;
  line-height: 1.4;
  margin: 4px 0 18px;
}

.checkbox-row input {
  margin-top: 3px;
  flex-shrink: 0;
}

.hint-box {
  background: #f6f7f9;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 18px;
}

.request-success {
  text-align: center;
  padding: 10px 4px 4px;
}

.request-success .icon-big {
  font-size: 44px;
  margin-bottom: 10px;
}

.request-success-video {
  width: 170px;
  height: 170px;
  border-radius: 20px;
  object-fit: cover;
  margin: 0 auto 14px;
  display: block;
  background: #f6f7f9;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.success-actions .btn {
  text-decoration: none;
  box-sizing: border-box;
}

/* ---- Swipeable info banner (register tab) ---- */
.swipe-banner-wrap {
  margin-bottom: 18px;
}

.swipe-banner {
  border-radius: 16px;
  overflow: hidden;
}

.swipe-banner-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.swipe-banner-track::-webkit-scrollbar {
  display: none;
}

.swipe-banner-slide-img {
  flex: 0 0 100%;
  scroll-snap-align: start;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  display: block;
}

.swipe-banner-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px 0;
}

.swipe-banner-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e2e2e6;
  overflow: hidden;
}

.swipe-banner-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: #3fae57;
  transition: width 0.2s ease;
}

.swipe-banner-progress-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #666;
  flex-shrink: 0;
  min-width: 32px;
  text-align: right;
}

.urgent-note {
  text-align: center;
  margin-top: 18px;
  font-size: 12.5px;
  color: #777;
  line-height: 1.5;
}

.urgent-note a {
  color: #2f6fa0;
  font-weight: 700;
  text-decoration: none;
}

/* ---- Bottom tab bar (driver pages) ---- */
.screen.has-bottom-nav {
  padding-bottom: 96px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-top: 1px solid #ececef;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.06);
  display: flex;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: #9a9aa0;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 4px 2px;
}

.bottom-nav-item .bottom-nav-icon {
  font-size: 19px;
  line-height: 1;
}

.bottom-nav-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 24px;
  line-height: 1.2;
}

.bottom-nav-item .bottom-nav-icon svg {
  width: 21px;
  height: 21px;
  display: block;
}

.bottom-nav-item.active {
  color: #3fae57;
}
