/* ==========================================================================
   HDMoviesHub Admin - Node.js / WordPress Fusion Dark Theme
   ========================================================================== */
@import url('local-fonts.css');

:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: #131c31;
  --bg-card-hover: #19243d;
  --bg-input: #0a0f1d;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.25);

  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-info: #06b6d4;

  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --topbar-height: 64px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --transition-fast: 0.18s ease;
  --transition-smooth: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  overflow-x: hidden;
}

/* ==========================================================================
   Admin Layout Shell
   ========================================================================== */
.admin-wrapper {
  display: flex;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Left Sidebar - WordPress / Node Style */
.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: width var(--transition-smooth), transform var(--transition-smooth);
}

.sidebar-header {
  height: var(--topbar-height);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.sidebar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.sidebar-logo .badge-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  padding: 1.25rem 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0.75rem 0.75rem 0.35rem;
  font-weight: 700;
}

/* Nav Item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-item:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: #fff;
  background-color: var(--accent-primary);
  font-weight: 600;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex-shrink: 0;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.nav-item.active .nav-badge {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
}

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

.admin-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

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

.btn-icon-logout {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-icon-logout:hover {
  color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.1);
}

/* Main Content Area */
.admin-main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition-smooth);
  overflow-x: hidden;
}

/* Topbar */
.admin-topbar {
  height: var(--topbar-height);
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-sidebar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.api-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-dot.active {
  background-color: var(--accent-success);
  box-shadow: 0 0 8px var(--accent-success);
}

.status-dot.inactive {
  background-color: var(--accent-danger);
}

.btn-view-site {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-view-site:hover {
  background: var(--accent-primary);
  color: white;
}

/* Page Body Container */
.admin-content {
  flex: 1;
  padding: 1.75rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Flash Messages */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

/* Stat Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.primary {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.stat-icon.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.stat-icon.info {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}

.stat-icon.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

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

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-top: 0.1rem;
}

/* Generic Card Container */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1.75rem;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

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

.btn-danger:hover {
  background-color: var(--accent-danger);
  color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.form-label .required {
  color: var(--accent-danger);
}

.form-help {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

textarea.code-area {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  min-height: 120px;
  color: #38bdf8;
  background-color: #060913;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 991px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Data Tables */
.table-responsive {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
  box-sizing: border-box;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
  min-width: 640px;
}

.data-table th {
  padding: 0.85rem 1rem;
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

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

.table-movie-thumb {
  width: 42px;
  height: 63px; /* 2:3 aspect ratio */
  object-fit: cover;
  border-radius: 4px;
  background-color: #1e293b;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.badge-quality {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-featured {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* TMDb Quick Fetch Box */
.fetch-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.fetch-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.fetch-input-group {
  display: flex;
  gap: 0.75rem;
}

.fetch-input-group .form-control {
  flex: 1;
}

/* Tab Navigation for Settings */
.settings-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.settings-tab-btn {
  background: transparent;
  border: none;
  padding: 0.75rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.settings-tab-btn:hover {
  color: var(--text-main);
}

.settings-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Dynamic Repeater Lists (Download Links & Screenshots) */
.repeater-item {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.repeater-remove {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: none;
  border-radius: var(--radius-sm);
  width: 26px;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.25s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Summernote Dark Theme Customization */
.note-editor.note-air, .note-editor.note-frame {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  background-color: var(--bg-input) !important;
  color: var(--text-main) !important;
}

.note-toolbar {
  background-color: #0f172a !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 6px !important;
}

.note-btn {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

.note-btn:hover, .note-btn.active {
  background-color: var(--accent-primary) !important;
  color: #fff !important;
}

.note-editable {
  background-color: var(--bg-input) !important;
  color: var(--text-main) !important;
  min-height: 220px !important;
  font-family: inherit !important;
  line-height: 1.6 !important;
}

.note-editor .note-statusbar {
  background-color: #0f172a !important;
  border-top: 1px solid var(--border-color) !important;
}

.note-dropdown-menu {
  background-color: #1e293b !important;
  color: #fff !important;
  border: 1px solid var(--border-color) !important;
}

.note-dropdown-item {
  color: #cbd5e1 !important;
}

.note-dropdown-item:hover {
  background-color: var(--accent-primary) !important;
  color: #fff !important;
}

.note-codable {
  background-color: #050811 !important;
  color: #38bdf8 !important;
  font-family: 'JetBrains Mono', monospace !important;
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 14, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Quick Import Form */
.quick-import-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive Media Queries */
@media (max-width: 991px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    max-width: 80vw;
    z-index: 50;
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  }
  .admin-sidebar.show {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }
  .btn-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .admin-content {
    padding: 1.25rem 1rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }
  .admin-topbar {
    padding: 0 0.85rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
  .topbar-left {
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }
  .page-title {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .topbar-right {
    gap: 0.5rem;
    flex-shrink: 0;
  }
  .btn-view-site {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .admin-content {
    padding: 1rem 0.75rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
  .card {
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
  }
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 0.85rem;
  }
  .card-header > div:last-child {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .card-body {
    padding: 1rem 0.85rem;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .fetch-input-group {
    flex-direction: column;
  }
  .fetch-input-group .btn {
    width: 100%;
    justify-content: center;
  }
  .quick-import-form {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .quick-import-form .form-control {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  .quick-import-form .btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .stat-card {
    padding: 1rem 0.85rem;
    gap: 0.85rem;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }
  .stat-icon {
    width: 42px;
    height: 42px;
  }
  .stat-value {
    font-size: 1.35rem;
  }
  .modal-container {
    max-height: 94vh;
    border-radius: var(--radius-lg);
  }
  .modal-header, .modal-footer {
    padding: 0.85rem 1rem;
  }
  .modal-body {
    padding: 1rem;
    gap: 1rem;
  }
  .modal-footer {
    flex-direction: column;
  }
  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }
  .table-responsive {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table {
    min-width: 620px;
  }
  .data-table th, .data-table td {
    padding: 0.65rem 0.75rem;
  }
}

@media (max-width: 520px) {
  .topbar-left {
    gap: 0.4rem;
  }
  .page-title {
    font-size: 0.95rem;
    max-width: 150px;
  }
  .admin-profile .admin-info {
    display: none;
  }
}

/* ==========================================================================
   Fast Post Creator Modal Dialog Styles
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-container {
  width: 100%;
  max-width: 940px;
  max-height: 90vh;
  background-color: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.show .modal-container {
  transform: scale(1);
}

.modal-header {
  padding: 1.2rem 1.5rem;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.modal-close-btn:hover {
  background-color: var(--accent-danger);
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.creator-step-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.creator-step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.creator-step-title .badge-step {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}

.modal-screenshots-preview {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.modal-ss-thumb {
  width: 80px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.modal-dl-tier-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
}

.modal-mirror-button-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
