/* Nexus Defenders Admin Panel Styles */

:root {
  --admin-bg: #040914;
  --admin-surface: #0b1121;
  --admin-surface-light: rgba(255, 255, 255, 0.05);
  --admin-border: rgba(255, 255, 255, 0.08);
  --admin-primary: #3b82f6;
  --admin-primary-hover: #2563eb;
  --admin-text: #f8fafc;
  --admin-text-muted: #94a3b8;
  --admin-success: #22c55e;
  --admin-danger: #ef4444;
  --admin-warning: #f59e0b;
  --admin-gold: #fbbf24;
  --sidebar-width: 280px;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* ── LAYOUT ── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--admin-surface);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
}

.admin-main {
  flex-grow: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  height: 70px;
  background: rgba(11, 17, 33, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.admin-content {
  padding: 30px;
  flex-grow: 1;
}

/* ── SIDEBAR ── */
.sidebar-header {
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--admin-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
}

.sidebar-logo img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(96, 165, 250, 0.6);
  object-fit: cover;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
  flex-shrink: 0;
}

.sidebar-menu {
  padding: 20px 0;
  overflow-y: auto;
  flex-grow: 1;
}

.sidebar-menu-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--admin-text-muted);
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0 25px;
  margin: 15px 0 10px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 12px 25px;
  color: var(--admin-text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-link i {
  width: 24px;
  font-size: 1.1rem;
  margin-right: 10px;
}

.sidebar-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-link.active {
  color: var(--admin-primary);
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--admin-primary);
}

/* ── TOPBAR ── */
.topbar-search {
  position: relative;
  width: 300px;
}

.topbar-search i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--admin-text-muted);
}

.topbar-search input {
  width: 100%;
  background: var(--admin-surface-light);
  border: 1px solid var(--admin-border);
  color: white;
  padding: 10px 15px 10px 40px;
  border-radius: 20px;
  outline: none;
  transition: 0.3s;
}

.topbar-search input:focus {
  border-color: var(--admin-primary);
  background: rgba(0,0,0,0.2);
}

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

.action-btn {
  background: none;
  border: none;
  color: var(--admin-text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  position: relative;
  transition: 0.2s;
}

.action-btn:hover {
  color: white;
}

.badge-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--admin-danger);
  border-radius: 50%;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.admin-profile img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.admin-profile-info {
  display: flex;
  flex-direction: column;
}

.admin-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
}

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

/* ── DASHBOARD CARDS ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: 0.3s;
}

.stat-card:hover {
  border-color: rgba(96, 165, 250, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.stat-icon.primary { background: rgba(59, 130, 246, 0.1); color: #60a5fa; }
.stat-icon.success { background: rgba(34, 197, 94, 0.1); color: #4ade80; }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: #fbbf24; }
.stat-icon.danger { background: rgba(239, 68, 68, 0.1); color: #f87171; }

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

.stat-label {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}

/* ── TABLES ── */
.admin-panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 30px;
}

.panel-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

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

