/* ============================================================
 * FREEZE ADS BOT — Reusable Components
 * ============================================================
 * 
 * All shared UI components for the Telegram Mini App.
 * Every component uses design tokens from variables.css.
 *
 * Sections:
 *   1. Cards
 *   2. Buttons
 *   3. Badges
 *   4. Balance display
 *   5. Stat boxes
 *   6. List items
 *   7. Channel cards
 *   8. Action rows
 *   9. Inputs
 *  10. Toggle switch
 *  11. Avatars
 *  12. Modal & Drawer
 *  13. Divider
 *  14. Empty state
 *  15. Toast / Snackbar
 *  16. Progress bar
 * ========================================================== */


/* ══════════════════════════════════════════════════════════
 * 1. CARDS
 * ════════════════════════════════════════════════════════ */

.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition:
    background var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
}

.card:hover {
  background: var(--bg-card-hover);
}

/* Card with pressed / active feedback */
.card:active {
  transform: scale(0.985);
}

/* Header label above card content — small uppercase label */
.card-header {
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

/* Elevated variant — more shadow, slightly opaque */
.card-elevated {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

/* Feature card — used on Promote page, icon + text layout */
.card-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
}

.card-feature .card-feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: var(--font-size-xl);
}

.card-feature .card-feature-content {
  flex: 1;
  min-width: 0;
}

.card-feature .card-feature-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.card-feature .card-feature-desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}

/* Card group — vertical stack of cards with shared border */
.card-group {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
}

.card-group > .card {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.card-group > .card:last-child {
  border-bottom: none;
}


/* ══════════════════════════════════════════════════════════
 * 2. BUTTONS
 * ════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

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

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

/* ── Primary ─────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}

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

.btn-primary:active {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Secondary / Outlined ────────────────────────────────── */
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-soft);
}

/* ── Gradient ────────────────────────────────────────────── */
.btn-gradient {
  background: var(--gradient-primary);
  color: var(--text-on-accent);
  border: none;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.btn-gradient:hover {
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
  filter: brightness(1.08);
}

.btn-gradient:active {
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.25);
}

/* ── Premium / Indigo Button ─────────────────────────────── */
.btn-premium {
  background: var(--gradient-premium);
  color: var(--text-on-accent);
  border: none;
  box-shadow: 0 4px 12px rgba(var(--accent-premium-rgb), 0.3);
}

.btn-premium:hover {
  box-shadow: 0 6px 20px rgba(var(--accent-premium-rgb), 0.4);
  filter: brightness(1.08);
}

.btn-premium:active {
  box-shadow: 0 2px 8px rgba(var(--accent-premium-rgb), 0.25);
}

/* ── Ghost ───────────────────────────────────────────────── */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: var(--space-2) var(--space-3);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--accent-soft);
}



/* ── Icon button (circular) ──────────────────────────────── */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  border: none;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
}

/* ── Large button ────────────────────────────────────────── */
.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-base);
  border-radius: var(--radius-full);
  min-height: 48px;
}

/* ── Small button ────────────────────────────────────────── */
.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  min-height: 28px;
}

/* ── Block (full-width) ──────────────────────────────────── */
.btn-block {
  width: 100%;
}

/* ── Success ─────────────────────────────────────────────── */
.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* ── Danger ──────────────────────────────────────────────── */
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* ── Ripple container (JS adds .ripple-circle child) ─────── */
.ripple {
  position: relative;
  overflow: hidden;
}


/* ══════════════════════════════════════════════════════════
 * 3. BADGES
 * ════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  border-radius: var(--radius-full);
  white-space: nowrap;
  user-select: none;
  background: var(--accent-soft);
  color: var(--accent);
}

/* Plan badge — sits next to or below avatar, styled as a premium glass pill */
.badge-plan {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px var(--space-3);
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: var(--tracking-wide);
  text-transform: none;
  transition: all var(--transition-normal);
}

/* Plan badge pro variant */
.badge-plan.badge-pro {
  background: rgba(93, 95, 239, 0.08);
  color: var(--accent-premium);
  border-color: rgba(93, 95, 239, 0.18);
  box-shadow: 0 0 8px rgba(93, 95, 239, 0.15);
}

/* Status badge — dot + text */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--text-muted);
  flex-shrink: 0;
}

.badge-status.active::before {
  background: var(--success);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

.badge-status.active {
  color: var(--success);
}

.badge-status.inactive::before {
  background: var(--danger);
}

.badge-status.inactive {
  color: var(--danger);
}

/* PRO badge — golden premium */
.badge-pro {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3);
}

