/* ============================================
   Admin Panel CSS — Aerobar Composites
   ============================================ */

:root {
  --admin-primary: #1a2744;
  --admin-accent: #FF6B35;
  --admin-sidebar: #0f1a30;
  --admin-light: #f4f6fa;
  --admin-border: #e0e7f0;
  --admin-text: #1e2533;
  --admin-muted: #6b7a9a;
  --admin-success: #22c55e;
  --admin-danger: #ef4444;
  --admin-warning: #f5a623;
  --font: 'Inter', sans-serif;
  --font-h: 'Outfit', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--admin-light); color: var(--admin-text); }

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: var(--admin-sidebar);
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: all .3s;
}
.sidebar-brand {
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand a { text-decoration: none; }
.sidebar-logo-main { font-family: var(--font-h); font-size: 20px; font-weight: 900; color: white; letter-spacing: 2px; display: block; }
.sidebar-logo-sub { font-family: var(--font-h); font-size: 9px; font-weight: 700; color: var(--admin-accent); letter-spacing: 3px; text-transform: uppercase; }
.sidebar-admin-badge { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: rgba(255,255,255,.5); }
.sidebar-admin-badge span { width: 8px; height: 8px; background: var(--admin-success); border-radius: 50%; }

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-section-title { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.3); letter-spacing: 2px; text-transform: uppercase; padding: 12px 24px 6px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px; color: rgba(255,255,255,.65);
  font-size: 14px; font-weight: 500;
  text-decoration: none; transition: all .2s;
  border-left: 3px solid transparent;
}
.sidebar-nav a i { width: 18px; text-align: center; font-size: 15px; }
.sidebar-nav a:hover { color: white; background: rgba(255,255,255,.06); }
.sidebar-nav a.active { color: white; background: rgba(255,107,53,.12); border-left-color: var(--admin-accent); }
.sidebar-nav a.active i { color: var(--admin-accent); }

.sidebar-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer a { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.5); font-size: 13px; text-decoration: none; }
.sidebar-footer a:hover { color: var(--admin-danger); }

/* Main Content */
.admin-main { margin-left: 260px; min-height: 100vh; display: flex; flex-direction: column; }

/* Top Bar */
.admin-topbar {
  background: white; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 10px rgba(26,39,68,.07);
  position: sticky; top: 0; z-index: 100;
}
.admin-page-title { font-family: var(--font-h); font-size: 1.15rem; font-weight: 800; color: var(--admin-primary); }
.admin-topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-badge { background: var(--admin-accent); color: white; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--admin-primary); }
.admin-avatar { width: 36px; height: 36px; background: var(--admin-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 15px; }

/* Content Area */
.admin-content { padding: 28px; flex: 1; }

/* Cards */
.admin-card { background: white; border-radius: 14px; padding: 24px; box-shadow: 0 2px 12px rgba(26,39,68,.07); border: 1px solid var(--admin-border); margin-bottom: 24px; }
.admin-card-title { font-family: var(--font-h); font-size: 1rem; font-weight: 800; color: var(--admin-primary); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.admin-card-title i { color: var(--admin-accent); }

/* Stat Cards */
.stat-card { border-radius: 14px; padding: 24px; color: white; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,.08); }
.stat-card::after { content: ''; position: absolute; right: 10px; bottom: -30px; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,.05); }
.stat-card-icon { font-size: 28px; margin-bottom: 16px; position: relative; z-index: 1; }
.stat-card-value { font-family: var(--font-h); font-size: 2.2rem; font-weight: 900; line-height: 1; position: relative; z-index: 1; }
.stat-card-label { font-size: 13px; opacity: .75; margin-top: 6px; position: relative; z-index: 1; }

/* Table */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { padding: 12px 16px; text-align: left; font-weight: 700; color: var(--admin-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid var(--admin-border); background: var(--admin-light); }
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--admin-border); color: var(--admin-text); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--admin-light); }
.admin-table .badge-read { background: #d1fae5; color: #065f46; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.admin-table .badge-unread { background: #fee2e2; color: #991b1b; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }

/* Buttons */
.btn-admin { padding: 9px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; transition: all .2s; }
.btn-admin-primary { background: var(--admin-primary); color: white; }
.btn-admin-primary:hover { background: #0f1a30; color: white; transform: translateY(-1px); }
.btn-admin-accent { background: var(--admin-accent); color: white; }
.btn-admin-accent:hover { background: #e55a24; color: white; }
.btn-admin-success { background: var(--admin-success); color: white; }
.btn-admin-danger { background: var(--admin-danger); color: white; }
.btn-admin-danger:hover { background: #dc2626; color: white; }
.btn-admin-sm { padding: 6px 12px; font-size: 12px; }

/* Form */
.admin-form-label { font-weight: 600; font-size: 13px; color: var(--admin-primary); margin-bottom: 6px; display: block; }
.admin-form-control { width: 100%; padding: 10px 14px; border: 2px solid var(--admin-border); border-radius: 8px; font-size: 14px; font-family: var(--font); color: var(--admin-text); background: var(--admin-light); transition: all .2s; }
.admin-form-control:focus { border-color: var(--admin-primary); background: white; outline: none; box-shadow: 0 0 0 3px rgba(26,39,68,.08); }
textarea.admin-form-control { resize: vertical; min-height: 120px; }
select.admin-form-control { cursor: pointer; }

/* Alerts */
.admin-alert-success { background: #d1fae5; border: 1px solid #86efac; color: #065f46; padding: 12px 16px; border-radius: 8px; font-size: 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.admin-alert-danger { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; padding: 12px 16px; border-radius: 8px; font-size: 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }

/* Badges */
.badge-active { background: #d1fae5; color: #065f46; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-inactive { background: #f3f4f6; color: #6b7280; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; }

/* Responsive styling and sidebar toggle */
.btn-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--admin-primary);
  cursor: pointer;
  padding: 5px;
  margin-right: 15px;
}
.btn-sidebar-close {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 20px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
}

@media (max-width: 991px) {
  .admin-sidebar { width: 220px; }
  .admin-main { margin-left: 220px; }
}

@media (max-width: 767px) {
  .btn-sidebar-toggle {
    display: block;
  }
  .btn-sidebar-close {
    display: block;
  }
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: 5px 0 15px rgba(0,0,0,0.25);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .admin-topbar {
    padding: 14px 15px;
    justify-content: flex-start;
  }
  .admin-topbar-right {
    margin-left: auto;
  }
  .admin-content {
    padding: 15px;
  }
  .admin-table th, .admin-table td {
    padding: 10px 8px;
    font-size: 13px;
  }
  .stat-card {
    padding: 15px;
  }
  .stat-card-value {
    font-size: 1.8rem;
  }
}
