/* ══════════════════════════════════════════════════════════
   S.G Giveaway — Modern Telegram Mini App v2
   Glassmorphism + Smooth Animations + Premium UI
   ══════════════════════════════════════════════════════════ */

:root {
  --bg: var(--tg-theme-bg-color, #0a0a12);
  --text: var(--tg-theme-text-color, #e8e8ed);
  --hint: var(--tg-theme-hint-color, #7a7a85);
  --link: var(--tg-theme-link-color, #5eaaff);
  --btn: var(--tg-theme-button-color, #5288c1);
  --btn-text: var(--tg-theme-button-text-color, #ffffff);
  --secondary-bg: var(--tg-theme-secondary-bg-color, #14141e);
  --header-bg: var(--tg-theme-header-bg-color, var(--btn));
  --section-bg: var(--tg-theme-section-bg-color, #1a1a26);
  --section-header: var(--tg-theme-section-header-text-color, var(--hint));
  --separator: var(--tg-theme-section-separator-color, rgba(255,255,255,0.05));
  --destructive: var(--tg-theme-destructive-text-color, #ff4757);
  --accent: #7c6cf0;
  --accent2: #00d2c6;
  --success: #00c48c;
  --warning: #ffc85e;
  --radius: 18px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --glass: rgba(255,255,255,0.035);
  --glass-border: rgba(255,255,255,0.07);
  --glass-hover: rgba(255,255,255,0.06);
  --shadow: 0 8px 32px rgba(0,0,0,0.25);
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.18);
  --transition: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

/* ─── Loading ─── */
.loading-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100vh; gap: 24px; color: var(--hint);
}
.spinner {
  width: 40px; height: 40px;
  border: 2.5px solid var(--glass-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13px; letter-spacing: 0.5px; opacity: 0.6; }

/* ─── Header ─── */
.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  background: rgba(10,10,18,0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header h1 { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.header-btn {
  background: var(--glass); border: 1px solid var(--glass-border);
  font-size: 16px; color: var(--link); cursor: pointer;
  padding: 6px 10px; border-radius: var(--radius-xs);
  transition: all 0.25s var(--transition);
}
.header-btn:active { transform: scale(0.88); opacity: 0.6; }

/* ─── Role Badge ─── */
.role-badge {
  font-size: 10px; padding: 3px 10px; border-radius: 20px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  display: inline-block;
}
.role-owner { background: linear-gradient(135deg, #ff6b35, #ff9f43); color: #fff; }
.role-super_admin { background: linear-gradient(135deg, #e53935, #ff6b6b); color: #fff; }
.role-admin { background: linear-gradient(135deg, var(--btn), #6c9bd1); color: var(--btn-text); }
.role-user { background: var(--glass); border: 1px solid var(--glass-border); color: var(--hint); }

/* ─── Navigation ─── */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: flex;
  background: rgba(10,10,18,0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--glass-border);
  padding: 2px 6px;
  padding-bottom: calc(2px + env(safe-area-inset-bottom, 0px));
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px 6px; background: none; border: none;
  color: var(--hint); font-size: 10px; font-weight: 500;
  cursor: pointer; transition: all 0.3s var(--transition);
  -webkit-tap-highlight-color: transparent; position: relative;
}
.nav-btn .nav-icon { font-size: 21px; transition: all 0.3s var(--transition); }
.nav-btn.active { color: var(--link); }
.nav-btn.active .nav-icon { transform: scale(1.12) translateY(-1px); }
.nav-btn.active::after {
  content: ''; position: absolute; top: -1px; left: 50%;
  transform: translateX(-50%); width: 22px; height: 2.5px;
  background: var(--link); border-radius: 0 0 3px 3px;
}
.nav-btn:active .nav-icon { transform: scale(0.82); }

/* ─── Content ─── */
.content {
  padding: 14px 14px;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  min-height: calc(100vh - 52px);
}

/* ─── Cards ─── */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  backdrop-filter: blur(12px);
  transition: all 0.3s var(--transition);
}
.card:active { transform: scale(0.985); }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.card-subtitle { font-size: 12px; color: var(--hint); margin-bottom: 4px; line-height: 1.5; }

.card-gradient {
  background: linear-gradient(135deg, rgba(124,108,240,0.12) 0%, rgba(0,210,198,0.08) 100%);
  border: 1px solid rgba(124,108,240,0.18);
}

/* ─── Stats Grid ─── */
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; margin-bottom: 12px;
}
.stats-grid-4 { grid-template-columns: repeat(4, 1fr); }

.stat-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 8px; text-align: center;
  backdrop-filter: blur(12px);
  transition: all 0.3s var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(124,108,240,0.06), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.stat-card:active { transform: scale(0.95); }
.stat-card:active::before { opacity: 1; }
.stat-value {
  font-size: 22px; font-weight: 800;
  background: linear-gradient(135deg, var(--link) 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1.2;
  position: relative;
}
.stat-label {
  font-size: 9px; color: var(--hint); margin-top: 4px;
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
  position: relative;
}

/* ─── Status Badges ─── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-active { background: rgba(0,196,140,0.12); color: var(--success); }
.badge-finished { background: rgba(122,122,133,0.12); color: var(--hint); }
.badge-cancelled { background: rgba(255,71,87,0.12); color: var(--destructive); }
.badge-pending { background: rgba(255,200,94,0.12); color: var(--warning); }
.badge-winner { background: rgba(255,215,0,0.15); color: #ffd700; }

/* ─── List Items ─── */
.list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px; cursor: pointer;
  transition: all 0.25s var(--transition);
}
.list-item:active { transform: scale(0.98); background: var(--glass-hover); }
.list-item-left { flex: 1; min-width: 0; }
.list-item-title {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-item-sub { font-size: 11px; color: var(--hint); margin-top: 3px; }
.list-item-right { margin-left: 12px; flex-shrink: 0; }
.list-item-icon {
  font-size: 30px; margin-right: 12px; flex-shrink: 0;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: all 0.3s var(--transition);
  -webkit-tap-highlight-color: transparent;
  letter-spacing: -0.2px;
  position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0); transition: background 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn:active::after { background: rgba(255,255,255,0.08); }
.btn-primary {
  background: linear-gradient(135deg, var(--btn) 0%, var(--accent) 100%);
  color: var(--btn-text); width: 100%;
  box-shadow: 0 4px 20px rgba(124,108,240,0.25);
}
.btn-secondary {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text); width: 100%;
}
.btn-danger {
  background: linear-gradient(135deg, #e53935, #ff6b6b);
  color: white; box-shadow: 0 4px 15px rgba(229,57,53,0.25);
}
.btn-glow {
  animation: glow-pulse 2s ease-in-out infinite;
  box-shadow: 0 4px 25px rgba(124,108,240,0.4);
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 4px 25px rgba(124,108,240,0.4); }
  50% { box-shadow: 0 4px 35px rgba(124,108,240,0.65), 0 0 60px rgba(124,108,240,0.15); }
}
.btn-small { padding: 8px 14px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-approve { background: linear-gradient(135deg, #00c48c, #4ade80); color: #0d1b0e; }
.btn-reject { background: linear-gradient(135deg, #e53935, #ff6b6b); color: white; }
.btn-icon { width: auto; padding: 10px 16px; }

/* Action buttons row */
.action-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
}
.action-row .btn { flex: 1; min-width: 0; }

/* ─── Tabs ─── */
.tabs {
  display: flex; gap: 6px; margin-bottom: 14px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 2px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 8px 16px; border: 1px solid var(--glass-border);
  border-radius: 24px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  background: var(--glass); color: var(--hint);
  transition: all 0.3s var(--transition);
}
.tab-btn.active {
  background: linear-gradient(135deg, var(--btn), var(--accent));
  color: var(--btn-text); border-color: transparent;
  box-shadow: 0 4px 16px rgba(124,108,240,0.25);
}

/* ─── Section Header ─── */
.section-header {
  font-size: 11px; font-weight: 700; color: var(--section-header);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin: 16px 0 8px; padding: 0 4px;
}

/* ─── Profile ─── */
.profile-card {
  background: linear-gradient(135deg, rgba(124,108,240,0.15) 0%, rgba(0,210,198,0.08) 100%);
  border: 1px solid rgba(124,108,240,0.2);
  border-radius: var(--radius); padding: 22px 18px;
  margin-bottom: 12px; text-align: center;
  position: relative; overflow: hidden;
}
.profile-card::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,108,240,0.15), transparent);
}
.profile-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: white; display: flex; align-items: center;
  justify-content: center; font-size: 26px; font-weight: 700;
  margin: 0 auto 10px;
  box-shadow: 0 6px 24px rgba(124,108,240,0.35);
  position: relative;
}
.profile-name { font-size: 19px; font-weight: 800; margin-bottom: 2px; position: relative; }
.profile-username { font-size: 13px; color: var(--hint); margin-bottom: 6px; position: relative; }
.profile-level {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 20px; padding: 4px 14px; font-size: 13px;
  font-weight: 600; margin-top: 4px; position: relative;
}
.xp-bar-wrap {
  width: 100%; height: 5px; background: rgba(255,255,255,0.06);
  border-radius: 3px; margin-top: 10px; overflow: hidden; position: relative;
}
.xp-bar {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.6s var(--transition);
  box-shadow: 0 0 8px rgba(124,108,240,0.4);
}

/* ─── Balance Card ─── */
.balance-card {
  background: linear-gradient(135deg, #7c6cf0 0%, #0984e3 50%, #00d2c6 100%);
  color: white; border-radius: var(--radius);
  padding: 22px 18px; margin-bottom: 12px;
  box-shadow: 0 8px 32px rgba(124,108,240,0.28);
  position: relative; overflow: hidden;
}
.balance-card::before {
  content: ''; position: absolute; top: -40%; right: -25%;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.balance-card::after {
  content: ''; position: absolute; bottom: -30%; left: -20%;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.balance-label {
  font-size: 11px; opacity: 0.75; text-transform: uppercase;
  letter-spacing: 1px; font-weight: 600; position: relative;
}
.balance-value {
  font-size: 34px; font-weight: 800; margin: 4px 0;
  position: relative; z-index: 1;
}
.balance-currency { font-size: 16px; opacity: 0.55; font-weight: 600; }

/* ─── Transaction List ─── */
.tx-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--separator);
}
.tx-item:last-child { border-bottom: none; }
.tx-desc { font-size: 13px; font-weight: 500; }
.tx-amount { font-weight: 700; font-size: 14px; }
.tx-positive { color: var(--success); }
.tx-negative { color: var(--destructive); }
.tx-date { font-size: 11px; color: var(--hint); margin-top: 2px; }

/* ─── Giveaway Detail ─── */
.detail-header {
  background: linear-gradient(135deg, rgba(0,196,140,0.1) 0%, rgba(124,108,240,0.06) 100%);
  border: 1px solid rgba(0,196,140,0.15);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 12px; text-align: center;
  position: relative; overflow: hidden;
}
.detail-header::before {
  content: '';
  position: absolute; top: -50px; left: -50px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,196,140,0.1), transparent);
}
.detail-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; position: relative; }
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--separator);
  border-radius: var(--radius-sm); overflow: hidden;
  margin-bottom: 12px;
}
.detail-cell {
  background: var(--glass); padding: 12px;
  text-align: center;
}
.detail-cell-label {
  font-size: 9px; color: var(--hint);
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
.detail-cell-value { font-size: 15px; font-weight: 700; margin-top: 3px; }

/* ─── Participation Status ─── */
.check-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--separator);
}
.check-item:last-child { border-bottom: none; }
.check-icon { font-size: 18px; flex-shrink: 0; width: 26px; text-align: center; }
.check-label { font-size: 13px; flex: 1; }
.check-status { font-size: 12px; font-weight: 600; }
.check-ok { color: var(--success); }
.check-no { color: var(--destructive); }

/* ─── Leaderboard ─── */
.lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); margin-bottom: 6px;
  transition: all 0.25s var(--transition);
}
.lb-rank {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.lb-rank-1 { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #1a0f00; box-shadow: 0 3px 12px rgba(255,215,0,0.3); }
.lb-rank-2 { background: linear-gradient(135deg, #c0c0c0, #e0e0e0); color: #1a1a1a; }
.lb-rank-3 { background: linear-gradient(135deg, #cd7f32, #e8a050); color: #1a1000; }
.lb-rank-n { background: var(--glass); border: 1px solid var(--glass-border); color: var(--hint); }
.lb-name { flex: 1; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-count { font-size: 14px; font-weight: 800; color: var(--link); }
.lb-my { border: 1px solid var(--accent) !important; background: rgba(124,108,240,0.08) !important; }

/* ─── Request Card ─── */
.request-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 14px;
  margin-bottom: 8px; border-left: 3px solid var(--warning);
  transition: all 0.25s var(--transition);
}
.request-info { font-size: 13px; margin-bottom: 4px; color: var(--hint); }
.request-info span { font-weight: 700; color: var(--text); }
.admin-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ─── Streak/Achievement ─── */
.streak-card {
  background: linear-gradient(135deg, rgba(255,200,94,0.08) 0%, rgba(255,107,53,0.06) 100%);
  border: 1px solid rgba(255,200,94,0.15);
  border-radius: var(--radius); padding: 18px;
  margin-bottom: 12px; text-align: center;
}
.streak-value { font-size: 36px; font-weight: 900; margin-bottom: 4px; }
.streak-label { font-size: 11px; color: var(--hint); text-transform: uppercase; letter-spacing: 0.5px; }
.milestone-row {
  display: flex; gap: 6px; justify-content: center;
  flex-wrap: wrap; margin-top: 10px;
}
.milestone {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  background: var(--glass); border: 1px solid var(--glass-border); color: var(--hint);
  transition: all 0.3s;
}
.milestone.reached {
  background: linear-gradient(135deg, #ffd700, #ff9f43);
  border-color: transparent; color: #1a0f00;
  box-shadow: 0 2px 10px rgba(255,215,0,0.25);
}

/* ─── Win Card ─── */
.win-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--separator);
}
.win-item:last-child { border-bottom: none; }
.win-icon { font-size: 22px; }
.win-title { font-size: 13px; font-weight: 600; }
.win-date { font-size: 11px; color: var(--hint); }

/* ─── Participant ─── */
.participants-list { max-height: 60vh; overflow-y: auto; }
.participant-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--separator);
  font-size: 13px;
}
.participant-row:last-child { border-bottom: none; }
.p-checks { display: flex; gap: 3px; font-size: 14px; }

/* ─── Search / Input ─── */
.search-box {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.025); color: var(--text);
  font-size: 14px; outline: none; margin-bottom: 12px;
  transition: all 0.3s var(--transition);
}
.search-box:focus {
  border-color: var(--accent);
  background: rgba(124,108,240,0.04);
  box-shadow: 0 0 0 3px rgba(124,108,240,0.08);
}
.search-box::placeholder { color: var(--hint); opacity: 0.7; }
textarea.search-box {
  font-family: inherit; line-height: 1.5;
  min-height: 60px; resize: vertical;
}

/* ─── Select ─── */
.select-box {
  padding: 10px 14px; border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs); background: var(--section-bg);
  color: var(--text); font-size: 13px; font-weight: 500;
  outline: none; -webkit-appearance: none; appearance: none;
  transition: all 0.2s;
}
.select-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,108,240,0.08);
}

/* ─── Checkbox Toggle ─── */
input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent);
  border-radius: 4px; cursor: pointer;
}

/* ─── Empty State ─── */
.empty-state { text-align: center; padding: 44px 24px; color: var(--hint); }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state-text { font-size: 14px; line-height: 1.5; }

/* ─── Promo Code ─── */
.promo-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}
.promo-code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 14px; font-weight: 700; color: var(--accent);
  flex: 1;
}
.promo-info { font-size: 11px; color: var(--hint); }

/* ─── Dashboard Quick Actions ─── */
.quick-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 12px;
}
.quick-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 14px 6px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.3s var(--transition); text-align: center;
  position: relative; overflow: hidden;
}
.quick-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(124,108,240,0.08), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.quick-card:active { transform: scale(0.92); }
.quick-card:active::before { opacity: 1; }
.quick-card-icon { font-size: 24px; position: relative; }
.quick-card-label { font-size: 10px; font-weight: 600; color: var(--hint); position: relative; }