/* Count badge — small circle with number (notifications) */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-full);
  background: var(--danger);
  color: #FFFFFF;
}


/* ══════════════════════════════════════════════════════════
 * 4. BALANCE DISPLAY
 * ════════════════════════════════════════════════════════ */

/* Header balance pill — dark rounded pill with $ + amount */
.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
  user-select: none;
}

.balance-pill:hover {
  background: var(--bg-card-hover);
}

.balance-pill:active {
  transform: scale(0.97);
}

.balance-pill .balance-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.balance-pill .balance-amount {
  font-variant-numeric: tabular-nums;
}

/* Large balance display — centered on Wallet / Earn pages */
.balance-display {
  text-align: center;
  padding: var(--space-6) 0;
}

.balance-display .balance-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.balance-display .balance-value {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}

.balance-display .balance-currency {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  vertical-align: super;
  margin-right: var(--space-1);
}

.balance-display .balance-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--success);
}

.balance-display .balance-change.negative {
  color: var(--danger);
}


/* ══════════════════════════════════════════════════════════
 * 5. STAT BOXES
 * ════════════════════════════════════════════════════════ */

/* 2×2 grid container */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* Individual stat card */
.stat-box {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: box-shadow var(--transition-normal);
}

.stat-box:hover {
  box-shadow: var(--shadow-sm);
}

.stat-box .stat-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: var(--font-size-sm);
}

.stat-box .stat-label {
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-muted);
}

.stat-box .stat-value {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stat-box .stat-change {
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-medium);
  color: var(--success);
}

.stat-box .stat-change.negative {
  color: var(--danger);
}


/* ══════════════════════════════════════════════════════════
 * 6. LIST ITEMS
 * ════════════════════════════════════════════════════════ */

.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.list-item:hover {
  background: var(--accent-soft);
}

.list-item:active {
  transform: scale(0.98);
}

.list-item .list-item-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: var(--font-size-lg);
}

.list-item .list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item .list-item-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item .list-item-subtitle {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: 1px;
}

.list-item .list-item-trailing {
  flex-shrink: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}

/* Arrow indicator on trailing side */
.list-item-arrow::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(-45deg);
  margin-left: var(--space-2);
  flex-shrink: 0;
}


/* ══════════════════════════════════════════════════════════
 * 7. CHANNEL CARDS
 * ════════════════════════════════════════════════════════ */

.channel-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: background var(--transition-normal);
}

.channel-card:hover {
  background: var(--bg-card-hover);
}

.channel-card .channel-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

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

.channel-card .channel-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-card .channel-id {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 1px;
}

.channel-card .channel-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.channel-card .channel-earnings {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--success);
}

.channel-card .channel-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}


/* ══════════════════════════════════════════════════════════
 * 8. ACTION ROWS
 * ════════════════════════════════════════════════════════ */

.action-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.action-row:hover {
  background: var(--accent-soft);
}

.action-row:active {
  transform: scale(0.98);
}

.action-row .action-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: var(--font-size-xl);
}

.action-row .action-icon.success {
  background: var(--success-soft);
  color: var(--success);
}

.action-row .action-icon.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.action-row .action-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.action-row .action-text {
  flex: 1;
  min-width: 0;
}

.action-row .action-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.action-row .action-subtitle {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: 1px;
}

/* Right arrow chevron */
.action-row .action-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.action-row .action-arrow::after {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}


/* ══════════════════════════════════════════════════════════
 * 9. INPUTS
 * ════════════════════════════════════════════════════════ */

.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--text-primary);
  background: var(--bg-input);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

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

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-card);
}

.input:invalid {
  border-color: var(--danger);
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Input with label wrapper */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.input-group .input-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  padding-left: var(--space-1);
}

.input-group .input-error {
  font-size: var(--font-size-xs);
  color: var(--danger);
  padding-left: var(--space-1);
  margin-top: var(--space-1);
}

.input-group .input-hint {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  padding-left: var(--space-1);
}

/* Textarea */
.textarea {
  resize: vertical;
  min-height: 80px;
}

/* Search input variant */
.input-search {
  padding-left: var(--space-10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A6555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: var(--space-4) center;
  background-size: 16px;
}


/* ══════════════════════════════════════════════════════════
 * 10. TOGGLE SWITCH
 * ════════════════════════════════════════════════════════ */

.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.toggle input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.toggle .toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.toggle .toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    background var(--transition-fast);
}

