/* ============================================================
   DJBFH Crowdfunding — admin.css
   Dark command-center aesthetic: ebony + gold accents
   ============================================================ */

:root {
  --gold:       #C9A84C;
  --gold-light: #E8C96A;
  --gold-dark:  #9B7D35;
  --ebony:      #0d0d0d;
  --dark1:      #111111;
  --dark2:      #161616;
  --dark3:      #1e1e1e;
  --dark4:      #272727;
  --dark5:      #303030;
  --white:      #FAFAF8;
  --gray1:      #888888;
  --gray2:      #555555;
  --gray3:      #333333;
  --green:      #22c55e;
  --red:        #ef4444;
  --amber:      #f59e0b;
  --blue:       #3b82f6;

  --font-body:  'DM Sans', system-ui, sans-serif;
  --font-disp:  'Cormorant Garamond', Georgia, serif;
  --font-mono:  'DM Mono', 'Courier New', monospace;

  --radius:     10px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow:     0 2px 16px rgba(0,0,0,0.4);
}

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

html, body {
  height: 100%; font-family: var(--font-body);
  background: var(--dark1); color: var(--white);
  -webkit-font-smoothing: antialiased;
  font-size: 14px; line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── LOGIN ───────────────────────────────────────────────────── */
.adm-login-wrap {
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 30% 30%, rgba(201,168,76,0.08) 0%, transparent 60%),
              var(--dark1);
  padding: 24px;
}
.adm-login-card {
  width: 100%; max-width: 400px;
  background: var(--dark2);
  border: 1px solid var(--dark4);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.adm-login-logo {
  height: 68px; width: 68px; border-radius: 50%;
  margin: 0 auto 20px; object-fit: contain;
  border: 2px solid rgba(201,168,76,0.25);
}
.adm-login-title {
  font-family: var(--font-disp); font-size: 28px; font-weight: 600;
  color: var(--white); text-align: center; margin-bottom: 4px;
}
.adm-login-sub { font-size: 12px; color: var(--gray1); text-align: center; margin-bottom: 28px; letter-spacing: 0.04em; }
.adm-login-err {
  background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5; border-radius: 8px;
  padding: 10px 14px; font-size: 13px; margin-top: 14px;
  text-align: center;
}

/* ── HEADER ──────────────────────────────────────────────────── */
.adm-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: var(--dark2);
  border-bottom: 1px solid var(--dark4);
}
.adm-header-left  { display: flex; align-items: center; gap: 12px; }
.adm-header-right { display: flex; align-items: center; gap: 10px; }
.adm-header-logo  { height: 28px; width: 28px; border-radius: 50%; object-fit: contain; }
.adm-header-title {
  font-size: 13px; font-weight: 600; letter-spacing: 0.05em;
  color: var(--white); text-transform: uppercase;
}
.adm-sidebar-toggle {
  background: none; border: none; color: var(--gray1);
  font-size: 18px; cursor: pointer; padding: 4px;
  display: none;
}
.adm-live-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--green);
}
.adm-live-badge i { font-size: 8px; animation: blink 1.5s infinite; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.3; } }
.adm-clock { font-family: var(--font-mono); font-size: 12px; color: var(--gray1); }

/* ── LAYOUT ──────────────────────────────────────────────────── */
.adm-layout {
  display: flex;
  padding-top: 56px;
  min-height: 100svh;
}
.adm-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--dark2);
  border-right: 1px solid var(--dark4);
  padding: 20px 12px;
  position: fixed; left: 0; top: 56px; bottom: 0;
  overflow-y: auto;
  transition: transform var(--transition);
}
.adm-sidebar-section { margin-bottom: 24px; }
.adm-sidebar-label {
  display: block; font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gray2); padding: 0 10px; margin-bottom: 6px;
}
.adm-nav-item {
  width: 100%; text-align: left;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  background: none; border: none;
  font-size: 13px; font-weight: 500; color: var(--gray1);
  cursor: pointer; transition: all var(--transition);
  margin-bottom: 2px;
}
.adm-nav-item:hover { background: var(--dark3); color: var(--white); }
.adm-nav-item.active { background: rgba(201,168,76,0.12); color: var(--gold); }
.adm-nav-item i { width: 16px; text-align: center; font-size: 13px; }

