/* ============================================================
   BLOXIFY SERVICES DASHBOARD — STYLES v2
   ============================================================ */

:root {
  --bg:          #07090f;
  --bg-card:     #0d1018;
  --bg-card-2:   #111520;
  --bg-hover:    #141824;
  --border:      #1a2035;
  --border-lit:  #263050;

  --blue:        #0066ff;
  --blue-mid:    #2878ff;
  --blue-light:  #5b9bff;
  --blue-glow:   rgba(0, 102, 255, 0.28);
  --blue-dim:    rgba(0, 102, 255, 0.10);
  --blue-dim2:   rgba(0, 102, 255, 0.06);

  --green:       #22c55e;
  --green-dim:   rgba(34, 197, 94, 0.10);
  --red:         #f04444;
  --red-dim:     rgba(240, 68, 68, 0.10);
  --purple:      #a855f7;
  --purple-dim:  rgba(168, 85, 247, 0.10);
  --orange:      #f97316;
  --orange-dim:  rgba(249, 115, 22, 0.10);

  --text-1:      #eef2ff;
  --text-2:      #8b99c0;
  --text-3:      #404b6a;

  --sidebar-w:   250px;
  --radius:      14px;
  --radius-sm:   9px;
  --radius-xs:   6px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-card: 0 2px 16px rgba(0,0,0,0.35);
  --shadow-blue: 0 4px 24px rgba(0, 102, 255, 0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0,80,220,0.12) 0%, transparent 60%),
              radial-gradient(ellipse 60% 50% at 80% 80%, rgba(0,120,255,0.08) 0%, transparent 60%),
              var(--bg);
  position: relative; overflow: hidden;
}

.bg-orb { position: fixed; border-radius: 50%; pointer-events: none; }
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,100,255,0.15) 0%, transparent 70%);
  top: -200px; left: -200px;
  filter: blur(60px);
  animation: orb1 18s ease-in-out infinite;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,160,255,0.10) 0%, transparent 70%);
  bottom: -150px; right: -150px;
  filter: blur(60px);
  animation: orb2 22s ease-in-out infinite;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(80,140,255,0.08) 0%, transparent 70%);
  top: 50%; left: 60%;
  filter: blur(40px);
  animation: orb3 14s ease-in-out infinite;
}
@keyframes orb1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(40px,-30px) scale(1.05)} }
@keyframes orb2 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-30px,25px) scale(1.08)} }
@keyframes orb3 { 0%,100%{transform:translate(-50%,-50%) scale(1)} 50%{transform:translate(-50%,-58%) scale(1.1)} }

.login-container {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 430px;
  padding: 32px 20px 40px;
}

