/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #0f0f13;
  --bg-secondary: #1a1a24;
  --bg-card: #1e1e2e;
  --bg-input: #252535;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: rgba(59, 130, 246, 0.15);
  --accent-glow: rgba(59, 130, 246, 0.3);
  --text-primary: #f0f0f5;
  --text-secondary: #9090a8;
  --text-muted: #5a5a72;
  --border: #2a2a3e;
  --border-accent: rgba(59, 130, 246, 0.4);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info: #06b6d4;
  --info-bg: rgba(6, 182, 212, 0.15);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 4px 24px rgba(59, 130, 246, 0.2);
  --nav-height: 64px;
  --header-height: 56px;
  --transition: 0.2s ease;
}

html, body {
  height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 20px;
}

.loader-logo {
  font-size: 48px;
  animation: pulse 1.5s ease-in-out infinite;
}

.loader-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ===== GLOBAL BACKGROUND LAYER ===== */
#global-bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* ===== APP LAYOUT ===== */
#app {
  display: none;
  flex-direction: column;
  height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background: transparent;
}

#app.visible {
  display: flex;
}

/* ===== HEADER ===== */
.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--header-height);
  background: rgba(15, 15, 19, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

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

.header-logo {
  font-size: 24px;
}

.header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.header-title span {
  color: var(--accent);
}

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

.lang-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.5px;
}

.lang-btn:hover, .lang-btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== MAIN CONTENT ===== */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding-top: var(--header-height);
  padding-bottom: calc(var(--nav-height) + 8px);
  -webkit-overflow-scrolling: touch;
}

.page {
  display: none;
  padding: 16px;
  min-height: calc(100vh - var(--header-height) - var(--nav-height));
  animation: fadeIn 0.25s ease;
}

.page.active {
  display: block;
}

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

/* ===== BOTTOM NAV ===== */
.app-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: rgba(26, 26, 36, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 8px 4px;
  transition: all var(--transition);
  border: none;
  background: none;
  color: var(--text-muted);
  position: relative;
}

.nav-item .nav-icon {
  font-size: 22px;
  transition: transform var(--transition);
}

.nav-item .nav-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

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

.nav-item.active .nav-icon {
  transform: translateY(-2px);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color var(--transition);
}

.card:hover {
  border-color: var(--border-accent);
}

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

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ===== HOME PAGE ===== */
.welcome-section {
  background: linear-gradient(135deg, #1a2744 0%, #0f1929 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.welcome-section::before {
  content: '🚚';
  position: absolute;
  right: -10px;
  top: -10px;
  font-size: 80px;
  opacity: 0.08;
  transform: rotate(-15deg);
}

.welcome-greeting {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.welcome-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.client-code-box {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition);
}

.client-code-box:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent);
}

.client-code-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.client-code-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
}

.copy-icon {
  font-size: 18px;
  opacity: 0.6;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 12px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  -webkit-tap-highlight-color: transparent;
}

.info-card:active {
  background: var(--bg-hover, rgba(255,255,255,0.04));
}

.info-card-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.info-card-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-card-value {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.info-card-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.5;
}

/* ===== WAREHOUSES ===== */
.section-title {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.wh-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.wh-card:has(.wh-body[style*="block"]) {
  border-color: var(--accent);
}

.wh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}

/* Glass effect when card has background image */
.wh-has-bg .wh-header,
.wh-has-bg .wh-body {
  background: rgba(10, 10, 14, 0.58);
}

.wh-has-bg .wh-city-name,
.wh-has-bg .wh-value,
.wh-has-bg .wh-chinese {
  color: #fff;
}

.wh-has-bg .wh-note,
.wh-has-bg .wh-label,
.wh-has-bg .wh-arrow {
  color: rgba(255, 255, 255, 0.65);
}

