/* ==========================================================================
   KSHATRIYA YOUTH — ADMIN STUDIO
   Premium Dark-Gold Admin Dashboard
   ========================================================================== */

.admin-body {
  background: #07070a;
  min-height: 100vh;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
}

/* ── TOP NAVBAR ─────────────────────────────────────────────────────────── */
.admin-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 16, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(245, 166, 35, 0.18);
  padding: 0 1.5rem;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex-shrink: 0;
}

.brand-emblem {
  flex-shrink: 0;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-brand-text {
  min-width: 0;
}

.admin-brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
}

.admin-brand-sub {
  font-size: 0.68rem;
  color: var(--gold-light);
  white-space: nowrap;
}

.admin-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  background: linear-gradient(135deg, #f5a623, #e8890a);
  color: #000;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  max-width: 180px;
  overflow: hidden;
}

.user-pill span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-view-site {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.85rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-view-site:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.85rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-logout:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

/* ── SIDEBAR + CONTENT LAYOUT ────────────────────────────────────────────── */
.admin-shell {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Sidebar */
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: rgba(10, 10, 16, 0.95);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 0.75rem;
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 0.75rem;
  margin: 0.75rem 0 0.35rem;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
  width: 100%;
  text-align: left;
  transition: all 0.18s;
  cursor: pointer;
  white-space: nowrap;
}

.sidebar-btn .sb-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.sidebar-btn:hover {
  background: rgba(245, 166, 35, 0.08);
  color: #fff;
  border-color: rgba(245, 166, 35, 0.15);
}

.sidebar-btn.active {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.18), rgba(232, 137, 10, 0.12));
  color: #f5a623;
  border-color: rgba(245, 166, 35, 0.3);
  font-weight: 700;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 0.5rem 0.75rem;
}

/* Main content area */
.admin-content {
  flex: 1;
  min-width: 0;
  padding: 2rem 2rem 5rem;
  overflow-x: hidden;
}

/* Mobile tab strip (hidden on desktop) */
.admin-tabs-mobile {
  display: none;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(10,10,16,0.9);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  scrollbar-width: none;
}
.admin-tabs-mobile::-webkit-scrollbar { display: none; }

.admin-tab-btn-mob {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.18s;
}
.admin-tab-btn-mob.active,
.admin-tab-btn-mob:hover {
  background: linear-gradient(135deg, #f5a623, #e8890a);
  color: #000;
  border-color: #f5a623;
  font-weight: 700;
}

/* ── TAB PANELS ─────────────────────────────────────────────────────────── */
.admin-view-panel { display: none; }
.admin-view-panel.active-panel { display: block; }

/* ── SECTION HEADER ─────────────────────────────────────────────────────── */
.admin-section-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.25rem;
}
.admin-section-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── STATS GRID ─────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: all 0.22s;
}
.stat-card:hover {
  border-color: rgba(245, 166, 35, 0.3);
  transform: translateY(-2px);
  background: rgba(245, 166, 35, 0.04);
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-heading);
  line-height: 1;
}
.stat-sub {
  font-size: 0.72rem;
  color: var(--gold-light);
}

/* ── ADMIN CARD ─────────────────────────────────────────────────────────── */
.admin-card {
  background: rgba(255,255,255,0.025);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

/* ── UPLOAD DROPZONE ─────────────────────────────────────────────────────── */
.upload-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}

.upload-dropzone {
  border: 2px dashed rgba(245, 166, 35, 0.35);
  border-radius: 14px;
  padding: 3rem 1.5rem;
  text-align: center;
  background: rgba(245, 166, 35, 0.02);
  transition: all 0.22s;
  cursor: pointer;
}
.upload-dropzone:hover,
.upload-dropzone.dragover {
  background: rgba(245, 166, 35, 0.07);
  border-color: #f5a623;
  transform: scale(1.005);
}
.dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  color: var(--gold-light);
}
.dropzone-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}
.dropzone-sub {
  color: var(--text-secondary);
  font-size: 0.85rem;
  max-width: 440px;
  margin: 0 auto 1rem;
}
.dropzone-specs {
  font-size: 0.75rem;
  color: var(--gold-light);
  background: rgba(245, 166, 35, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(245, 166, 35, 0.2);
}

/* ── UPLOAD QUEUE ────────────────────────────────────────────────────────── */
.upload-queue-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.queue-item {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.queue-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}
.queue-filename {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
.queue-progress-bar-wrap {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.queue-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #f5a623, #e8890a);
  border-radius: 999px;
  width: 0%;
  transition: width 0.25s ease;
}
.queue-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── DATA TABLE ──────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}
.data-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}
.data-table tr:hover td {
  background: rgba(255,255,255,0.02);
  color: #fff;
}
.table-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.table-responsive {
  overflow-x: auto;
}

/* ── ICON BUTTON ─────────────────────────────────────────────────────────── */
.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.18s;
  cursor: pointer;
}
.btn-icon:hover {
  background: rgba(245,166,35,0.15);
  color: #f5a623;
  border-color: rgba(245,166,35,0.3);
}
.btn-icon.danger:hover {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border-color: rgba(239,68,68,0.3);
}

/* ── FORM ELEMENTS ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}
.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.18s;
  box-sizing: border-box;
}
.form-control:focus {
  border-color: #f5a623;
  background: rgba(0,0,0,0.5);
}
.form-control option { background: #111119; }

/* ── MODAL ───────────────────────────────────────────────────────────────── */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.admin-modal.active { display: flex; }

.admin-modal-card {
  background: #0e0e18;
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.9), 0 0 0 1px rgba(245,166,35,0.08);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.admin-modal-header {
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(245,166,35,0.04);
}
.admin-modal-body {
  padding: 1.5rem;
  max-height: 72vh;
  overflow-y: auto;
}
.admin-modal-footer {
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── MEDIA GRID IN ADMIN ─────────────────────────────────────────────────── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* ── DRIVE INFO BANNER ───────────────────────────────────────────────────── */
.drive-config-banner {
  background: linear-gradient(135deg, rgba(56,189,248,0.08), rgba(99,102,241,0.08));
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #94a3b8;
}
.drive-config-banner strong { color: #7dd3fc; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .admin-sidebar { display: none; }
  .admin-tabs-mobile { display: flex; }
  .admin-content { padding: 1.25rem 1rem 4rem; }
  .user-pill { display: none; }
  .btn-view-site span { display: none; }
  .btn-logout span { display: none; }
}

@media (max-width: 600px) {
  .admin-navbar { padding: 0 1rem; height: 56px; }
  .admin-brand-sub { display: none; }
  .admin-badge { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat-value { font-size: 1.5rem; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
