/* ═══════════════════════════════════════════════════
   Irancell Manager – Liquid Glass + Brand Yellow
═══════════════════════════════════════════════════ */

:root {
  --yellow: #FEBE10;
  --yellow-soft: rgba(254, 190, 16, 0.18);
  --yellow-glow: rgba(254, 190, 16, 0.45);
  --black: #0D0D0F;
  --text: #1A1A1C;
  --text-secondary: #5C5C66;
  --text-muted: #8E8E98;
  --surface: rgba(255, 255, 255, 0.55);
  --surface-strong: rgba(255, 255, 255, 0.78);
  --surface-border: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --nav-h: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --blur: 24px;
  --blur-strong: 40px;
}

html,
body {
    touch-action: pan-x pan-y;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
}

* {
    -webkit-tap-highlight-color: transparent;
}

input,
textarea,
select {
    font-size: 16px !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  direction: rtl;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
  line-height: 1.55;
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(254, 190, 16, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 20%, rgba(254, 190, 16, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(200, 200, 220, 0.25) 0%, transparent 50%),
    linear-gradient(180deg, #F0F0F5 0%, #E8E8EE 100%);
  background-attachment: fixed;
}

.glass {
  background: var(--surface);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.glass-strong {
  background: var(--surface-strong);
  backdrop-filter: blur(var(--blur-strong)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-lg);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-right: 18px;
  padding-bottom: 16px;
  padding-left: 18px;
  background-color: #FEBE10;
  background-image: linear-gradient(
    180deg,
    #FFD54F 0%,
    #FEBE10 55%,
    #F5B400 100%
  );
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(254, 190, 16, 0.35);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  margin: 12px;
  margin-top: 0;
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 18px;
}


.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--black);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--yellow);
}

.brand-text {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--black);
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  color: var(--black);
  text-decoration: none;
}

.icon-btn:active {
  transform: scale(0.94);
  background: rgba(0, 0, 0, 0.16);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  padding: 10px 14px;
}

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

.account-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-phone {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.65);
  direction: ltr;
  text-align: right;
  font-weight: 500;
  margin-top: 1px;
}

.stored-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: var(--yellow);
  border-radius: 12px;
  min-width: 48px;
  padding: 8px 10px;
  flex-shrink: 0;
  gap: 2px;
}

.stored-badge .num {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
}

.account-strip.empty-state {
  justify-content: center;
}

.account-strip.empty-state .account-name {
  font-weight: 600;
  opacity: 0.8;
}

.card {
  background: var(--surface-strong);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 0 16px 14px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 14px;
  padding: 13px 18px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, background 0.2s, box-shadow 0.2s;
  width: 100%;
}

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

.btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
  box-shadow: 0 4px 16px var(--yellow-glow);
}

.btn-primary:hover {
  background: #F0B400;
}

.btn-dark {
  background: var(--black);
  color: var(--yellow);
}

.btn-ghost {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #B91C1C;
}

.btn-success {
  background: rgba(34, 197, 94, 0.12);
  color: #15803D;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.82rem;
  border-radius: 10px;
  width: auto;
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  direction: ltr;
  text-align: left;
}

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

.input-rtl {
  direction: rtl;
  text-align: right;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding: 8px 8px var(--safe-bottom);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(var(--blur-strong)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  z-index: 100;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.06);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 14px;
  transition: color 0.2s, background 0.2s;
  min-width: 64px;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s;
}

.nav-item.active {
  color: var(--black);
}

.nav-item.active svg {
  stroke: var(--black);
  stroke-width: 2.2;
}

.nav-item.active .nav-icon-wrap {
  background: var(--yellow);
  box-shadow: 0 2px 10px var(--yellow-glow);
}

.nav-icon-wrap {
  width: 44px;
  height: 30px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  transition: background 0.25s, box-shadow 0.25s;
}

.page {
  display: none;
  animation: fadeUp 0.28s ease;
  padding-top: 16px;
}

.page.active {
  display: block;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 20px 12px;
  letter-spacing: -0.02em;
}

.pkg-card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}