.wh-has-bg .wh-body {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.wh-city {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wh-flag {
  font-size: 22px;
}

.wh-city-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.wh-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.wh-arrow {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.wh-body {
  padding: 0 16px 14px;
  border-top: 1px solid var(--border);
}

.wh-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: flex-start;
}

.wh-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 70px;
  padding-top: 1px;
}

.wh-value {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.wh-chinese {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.wh-actions {
  margin-top: 12px;
}

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

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== PACKAGES ===== */
.package-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.package-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0;
}

.package-card.status-waiting::before { background: var(--text-muted); }
.package-card.status-arrived::before { background: var(--info); }
.package-card.status-measured::before { background: var(--warning); }
.package-card.status-in_transit::before { background: var(--accent); }
.package-card.status-delivered::before { background: var(--success); }

.package-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.package-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.package-tracking {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.package-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-waiting { background: rgba(90,90,114,0.2); color: var(--text-secondary); }
.status-arrived { background: var(--info-bg); color: var(--info); }
.status-measured { background: var(--warning-bg); color: var(--warning); }
.status-in_transit { background: var(--accent-light); color: var(--accent); }
.status-delivered { background: var(--success-bg); color: var(--success); }
.status-pending { background: rgba(90,90,114,0.2); color: var(--text-secondary); }
.status-calculated { background: var(--warning-bg); color: var(--warning); }
.status-confirmed { background: var(--info-bg); color: var(--info); }
.status-rejected { background: var(--danger-bg); color: var(--danger); }
.status-purchased { background: var(--accent-light); color: var(--accent); }
.status-completed { background: var(--success-bg); color: var(--success); }
.status-open { background: var(--success-bg); color: var(--success); }
.status-full { background: var(--danger-bg); color: var(--danger); }
.status-started { background: var(--accent-light); color: var(--accent); }

.package-info {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.package-info-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== PACKAGE DETAIL ===== */
.detail-view {
  display: none;
  padding: 16px;
  animation: slideIn 0.25s ease;
}

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 15px;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 16px;
  font-weight: 500;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}

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

.detail-card-body {
  padding: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.detail-label {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}

.detail-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
  flex: 1;
}

.cost-highlight {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}

/* ===== STATUS STEPPER ===== */
.status-stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 60px;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step.completed:not(:last-child)::after,
.step.active:not(:last-child)::after {
  background: var(--accent);
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  z-index: 1;
  position: relative;
  transition: all var(--transition);
}

.step.completed .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.step.active .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.step-label {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

.step.completed .step-label,
.step.active .step-label {
  color: var(--accent);
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.service-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: inherit;
  pointer-events: none;
  transition: opacity 0.3s;
}

.service-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.service-card--wide .service-card-content {
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
}

.service-card--wide .service-card-content .service-text {
  flex: 1;
}

.service-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.service-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.service-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--transition);
  font-family: inherit;
  -webkit-appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  background: rgba(37, 37, 53, 0.8);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-muted);
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239090a8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-select option {
  background: var(--bg-secondary);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.3px;
  font-family: inherit;
  width: 100%;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-success {
  background: var(--success);
  color: white;
}

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

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-group {
  display: flex;
  gap: 10px;
}

.btn-group .btn {
  flex: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 240px;
}

/* ===== PROFILE ===== */
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin: 0 auto 16px;
  overflow: hidden;
}

.profile-name {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-username {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.profile-info-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
}
.profile-info-toggle .toggle-arrow {
  transition: transform 0.25s;
}
.profile-info-toggle.open .toggle-arrow {
  transform: rotate(180deg);
}

.profile-info-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.profile-info-collapse.open {
  max-height: 400px;
}

.profile-info-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  margin-bottom: 0;
}

.profile-info-collapse.open + * {
  margin-top: 16px;
}
.profile-info-collapse {
  margin-bottom: 0;
}
.profile-info-collapse.open {
  margin-bottom: 16px;
}

.profile-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

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

.profile-info-icon {
  font-size: 18px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.7;
}
.profile-info-icon svg {
  width: 18px;
  height: 18px;
}

.profile-info-content {
  flex: 1;
}

.profile-info-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 2px;
}

.profile-info-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== NOTIFICATION TOAST ===== */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  z-index: 9999;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: var(--shadow);
  white-space: nowrap;
  max-width: 90%;
}

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