.toggle input:checked + .toggle-track {
  background: var(--accent);
}

.toggle input:checked + .toggle-track + .toggle-thumb,
.toggle input:checked ~ .toggle-thumb {
  transform: translateX(20px);
}


/* ══════════════════════════════════════════════════════════
 * 11. AVATARS
 * ════════════════════════════════════════════════════════ */

.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--accent-soft);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.avatar img.animated-logo {
  width: 75%;
  height: 75%;
  object-fit: contain;
  margin: auto;
  border-radius: 0; /* WebP emoji doesn't need border-radius clipping */
}

/* Size variants */
.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: var(--font-size-xs);
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: var(--font-size-xl);
}

.avatar-xl {
  width: 72px;
  height: 72px;
  font-size: var(--font-size-2xl);
}

/* Letter initial avatar */
.avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  color: var(--text-on-accent);
  background: linear-gradient(135deg, #1B5E96 0%, #2481CC 100%);
  text-transform: uppercase;
  letter-spacing: 0;
  border-radius: var(--radius-full);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.15);
}

/* Premium styled Pro Initial */
.avatar-initial.avatar-initial-pro {
  background: linear-gradient(135deg, #5D5FEF 0%, #E100FF 100%);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.25),
    0 0 10px rgba(93, 95, 239, 0.4);
}

/* Avatar with online indicator */
.avatar-wrapper {
  position: relative;
  display: inline-flex;
}

.avatar-wrapper .avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--success);
  border: 2px solid var(--bg-primary);
}


/* ══════════════════════════════════════════════════════════
 * 12. MODAL & DRAWER
 * ════════════════════════════════════════════════════════ */

/* Full-screen dark overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-normal),
    visibility var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Centered modal card */
.modal {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  width: 100%;
  max-width: 360px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  opacity: 0;
  transition:
    transform var(--transition-normal),
    opacity var(--transition-normal);
  z-index: var(--z-modal);
}

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

.modal .modal-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.modal .modal-body {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-5);
}

.modal .modal-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.modal .modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: var(--font-size-lg);
}

/* Bottom drawer — slides up from bottom */
.drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: var(--max-app-width);
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-5);
  padding-bottom: calc(var(--space-5) + var(--safe-area-bottom, 0px));
  box-shadow: var(--shadow-xl);
  z-index: var(--z-drawer);
  transform: translateY(100%);
  transition: transform 0.35s var(--ease-out-expo);
}

.drawer.active {
  transform: translateY(0);
}

/* Drawer handle (pull indicator) */
.drawer .drawer-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-4);
}

.drawer .drawer-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}


/* ══════════════════════════════════════════════════════════
 * 13. DIVIDER
 * ════════════════════════════════════════════════════════ */

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

.divider-strong {
  background: var(--border);
}

/* Divider with label */
.divider-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}


/* ══════════════════════════════════════════════════════════
 * 14. EMPTY STATE
 * ════════════════════════════════════════════════════════ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  text-align: center;
}

.empty-state .empty-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
}

.empty-state .empty-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.empty-state .empty-message {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  max-width: 260px;
  line-height: var(--line-height-relaxed);
}

.empty-state .empty-action {
  margin-top: var(--space-5);
}


/* ══════════════════════════════════════════════════════════
 * 15. TOAST / SNACKBAR
 * ════════════════════════════════════════════════════════ */

.toast {
  position: fixed;
  top: calc(var(--safe-area-top, 0px) + var(--space-4));
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  max-width: calc(var(--max-app-width) - var(--space-8));
  width: auto;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: transform 0.35s var(--ease-out-expo);
}

.toast.active {
  transform: translateX(-50%) translateY(0);
}

.toast.toast-success {
  border-color: var(--success);
}

.toast.toast-error {
  border-color: var(--danger);
}


/* ══════════════════════════════════════════════════════════
 * 16. PROGRESS BAR
 * ════════════════════════════════════════════════════════ */

.progress {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress .progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-out-expo);
}

.progress-sm {
  height: 3px;
}

.progress-lg {
  height: 10px;
}

/* ══════════════════════════════════════════════════════════
 * 17. ANIMATED EMOJIS (TELEGRAM PREMIUM STYLE)
 * ════════════════════════════════════════════════════════ */

.animated-emoji {
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

.animated-emoji--sm {
  width: 20px;
  height: 20px;
}

.animated-emoji--md {
  width: 32px;
  height: 32px;
}

.animated-emoji--lg {
  width: 64px;
  height: 64px;
}

