/* =============================================================
 *  admin.css — Admin Panel Styles
 *  Bleach Resistant / FinPrint Inc.
 *  =============================================================
 *  Brand: #C7065C (pink/magenta)  |  Font: Montserrat
 *  ============================================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  background: #f4f5f7;
  color: #2c2c2c;
  min-height: 100vh;
  display: flex;
}
/* Hide admin content until auth check passes */
body.admin-hidden { display: none !important; }
a { color: #C7065C; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* ---------- Auth Pages (login/signup) ---------- */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.auth-card {
  background: #fff;
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.auth-card .logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-card .logo h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #C7065C;
}
.auth-card .logo p {
  font-size: 12px;
  color: #888;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}
.auth-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #2c2c2c;
}

/* ---------- Form Controls ---------- */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  color: #2c2c2c;
  background: #fff;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #C7065C;
  box-shadow: 0 0 0 3px rgba(199,6,92,0.1);
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: #C7065C;
  color: #fff;
}
.btn-primary:hover { background: #9a0447; }
.btn-secondary {
  background: #e8e8e8;
  color: #333;
}
.btn-secondary:hover { background: #d0d0d0; }
.btn-danger {
  background: #dc3545;
  color: #fff;
}
.btn-danger:hover { background: #b02a37; }
.btn-success {
  background: #198754;
  color: #fff;
}
.btn-success:hover { background: #146c43; }
.btn-sm {
  padding: 6px 14px;
  font-size: 11px;
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: #1a1a2e;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s;
}
.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand h2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #C7065C;
}
.sidebar-brand small {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}
.sidebar-nav .nav-section {
  padding: 16px 20px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
  text-decoration: none;
}
.sidebar-nav a.active {
  color: #fff;
  background: rgba(199,6,92,0.15);
  border-left-color: #C7065C;
}
.sidebar-nav a .icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sidebar-footer .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #C7065C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.sidebar-footer .user-email {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

/* ---------- Main Content ---------- */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 0;
  min-height: 100vh;
}
.topbar {
  background: #fff;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar h1 {
  font-size: 18px;
  font-weight: 700;
  color: #2c2c2c;
}
.topbar .breadcrumb {
  font-size: 12px;
  color: #888;
}
.topbar .topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.content-area {
  padding: 32px;
}

/* ---------- Stat Cards ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border-left: 4px solid #C7065C;
}
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #2c2c2c;
}
.stat-card .stat-sub {
  font-size: 11px;
  color: #aaa;
  margin-top: 4px;
}
.stat-card:nth-child(2) { border-left-color: #198754; }
.stat-card:nth-child(3) { border-left-color: #0d6efd; }
.stat-card:nth-child(4) { border-left-color: #ffc107; }

/* ---------- Table ---------- */
.table-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 24px;
}
.table-card .table-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.table-card .table-header h3 {
  font-size: 15px;
  font-weight: 700;
}
.table-card .table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.table-card .search-input {
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 12px;
  width: 220px;
}
.table-card .search-input:focus {
  border-color: #C7065C;
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
}
table.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #888;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}
table.data-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid #f4f4f4;
  vertical-align: middle;
}
table.data-table tr:hover { background: #fafbfc; }
table.data-table tr:last-child td { border-bottom: none; }

/* ---------- Status Badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-new { background: #e8f5e9; color: #2e7d32; }
.badge-progress { background: #fff3e0; color: #e65100; }
.badge-complete { background: #e3f2fd; color: #1565c0; }
.badge-closed { background: #f5f5f5; color: #757575; }

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #999;
  padding: 0 4px;
}
.modal-close:hover { color: #333; }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ---------- Page Editor ---------- */
.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.page-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
  cursor: pointer;
}
.page-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.page-card .page-card-preview {
  height: 160px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #ccc;
  position: relative;
  overflow: hidden;
}
.page-card .page-card-preview iframe {
  width: 200%;
  height: 200%;
  transform: scale(0.5);
  transform-origin: top left;
  pointer-events: none;
  border: none;
}
.page-card .page-card-body {
  padding: 16px;
}
.page-card .page-card-body h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.page-card .page-card-body p {
  font-size: 11px;
  color: #888;
}