.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.warning { border-color: #f59e0b; color: #f59e0b; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding: 20px;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

/* ===== EDUCATION CARDS ===== */
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  transition: all var(--transition);
}

.edu-card:hover {
  border-color: var(--border-accent);
}

.edu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.edu-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  margin-right: 8px;
}

.edu-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.edu-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.edu-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}

.edu-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.badge-count {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

/* ===== INFO PANEL (rates & prices) ===== */
.info-panel {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}

.info-panel-half {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.info-panel-divider {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

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

.info-row-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.info-row-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.info-row-unit {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.trend {
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  vertical-align: middle;
}

.trend-up {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.12);
}

.trend-down {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.12);
}

/* ===== CALCULATOR BUTTON ===== */
.calc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  margin-bottom: 16px;
  background: none;
  border: 1.5px dashed var(--border-accent);
  border-radius: var(--radius-lg);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.calc-btn:hover {
  background: rgba(var(--accent-rgb, 99,102,241), 0.06);
}

/* ===== CALCULATOR PAGE ===== */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.calc-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.calc-row {
  display: flex;
  gap: 10px;
}

.calc-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-field label {
  font-size: 12px;
  color: var(--text-secondary);
}

.calc-field input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 12px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.calc-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.calc-result {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.calc-result-row span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.calc-result-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 2px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.calc-result-total span:last-child {
  color: var(--accent);
}

.calc-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

/* ===== VIDEO WIDGET ===== */
.video-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}

.video-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  gap: 10px;
}

.video-widget-header:hover {
  background: var(--bg-secondary);
}

.video-widget-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.video-widget-toggle {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.video-widget-body {
  border-top: 1px solid var(--border);
}

.video-embed-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.video-embed-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ===== VIDEO THUMBNAIL CLICK-TO-PLAY ===== */
.video-thumb-container {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.video-thumb-container:hover .video-thumb-img {
  opacity: 0.85;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-play-btn {
  width: 56px;
  height: 56px;
  background: rgba(0,0,0,0.65);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  padding-left: 4px;
  transition: transform 0.15s, background 0.15s;
}

.video-thumb-container:hover .video-play-btn {
  transform: scale(1.1);
  background: rgba(0,0,0,0.8);
}

/* ===== CONTACTS BLOCK ===== */
.contacts-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.contacts-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.contacts-card-content {
  position: relative;
  z-index: 1;
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-primary);
}

.contact-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.75;
}

/* ===== WHEEL NAV ITEM ===== */
.nav-item--wheel {
  position: relative;
}

.nav-wheel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
  margin-top: -20px;
  transition: transform 0.2s ease;
}

.nav-item--wheel:hover .nav-wheel-btn,
.nav-item--wheel.active .nav-wheel-btn {
  transform: rotate(20deg) scale(1.05);
}

.nav-item--wheel .nav-label {
  font-size: 10px;
  margin-top: 2px;
  color: #f59e0b;
}

/* ===== CASE PAGE (CS:GO style) ===== */
.case-page {
  display: flex;
  flex-direction: column;
  gap: 0;
}

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

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

.case-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.case-badge--ok {
  background: rgba(99,102,241,0.15);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.case-badge--empty {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.case-strip-wrap {
  position: relative;
  margin-bottom: 16px;
}

.case-strip-arrow {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 22px solid #f59e0b;
  z-index: 10;
  filter: drop-shadow(0 2px 6px rgba(245,158,11,0.6));
}

.case-strip-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: rgba(245,158,11,0.5);
  z-index: 9;
  pointer-events: none;
}

.case-strip-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 8;
  pointer-events: none;
}

.case-strip-fade--l {
  left: 0;
  background: linear-gradient(to right, var(--bg-primary), transparent);
}

.case-strip-fade--r {
  right: 0;
  background: linear-gradient(to left, var(--bg-primary), transparent);
}

.case-strip-overflow {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 14px 0;
}

.case-track {
  display: flex;
  gap: 6px;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}

.case-item {
  flex-shrink: 0;
  width: 94px;
  height: 112px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-top: 3px solid var(--rc, #64748b);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 4px;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.case-item--winner {
  border-color: #f59e0b !important;
  border-top-color: #f59e0b !important;
  background: rgba(245,158,11,0.08);
  box-shadow: 0 0 24px rgba(245,158,11,0.35);
}

.case-item-emoji {
  font-size: 30px;
  line-height: 1;
}

.case-item-name {
  font-size: 10px;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.3;
  max-width: 82px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.case-open-btn {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(245,158,11,0.35);
  transition: all 0.2s;
  margin-bottom: 10px;
}

.case-open-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.case-open-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245,158,11,0.5);
}

.case-stat {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}

/* Promo (no orders) */
.case-promo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 0;
}

