/* ===== ADMIN PANEL STYLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --fire: #ff6b00; --fire2: #ff9500; --gold: #ffd700;
  --diamond: #00d4ff; --diamond2: #0099cc;
  --dark: #050810; --dark2: #0a0f1e; --dark3: #111827;
  --sidebar: #080d1a; --card: rgba(255,255,255,0.04);
  --card-border: rgba(255,107,0,0.2);
  --text: #f0f0f0; --text2: #a0aec0;
  --success: #00e676; --danger: #ff1744; --warning: #ffab00;
}

body { font-family: 'Exo 2', sans-serif; background: var(--dark); color: var(--text); min-height: 100vh; }

/* ===== LOGIN ===== */
.admin-login {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(255,107,0,0.08) 0%, var(--dark) 70%);
  padding: 2rem;
}
.login-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,107,0,0.3);
  border-radius: 24px; padding: 3rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(255,107,0,0.15);
  backdrop-filter: blur(20px);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-icon { font-size: 4rem; margin-bottom: 1rem; }
.login-logo h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem; font-weight: 900;
  background: linear-gradient(90deg, var(--fire), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 0.3rem;
}
.login-logo p { color: var(--text2); font-size: 0.85rem; }
.login-hint { font-size: 0.75rem; color: var(--text2); text-align: center; margin-bottom: 1rem; background: rgba(255,255,255,0.03); padding: 0.5rem; border-radius: 8px; }
.back-link { display: block; text-align: center; margin-top: 1rem; color: var(--text2); text-decoration: none; font-size: 0.85rem; transition: color 0.3s; }
.back-link:hover { color: var(--fire); }

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

/* ===== SIDEBAR ===== */
.admin-sidebar {
  width: 240px; min-height: 100vh;
  background: var(--sidebar);
  border-right: 1px solid rgba(255,107,0,0.15);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100; transition: transform 0.3s;
  overflow-y: auto;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 1.5rem; border-bottom: 1px solid rgba(255,107,0,0.15);
}
.sidebar-icon { font-size: 2rem; }
.sidebar-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem; font-weight: 900;
  color: var(--fire);
}
.sidebar-sub { font-size: 0.7rem; color: var(--text2); }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.5rem; cursor: pointer;
  color: var(--text2); font-size: 0.9rem; font-weight: 600;
  transition: all 0.3s; border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-item:hover { color: var(--text); background: rgba(255,107,0,0.08); border-left-color: rgba(255,107,0,0.3); }
.nav-item.active { color: var(--fire); background: rgba(255,107,0,0.1); border-left-color: var(--fire); }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(255,107,0,0.15); }

/* ===== MAIN CONTENT ===== */
.admin-main { flex: 1; margin-left: 240px; display: flex; flex-direction: column; min-height: 100vh; }

/* ===== TOPBAR ===== */
.admin-topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(8,13,26,0.95);
  border-bottom: 1px solid rgba(255,107,0,0.15);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
}
.sidebar-toggle {
  background: none; border: none; color: var(--fire);
  font-size: 1.3rem; cursor: pointer; display: none;
}
.topbar-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem; font-weight: 700; flex: 1;
}
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.admin-badge {
  background: rgba(0,230,118,0.1);
  border: 1px solid rgba(0,230,118,0.3);
  color: var(--success); padding: 0.3rem 0.8rem;
  border-radius: 20px; font-size: 0.75rem; font-weight: 700;
}
.admin-time { font-family: 'Orbitron', sans-serif; font-size: 0.8rem; color: var(--text2); }

/* ===== SECTIONS ===== */
.admin-section { padding: 1.5rem; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px; padding: 1.2rem;
  display: flex; align-items: center; gap: 1rem;
  transition: all 0.3s; backdrop-filter: blur(10px);
}
.stat-card:hover { border-color: var(--fire); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255,107,0,0.15); }
.stat-icon { font-size: 2rem; }
.stat-info { flex: 1; }
.stat-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem; font-weight: 900; color: var(--gold);
}
.stat-lbl { font-size: 0.75rem; color: var(--text2); }
.stat-trend { font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 8px; }
.stat-trend.up { background: rgba(0,230,118,0.1); color: var(--success); }
.stat-trend.down { background: rgba(255,171,0,0.1); color: var(--warning); }

/* ===== ADMIN CARD ===== */
.admin-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px; padding: 1.5rem;
  backdrop-filter: blur(10px);
  margin-bottom: 1.5rem;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.2rem; flex-wrap: wrap; gap: 0.5rem;
}
.card-header h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem; color: var(--gold);
}

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th {
  background: rgba(255,107,0,0.08);
  color: var(--fire); padding: 0.8rem 1rem;
  text-align: left; font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem; letter-spacing: 1px;
  border-bottom: 1px solid rgba(255,107,0,0.2);
  white-space: nowrap;
}
.admin-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text2); vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(255,107,0,0.04); color: var(--text); }
.status-badge {
  display: inline-block; padding: 0.2rem 0.7rem;
  border-radius: 20px; font-size: 0.7rem; font-weight: 700;
}
.status-pending { background: rgba(255,171,0,0.15); color: var(--warning); border: 1px solid rgba(255,171,0,0.3); }
.status-completed { background: rgba(0,230,118,0.15); color: var(--success); border: 1px solid rgba(0,230,118,0.3); }
.status-cancelled { background: rgba(255,23,68,0.15); color: var(--danger); border: 1px solid rgba(255,23,68,0.3); }

