/* ==========================================================================
   MediaFlow Admin Console Stylesheet
   - Fully Optimized for Desktop & Mobile Screens
   - Modern Glassmorphism & High-Contrast Dark UI
   ========================================================================== */

/* Page Background */
.admin-body {
  background: #070a13;
  color: var(--text-main, #f1f5f9);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   1. Admin Login View
   ========================================================================== */
.admin-login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px;
  background: radial-gradient(circle at 50% 30%, rgba(30, 58, 138, 0.25), transparent 70%), #070a13;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  text-align: center;
  animation: fadeInDown 0.4s ease;
}

.login-header h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-top: 14px;
  margin-bottom: 6px;
  color: #fff;
}

.login-subtitle {
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 24px;
}

.admin-badge {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-form .input-group {
  text-align: left;
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 16px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.password-input-wrapper input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.btn-toggle-pw {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.btn-toggle-pw:hover {
  opacity: 1;
}

.login-btn {
  height: 48px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.error-msg {
  display: block;
  font-size: 0.8rem;
  color: #f87171;
  margin-top: 6px;
}

.login-footer {
  margin-top: 24px;
}

.back-link {
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: #38bdf8;
}

/* ==========================================================================
   2. Admin Main Dashboard Layout
   ========================================================================== */
.admin-dashboard-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Admin Navigation Header */
.admin-nav-header {
  height: 64px;
  padding: 0 24px;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-tag {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-pill-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-pill-btn svg {
  width: 16px;
  height: 16px;
}

.danger-outline-btn {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.danger-outline-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

.warning-outline-btn {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.warning-outline-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fef08a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

/* Main Content Area */
.admin-main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.admin-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
}

.section-count {
  font-size: 0.82rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 10px;
  border-radius: 20px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #10b981;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   3. KPI Stats Grid (Desktop)
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.kpi-card {
  padding: 20px 22px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.35);
}

.kpi-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon-box svg {
  width: 24px;
  height: 24px;
}

.kpi-icon-box.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.kpi-icon-box.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.kpi-icon-box.amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.kpi-icon-box.cyan { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.kpi-icon-box.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.kpi-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-label {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.kpi-unit {
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 600;
}

.kpi-sub-badge {
  font-size: 0.72rem;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.media-breakdown {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.breakdown-tag {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.breakdown-tag strong {
  color: #fff;
  margin-left: 2px;
}

.server-specs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
}

.server-specs strong {
  color: #e2e8f0;
}

/* Disk Progress Bar */
.disk-progress-wrapper {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.disk-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.disk-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.disk-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94a3b8;
}

/* ==========================================================================
   4. Toolbar & Batch Action Bar
   ========================================================================== */
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
}

.search-box input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 38px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 0.85rem;
}

.search-box input:focus {
  outline: none;
  border-color: #3b82f6;
}

.filter-group {
  display: flex;
  gap: 8px;
}

/* Batch Action Bar */
.batch-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(30, 58, 138, 0.25);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  animation: fadeIn 0.2s ease;
}

.batch-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #93c5fd;
}

.batch-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.danger-solid-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
  transition: all 0.2s;
}

.danger-solid-btn:hover {
  background: linear-gradient(135deg, #f87171, #ef4444);
  transform: translateY(-1px);
}

.danger-solid-btn svg {
  width: 16px;
  height: 16px;
}

.text-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
}

.text-btn:hover {
  color: #fff;
}

/* Custom Checkbox */
.custom-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  width: 20px;
  height: 20px;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
}

.custom-checkbox:hover input ~ .checkmark {
  border-color: #3b82f6;
}

.custom-checkbox input:checked ~ .checkmark {
  background: #3b82f6;
  border-color: #3b82f6;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
}

/* ==========================================================================
   5. Desktop Table View
   ========================================================================== */
.table-container {
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

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

.admin-table thead {
  background: rgba(11, 15, 25, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table th {
  padding: 14px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 14px 16px;
  font-size: 0.86rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: background 0.15s;
}

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

.admin-table tbody tr.row-selected {
  background: rgba(59, 130, 246, 0.1);
}

.th-check, .td-check { width: 44px; text-align: center; }
.th-preview, .td-preview { width: 90px; }
.th-type { width: 90px; }
.th-size { width: 100px; }
.th-res { width: 120px; }
.th-views, .td-views { width: 90px; text-align: center; }
.th-downloads, .td-downloads { width: 90px; text-align: center; }
.th-date { width: 140px; }
.th-actions, .td-actions { width: 145px; text-align: right; }

.stat-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}
.stat-count-badge.views {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.stat-count-badge.downloads {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.mobile-card-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}
.stat-pill.views {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.stat-pill.dls {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}

.table-thumb {
  width: 76px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
  display: block;
}

.table-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 320px;
}

.table-item-title {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-item-filename {
  font-size: 0.75rem;
  color: #64748b;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
}

.type-badge.video { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.type-badge.photo { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-action-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-icon svg {
  width: 16px;
  height: 16px;
}

.btn-action-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

.btn-action-icon.edit-btn:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.6);
  color: #60a5fa;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

.btn-action-icon.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #f87171;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

/* ==========================================================================
   6. Mobile Card List View (Thumb-Friendly Touch UI)
   ========================================================================== */
.mobile-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-mobile-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all 0.2s ease;
  position: relative;
}

.admin-mobile-card.card-selected {
  background: rgba(30, 58, 138, 0.3);
  border-color: #3b82f6;
}

.mobile-card-check {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 2px;
}

.mobile-card-thumb-wrapper {
  position: relative;
  width: 84px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
}

.mobile-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-card-type-icon {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 4px;
  border-radius: 4px;
}

.mobile-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.mobile-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.mobile-card-date {
  font-size: 0.72rem;
  color: #64748b;
}

.mobile-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

/* Mobile Floating Batch Dock (Bottom Sheet) */
.mobile-batch-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(59, 130, 246, 0.4);
  padding: 12px 18px;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 16px);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
  z-index: 100;
  animation: slideUpDock 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpDock {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mobile-batch-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-batch-content span {
  font-size: 0.95rem;
  font-weight: 700;
  color: #93c5fd;
}

.mobile-batch-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-cancel-small {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
}

/* ==========================================================================
   7. Modals (Alert & Preview)
   ========================================================================== */
.alert-modal-box {
  max-width: 440px;
  padding: 28px 24px;
  border-radius: 20px;
  text-align: center;
}

.alert-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.danger-glow {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
}

.warning-glow {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
}

.warning-solid-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transition: all 0.2s;
}

.warning-solid-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-1px);
}

.alert-icon-wrapper svg {
  width: 32px;
  height: 32px;
}

.alert-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.alert-desc {
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 18px;
}

.alert-target-info {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #e2e8f0;
  margin-bottom: 22px;
  word-break: break-all;
}

.alert-btn-row {
  display: flex;
  gap: 10px;
}

.alert-btn-row button {
  flex: 1;
  height: 44px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 12px;
}

/* Preview Modal */
.preview-modal-container {
  max-width: 860px;
  width: 100%;
  max-height: 85vh;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-modal-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.preview-title-box h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-type-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-weight: 700;
}

.preview-media-viewer {
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  max-height: 70vh;
}

.preview-media-viewer video,
.preview-media-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Edit Media & Stats Modal */
.edit-modal-container {
  max-width: 600px;
  width: 95%;
  max-height: 90vh;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: fadeInDown 0.25s ease;
}

.edit-modal-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
}

.edit-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.edit-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edit-header-icon svg {
  width: 22px;
  height: 22px;
}

.edit-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 3px 0;
}

.edit-modal-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
}

.edit-modal-form {
  padding: 22px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Edit Preview Banner */
.edit-preview-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
}

.edit-preview-thumb {
  width: 78px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.edit-preview-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.edit-preview-filename {
  font-size: 0.8rem;
  color: #94a3b8;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edit-preview-specs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #64748b;
}

/* Form Controls */
.edit-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label .required {
  color: #f87171;
}

.styled-input,
.styled-textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.styled-input:focus,
.styled-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: rgba(2, 6, 23, 0.9);
}

.styled-textarea {
  resize: vertical;
  min-height: 60px;
}

/* Edit Stats Box */
.edit-stats-box {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.edit-stats-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stats-box-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #f1f5f9;
}

.stats-box-desc {
  font-size: 0.78rem;
  color: #94a3b8;
}

.edit-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-control-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-control-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
}

.stat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-number-input {
  width: 90px;
  flex: 1;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 8px 10px;
}

.mini-btn {
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.warning-sub-btn {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.warning-sub-btn:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  transform: translateY(-1px);
}

.cyan-sub-btn {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.35);
  color: #22d3ee;
}

.cyan-sub-btn:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: #06b6d4;
  transform: translateY(-1px);
}

.stat-quick-reset-banner {
  padding-top: 4px;
}

.reset-both-btn {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px dashed rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.reset-both-btn svg {
  width: 16px;
  height: 16px;
}

.reset-both-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fff;
  border-style: solid;
}

/* Edit Modal Footer */
.edit-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.edit-modal-footer button {
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.edit-modal-footer button svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   8. Responsive Media Queries (Mobile Screen Optimization)
   ========================================================================== */
@media (max-width: 768px) {
  .admin-main-content {
    padding: 16px 14px 80px;
    gap: 24px;
  }

  .admin-nav-header {
    height: 56px;
    padding: 0 14px;
  }

  .admin-tag {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .kpi-card {
    padding: 16px;
    gap: 14px;
  }

  .kpi-icon-box {
    width: 42px;
    height: 42px;
  }

  .kpi-value {
    font-size: 1.35rem;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }

  .search-box {
    min-width: 100%;
  }

  .filter-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .batch-action-bar {
    display: none; /* Replaced by mobile bottom dock */
  }

  .alert-modal-box {
    margin: 16px;
    padding: 22px 18px;
  }

  .edit-modal-container {
    max-height: 94vh;
    border-radius: 16px;
    width: 96%;
  }

  .edit-modal-header {
    padding: 14px 16px;
  }

  .edit-modal-form {
    padding: 16px;
    gap: 14px;
  }

  .edit-stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .edit-modal-footer {
    padding-top: 8px;
  }

  .edit-modal-footer button {
    flex: 1;
    justify-content: center;
  }
}
