/* ============================================
   assets/css/admin.css
   SIT19 - Admin Panel Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --bg:        #060614;
  --sidebar:   #0a0a1e;
  --card:      #0f0f24;
  --border:    rgba(255,255,255,0.07);
  --blue:      #3d7eff;
  --violet:    #8b5cf6;
  --cyan:      #06b6d4;
  --green:     #10b981;
  --red:       #ef4444;
  --amber:     #f59e0b;
  --text:      #e8e8ff;
  --muted:     #6b6b8f;
  --gradient:  linear-gradient(135deg, #3d7eff, #8b5cf6);
  --font:      'DM Sans', sans-serif;
  --font-head: 'Syne', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; }

/* ---------- Login Page ---------- */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(61,126,255,0.1) 0%, transparent 60%);
}
.login-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
}
.login-logo {
  text-align: center;
  margin-bottom: 36px;
}
.login-logo .badge {
  width: 60px; height: 60px;
  background: var(--gradient);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 auto 14px;
}
.login-logo h1 { font-family: var(--font-head); font-size: 1.4rem; margin-bottom: 4px; }
.login-logo p { color: var(--muted); font-size: 0.85rem; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.form-control {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: var(--text);
  font-family: var(--font);
  transition: 0.3s;
}
.form-control:focus { outline: none; border-color: var(--blue); background: rgba(61,126,255,0.04); }
.btn-login {
  width: 100%;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  margin-top: 8px;
  transition: 0.3s;
}
.btn-login:hover { opacity: 0.9; }
.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.88rem; margin-bottom: 16px; }
.alert-danger { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--red); }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: var(--green); }

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

.sidebar {
  width: 260px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: 0.3s;
}
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-logo {
  width: 38px; height: 38px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.8rem;
}
.sidebar-title { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.sidebar-title small { display: block; font-size: 0.65rem; color: var(--muted); font-weight: 400; }
.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-section-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: 0.2s;
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active { background: rgba(61,126,255,0.12); color: var(--blue); }
.nav-item .icon { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.logout-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.15);
  color: var(--red);
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s;
}
.logout-btn:hover { background: rgba(239,68,68,0.15); }

.main-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  background: var(--sidebar);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-family: var(--font-head); font-size: 1.1rem; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.admin-badge {
  background: rgba(61,126,255,0.12);
  border: 1px solid rgba(61,126,255,0.2);
  color: var(--blue);
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 100px;
}
.content-area { padding: 28px; }

/* ---------- Dashboard Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.blue::before { background: var(--blue); }
.stat-card.violet::before { background: var(--violet); }
.stat-card.cyan::before { background: var(--cyan); }
.stat-card.green::before { background: var(--green); }
.stat-card.amber::before { background: var(--amber); }
.stat-num { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; }
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.stat-icon {
  position: absolute;
  top: 18px; right: 18px;
  font-size: 1.8rem;
  opacity: 0.15;
}

/* ---------- Admin Cards & Tables ---------- */
.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 24px;
}
.admin-card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.admin-card-header h2 { font-family: var(--font-head); font-size: 1.05rem; }
.admin-card-body { padding: 22px; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: none; font-family: var(--font); text-decoration: none; transition: 0.2s; }
.btn-primary { background: var(--gradient); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-danger { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-success { background: rgba(16,185,129,0.1); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.btn-warning { background: rgba(245,158,11,0.1); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: rgba(255,255,255,0.05); }

/* ---------- Status Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 0.72rem; font-weight: 600; }
.badge-pending { background: rgba(245,158,11,0.1); color: var(--amber); }
.badge-accepted { background: rgba(16,185,129,0.1); color: var(--green); }
.badge-rejected { background: rgba(239,68,68,0.1); color: var(--red); }
.badge-photo { background: rgba(61,126,255,0.1); color: var(--blue); }
.badge-video { background: rgba(139,92,246,0.1); color: var(--violet); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 16px;
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-family: var(--font-head); font-size: 1rem; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.modal-body { padding: 22px; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Toggle Switch ---------- */
.toggle-wrap { display: flex; align-items: center; gap: 12px; }
.toggle { position: relative; width: 50px; height: 26px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  cursor: pointer;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(24px); }

/* ---------- Upload Area ---------- */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
}
.upload-area:hover { border-color: var(--blue); background: rgba(61,126,255,0.04); }
.upload-area .icon { font-size: 2.5rem; margin-bottom: 10px; }
.upload-area p { color: var(--muted); font-size: 0.875rem; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
}
