/* ===================================================
   ELITE 4 HOST — Admin Dashboard Stylesheet
   Dark & Gold Luxury Theme
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --admin-gold:       #C9A96E;
  --admin-gold-light: #FFD700;
  --admin-gold-hover: #e6c587;
  --admin-bg:         #050814;
  --admin-sidebar-bg: #090e24;
  --admin-card-bg:    #0e1533;
  --admin-card-border:rgba(201, 169, 110, 0.15);
  --admin-input-bg:   #080c20;
  --admin-text-main:  #F8FAFC;
  --admin-text-muted: #94A3B8;
  --admin-success:    #10B981;
  --admin-danger:     #EF4444;
  --admin-warning:    #F59E0B;
  --admin-info:       #3B82F6;
  --font-ar:          'Tajawal', sans-serif;
  --font-en:          'Poppins', sans-serif;
  --shadow-card:      0 10px 30px rgba(0,0,0,0.4);
}

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

body {
  font-family: var(--font-ar);
  background-color: var(--admin-bg);
  color: var(--admin-text-main);
  direction: rtl;
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: var(--admin-gold);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--admin-gold-light);
}

/* ─── Admin Layout ─── */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

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

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--admin-card-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header img {
  height: 44px;
  border-radius: 8px;
}

.sidebar-header .brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--admin-gold);
  line-height: 1.2;
}
.sidebar-header .brand-sub {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  font-family: var(--font-en);
}

.sidebar-nav {
  padding: 20px 12px;
  overflow-y: auto;
  flex: 1;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--admin-text-muted);
  padding: 12px 14px 4px;
  font-weight: 700;
  letter-spacing: 1px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--admin-text-muted);
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.sidebar-nav a .nav-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(201, 169, 110, 0.12);
  color: var(--admin-gold);
  border-right: 3px solid var(--admin-gold);
}

.badge-count {
  margin-right: auto;
  background: var(--admin-danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
}

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

/* Main Content Area */
.admin-main {
  flex: 1;
  margin-right: 280px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.admin-topbar {
  background-color: rgba(9, 14, 36, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--admin-card-border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-title h1 {
  font-size: 1.3rem;
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid var(--admin-card-border);
  border-radius: 50px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--admin-gold);
  color: var(--admin-bg);
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
}

/* Page Body */
.admin-content {
  padding: 32px;
  flex: 1;
}

/* Flash Messages */
.alert {
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34D399;
}
.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #F87171;
}

/* ─── Cards & Grid ─── */
.admin-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-card);
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 169, 110, 0.4);
}

.stat-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(201, 169, 110, 0.12);
  border: 1px solid rgba(201, 169, 110, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.stat-details h3 {
  font-size: 1.8rem;
  font-weight: 900;
  font-family: var(--font-en);
  color: var(--admin-gold);
  line-height: 1.1;
}
.stat-details span {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
}

/* Admin Card Component */
.admin-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: 20px;
  margin-bottom: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.admin-card-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--admin-card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.admin-card-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-card-body {
  padding: 28px;
}

/* ─── Tables ─── */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}

.admin-table th {
  background: rgba(255, 255, 255, 0.02);
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--admin-gold);
  border-bottom: 1px solid var(--admin-card-border);
  font-weight: 700;
}

.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(201, 169, 110, 0.03);
}

.table-img {
  width: 50px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--admin-card-border);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
}
.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ─── Buttons ─── */
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-ar);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-admin-primary {
  background: linear-gradient(135deg, #C9A96E 0%, #FFD700 100%);
  color: #030712;
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.3);
}
.btn-admin-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 169, 110, 0.5);
  color: #030712;
}

.btn-admin-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
}
.btn-admin-secondary:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.btn-admin-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #F87171;
}
.btn-admin-danger:hover {
  background: #EF4444;
  color: #fff;
}

.btn-admin-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* ─── Forms ─── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--admin-text-main);
}

.form-group .help-text {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
}

.form-control {
  background: var(--admin-input-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-ar);
  font-size: 0.92rem;
  transition: border-color 0.2s ease;
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--admin-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Repeater Items */
.repeater-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--admin-card-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}

/* Responsive Sidebar */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--admin-gold);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(100%);
  }
  .admin-sidebar.show {
    transform: translateX(0);
  }
  .admin-main {
    margin-right: 0;
  }
  .menu-toggle {
    display: block;
  }
}