/* ---------- Media Grid ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.media-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  position: relative;
}
.media-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.media-item .media-info {
  padding: 10px 12px;
}
.media-item .media-info .filename {
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-item .media-info .filesize {
  font-size: 10px;
  color: #aaa;
}
.media-item .media-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.media-item:hover .media-actions { opacity: 1; }
.media-actions .btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}
.media-actions .btn-icon:hover { background: #C7065C; }

/* ---------- Upload Zone ---------- */
.upload-zone {
  border: 2px dashed #ddd;
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 24px;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #C7065C;
  background: rgba(199,6,92,0.03);
}
.upload-zone .upload-icon {
  font-size: 40px;
  color: #ccc;
  margin-bottom: 12px;
}
.upload-zone .upload-text {
  font-size: 13px;
  color: #888;
}
.upload-zone .upload-text strong {
  color: #C7065C;
}

/* ---------- Content Editor ---------- */
.editor-panel {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  min-height: 60vh;
}
.editor-sidebar {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow-y: auto;
  max-height: 70vh;
}
.editor-sidebar .es-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f4f4f4;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 12px;
}
.editor-sidebar .es-item:hover { background: #fafafa; }
.editor-sidebar .es-item.active {
  background: rgba(199,6,92,0.06);
  border-left: 3px solid #C7065C;
}
.editor-sidebar .es-item .es-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #aaa;
}
.editor-main {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 24px;
}
.editor-preview {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 16px;
  min-height: 200px;
  background: #f9f9f9;
}
.editor-preview img {
  max-width: 100%;
  display: block;
  margin: auto;
}