.pkg-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.pkg-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.65rem;
  line-height: normal;
  font-weight: 600;
}

.badge-yellow {
  background: var(--yellow-soft);
  color: #92600A;
}

.badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #15803D;
}

.badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: #B91C1C;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-expiry {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.badge-expiry svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.badge-expiry-ok {
  background: rgba(34, 197, 94, 0.12);
  color: #15803D;
}

.badge-expiry-mid {
  background: rgba(254, 190, 16, 0.16);
  color: #92600A;
}

.badge-expiry-warn {
  background: rgba(249, 115, 22, 0.14);
  color: #C2410C;
}

.badge-expiry-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #B91C1C;
}

.badge-expiry-dead {
  background: rgba(100, 100, 110, 0.12);
  color: #5C5C66;
}

.account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.account-item .phone {
  font-weight: 700;
  font-size: 1.02rem;
  direction: ltr;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 6px;
}

.status-dot.on {
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.status-dot.off {
  background: var(--text-muted);
}

.progress {
  height: 7px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), #F0B400);
  border-radius: 4px;
  transition: width 0.45s ease;
}

.toast-stack {
  position: fixed;
  top: calc(12px + var(--safe-top));
  left: 16px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(28, 28, 32, 0.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  color: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  background: rgba(22, 101, 52, 0.92);
  border-color: rgba(34, 197, 94, 0.3);
}

.toast.error {
  background: rgba(127, 29, 29, 0.92);
  border-color: rgba(239, 68, 68, 0.3);
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.toast-icon svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.toast-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.toast-text {
  font-size: 0.8rem;
  opacity: 0.85;
  line-height: 1.4;
}

.toast-close {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: background 0.15s;
}

.toast-close:active {
  background: rgba(255, 255, 255, 0.2);
}

.toast-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  place-items: center;
  z-index: 150;
}

.loading-overlay.show {
  display: grid;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.04);
  display: grid;
  place-items: center;
}

.empty-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-page,
.onboard-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: calc(24px + var(--safe-top));
  background:
    radial-gradient(ellipse 100% 70% at 50% -20%, rgba(254, 190, 16, 0.5) 0%, transparent 60%),
    linear-gradient(180deg, #FEBE10 0%, #F0F0F5 42%);
}

.login-card,
.onboard-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(var(--blur-strong)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  padding: 32px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.1);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo .badge {
  width: 72px;
  height: 72px;
  background: var(--black);
  border-radius: 22px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.login-logo .badge svg {
  width: 36px;
  height: 36px;
  fill: var(--yellow);
}

.login-logo h1 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
  transition: background 0.28s ease, visibility 0.28s;
  /* iOS keyboard: keep sheet above keyboard via JS --vvh */
  padding-bottom: 0;
}

.modal-backdrop.show {
  visibility: visible;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-backdrop.closing {
  background: rgba(0, 0, 0, 0);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(var(--blur-strong)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
  width: 100%;
  max-width: 480px;
  max-height: min(92dvh, var(--sheet-max, 92dvh));
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-bottom: none;
  padding: 12px 20px calc(24px + var(--safe-bottom));
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateY(110%);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  touch-action: none; /* drag handled by JS on handle */
  overflow: hidden;
}

.modal-backdrop.show .modal {
  transform: translateY(0);
}

.modal-backdrop.show.dragging .modal {
  transition: none;
}

.modal-backdrop.closing .modal {
  transform: translateY(110%);
}

.modal-handle-area {
  flex-shrink: 0;
  padding: 10px 20px 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.modal-handle-area:active {
  cursor: grabbing;
}

.modal-handle {
  width: 40px;
  height: 5px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 3px;
  margin: 0 auto 12px;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 20px 12px;
  text-align: center;
  flex-shrink: 0;
}

.modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 20px calc(20px + var(--safe-bottom));
  touch-action: pan-y;
  min-height: 0;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-shrink: 0;
}

.modal-actions .btn {
  flex: 1;
}

/* Prevent body scroll when sheet open */
body.sheet-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 12px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.active {
  background: #fff;
  color: var(--black);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mb-2 { margin-bottom: 8px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }

body.onboarding .app-header,
body.onboarding .bottom-nav {
  display: none;
}

body.onboarding {
  padding-bottom: 0;
}

/* ───── Package wheels ───── */
.wheels-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 8px 0 4px;
}

.wheel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 140px;
}

.wheel {
  position: relative;
  width: 120px;
  height: 120px;
}

.wheel svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.wheel-track {
  fill: none;
  stroke: rgba(0, 0, 0, 0.06);
  stroke-width: 10;
}

.wheel-progress {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.wheel-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.wheel-pct {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--black);
  line-height: 1.1;
}

.wheel-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.wheel-name {
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  line-height: 1.3;
  max-width: 140px;
}

.wheel-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
  unicode-bidi: plaintext;
  text-align: center;
}