.case-promo-icon {
  font-size: 72px;
  margin-bottom: 16px;
  animation: caseFloat 3s ease-in-out infinite;
}

@keyframes caseFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

.case-promo-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.case-promo-sub {
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 24px;
}

.case-promo-steps {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.case-promo-step {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 16px;
  font-size: 13px;
  text-align: left;
}

.case-promo-num {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.case-promo-prizes {
  width: 100%;
  margin-bottom: 20px;
}

.case-promo-prizes-title {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.case-promo-prizes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.case-promo-prize-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid;
  background: var(--bg-card);
  color: var(--text-primary);
}

.wheel-history {
  width: 100%;
  margin-top: 20px;
}

.wheel-history-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.wheel-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  font-size: 13px;
}

.wheel-history-prize {
  font-weight: 600;
  color: var(--text-primary);
}

.wheel-history-date {
  color: var(--text-secondary);
  font-size: 11px;
}

/* Prize modal */
.prize-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.prize-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.prize-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  max-width: 300px;
  width: 90%;
  transform: scale(0.8);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.prize-modal-overlay.active .prize-modal {
  transform: scale(1);
}

.prize-emoji {
  font-size: 64px;
  margin-bottom: 12px;
  display: block;
  animation: bounce 0.6s ease 0.3s both;
}

@keyframes bounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.prize-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.prize-label {
  font-size: 16px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}

.prize-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 480px) {
  #app {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .app-header,
  .app-nav {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

/* ===== NEWS BLOCK ===== */
.news-section {
  margin-bottom: 24px;
}

.news-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-card {
  background: var(--card-bg);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}

.news-card:active {
  transform: scale(0.98);
}

.news-card--has-img {
  flex-direction: row;
  min-height: 100px;
}

.news-card-img {
  background: var(--border);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.news-card--has-img .news-card-img {
  width: 110px;
  min-height: 100px;
}

.news-card--no-img .news-card-img {
  display: none;
}

.news-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-card-date {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.news-card-badge {
  font-size: 10px;
  font-weight: 600;
  background: var(--accent);
  color: white;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.news-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.news-card-arrow {
  font-size: 12px;
  color: var(--accent);
  margin-top: auto;
  font-weight: 600;
}

/* News article modal */
.news-article {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-article-img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  max-height: 200px;
}

.news-article-date {
  font-size: 12px;
  color: var(--text-muted);
}

.news-article-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0;
}

.news-article-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ===== RANK BAR ===== */
.rank-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rank-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== RANK CARD (Hero) ===== */
.rank-card {
  border-radius: 22px;
  padding: 0;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.rank-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.rank-card-content {
  position: relative;
  z-index: 1;
  padding: 20px 18px 16px;
}

.rank-user-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.rank-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}

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

.rank-user-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-bottom: 2px;
}

.rank-user-username {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
}

.rank-user-code {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-family: monospace;
  margin-bottom: 6px;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid;
}

.rank-badge-icon {
  display: flex;
  align-items: center;
}

.rank-badge-sep {
  opacity: 0.4;
}

.rank-user-phone {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
}

.rank-phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 3px 10px;
  cursor: pointer;
  margin-bottom: 6px;
}

.rank-divider {
  height: 1px;
  margin: 0 0 14px;
}

.rank-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
}

.rank-steps::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 17px;
  right: 17px;
  height: 1px;
  background: rgba(255,255,255,0.12);
  z-index: 0;
}