/* ─── Alert Banner ─── */
.alert-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  margin-bottom: 10px; cursor: pointer;
  transition: all 0.25s var(--transition);
}
.alert-banner:active { transform: scale(0.98); }
.alert-warning {
  background: rgba(255,200,94,0.08); border: 1px solid rgba(255,200,94,0.15);
}
.alert-danger {
  background: rgba(255,71,87,0.08); border: 1px solid rgba(255,71,87,0.15);
}
.alert-info {
  background: rgba(94,170,255,0.08); border: 1px solid rgba(94,170,255,0.15);
}
.alert-icon { font-size: 20px; flex-shrink: 0; }
.alert-text { font-size: 13px; font-weight: 600; }
.alert-sub { font-size: 11px; color: var(--hint); }

/* ─── Form field label ─── */
.field-label {
  font-size: 12px; color: var(--hint); margin-bottom: 5px;
  font-weight: 500;
}

/* ─── Form Group (modern fields) ─── */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 6px;
}
.form-label .required {
  color: var(--destructive); font-size: 11px;
}
.form-hint {
  font-size: 11px; color: var(--hint); margin-top: 5px;
  line-height: 1.4; padding-left: 2px;
}
.form-hint a { color: var(--link); text-decoration: none; }

/* Toggle switch */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
  cursor: pointer; transition: all 0.25s var(--transition);
}
.toggle-row:active { transform: scale(0.98); }
.toggle-row-left { display: flex; align-items: center; gap: 10px; }
.toggle-row-icon { font-size: 18px; }
.toggle-row-text { font-size: 13px; font-weight: 600; }
.toggle-row-sub { font-size: 11px; color: var(--hint); margin-top: 2px; }
.toggle-switch {
  width: 44px; height: 24px; border-radius: 12px;
  background: rgba(255,255,255,0.1); position: relative;
  transition: background 0.3s; flex-shrink: 0;
}
.toggle-switch::after {
  content: ''; position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  background: white; top: 2px; left: 2px;
  transition: transform 0.3s var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch.on::after { transform: translateX(20px); }

/* Step indicator */
.form-steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 20px; padding: 0 10px;
}
.form-step {
  flex: 1; text-align: center; position: relative;
}
.form-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--glass); border: 2px solid var(--glass-border);
  color: var(--hint); margin: 0 auto 4px;
  transition: all 0.3s;
}
.form-step.active .form-step-dot {
  background: var(--accent); border-color: var(--accent);
  color: white; box-shadow: 0 2px 12px rgba(124,108,240,0.35);
}
.form-step.done .form-step-dot {
  background: var(--success); border-color: var(--success); color: white;
}
.form-step-label { font-size: 9px; color: var(--hint); font-weight: 600; text-transform: uppercase; }
.form-step.active .form-step-label { color: var(--accent); }
.form-step-line {
  position: absolute; top: 14px; left: calc(50% + 18px); right: calc(-50% + 18px);
  height: 2px; background: var(--glass-border);
}
.form-step:last-child .form-step-line { display: none; }
.form-step.done .form-step-line { background: var(--success); }