.adm-main {
  flex: 1;
  margin-left: 220px;
  padding: 28px;
  min-height: calc(100svh - 56px);
  background: var(--dark1);
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.adm-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 8px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  cursor: pointer; border: none; transition: all var(--transition);
  white-space: nowrap;
}
.adm-btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--ebony); }
.adm-btn-gold:hover { opacity: 0.9; transform: translateY(-1px); }
.adm-btn-outline { background: transparent; border: 1px solid var(--dark5); color: var(--gray1); }
.adm-btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.adm-btn-ghost { background: var(--dark3); color: var(--gray1); }
.adm-btn-ghost:hover { background: var(--dark4); color: var(--white); }
.adm-btn-danger { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.2); }
.adm-btn-danger:hover { background: rgba(239,68,68,0.25); }
.adm-btn-success { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.2); }
.adm-btn-success:hover { background: rgba(34,197,94,0.25); }
.adm-btn-sm { padding: 6px 12px; font-size: 12px; }
.adm-btn-block { width: 100%; justify-content: center; padding: 13px; font-size: 14px; }
.adm-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ── CARDS ───────────────────────────────────────────────────── */
.adm-card {
  background: var(--dark2);
  border: 1px solid var(--dark4);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.adm-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--dark4);
}
.adm-card-title { font-size: 14px; font-weight: 600; color: var(--white); display: flex; align-items: center; gap: 8px; }
.adm-card-title i { color: var(--gold); }
.adm-card-body { padding: 20px; }

/* ── PAGE HEAD ───────────────────────────────────────────────── */
.adm-page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.adm-page-title {
  font-family: var(--font-disp);
  font-size: 28px; font-weight: 600; color: var(--white);
}

/* ── DASHBOARD STATS ─────────────────────────────────────────── */
.adm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.adm-stat-card {
  background: var(--dark2);
  border: 1px solid var(--dark4);
  border-radius: var(--radius);
  padding: 20px;
}
.adm-stat-card.adm-loading {
  height: 100px;
  background: linear-gradient(90deg, var(--dark2) 25%, var(--dark3) 50%, var(--dark2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position:200% 0; } 100% { background-position:-200% 0; } }
.adm-stat-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(201,168,76,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--gold); margin-bottom: 12px;
}
.adm-stat-val {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 700; color: var(--white);
  margin-bottom: 4px;
}
.adm-stat-lbl { font-size: 12px; color: var(--gray1); letter-spacing: 0.04em; }
.adm-stat-card.gold-border { border-top: 2px solid var(--gold); }
.adm-stat-card.green-border { border-top: 2px solid var(--green); }
.adm-stat-card.amber-border { border-top: 2px solid var(--amber); }
.adm-stat-card.red-border   { border-top: 2px solid var(--red); }
.adm-stat-card.blue-border  { border-top: 2px solid var(--blue); }

/* ── GRID LAYOUTS ────────────────────────────────────────────── */
.adm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── TABLES ──────────────────────────────────────────────────── */
.adm-table-wrap { overflow-x: auto; }
.adm-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.adm-table th {
  text-align: left; padding: 10px 16px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray1); background: var(--dark3);
  border-bottom: 1px solid var(--dark4);
  white-space: nowrap;
}
.adm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--dark3);
  vertical-align: middle;
  color: #ccc;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: rgba(255,255,255,0.02); }