/* ===== BUTTONS ===== */
.admin-btn {
  background: linear-gradient(135deg, var(--fire), var(--fire2));
  color: white; border: none; cursor: pointer;
  padding: 0.7rem 1.5rem; border-radius: 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  transition: all 0.3s; letter-spacing: 0.5px;
}
.admin-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,0,0.4); }
.admin-btn.secondary {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text2);
}
.admin-btn.secondary:hover { background: rgba(255,255,255,0.12); color: var(--text); box-shadow: none; }
.admin-btn.danger { background: linear-gradient(135deg, var(--danger), #cc0000); }
.admin-btn.danger:hover { box-shadow: 0 6px 20px rgba(255,23,68,0.4); }
.admin-btn.small { padding: 0.4rem 0.9rem; font-size: 0.7rem; }
.admin-btn.success { background: linear-gradient(135deg, var(--success), #00b050); color: #000; }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8rem; color: var(--text2); margin-bottom: 0.4rem; font-weight: 600; }
.admin-input {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,107,0,0.25);
  border-radius: 10px; padding: 0.7rem 1rem;
  color: var(--text); font-family: 'Exo 2', sans-serif;
  font-size: 0.9rem; outline: none; transition: border-color 0.3s;
}
.admin-input:focus { border-color: var(--fire); box-shadow: 0 0 12px rgba(255,107,0,0.2); }
.admin-input::placeholder { color: var(--text2); }
.admin-input.small { width: auto; padding: 0.4rem 0.8rem; font-size: 0.8rem; }
textarea.admin-input { resize: vertical; min-height: 100px; }
.admin-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,107,0,0.25);
  border-radius: 10px; padding: 0.5rem 0.8rem;
  color: var(--text); font-family: 'Exo 2', sans-serif;
  font-size: 0.85rem; outline: none; cursor: pointer;
}
.admin-select option { background: var(--dark2); }

/* ===== QUICK ACTIONS ===== */
.quick-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.qa-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,107,0,0.2);
  color: var(--text); cursor: pointer;
  padding: 0.7rem 1.2rem; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600;
  transition: all 0.3s;
}
.qa-btn:hover { background: rgba(255,107,0,0.1); border-color: var(--fire); color: var(--fire); }
.qa-btn.danger { border-color: rgba(255,23,68,0.3); }
.qa-btn.danger:hover { background: rgba(255,23,68,0.1); border-color: var(--danger); color: var(--danger); }

/* ===== ACTION BUTTONS IN TABLE ===== */
.tbl-btn {
  background: none; border: 1px solid;
  border-radius: 6px; padding: 0.25rem 0.6rem;
  font-size: 0.7rem; cursor: pointer;
  transition: all 0.3s; margin: 0 2px;
}
.tbl-btn.complete { border-color: rgba(0,230,118,0.4); color: var(--success); }
.tbl-btn.complete:hover { background: rgba(0,230,118,0.1); }
.tbl-btn.cancel { border-color: rgba(255,23,68,0.4); color: var(--danger); }
.tbl-btn.cancel:hover { background: rgba(255,23,68,0.1); }
.tbl-btn.delete { border-color: rgba(255,255,255,0.2); color: var(--text2); }
.tbl-btn.delete:hover { background: rgba(255,255,255,0.05); }

/* ===== PACKAGES ADMIN ===== */
.packages-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.pkg-admin-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,107,0,0.2);
  border-radius: 14px; padding: 1.2rem;
  text-align: center; position: relative;
}
.pkg-admin-card .pkg-count { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; font-weight: 900; color: var(--gold); }
.pkg-admin-card .pkg-price { font-size: 1.2rem; color: var(--fire); font-weight: 700; margin: 0.3rem 0; }
.pkg-admin-card .pkg-name { font-size: 0.8rem; color: var(--text2); margin-bottom: 0.8rem; }
.pkg-admin-actions { display: flex; gap: 0.5rem; justify-content: center; }

/* ===== ANNOUNCEMENTS ===== */
.ann-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,107,0,0.15);
  border-radius: 12px; padding: 1rem;
  margin-bottom: 0.8rem;
}
.ann-item.fire { border-color: rgba(255,107,0,0.4); }
.ann-item.success { border-color: rgba(0,230,118,0.3); }
.ann-item.warning { border-color: rgba(255,171,0,0.3); }
.ann-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.ann-title { font-weight: 700; font-size: 0.9rem; }
.ann-time { font-size: 0.75rem; color: var(--text2); }
.ann-msg { color: var(--text2); font-size: 0.85rem; line-height: 1.5; }

/* ===== SETTINGS ===== */
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

/* ===== MODAL ===== */
.admin-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
}
.admin-modal-box {
  background: var(--dark2);
  border: 1px solid rgba(255,107,0,0.4);
  border-radius: 20px; padding: 2rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(255,107,0,0.2);
  animation: modal-in 0.3s ease;
}
.admin-modal-box h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem; color: var(--gold);
  margin-bottom: 1.5rem;
}
@keyframes modal-in { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ===== TOAST ===== */
.admin-toast {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--dark2);
  border: 1px solid rgba(255,107,0,0.4);
  border-radius: 12px; padding: 1rem 1.5rem;
  font-weight: 600; z-index: 99999;
  transform: translateY(100px); opacity: 0;
  transition: all 0.4s; max-width: 300px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.admin-toast.show { transform: translateY(0); opacity: 1; }
.admin-toast.success { border-color: rgba(0,230,118,0.4); color: var(--success); }
.admin-toast.error { border-color: rgba(255,23,68,0.4); color: var(--danger); }
.admin-toast.info { border-color: rgba(0,212,255,0.4); color: var(--diamond); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-time { display: none; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .admin-section { padding: 1rem; }
  .login-box { padding: 2rem 1.5rem; }
}