/* Chip selector */
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 8px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--hint); transition: all 0.25s var(--transition);
}
.chip.active {
  background: rgba(124,108,240,0.15); border-color: var(--accent);
  color: var(--accent);
}
.chip:active { transform: scale(0.95); }

/* ─── Responsive ─── */
@media (min-width: 480px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ─── Animations ─── */
.fade-in { animation: fadeIn 0.3s var(--transition); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up { animation: slideUp 0.35s var(--transition); }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Staggered children animation */
.stagger > * {
  animation: fadeIn 0.35s var(--transition) both;
}
.stagger > *:nth-child(1) { animation-delay: 0s; }
.stagger > *:nth-child(2) { animation-delay: 0.04s; }
.stagger > *:nth-child(3) { animation-delay: 0.08s; }
.stagger > *:nth-child(4) { animation-delay: 0.12s; }
.stagger > *:nth-child(5) { animation-delay: 0.16s; }
.stagger > *:nth-child(6) { animation-delay: 0.2s; }
.stagger > *:nth-child(7) { animation-delay: 0.24s; }
.stagger > *:nth-child(8) { animation-delay: 0.28s; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
::-webkit-scrollbar-track { background: transparent; }

/* ─── Footer ─── */
.footer {
  text-align: center; padding: 16px 0 6px;
  font-size: 11px; color: var(--hint); opacity: 0.4;
}

/* ─── Ticket (Chat bubbles) ─── */
.ticket-msg {
  max-width: 82%; padding: 10px 14px;
  border-radius: 16px 16px 16px 4px; margin-bottom: 6px;
  font-size: 13px; background: var(--glass); border: 1px solid var(--glass-border);
  animation: fadeIn 0.25s var(--transition);
}
.ticket-msg-admin {
  margin-left: auto; border-radius: 16px 16px 4px 16px;
  background: rgba(82,136,193,0.12); border-color: rgba(82,136,193,0.18);
}
.ticket-msg-meta { font-size: 10px; color: var(--hint); margin-top: 3px; }

/* ─── Pulse dot for live indicators ─── */
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); display: inline-block;
  animation: pulse 1.5s ease-in-out infinite;
  margin-right: 6px;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ─── Shimmer placeholder ─── */
.shimmer {
  background: linear-gradient(90deg, var(--glass) 25%, rgba(255,255,255,0.06) 50%, var(--glass) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