.adm-table .mono { font-family: var(--font-mono); font-size: 12px; }
.adm-loading-row {
  height: 48px; margin: 8px 16px;
  background: linear-gradient(90deg, var(--dark3) 25%, var(--dark4) 50%, var(--dark3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

/* ── BADGES / STATUS ─────────────────────────────────────────── */
.adm-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
}
.adm-badge.success { background: rgba(34,197,94,0.12); color: #86efac; border: 1px solid rgba(34,197,94,0.2); }
.adm-badge.pending { background: rgba(245,158,11,0.12); color: #fcd34d; border: 1px solid rgba(245,158,11,0.2); }
.adm-badge.failed  { background: rgba(239,68,68,0.12);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.2); }
.adm-badge.verified{ background: rgba(59,130,246,0.12); color: #93c5fd; border: 1px solid rgba(59,130,246,0.2); }
.adm-badge.refunded{ background: rgba(168,85,247,0.12); color: #c4b5fd; border: 1px solid rgba(168,85,247,0.2); }

/* ── FORM ELEMENTS ───────────────────────────────────────────── */
.adm-form-group { margin-bottom: 16px; }
.adm-label,
.adm-form-group label {
  display: block; font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray1); margin-bottom: 7px;
}
.adm-input, .adm-select, .adm-textarea {
  width: 100%; padding: 10px 14px;
  background: var(--dark3); border: 1px solid var(--dark5);
  border-radius: 8px; color: var(--white);
  font-family: var(--font-body); font-size: 14px;
  outline: none; transition: all var(--transition);
}
.adm-input:focus, .adm-select:focus, .adm-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.15);
}
.adm-select option { background: var(--dark3); }
.adm-textarea { resize: vertical; min-height: 90px; }
.adm-select-sm { width: auto; padding: 7px 12px; font-size: 12px; }
.adm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── TOGGLE ──────────────────────────────────────────────────── */
.adm-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--dark4);
}
.adm-toggle-row:last-child { border-bottom: none; }
.adm-toggle-label { font-size: 14px; font-weight: 500; color: var(--white); }
.adm-toggle-hint  { font-size: 12px; color: var(--gray1); margin-top: 2px; }
.adm-toggle { position: relative; display: inline-block; cursor: pointer; }
.adm-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.adm-toggle-track {
  display: block; width: 40px; height: 22px; border-radius: 11px;
  background: var(--dark5); transition: all var(--transition);
  position: relative;
}
.adm-toggle-track::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gray1); top: 3px; left: 3px;
  transition: all var(--transition);
}
.adm-toggle input:checked + .adm-toggle-track { background: var(--gold); }
.adm-toggle input:checked + .adm-toggle-track::after {
  background: var(--ebony); transform: translateX(18px);
}

/* ── BILL BREAKDOWN ──────────────────────────────────────────── */
.adm-bill-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--dark3);
  border-radius: 6px; margin-bottom: 6px;
  font-size: 13px;
}
.adm-bill-item .amount { font-family: var(--font-mono); color: var(--gold); }
.adm-bill-item button { background: none; border: none; color: var(--red); cursor: pointer; padding: 2px 6px; }

/* ── DIALOG / MODAL ──────────────────────────────────────────── */
.adm-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
}
.adm-dialog {
  position: fixed; z-index: 1001;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, 94vw);
  background: var(--dark2);
  border: 1px solid var(--dark4);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.adm-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.adm-dialog-head h3 { font-family: var(--font-disp); font-size: 22px; color: var(--white); }
.adm-close-btn {
  background: var(--dark3); border: none; color: var(--gray1);
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px;
  transition: all var(--transition);
}
.adm-close-btn:hover { background: var(--dark4); color: var(--white); }

/* ── TOAST ───────────────────────────────────────────────────── */
.adm-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  padding: 12px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform:none; } }
.adm-toast.success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.adm-toast.error   { background: rgba(239,68,68,0.15);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.adm-toast.info    { background: rgba(201,168,76,0.15); border: 1px solid rgba(201,168,76,0.3); color: var(--gold-light); }

/* ── MISC HELPERS ────────────────────────────────────────────── */
.adm-tab { display: none; }
.adm-tab.active { display: block; }
.adm-empty { padding: 32px; text-align: center; color: var(--gray1); font-size: 14px; }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-amber  { color: var(--amber); }
.text-muted  { color: var(--gray1); }
.mono        { font-family: var(--font-mono); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .adm-sidebar-toggle { display: flex; }
  .adm-sidebar {
    transform: translateX(-100%);
    z-index: 800;
  }
  .adm-sidebar.open { transform: translateX(0); }
  .adm-main { margin-left: 0; padding: 20px 16px; }
  .adm-grid-2 { grid-template-columns: 1fr; }
  .adm-form-row { grid-template-columns: 1fr; }
  .adm-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .adm-stats-grid { grid-template-columns: 1fr 1fr; }
  .adm-page-title { font-size: 22px; }
}
