:root {
  --gold: #d4af37;
  --gold-light: #f5e6a8;
  --gold-dark: #b8942c;
  --black: #0a0a0a;
  --dark: #141414;
  --dark-2: #1e1e1e;
  --white: #ffffff;
  --gray: #f5f5f5;
  --gray-2: #e5e5e5;
  --text: #1a1a1a;
  --text-muted: #666;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
}

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

body { font-family: 'Poppins', sans-serif; color: var(--text); background: var(--gray); }

/* ===== LOGIN ===== */
.admin-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
}
.admin-login-body::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(212,175,55,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(212,175,55,0.06) 0%, transparent 50%);
  animation: bgPulse 8s ease-in-out infinite;
}
@keyframes bgPulse {
  0%,100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(180deg); }
}
.admin-floating-shapes span {
  position: absolute;
  border-radius: 50%;
  animation: float 7s ease-in-out infinite;
  border: 1px solid rgba(212,175,55,0.15);
}
.admin-floating-shapes span:nth-child(1) { top:10%; left:8%; width:100px; height:100px; background:rgba(212,175,55,0.06); animation-delay:0s; }
.admin-floating-shapes span:nth-child(2) { top:15%; right:10%; width:140px; height:140px; background:rgba(212,175,55,0.04); animation-delay:1.5s; }
.admin-floating-shapes span:nth-child(3) { bottom:25%; left:15%; width:70px; height:70px; background:rgba(212,175,55,0.08); animation-delay:3s; }
.admin-floating-shapes span:nth-child(4) { bottom:10%; right:12%; width:110px; height:110px; background:rgba(212,175,55,0.05); animation-delay:4.5s; }
.admin-floating-shapes span:nth-child(5) { top:50%; left:3%; width:60px; height:60px; background:rgba(212,175,55,0.07); animation-delay:2s; }
@keyframes float {
  0%,100% { transform: translateY(0) scale(1) rotate(0deg); }
  33% { transform: translateY(-30px) scale(1.08) rotate(120deg); }
  66% { transform: translateY(15px) scale(0.95) rotate(240deg); }
}
.admin-login-wrapper { position: relative; z-index: 10; width: 100%; max-width: 440px; padding: 20px; }
.admin-login-card {
  background: rgba(20,20,20,0.85);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 20px;
  padding: 44px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(212,175,55,0.08) inset;
  animation: slideUp 0.8s cubic-bezier(0.16,1,0.3,1);
  position: relative;
}
.admin-login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  border-radius: 20px 20px 0 0;
  animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(50px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.admin-login-logo { text-align: center; margin-bottom: 36px; }
.admin-logo-icon {
  width: 90px; height: 90px;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  font-size: 36px; color: #0a0a0a;
  box-shadow: 0 10px 40px rgba(212,175,55,0.35), 0 0 0 6px rgba(212,175,55,0.08);
  animation: logoPulse 2.5s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,100% { transform: scale(1); box-shadow: 0 10px 40px rgba(212,175,55,0.35), 0 0 0 6px rgba(212,175,55,0.08); }
  50% { transform: scale(1.06); box-shadow: 0 12px 50px rgba(212,175,55,0.5), 0 0 0 10px rgba(212,175,55,0.04); }
}
.admin-login-logo h1 {
  font-size: 26px; font-weight: 700;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.admin-login-logo p { font-size: 13px; color: rgba(255,255,255,0.5); letter-spacing: 2px; text-transform: uppercase; margin-top: 4px; }
.admin-login-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  text-align: center;
}
.admin-login-form .admin-form-group { margin-bottom: 22px; }
.admin-login-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; color: rgba(255,255,255,0.8); }
.admin-input-icon { position: relative; }
.admin-input-icon i:first-child {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: rgba(212,175,55,0.6); font-size: 15px;
}
.admin-input-icon input {
  width: 100%; padding: 14px 16px 14px 46px;
  border: 1px solid rgba(212,175,55,0.2); border-radius: 12px;
  font-size: 14px; font-family: inherit;
  background: rgba(255,255,255,0.04); color: #fff;
  transition: all 0.3s ease;
}
.admin-input-icon input::placeholder { color: rgba(255,255,255,0.3); }
.admin-input-icon input:focus { outline: none; border-color: rgba(212,175,55,0.6); box-shadow: 0 0 0 4px rgba(212,175,55,0.1); }
.admin-toggle-pw {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.4); cursor: pointer; font-size: 14px;
}
.admin-btn-gold {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  color: #0a0a0a; font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.3s ease; box-shadow: 0 6px 24px rgba(212,175,55,0.3);
}
.admin-btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(212,175,55,0.45); }
.admin-login-footer { text-align: center; margin-top: 24px; font-size: 12px; color: rgba(255,255,255,0.35); padding-top: 20px; border-top: 1px solid rgba(212,175,55,0.1); }

/* ===== DASHBOARD SHELL ===== */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #141414 0%, #0a0a0a 100%);
  border-right: 1px solid rgba(212,175,55,0.15);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}