/* ───── Packages table ───── */
/* .pkg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.pkg-table thead th {
  text-align: right;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0 10px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.pkg-table tbody tr {
  transition: background 0.15s;
}

.pkg-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.pkg-table td {
  padding: 14px 10px;
  vertical-align: middle;
}

.pkg-table .col-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}

.pkg-table .col-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
  max-width: 180px;
}

.pkg-table .col-id {
  font-size: 0.49rem;
  color: var(--text-muted);
  direction: ltr;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.pkg-table .col-action {
  text-align: left;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .pkg-table .col-desc { max-width: 120px; }
  .wheel-item { width: 120px; }
  .wheel, .wheel svg { width: 100px; height: 100px; }
  .wheel-pct { font-size: 1rem; }
}


.pkg-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pkg-stat {
  text-align: center;
  background: var(--pkg-card-bg);
  border: 1px solid var(--pkg-card-border);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
}

.pkg-stat-num {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.pkg-stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

.pkg-stat-50 {
  border-color: rgba(254, 190, 16, 0.45);
  background: var(--yellow-soft);
}

.pkg-stat-50 .pkg-stat-num {
  color: #92600A;
}

.pkg-stat-3 .pkg-stat-num {
  color: #15803D;
}

@media (prefers-color-scheme: dark) {
  .pkg-stat-50 .pkg-stat-num {
    color: #FEBE10;
  }
  .pkg-stat-3 .pkg-stat-num {
    color: #4ADE80;
  }
}
 */
.pkg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--table-border);
}

.pkg-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pkg-row:first-of-type {
  padding-top: 4px;
}

.pkg-row-main {
  min-width: 0;
  flex: 1;
}

.pkg-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.pkg-row .btn-sm {
  flex-shrink: 0;
}

.pkg-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pkg-stat {
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.pkg-stat:active {
  transform: scale(0.97);
}

.pkg-stat.is-active {
  border-width: revert;
  border-top-width: 8px;
}

.pkg-stat-50 {
  background: rgba(254, 190, 16, 0.14);
  border-color: rgba(254, 190, 16, 0.35);
}

.pkg-stat-3 {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.pkg-stat-num {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}

.pkg-stat-lbl {
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #8E8E98);
}

.pkg-list {
  margin-left: -10px;
}

.pkg-list-wrap {
  position: relative;
}

.pkg-list-wrap.has-more .pkg-list {
  mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}

.pkg-more-fade {
  position: relative;
  margin-top: -75px;
  padding-top: 28px;
  display: flex;
  justify-content: center;
}

.pkg-more-btn {
  width: auto;
  height: 38px;
  font-size: 12px;
  color: var(--text-secondary);
  border-radius: 10px;
}

.pkg-section-count {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 998px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.78rem;
  font-weight: 700;
  display: grid;
  align-items: center;
  justify-content: center;
  line-height: normal;
}

.pkg-row .pkg-row-top {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}

.pkg-row .pkg-row-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
  max-width: 180px;
}

.pkg-row .btn {
  margin-left: 10px;
}

.confirm-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.65;
  text-align: center;
}

.pkg-title-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pkg-section-count,
.pkg-section-volume {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pkg-section-count {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary, #5C5C66);
}

.pkg-section-volume {
  background: rgba(254, 190, 16, 0.18);
  color: #92600A;
}