/* Logo */
.login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; }
.logo-icon { width: 54px; height: 54px; flex-shrink: 0; }
.logo-icon.small { width: 38px; height: 38px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-brand {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(135deg, #60b0ff 0%, #0066ff 60%, #003ccc 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-sub { font-size: 0.76rem; font-weight: 500; color: var(--text-3); letter-spacing: 0.06em; margin-top: 3px; text-transform: uppercase; }

/* Card */
.login-card {
  width: 100%;
  background: linear-gradient(145deg, rgba(15,18,28,0.95) 0%, rgba(11,14,22,0.98) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset,
              0 24px 64px rgba(0,0,0,0.5),
              0 0 80px rgba(0,80,255,0.06);
  backdrop-filter: blur(20px);
}
.login-card-header { margin-bottom: 30px; }
.login-card-header h1 { font-size: 1.55rem; font-weight: 700; color: var(--text-1); margin-bottom: 6px; letter-spacing: -0.02em; }
.login-card-header p { color: var(--text-2); font-size: 0.9rem; }

/* Alert */
.alert { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; margin-bottom: 24px; font-weight: 500; }
.alert-error { background: rgba(240,68,68,0.08); border: 1px solid rgba(240,68,68,0.2); color: #fca5a5; }

/* Form */
.login-form { display: flex; flex-direction: column; gap: 22px; }
.form-group { display: flex; flex-direction: column; gap: 9px; }
.form-group label { font-size: 0.78rem; font-weight: 600; color: var(--text-2); letter-spacing: 0.06em; text-transform: uppercase; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 15px; color: var(--text-3); pointer-events: none; flex-shrink: 0; }
.input-wrapper input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 14px 14px 46px;
  font-size: 0.92rem; font-family: var(--font); color: var(--text-1);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input-wrapper input:focus {
  border-color: var(--blue-mid);
  background: rgba(0,102,255,0.04);
  box-shadow: 0 0 0 3px var(--blue-glow);
}
.input-wrapper input::placeholder { color: var(--text-3); }
.toggle-key { position: absolute; right: 13px; background: none; border: none; cursor: pointer; color: var(--text-3); padding: 4px; display: flex; align-items: center; transition: color 0.2s; }
.toggle-key:hover { color: var(--text-2); }

.btn-login {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--blue-mid), var(--blue));
  border: none; border-radius: var(--radius-sm);
  color: #fff; font-size: 0.95rem; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(0,102,255,0.4), 0 1px 0 rgba(255,255,255,0.15) inset;
  margin-top: 6px;
}
.btn-login:hover { background: linear-gradient(135deg, #3b8fff, #0055ee); box-shadow: 0 6px 28px rgba(0,102,255,0.55); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }

.login-footer-note { text-align: center; color: var(--text-3); font-size: 0.82rem; margin-top: 22px; }
.login-copyright { color: var(--text-3); font-size: 0.78rem; margin-top: 28px; text-align: center; }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard-page { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(10,13,20,0.97) 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 100; transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}

.sidebar-logo {
  display: flex; align-items: center; gap: 11px;
  padding: 22px 18px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1; padding: 16px 10px;
  display: flex; flex-direction: column; gap: 3px;
  overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar { width: 0; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 0.89rem; font-weight: 500;
  transition: all 0.15s; cursor: pointer;
  position: relative;
}
.nav-item svg { flex-shrink: 0; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-1); }
.nav-item.active {
  background: var(--blue-dim);
  color: var(--blue-light);
  border: 1px solid rgba(91,155,255,0.15);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--blue-mid);
}

.sidebar-footer {
  padding: 14px 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.user-badge { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-mid), #00aaff);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: #fff; flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0,102,255,0.35);
}
.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-email { font-size: 0.77rem; font-weight: 600; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 0.68rem; color: var(--text-3); margin-top: 1px; }
.btn-logout {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  color: var(--text-3); flex-shrink: 0; transition: all 0.15s;
}
.btn-logout:hover { background: var(--red-dim); color: var(--red); }

.main-content { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  height: 62px;
  background: rgba(7,9,15,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px; gap: 16px;
}
.menu-btn { display: none; background: none; border: none; color: var(--text-2); cursor: pointer; padding: 4px; }
.topbar-title { font-size: 0.92rem; font-weight: 600; color: var(--text-1); flex: 1; letter-spacing: -0.01em; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(34,197,94,0.2);
  animation: pulse-green 2.5s ease-in-out infinite;
}
@keyframes pulse-green { 0%,100%{box-shadow:0 0 0 2px rgba(34,197,94,0.2)} 50%{box-shadow:0 0 0 5px rgba(34,197,94,0.08)} }
.status-text { font-size: 0.75rem; font-weight: 600; color: var(--green); letter-spacing: 0.06em; text-transform: uppercase; }

.page-content { padding: 28px 32px; flex: 1; }

/* Section header */
.section-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.section-title { font-size: 1.45rem; font-weight: 700; color: var(--text-1); letter-spacing: -0.02em; }
.section-sub { font-size: 0.875rem; color: var(--text-2); margin-top: 4px; }

/* ============================================================
   ORDERS
   ============================================================ */
.header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.filter-tabs {
  display: flex;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px; gap: 2px;
}
.filter-tab {
  padding: 7px 16px; border: none; background: none; border-radius: 7px;
  color: var(--text-2); font-size: 0.82rem; font-weight: 500; font-family: var(--font);
  cursor: pointer; transition: all 0.15s;
}
.filter-tab:hover { color: var(--text-1); }
.filter-tab.active { background: var(--blue-dim); color: var(--blue-light); border: 1px solid rgba(91,155,255,0.18); }

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

.order-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius); padding: 18px 22px;
  transition: all 0.18s; cursor: default;
}
.order-card:hover { border-color: var(--border-lit); background: var(--bg-card-2); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.order-card.success { border-left-color: var(--green); }
.order-card.failed  { border-left-color: var(--red); }

.order-card-left { display: flex; align-items: center; gap: 15px; min-width: 0; }
.order-status-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.order-status-icon.success { background: var(--green-dim); color: var(--green); }
.order-status-icon.failed  { background: var(--red-dim);   color: var(--red); }

.order-info { min-width: 0; }
.order-headline { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 6px; }
.order-amount { font-size: 1.02rem; font-weight: 700; color: var(--text-1); }
.order-divider { color: var(--text-3); font-size: 0.9rem; }
.order-status-text { font-size: 0.9rem; font-weight: 600; }
.order-status-text.success { color: var(--green); }
.order-status-text.failed  { color: var(--red); }
.order-detail-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 0.82rem; }
.order-invite { color: var(--blue-light); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.order-got { color: var(--text-3); }
.order-user { color: var(--text-2); font-weight: 500; }

.order-card-right { flex-shrink: 0; text-align: right; }
.order-meta { display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.order-months {
  display: inline-block; background: var(--blue-dim2); color: var(--blue-light);
  border: 1px solid rgba(91,155,255,0.15); border-radius: 20px;
  padding: 3px 11px; font-size: 0.73rem; font-weight: 600;
}
.order-time { font-size: 0.77rem; color: var(--text-3); white-space: nowrap; }

/* Empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 24px; text-align: center; }
.empty-icon { width: 80px; height: 80px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-3); margin-bottom: 20px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-1); margin-bottom: 8px; }
.empty-state p  { font-size: 0.875rem; color: var(--text-2); }

/* ============================================================
   STATS
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 32px; }

.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 22px;
  display: flex; align-items: flex-start; gap: 16px;
  transition: all 0.18s; position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent); }
.stat-card:hover { border-color: var(--border-lit); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.stat-card.wide { grid-column: span 2; }

.stat-icon { width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon.blue   { background: var(--blue-dim);   color: var(--blue-light); }
.stat-icon.green  { background: var(--green-dim);  color: var(--green); }
.stat-icon.red    { background: var(--red-dim);    color: var(--red); }
.stat-icon.purple { background: var(--purple-dim); color: var(--purple); }
.stat-icon.orange { background: var(--orange-dim); color: var(--orange); }

.stat-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.stat-value { font-size: 1.9rem; font-weight: 800; color: var(--text-1); line-height: 1; letter-spacing: -0.03em; }
.stat-value.top-invite { font-size: 0.87rem; font-weight: 600; word-break: break-all; color: var(--blue-light); }
.stat-label { font-size: 0.76rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }

/* Bar chart */
.chart-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 28px 24px; }
.chart-title { font-size: 1rem; font-weight: 700; color: var(--text-1); margin-bottom: 28px; letter-spacing: -0.01em; }
.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 160px; overflow-x: auto; padding-bottom: 4px; }
.bar-chart::-webkit-scrollbar { height: 4px; }
.bar-chart::-webkit-scrollbar-thumb { background: var(--border-lit); border-radius: 4px; }
.bar-group { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 1; min-width: 52px; }
.bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; min-height: 120px; }
.bar-fill {
  width: 100%; max-width: 44px; min-height: 4px;
  background: linear-gradient(180deg, var(--blue-light), var(--blue));
  border-radius: 7px 7px 3px 3px;
  position: relative; display: flex; align-items: flex-start; justify-content: center;
  box-shadow: 0 0 16px rgba(0,102,255,0.25);
}
.bar-fill:hover { filter: brightness(1.2); }
.bar-value { position: absolute; top: -22px; font-size: 0.7rem; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.bar-label { font-size: 0.69rem; font-weight: 500; color: var(--text-3); white-space: nowrap; }

/* ============================================================
   SUPPORT
   ============================================================ */
.support-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.support-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.support-card h3 { font-size: 1rem; font-weight: 700; color: var(--text-1); margin-bottom: 16px; letter-spacing: -0.01em; }

.discord-card { background: linear-gradient(135deg, rgba(40,50,120,0.25) 0%, var(--bg-card) 60%); border-color: rgba(88,101,242,0.2); }
.support-card-icon { color: #5865f2; margin-bottom: 18px; }
.support-card-body p { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; margin-bottom: 22px; }
.btn-discord {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; background: #5865f2; border-radius: var(--radius-sm);
  color: #fff; font-size: 0.875rem; font-weight: 600; transition: all 0.2s;
}
.btn-discord:hover { background: #4752c4; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(88,101,242,0.4); }

.faq-list { display: flex; flex-direction: column; gap: 6px; }
.faq-item { border-radius: var(--radius-sm); overflow: hidden; }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-1);
  font-size: 0.875rem; font-weight: 500; font-family: var(--font);
  cursor: pointer; text-align: left; transition: all 0.15s; gap: 10px;
}
.faq-question:hover { background: var(--bg-hover); }
.faq-question svg { flex-shrink: 0; transition: transform 0.2s; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  display: none; padding: 14px 16px;
  font-size: 0.85rem; color: var(--text-2); line-height: 1.7;
  background: var(--bg-hover); border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.faq-item.open .faq-answer { display: block; }
.faq-answer code {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 7px; font-size: 0.82rem; color: var(--blue-light);
  font-family: 'Courier New', monospace;
}

.info-list { display: flex; flex-direction: column; }
.info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-label { font-size: 0.8rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }
.info-value { font-size: 0.88rem; font-weight: 600; color: var(--text-1); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 90; backdrop-filter: blur(4px); }

@media (max-width: 840px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .menu-btn { display: flex; }
  .topbar { padding: 0 18px; }
  .page-content { padding: 18px; }
  .stat-card.wide { grid-column: span 1; }
  .support-grid { grid-template-columns: 1fr; }
  .order-card { flex-direction: column; align-items: flex-start; }
  .order-card-right { width: 100%; }
  .order-meta { align-items: flex-start; flex-direction: row; }
}