.admin-sidebar-header {
  padding: 24px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(212,175,55,0.15);
}
.admin-sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.admin-sidebar-logo i {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #0a0a0a; font-size: 18px; -webkit-text-fill-color: #0a0a0a;
  box-shadow: 0 4px 16px rgba(212,175,55,0.3);
}
.admin-sidebar-close { display: none; background: none; border: none; font-size: 20px; color: rgba(255,255,255,0.7); cursor: pointer; }
.admin-sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.admin-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 4px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.55); text-decoration: none;
  font-weight: 500; font-size: 14px; transition: var(--transition); position: relative;
}
.admin-nav-item:hover, .admin-nav-item.active {
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
  color: #d4af37;
}
.admin-nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 4px; background: linear-gradient(180deg, #d4af37, #f5e6a8); border-radius: 0 4px 4px 0;
}
.admin-nav-item.logout { margin-top: auto; color: #f87171; }
.admin-nav-item.logout:hover { background: rgba(239,68,68,0.12); color: #ef4444; }

.admin-main { flex: 1; width: calc(100% - 260px); margin-left: 260px; display: flex; flex-direction: column; min-height: 100vh; }
.admin-topbar {
  height: 70px; background: var(--white); border-bottom: 1px solid var(--gray-2);
  display: flex; align-items: center; padding: 0 28px; gap: 20px;
  position: sticky; top: 0; z-index: 50;
}
.admin-menu-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; }
.admin-topbar-title { font-size: 18px; font-weight: 700; }
.admin-topbar-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.admin-user-info { display: flex; align-items: center; gap: 12px; }
.admin-user-avatar {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a8 50%, #d4af37 100%);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #0a0a0a; font-weight: 700; text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(212,175,55,0.3);
}
.admin-user-details { display: flex; flex-direction: column; line-height: 1.2; }
.admin-user-name { font-size: 13px; font-weight: 600; }
.admin-user-role { font-size: 11px; color: var(--text-muted); }
.admin-content { flex: 1; padding: 28px; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== DASHBOARD COMPONENTS ===== */
.admin-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-page-header h2 { font-size: 24px; font-weight: 700; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 28px; }
.admin-stat-card {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); display: flex; align-items: flex-start; justify-content: space-between;
  transition: var(--transition); border: 1px solid var(--gray-2); position: relative; overflow: hidden;
}
.admin-stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #d4af37, #f5e6a8, #d4af37); opacity: 0; transition: var(--transition);
}
.admin-stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(212,175,55,0.4); }
.admin-stat-card:hover::before { opacity: 1; }
.admin-stat-icon {
  width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--white);
}
.admin-stat-icon.gold { background: linear-gradient(135deg, #d4af37, #f5e6a8); color: #0a0a0a; }
.admin-stat-icon.dark { background: linear-gradient(135deg, #1a1a1a, #3d3d3d); color: #d4af37; }
.admin-stat-icon.green { background: linear-gradient(135deg, #10b981, #34d399); }
.admin-stat-icon.red { background: linear-gradient(135deg, #ef4444, #f87171); }
.admin-stat-info h3 { font-size: 26px; font-weight: 700; margin-bottom: 2px; }
.admin-stat-info p { font-size: 13px; color: var(--text-muted); }

/* ===== TABLES ===== */
.admin-card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--gray-2); margin-bottom: 24px; }
.admin-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-card-title { font-size: 16px; font-weight: 700; }
.admin-table-responsive { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table thead th { text-align: left; padding: 14px 16px; font-weight: 600; color: var(--text-muted); background: var(--gray); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--gray-2); }
.admin-table tbody tr:hover { background: rgba(212,175,55,0.05); }
.admin-table img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-success { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.1); color: var(--danger); }
.badge-gold { background: rgba(212,175,55,0.1); color: var(--gold-dark); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border: none; border-radius: var(--radius-sm); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--black); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,175,55,0.3); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--dark-2); }
.btn-success { background: var(--success); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-secondary { background: var(--gray); color: var(--text); border: 1px solid var(--gray-2); }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 8px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.form-control { width: 100%; padding: 12px 14px; border: 1px solid var(--gray-2); border-radius: var(--radius-sm); font-family: inherit; font-size: 13px; transition: var(--transition); background: var(--white); }
.form-control:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212,175,55,0.12); }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 200; display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.active { display: flex; opacity: 1; }
.modal { background: var(--white); border-radius: var(--radius); width: 90%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 80px rgba(0,0,0,0.2); transform: scale(0.9) translateY(20px); transition: transform 0.3s ease; }
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--gray-2); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; }
.modal-body { padding: 24px; }
.modal-footer { padding: 20px 24px; border-top: 1px solid var(--gray-2); display: flex; justify-content: flex-end; gap: 10px; }

/* ===== TOAST ===== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--white); border-radius: var(--radius-sm); padding: 14px 20px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; min-width: 280px; animation: toastIn 0.4s ease; border-left: 4px solid var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
.toast i { font-size: 18px; color: var(--success); }
.toast.error i { color: var(--danger); }

/* ===== MISC ===== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 48px; margin-bottom: 12px; color: var(--gray-2); }
.loading { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: white; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-close { display: block; }
  .admin-main { margin-left: 0; width: 100%; }
  .admin-menu-toggle { display: block; }
}
@media (max-width: 768px) {
  .admin-content { padding: 16px; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  .admin-topbar { padding: 0 16px; }
  .admin-user-details { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