.rank-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 1;
}

.rank-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: all 0.3s;
}

.rank-step--done .rank-step-icon {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
}

.rank-step--active .rank-step-icon {
  border-width: 2px;
  transform: scale(1.18);
  background: rgba(255,255,255,0.12);
}

.rank-step-label {
  font-size: 9px;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rank-progress-wrap {
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.rank-progress-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.7s ease;
  box-shadow: 0 0 8px currentColor;
}

.rank-progress-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

/* ===== ACHIEVEMENTS ===== */
.ach-section {
  margin-bottom: 16px;
}

.ach-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ach-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  transition: border-color 0.2s;
}

.ach-card--done {
  border-color: var(--ach-color, var(--accent));
}

.ach-card--locked {
  opacity: 0.7;
}

.ach-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  transition: all 0.3s;
}

.ach-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ach-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.ach-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.ach-progress-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 5px 0 2px;
}

.ach-progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.ach-progress-label {
  font-size: 11px;
  color: var(--text-muted);
}

.ach-reward {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.ach-reward--done {
  color: var(--success);
  font-weight: 600;
}

/* ===== PROMO WIDGET ===== */
.promo-widget {
  margin-bottom: 16px;
}

.promo-field-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 4px 4px 12px;
  transition: border-color .2s, box-shadow .2s;
}

.promo-field-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.promo-field-icon {
  display: flex;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
  margin-right: 8px;
  opacity: .7;
}

.promo-field-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 8px 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  color: var(--text-primary) !important;
  text-transform: uppercase;
  min-width: 0;
}

.promo-field-input::placeholder {
  letter-spacing: 1px;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 1;
}

.promo-field-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, opacity .2s;
  white-space: nowrap;
  line-height: 1;
}

.promo-field-btn:hover  { background: #2563eb; }
.promo-field-btn:active { opacity: .8; }
.promo-field-btn:disabled { opacity: .5; cursor: default; }

.promo-success {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 14px;
  background: #22c55e12;
  border: 1px solid #22c55e35;
  border-radius: 10px;
  animation: promoFadeIn .25s ease;
}

.promo-success-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.promo-success-title {
  font-weight: 700;
  font-size: 13px;
  color: #22c55e;
  line-height: 1.2;
}

.promo-success-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

.promo-error {
  margin-top: 6px;
  padding: 8px 12px;
  background: #ef444412;
  border: 1px solid #ef444430;
  border-radius: 8px;
  font-size: 12px;
  color: #ef4444;
  animation: promoFadeIn .2s ease;
}

.promo-input-error { border-color: #ef4444 !important; }

@keyframes promoFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes promoShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  40%      { transform: translateX(5px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

.promo-shake { animation: promoShake .35s ease; }

/* ===== TJ WAREHOUSES BLOCK ===== */
.tj-warehouses-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 12px;
  margin-bottom: 16px;
}

.tj-wh-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 1px solid var(--border);
}

.tj-wh-list {
  display: flex;
  flex-direction: column;
}

.tj-wh-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

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

.tj-wh-item:active {
  background: rgba(255,255,255,.03);
}

.tj-wh-left {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--accent-bg, #3b82f612);
  border-radius: 10px;
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
}

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

.tj-wh-city {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 3px;
}

.tj-wh-address {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 7px;
}

.tj-wh-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tj-wh-contact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s;
}

.tj-wh-contact:active { opacity: .7; }

.tj-wh-hours {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: .75;
  margin-bottom: 7px;
}

.tj-wh-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.tj-wh-copy,
.tj-wh-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity .15s;
  cursor: pointer;
  text-decoration: none;
}

.tj-wh-copy {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text-secondary);
}

.tj-wh-map-btn {
  background: rgba(99,102,241,.1);
  border: 1px solid rgba(99,102,241,.25);
  color: #818cf8;
}

.tj-wh-copy:active,
.tj-wh-map-btn:active { opacity: .6; }