.admin-table th {
  background: rgba(0,0,0,0.2);
  padding: 15px 25px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--admin-text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 15px 25px;
  border-bottom: 1px solid var(--admin-border);
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* ── BADGES & BUTTONS ── */
.status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
}
.status-active { background: rgba(34, 197, 94, 0.1); color: #4ade80; }
.status-pending { background: rgba(245, 158, 11, 0.1); color: #fbbf24; }
.status-inactive { background: rgba(239, 68, 68, 0.1); color: #f87171; }

.btn-admin {
  background: var(--admin-primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-admin:hover { background: var(--admin-primary-hover); }

.btn-admin-outline {
  background: transparent;
  color: white;
  border: 1px solid var(--admin-border);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}
.btn-admin-outline:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); }

.action-icon {
  color: var(--admin-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 5px;
  transition: 0.2s;
}
.action-icon:hover { color: white; }
.action-icon.edit:hover { color: #60a5fa; }
.action-icon.delete:hover { color: #f87171; }

/* ── RESPONSIVE ── */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 992px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-main { margin-left: 0; }
  .mobile-toggle { display: block; }
  .sidebar-open .admin-sidebar { transform: translateX(0); }
  .topbar-search { display: none; }
}
/* Certificates Module UI Styles */
.cert-stats-row { display: flex; gap: 15px; margin-bottom: 20px; }
.cert-stat-chip { flex: 1; padding: 15px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,0.2); }
.cert-stat-chip.yellow { border-color: rgba(234, 179, 8, 0.3); }
.cert-stat-chip.blue { border-color: rgba(59, 130, 246, 0.3); }
.cert-stat-chip.purple { border-color: rgba(168, 85, 247, 0.3); }
.cert-stat-num { font-size: 24px; font-weight: 700; margin-bottom: 5px; }
.cert-stat-num.yellow { color: #eab308; }
.cert-stat-num.blue { color: #3b82f6; }
.cert-stat-num.purple { color: #a855f7; }
.cert-stat-lbl { font-size: 12px; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; }

.cert-toolbar { display: flex; gap: 10px; margin-bottom: 20px; align-items: center; flex-wrap: wrap; }
.cert-search-wrap { position: relative; flex: 1; min-width: 200px; }
.cert-search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.cert-input { width: 100%; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); color: #fff; border-radius: 6px; padding: 10px 10px 10px 35px; }
select.cert-input { padding: 10px; }

.cert-table { width: 100%; border-collapse: collapse; text-align: left; }
.cert-table th { padding: 12px 15px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #94a3b8; border-bottom: 1px solid rgba(255,255,255,0.1); }
.cert-table td { padding: 12px 15px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; }
.cert-list-item:hover { background: rgba(255,255,255,0.02); }

.cert-name-cell { font-weight: 600; color: #f8fafc; font-size: 14px; margin-bottom: 4px; }
.cert-meta-row { font-size: 12px; color: #64748b; }

.cert-badge { display: inline-block; padding: 4px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.cert-badge.event { background: rgba(168, 85, 247, 0.1); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.2); }
.cert-badge.downloaded { background: rgba(34, 197, 94, 0.1); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); }
.cert-badge.pending { background: rgba(234, 179, 8, 0.1); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.2); }

.cert-action-btns { display: flex; gap: 8px; justify-content: flex-end; }
.cert-act-btn { width: 32px; height: 32px; border-radius: 6px; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.cert-act-btn.view { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.cert-act-btn.view:hover { background: rgba(59, 130, 246, 0.3); }
.cert-act-btn.del { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.cert-act-btn.del:hover { background: rgba(239, 68, 68, 0.3); }

.cert-empty-state { padding: 40px; text-align: center; color: #64748b; }
.cert-empty-state i { font-size: 48px; margin-bottom: 15px; opacity: 0.5; }
/* Certificate Template Editor Styles */
.cert-step-header { font-size: 11px; font-weight: 700; letter-spacing: 1px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cert-step-dot { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cert-step-dot.blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.cert-step-dot.purple { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }
.cert-typo-grid { display: grid; grid-template-columns: 1fr; gap: 15px; margin-bottom: 15px; }
.cert-typo-box { background: rgba(0,0,0,0.3); padding: 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
.cert-typo-lbl { font-size: 11px; color: #94a3b8; font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.cert-typo-row { display: flex; gap: 10px; margin-top: 10px; }
.cert-color-pick { width: 38px; height: 38px; padding: 2px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; cursor: pointer; }
.cert-btn { width: 100%; padding: 10px; border: none; border-radius: 6px; font-weight: 600; font-size: 13px; letter-spacing: 0.5px; cursor: pointer; transition: all 0.2s; }
.cert-btn.green { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); }
.cert-btn.green:hover { opacity: 0.9; }
.cert-preview-empty { flex: 1; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,0.2); border: 1px dashed rgba(255,255,255,0.2); border-radius: 10px; color: #64748b; text-align: center; font-size: 13px; line-height: 1.5; }
.cert-preview-empty i { font-size: 32px; margin-bottom: 12px; opacity: 0.5; }

/* -- Certificate Template Editor Styles -- */
.cert-step-header { display:flex; align-items:center; gap:10px; font-size:12px; font-weight:700; letter-spacing:1px; text-transform:uppercase; margin-bottom:14px; }
.cert-step-dot { width:22px; height:22px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; flex-shrink:0; }
.cert-step-dot.blue   { background:rgba(59,130,246,0.2);  color:#60a5fa; }
.cert-step-dot.purple { background:rgba(168,85,247,0.2);  color:#c084fc; }
.cert-step-dot.green  { background:rgba(16,185,129,0.2);  color:#34d399; }

.cert-typo-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.cert-typo-box  { display:flex; flex-direction:column; gap:8px; }
.cert-typo-lbl  { font-size:11px; font-weight:600; color:#94a3b8; text-transform:uppercase; letter-spacing:0.5px; }
.cert-typo-row  { display:flex; align-items:center; gap:8px; }

.cert-input { background:rgba(0,0,0,0.25); border:1px solid rgba(255,255,255,0.1); color:#fff; border-radius:6px; padding:8px 10px; width:100%; box-sizing:border-box; font-size:13px; }
.cert-input:focus { outline:none; border-color:rgba(59,130,246,0.5); }

.cert-color-pick { width:36px; height:34px; border:1px solid rgba(255,255,255,0.15); border-radius:6px; padding:2px; cursor:pointer; background:transparent; flex-shrink:0; }

.cert-btn { display:inline-flex; align-items:center; gap:8px; padding:10px 18px; border:none; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; transition:all 0.2s; width:100%; justify-content:center; margin-top:10px; }
.cert-btn.green { background:linear-gradient(135deg,#10b981,#059669); color:#fff; box-shadow:0 4px 14px rgba(16,185,129,0.3); }
.cert-btn.green:hover { opacity:0.88; transform:translateY(-1px); }

.cert-preview-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:40px; color:#475569; font-size:13px; text-align:center; border:1px dashed rgba(255,255,255,0.1); border-radius:10px; background:rgba(0,0,0,0.15); }
.cert-preview-empty i { font-size:40px; opacity:0.4; }


/* ══════════════════════════════════════════════════════
   ADM-* COMPONENT SYSTEM  (used by legacy admin modules)
   ══════════════════════════════════════════════════════ */

/* Card */
.adm-card {
  background: #0d1515;
  border: 1px solid rgba(0,220,229,0.15);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.adm-card-head {
  padding: 14px 20px;
  font-weight: 700;
  font-size: 14px;
  color: #00dce5;
  background: rgba(0,220,229,0.05);
  border-bottom: 1px solid rgba(0,220,229,0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* Table */
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.adm-table thead tr {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.adm-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #849495;
}
.adm-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #d4e0e1;
  vertical-align: middle;
}
.adm-table tbody tr:hover { background: rgba(0,220,229,0.03); }
.adm-table tbody tr:last-child td { border-bottom: none; }

/* Buttons */
.adm-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: #00dce5;
  color: #030d0d;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.adm-btn:hover { background: #00f5ff; transform: translateY(-1px); }
.adm-btn.red { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.adm-btn.red:hover { background: rgba(239,68,68,0.3); }
.adm-btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

/* Form rows */
.adm-form-row {
  padding: 0 20px;
  margin-bottom: 16px;
}
.adm-form-row:first-of-type { margin-top: 4px; }
.adm-form-row.cols2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Labels */
.adm-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Inputs */
.adm-input {
  width: 100%;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 11px 14px;
  color: #e2e8f0;
  font-size: 13.5px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: none;
}
.adm-input:focus { border-color: rgba(0,220,229,0.5); background: rgba(0,220,229,0.04); }
.adm-input::placeholder { color: rgba(255,255,255,0.25); }
textarea.adm-input { resize: vertical; min-height: 80px; line-height: 1.5; }
select.adm-input { cursor: pointer; }
input[type="file"].adm-input { padding: 9px 12px; cursor: pointer; }

/* Overlay / Modal backdrop */
.adm-loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,13,13,0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

/* Status badges */
.adm-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.adm-badge.green { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.adm-badge.red   { background: rgba(239,68,68,0.12);  color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.adm-badge.gray  { background: rgba(100,116,139,0.12); color: #94a3b8; border: 1px solid rgba(100,116,139,0.2); }