/* ---------- Toast / Alert ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 99999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-success { background: #198754; }
.toast-error { background: #dc3545; }
.toast-info { background: #0d6efd; }

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-error {
  background: #fce4e4;
  color: #c0392b;
  border: 1px solid #f5c6cb;
}
.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.alert-info {
  background: #cce5ff;
  color: #004085;
  border: 1px solid #b8daff;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: #aaa;
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.empty-state p {
  font-size: 14px;
}

/* ---------- Loading Spinner ---------- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(199,6,92,0.2);
  border-top-color: #C7065C;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  gap: 12px;
  color: #888;
  font-size: 13px;
}

/* ---------- Visit Site Link ---------- */
.visit-site-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(199,6,92,0.1);
  color: #C7065C;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
}
.visit-site-link:hover {
  background: rgba(199,6,92,0.2);
  text-decoration: none;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pagination button {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.pagination button:hover { border-color: #C7065C; color: #C7065C; }
.pagination button.active { background: #C7065C; color: #fff; border-color: #C7065C; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Responsive ---------- */

/* ===== TABLET (≤ 1024px) ===== */
@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
  }
  .main-content {
    margin-left: 220px;
  }
  .content-area {
    padding: 24px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .editor-panel {
    grid-template-columns: 240px 1fr;
  }
}

/* ===== MOBILE (≤ 768px) ===== */
@media (max-width: 768px) {

  /* ---- Body: column layout (sidebar on top) ---- */
  body {
    flex-direction: column !important;
  }

  /* ---- Sidebar → compact horizontal top nav ---- */
  .sidebar {
    width: 100% !important;
    min-height: unset !important;
    height: auto !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    bottom: auto !important;
    right: auto !important;
    flex-direction: column !important;
    transform: none !important;
    z-index: 200 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
  }

  /* Brand row */
  .sidebar-brand {
    padding: 10px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .sidebar-brand h2 {
    font-size: 14px !important;
    letter-spacing: 1.5px !important;
  }

  .sidebar-brand small {
    display: none !important;
  }

  /* Nav: horizontal scrollable strip */
  .sidebar-nav {
    flex: unset !important;
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none !important;
  }

  /* Section headings: hide in horizontal mode */
  .sidebar-nav .nav-section {
    display: none !important;
  }

  /* Nav links: horizontal tabs */
  .sidebar-nav a {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 10px 14px !important;
    border-left: none !important;
    border-bottom: 3px solid transparent !important;
    white-space: nowrap !important;
    font-size: 10px !important;
    min-width: 60px !important;
    flex-shrink: 0 !important;
    letter-spacing: 0 !important;
  }

  .sidebar-nav a .icon {
    font-size: 18px !important;
    width: auto !important;
  }

  .sidebar-nav a.active {
    border-bottom-color: #C7065C !important;
    border-left: none !important;
    background: rgba(199,6,92,0.15) !important;
  }

  /* Footer: hide to save space */
  .sidebar-footer {
    display: none !important;
  }

  /* ---- Main content: full width ---- */
  .main-content {
    margin-left: 0 !important;
    min-height: 0 !important;
    width: 100% !important;
  }

  /* ---- Topbar ---- */
  .topbar {
    padding: 10px 16px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    position: sticky !important;
    top: 0 !important;
  }

  .topbar h1 {
    font-size: 16px !important;
  }

  .topbar .breadcrumb {
    display: none !important;
  }

  .topbar .topbar-actions {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .topbar-actions select {
    width: 100% !important;
    max-width: 180px !important;
  }

  /* ---- Content area ---- */
  .content-area {
    padding: 14px !important;
  }

  /* ---- Stats grid: 2 columns ---- */
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .stat-card {
    padding: 16px !important;
  }

  .stat-card .stat-value {
    font-size: 22px !important;
  }

  /* ---- Tables: horizontal scroll ---- */
  .table-card {
    overflow-x: hidden !important;
  }

  .table-card > div[style*="overflow-x"],
  .table-card > div {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  table.data-table {
    min-width: 540px !important;
  }

  table.data-table th,
  table.data-table td {
    padding: 10px 12px !important;
    font-size: 12px !important;
  }

  .table-card .table-header {
    padding: 14px 16px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .table-card .table-actions {
    width: 100% !important;
  }

  .table-card .search-input {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ---- Pagination ---- */
  .pagination {
    flex-wrap: wrap !important;
    gap: 4px !important;
    padding: 12px !important;
  }

  /* ---- Modal ---- */
  .modal {
    width: 96% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    border-radius: 8px !important;
    margin: 0 2% !important;
  }

  .modal-body {
    padding: 16px !important;
  }

  .modal-footer {
    padding: 12px 16px !important;
    flex-wrap: wrap !important;
  }

  /* Grid inside modal: single column */
  .modal-body div[style*="grid-template-columns:1fr 1fr"],
  .modal-body div[style*="grid-template-columns: 1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  /* ---- Editor panel: single column ---- */
  .editor-panel {
    grid-template-columns: 1fr !important;
  }

  .editor-sidebar {
    max-height: 240px !important;
  }

  /* ---- Media grid: 2 columns ---- */
  .media-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* ---- Page cards: single column ---- */
  .page-grid {
    grid-template-columns: 1fr !important;
  }

  /* ---- Upload zone ---- */
  .upload-zone {
    padding: 24px 16px !important;
  }

  /* ---- Settings: single column ---- */
  .settings-grid {
    grid-template-columns: 1fr !important;
  }

  .settings-nav {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    border-right: none !important;
    border-bottom: 1px solid #eee !important;
    padding: 0 !important;
  }

  .settings-nav::-webkit-scrollbar {
    display: none !important;
  }

  .settings-nav a {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    border-left: none !important;
    border-bottom: 3px solid transparent !important;
    padding: 12px 16px !important;
    font-size: 12px !important;
  }

  .settings-nav a.active {
    border-left: none !important;
    border-bottom-color: #C7065C !important;
  }

  .settings-nav .nav-heading {
    display: none !important;
  }

  .settings-panel {
    padding: 16px !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
  }

  .save-bar {
    padding: 12px 16px !important;
  }

  /* ---- Analytics: single column ---- */
  .split-row {
    grid-template-columns: 1fr !important;
  }

  .analytics-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .filter-bar {
    flex-wrap: wrap !important;
  }

  .filter-bar select {
    width: 100% !important;
  }

  /* ---- Toast: bottom center on mobile ---- */
  .toast {
    right: 50% !important;
    transform: translateX(50%) translateY(100px) !important;
    bottom: 16px !important;
    left: auto !important;
    width: 90% !important;
    max-width: 320px !important;
  }

  .toast.show {
    transform: translateX(50%) translateY(0) !important;
  }

  /* ---- Buttons: fluid in tight spaces ---- */
  .btn-block {
    width: 100% !important;
  }

  /* ---- Visit site link: smaller ---- */
  .visit-site-link {
    font-size: 10px !important;
    padding: 6px 10px !important;
  }
}

/* ===== SMALL MOBILE (≤ 480px) ===== */
@media (max-width: 480px) {

  /* Stats: single column */
  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  /* Media grid: single column */
  .media-grid {
    grid-template-columns: 1fr !important;
  }

  /* Analytics: single column */
  .analytics-grid {
    grid-template-columns: 1fr !important;
  }

  .sidebar-nav a {
    padding: 8px 10px !important;
    font-size: 9px !important;
    min-width: 52px !important;
  }

  .sidebar-nav a .icon {
    font-size: 16px !important;
  }

  .topbar h1 {
    font-size: 14px !important;
  }

  .content-area {
    padding: 10px !important;
  }

  /* Auth card: edge-to-edge on tiny screens */
  .auth-card {
    padding: 32px 20px !important;
    border-radius: 8px !important;
  }
}
