/* TechnoHeberg Dashboard - Modern Hosting Theme */

:root {
  --bg-primary: #09090b;
  --bg-secondary: #18181b;
  --bg-tertiary: #27272a;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border-color: #27272a;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --discord: #5865F2;
  --nodejs: #68a063;
  --python: #3776ab;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Manrope', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

code, pre {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

pre {
  padding: 12px;
  overflow-x: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

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

.btn-danger:hover {
  background: #dc2626;
}

.btn-discord {
  background: var(--discord);
  color: white;
  font-size: 1rem;
  padding: 14px 28px;
}

.btn-discord:hover {
  background: #4752C4;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* Login Page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1200px;
  width: 100%;
  min-height: 600px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.login-left {
  background: var(--gradient-primary);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1680992046626-418f7e910589?w=800') center/cover;
  opacity: 0.15;
}

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

.logo-large {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 24px;
}

.logo-large i {
  font-size: 2rem;
}

.login-left h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.login-left p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
}

.feature i {
  width: 24px;
}

.login-right {
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form-container {
  max-width: 400px;
  width: 100%;
}

.login-form-container h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.login-info {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  text-align: center;
}

.login-info i {
  color: var(--warning);
  margin-right: 4px;
}

.login-footer {
  margin-top: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

.logo i {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 12px;
  margin-bottom: 8px;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--gradient-primary);
  color: white;
}

.nav-item i {
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 500;
  font-size: 0.875rem;
}

.user-credits {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-credits i {
  color: var(--warning);
}

.btn-logout {
  padding: 8px;
  color: var(--text-muted);
}

.btn-logout:hover {
  color: var(--danger);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 24px;
  min-height: 100vh;
}

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

.page-header h1 {
  font-size: 1.75rem;
}

.header-back {
  display: flex;
  align-items: center;
  gap: 16px;
}

.credit-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 500;
}

.credit-badge i {
  color: var(--warning);
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h3 i {
  color: var(--primary);
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

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

.section-header h3 {
  margin-bottom: 0;
}

/* Stats Cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card.large {
  padding: 24px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-icon.credits {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.stat-icon.servers {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
}

.stat-icon.cost {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.stat-icon.days {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.stat-icon.users {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.stat-icon.active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.stat-icon.earned {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.stat-icon.spent {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.stat-icon.referrals {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.dashboard-grid > .stats-row {
  grid-column: 1 / -1;
}

/* Quick Actions */
.quick-actions .actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all 0.2s;
}

.action-btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.action-btn i {
  font-size: 1.5rem;
}

/* Redeem Section */
.redeem-form {
  display: flex;
  gap: 12px;
}

.redeem-form input {
  flex: 1;
}

/* Servers Section */
.servers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.server-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.server-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.server-icon.nodejs {
  background: rgba(104, 160, 99, 0.2);
  color: var(--nodejs);
}

.server-icon.python {
  background: rgba(55, 118, 171, 0.2);
  color: var(--python);
}

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

.server-name {
  font-weight: 500;
}

.server-plan {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.server-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.server-status.active .status-dot {
  background: var(--success);
}

.server-status.suspended .status-dot {
  background: var(--danger);
}

/* Transactions */
.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.tx-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.tx-icon.positive {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.tx-icon.negative {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

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

.tx-desc {
  font-size: 0.875rem;
}

.tx-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tx-amount {
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.tx-amount.positive {
  color: var(--success);
}

.tx-amount.negative {
  color: var(--danger);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state.small {
  padding: 20px;
}

.empty-state.small i {
  font-size: 2rem;
}

.empty-state-full {
  text-align: center;
  padding: 80px 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
}

.empty-state-full h2 {
  margin-bottom: 8px;
}

.empty-state-full p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Servers Grid */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.server-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
}

.server-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.server-card-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-tertiary);
}

.server-type {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.server-type.nodejs {
  background: rgba(104, 160, 99, 0.2);
  color: var(--nodejs);
}

.server-type.python {
  background: rgba(55, 118, 171, 0.2);
  color: var(--python);
}

.server-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.server-status-badge.active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.server-status-badge.suspended {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.server-card-body {
  padding: 20px;
}

.server-title {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.server-plan-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(var(--plan-color), 0.15);
  color: var(--plan-color);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.server-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.server-specs .spec {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.server-specs .spec i {
  color: var(--text-muted);
  width: 16px;
}

.server-card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.server-cost {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.server-cost i {
  color: var(--warning);
}

/* Forms */
.form-section {
  margin-bottom: 24px;
}

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

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

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

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-row .form-group.flex-grow {
  flex: 2;
}

/* Plans Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.plan-card {
  cursor: pointer;
}

.plan-card input {
  display: none;
}

.plan-card-content {
  padding: 24px;
  background: var(--bg-tertiary);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  position: relative;
  transition: all 0.2s;
}

.plan-card input:checked + .plan-card-content {
  border-color: var(--plan-color);
  background: rgba(99, 102, 241, 0.05);
}

.plan-header {
  margin-bottom: 16px;
}

.plan-name {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 4px;
}

.plan-cost {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.plan-specs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-specs .spec {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.plan-specs .spec i {
  color: var(--text-muted);
  width: 16px;
}

.plan-check {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1.5rem;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.plan-card input:checked + .plan-card-content .plan-check {
  opacity: 1;
}

/* Eggs Grid */
.eggs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.egg-card {
  cursor: pointer;
}

.egg-card input {
  display: none;
}

.egg-card-content {
  padding: 32px;
  background: var(--bg-tertiary);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  transition: all 0.2s;
}

.egg-card input:checked + .egg-card-content {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.egg-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.egg-icon.nodejs {
  background: rgba(104, 160, 99, 0.2);
  color: var(--nodejs);
}

.egg-icon.python {
  background: rgba(55, 118, 171, 0.2);
  color: var(--python);
}

.egg-name {
  font-size: 1.125rem;
  font-weight: 600;
}

.egg-check {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1.5rem;
  color: var(--primary);
  opacity: 0;
}

.egg-card input:checked + .egg-card-content .egg-check {
  opacity: 1;
}

/* Server Details */
.server-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.server-info-card .info-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  font-weight: 500;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.spec-item .spec-icon {
  width: 48px;
  height: 48px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.spec-details {
  display: flex;
  flex-direction: column;
}

.spec-details .spec-value {
  font-size: 1.25rem;
  font-weight: 600;
}

.spec-details .spec-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Danger Zone */
.danger-zone {
  border-color: rgba(239, 68, 68, 0.3);
}

.danger-zone h3 {
  color: var(--danger);
}

.danger-zone h3 i {
  color: var(--danger);
}

/* Alerts */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.alert i {
  font-size: 1.25rem;
  margin-top: 2px;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

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

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Credentials Box */
.credentials-box {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
}

.credential {
  margin-bottom: 16px;
}

.credential:last-child {
  margin-bottom: 0;
}

.credential label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.credential-value {
  display: flex;
  align-items: center;
  gap: 8px;
}

.credential-value code {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-primary);
}

.btn-copy {
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-copy:hover {
  color: var(--primary);
}

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

/* Earn Page */
.earn-container {
  max-width: 800px;
}

.info-card {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.info-card .info-icon {
  font-size: 2rem;
  color: var(--primary);
}

.info-card .info-content h3 {
  margin-bottom: 8px;
}

.links-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
}

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

.link-card.completed {
  opacity: 0.6;
}

.link-number {
  width: 32px;
  height: 32px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.link-info {
  flex: 1;
}

.link-name {
  display: block;
  font-weight: 500;
}

.link-reward {
  font-size: 0.875rem;
  color: var(--success);
}

.link-completed {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  font-size: 0.875rem;
}

.progress-card {
  margin-top: 24px;
}

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

.progress-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 0.3s;
}

.progress-complete {
  margin-top: 16px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-display {
  font-size: 3rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  text-align: center;
  margin: 24px 0;
}

.timer-progress {
  margin-bottom: 16px;
}

.verify-status {
  text-align: center;
  color: var(--text-muted);
}

/* Stats Page */
.stats-page .stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.transactions-card {
  margin-top: 24px;
}

.transactions-table {
  overflow-x: auto;
}

.transactions-table table {
  width: 100%;
  border-collapse: collapse;
}

.transactions-table th,
.transactions-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.transactions-table th {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tx-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tx-type-badge.ad {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.tx-type-badge.server {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
}

.tx-type-badge.code {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.tx-type-badge.affiliate {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.tx-type-badge.admin {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.tx-type-badge.api {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

/* Affiliate Page */
.affiliate-link-card {
  text-align: center;
  padding: 40px;
}

.affiliate-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.affiliate-link-box {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 24px auto;
}

.affiliate-link-box input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.affiliate-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.referrals-card {
  margin-top: 24px;
}

.referrals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.referral-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.referral-avatar {
  width: 40px;
  height: 40px;
  background: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

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

.referral-name {
  font-weight: 500;
}

.referral-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.referral-bonus {
  color: var(--success);
  font-weight: 500;
}

/* Settings Page */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.password-display code {
  flex: 1;
  padding: 12px;
}

.password-display code.hidden {
  filter: blur(8px);
  user-select: none;
}

/* Admin Pages */
.admin-dashboard .admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.admin-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.admin-nav-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  color: var(--text-primary);
  transition: all 0.2s;
}

.admin-nav-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.admin-nav-card .nav-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.admin-nav-card h3 {
  margin-bottom: 4px;
}

.admin-nav-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.users-table {
  overflow-x: auto;
}

.users-table table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.users-table th {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.server-count-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  font-size: 0.75rem;
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.status-badge.banned,
.status-badge.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* User Details */
.user-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.user-details-grid .full-width {
  grid-column: 1 / -1;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.user-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.user-profile-info h2 {
  margin-bottom: 4px;
}

.user-profile-info p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.servers-mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.server-mini-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.server-mini-item i {
  font-size: 1.25rem;
}

.server-mini-item .badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--bg-primary);
  border-radius: 12px;
  font-size: 0.75rem;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* API Docs */
.api-docs {
  font-size: 0.875rem;
}

.api-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.api-section:last-child {
  border-bottom: none;
}

.api-section h4 {
  margin-bottom: 12px;
  color: var(--text-primary);
}

.endpoint {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.method {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.method.get {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.method.post {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.path {
  font-family: 'JetBrains Mono', monospace;
}

.endpoint p {
  color: var(--text-secondary);
  margin: 0;
}

.new-key-alert {
  margin-top: 16px;
}

.key-display {
  display: block;
  margin-top: 8px;
  padding: 12px;
  background: var(--bg-primary);
  word-break: break-all;
}

/* Error Page */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.error-container {
  text-align: center;
  max-width: 400px;
}

.error-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: rgba(239, 68, 68, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--danger);
}

.error-container h1 {
  margin-bottom: 8px;
}

.error-container p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Announcement Banner */
.announcement-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  color: var(--text-primary);
}

.announcement-banner i {
  color: var(--primary);
}

.announcement-banner.preview {
  margin-top: 12px;
  margin-bottom: 0;
}

.announcement-preview {
  margin-top: 16px;
}

.preview-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.announcement-card {
  margin-bottom: 24px;
}

.announcement-form {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.announcement-form .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* Admin Stats Page */
.admin-stats-page .today-summary {
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.today-summary h3 {
  margin-bottom: 16px;
  color: white;
}

.today-stats {
  display: flex;
  gap: 32px;
}

.today-stat {
  display: flex;
  flex-direction: column;
}

.today-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
}

.today-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.charts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.charts-row .chart-card.wide {
  grid-column: 1 / -1;
}

.bottom-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Top Referrers */
.top-referrers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.referrer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.referrer-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.referrer-rank.top1 {
  background: #ffd700;
  color: #000;
}

.referrer-rank.top2 {
  background: #c0c0c0;
  color: #000;
}

.referrer-rank.top3 {
  background: #cd7f32;
  color: #000;
}

.referrer-name {
  flex: 1;
  font-weight: 500;
}

.referrer-count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Recent Servers Mini */
.recent-servers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-server-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.server-type-mini {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.server-type-mini.nodejs {
  background: rgba(104, 160, 99, 0.2);
  color: var(--nodejs);
}

.server-type-mini.python {
  background: rgba(55, 118, 171, 0.2);
  color: var(--python);
}

.server-info-mini {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.server-name-mini {
  font-weight: 500;
  font-size: 0.875rem;
}

.server-owner-mini {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.server-date-mini {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Admin Nav Highlight */
.admin-nav-card.highlight {
  border: 2px solid var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.admin-nav-card.highlight .nav-icon {
  background: var(--primary);
}

/* Charts */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.chart-card {
  padding: 24px;
}

.chart-container {
  height: 250px;
  position: relative;
}

/* Summary List */
.summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.summary-label {
  color: var(--text-secondary);
}

.summary-value {
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.detailed-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

/* Plan Select Cards */
.plans-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.plan-select-card {
  cursor: pointer;
}

.plan-select-card.current {
  cursor: not-allowed;
}

.plan-select-card input {
  display: none;
}

.plan-select-content {
  padding: 16px;
  background: var(--bg-tertiary);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.plan-select-card input:checked + .plan-select-content {
  border-color: var(--plan-color);
  background: rgba(99, 102, 241, 0.05);
}

.plan-select-card.current .plan-select-content {
  opacity: 0.6;
  border-color: var(--border-color);
}

.plan-select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.plan-select-name {
  font-weight: 600;
}

.current-badge {
  font-size: 0.625rem;
  padding: 2px 6px;
  background: var(--bg-primary);
  border-radius: 10px;
  color: var(--text-muted);
}

.plan-select-cost {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.plan-select-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-select-specs span {
  font-size: 0.75rem;
  padding: 2px 6px;
  background: var(--bg-primary);
  border-radius: 4px;
  color: var(--text-secondary);
}

/* Turnstile */
.turnstile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Utilities */
.text-sm {
  font-size: 0.875rem;
}

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

.truncate {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hidden {
  display: none !important;
}

.positive {
  color: var(--success);
}

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

.actions-cell {
  display: flex;
  gap: 8px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

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

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

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

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

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

/* ========== GLOBAL ========== */

.mobile-toggle {
  display: none;
}
/* Responsive */
@media (max-width: 1200px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .plans-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* LOGIN */
  .login-container {
    grid-template-columns: 1fr;
  }
  
  .login-left {
    display: none;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    background: var(--primary);
    border: none;
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    z-index: 1100;
    cursor: pointer;
    display: block;
  }

  /* Overlay sombre quand sidebar ouverte */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }

  .sidebar-overlay.active {
    display: block;
  }

  /* MAIN */
  .main-content {
    margin-left: 0;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* GRIDS */
  .stats-row {
    grid-template-columns: 1fr;
  }

  .servers-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .user-details-grid,
  .server-details-grid {
    grid-template-columns: 1fr;
  }

  .admin-nav-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }
  .main-content {
    margin-left: 0;
    padding-top: 60px;
  }
.btn-discord {
  white-space: normal;
  text-align: center;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
}
