/* PetUnion Hub Admin Control Center CSS */
:root {
  --admin-primary: #A0522D;
  --admin-primary-hover: #8B4513;
  --admin-primary-light: rgba(160, 82, 45, 0.1);
  --admin-secondary: #43aa8b;
  --admin-accent: #F8961E;
  --admin-danger: #e63946;
  --admin-warning: #f4a261;
  --admin-info: #457b9d;
  --admin-success: #2a9d8f;

  --sidebar-bg: #1A1D20;
  --sidebar-hover: #262B30;
  --sidebar-text: #E0E2E5;
  --sidebar-muted: #8E959E;

  --bg-main: #F4F6F9;
  --surface: #FFFFFF;
  --surface-border: #E5E9F0;
  --text-main: #23272E;
  --text-muted: #6C757D;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.12);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.25s ease;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* App Layout */
#admin-app {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.admin-sidebar {
  width: 280px;
  min-width: 280px;
  height: 100vh;
  max-height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
  user-select: none;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  flex-shrink: 0;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-sidebar-close {
  display: none;
  background: transparent;
  border: none;
  color: var(--sidebar-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}
.btn-sidebar-close:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--admin-primary), var(--admin-accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(160, 82, 45, 0.35);
}

.sidebar-brand-text h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.sidebar-brand-text span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--admin-secondary);
  font-weight: 600;
}

.sidebar-nav {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px 28px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

.nav-category {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--sidebar-muted);
  padding: 14px 12px 6px 12px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.sidebar-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-item.active {
  background: linear-gradient(90deg, rgba(160, 82, 45, 0.9), rgba(160, 82, 45, 0.7));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(160, 82, 45, 0.25);
}

.sidebar-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  color: var(--sidebar-muted);
  transition: var(--transition);
}

.sidebar-item:hover i, .sidebar-item.active i {
  color: #fff;
}

.sidebar-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 14px 18px;
  background: #14171a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.user-profile-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--admin-primary);
}

.user-name-mini {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.user-role-mini {
  font-size: 0.72rem;
  color: var(--sidebar-muted);
  text-transform: capitalize;
}

.role-owner-badge {
  color: #F8961E !important;
  font-weight: 700 !important;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
}

.btn-sidebar-icon {
  background: transparent;
  border: none;
  color: var(--sidebar-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-sidebar-icon:hover {
  background: var(--sidebar-hover);
  color: var(--admin-danger);
}

/* Main Content Area */
.admin-main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Top Navbar */
.admin-topbar {
  height: 70px;
  min-height: 70px;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
}

.btn-sidebar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}
.btn-sidebar-toggle:hover {
  background: #f1f5f9;
  color: var(--admin-primary);
}

.sidebar-mobile-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  z-index: 95;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Viewport Preview Toggle Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--admin-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--admin-primary-hover);
  box-shadow: 0 4px 12px rgba(160, 82, 45, 0.25);
}

.btn-secondary {
  background: var(--admin-secondary);
  color: #fff;
}
.btn-secondary:hover {
  background: #378b71;
}

.btn-outline {
  background: transparent;
  border-color: var(--surface-border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon:hover {
  background: #f8fafc;
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}

/* Content Container */
.admin-content-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

/* Dashboard Cards & Layout */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-icon-primary {
  background: rgba(160, 82, 45, 0.12);
  color: var(--admin-primary);
}
.stat-icon-success {
  background: rgba(67, 170, 139, 0.15);
  color: var(--admin-secondary);
}
.stat-icon-warning {
  background: rgba(248, 150, 30, 0.15);
  color: var(--admin-accent);
}
.stat-icon-danger {
  background: rgba(230, 57, 70, 0.15);
  color: var(--admin-danger);
}

.stat-data h3 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}
.stat-data p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Panel Cards */
.admin-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 24px;
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--surface-border);
}

.admin-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}
.admin-card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Forms & Inputs */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media(max-width: 900px) {
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-group label.space-between,
.label-with-action {
  justify-content: space-between;
}

.form-control {
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: #FAFAFA;
  color: var(--text-main);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--admin-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(160, 82, 45, 0.12);
}

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

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Tables */
.admin-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
}

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

.admin-table th {
  background: #F8FAFC;
  padding: 14px 18px;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid var(--surface-border);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.6px;
}

.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--surface-border);
  color: var(--text-main);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #FBFBFB;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-success { background: rgba(67, 170, 139, 0.15); color: #2d8a6f; }
.badge-warning { background: rgba(248, 150, 30, 0.15); color: #d97706; }
.badge-danger { background: rgba(230, 57, 70, 0.15); color: #dc2626; }
.badge-info { background: rgba(69, 123, 157, 0.15); color: #2b6cb0; }
.badge-muted { background: #e2e8f0; color: #475569; }
.badge-owner {
  background: linear-gradient(135deg, rgba(248, 150, 30, 0.18), rgba(160, 82, 45, 0.22));
  color: #B45309;
  border: 1px solid rgba(248, 150, 30, 0.4);
  font-weight: 700;
}

/* Tabs Navigation */
.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 24px;
}

.admin-tab {
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.admin-tab:hover {
  color: var(--admin-primary);
}

.admin-tab.active {
  color: var(--admin-primary);
  border-bottom-color: var(--admin-primary);
}

/* Split View for Visual Customizer / Preview */
.live-preview-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 50vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--surface-border);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-preview-drawer.open {
  right: 0;
}

.preview-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
}

.preview-devices {
  display: flex;
  background: #e2e8f0;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.device-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  cursor: pointer;
  color: #475569;
  font-weight: 600;
  transition: var(--transition);
}
.device-btn.active {
  background: #fff;
  color: var(--admin-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.preview-iframe-container {
  flex: 1;
  display: flex;
  justify-content: center;
  background: #E2E8F0;
  padding: 20px;
  overflow: auto;
}

.preview-iframe {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: width 0.3s ease;
  height: 100%;
}

.preview-iframe.desktop { width: 100%; }
.preview-iframe.tablet { width: 768px; }
.preview-iframe.mobile { width: 375px; }

/* Media Gallery Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.media-card {
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.media-card:hover {
  border-color: var(--admin-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.media-card.selected {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(160, 82, 45, 0.25);
}

.media-thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background: #f1f5f9;
}

.media-info {
  padding: 10px;
}
.media-info-name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-info-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Modals */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.admin-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-modal {
  background: var(--surface);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.admin-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.admin-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--surface-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #F8FAFC;
}

/* Toast Notification */
#admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 22px;
  background: #1e293b;
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}
#admin-toast.success { background: #065f46; }
#admin-toast.error { background: #991b1b; }
#admin-toast.warning { background: #b45309; }

/* SEO Score Meter */
.seo-score-meter {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  margin-bottom: 24px;
}
.seo-gauge {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-heading);
}
.seo-gauge.green { color: #10b981; }
.seo-gauge.yellow { color: #f59e0b; }
.seo-gauge.red { color: #ef4444; }

.seo-issue-item {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  font-size: 0.88rem;
}
.seo-issue-critical {
  background: #FEF2F2;
  border-left: 4px solid #ef4444;
}
.seo-issue-warning {
  background: #FFFBEB;
  border-left: 4px solid #f59e0b;
}
.seo-issue-passed {
  background: #F0FDF4;
  border-left: 4px solid #10b981;
}

/* Homepage Builder Section Item */
.hp-section-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: #fff;
  transition: var(--transition);
}
.hp-section-item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}
.hp-section-drag {
  cursor: grab;
  color: var(--text-muted);
  margin-right: 12px;
  font-size: 1.1rem;
}

/* ========================================================
   SEO AUDIT DASHBOARD SUITE STYLES
   ======================================================== */
.audit-control-bar {
  background: var(--surface);
  padding: 18px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.audit-input-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1 1 550px;
}
.audit-input-group label {
  white-space: nowrap;
}
.audit-input-group input {
  flex: 1 1 200px;
  min-width: 180px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: #F8FAFC;
}
.audit-input-group input:focus {
  outline: none;
  border-color: var(--admin-primary);
  background: #fff;
}
.audit-input-group select {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  font-size: 0.92rem;
  background: #fff;
  cursor: pointer;
}
.audit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Real-Time Progress Bar */
.audit-progress-banner {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.3s ease;
}
.audit-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.audit-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}
.audit-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  border-radius: 6px;
  transition: width 0.3s ease;
}
.audit-progress-status-text {
  font-size: 0.85rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}

/* Health Score Overview Card */
.health-score-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 900px) {
  .health-score-container {
    grid-template-columns: 1fr;
  }
}
.score-badge-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  padding: 24px;
  background: #F8FAFC;
  border: 1px solid var(--surface-border);
  text-align: center;
}
.score-number {
  font-size: 4rem;
  font-weight: 800;
  font-family: var(--font-heading);
  line-height: 1;
  margin-bottom: 4px;
}
.score-grade {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.score-green { color: #10b981; }
.score-yellow { color: #f59e0b; }
.score-red { color: #ef4444; }

.score-stats-breakdown {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.score-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.score-stat-box {
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--surface-border);
  text-align: center;
}
.score-stat-box h4 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.score-stat-box p {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}

/* Severity Pill Bar */
.severity-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
}
.sev-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}
.sev-critical { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.sev-high { background: #FFEDD5; color: #9A3412; border: 1px solid #FDBA74; }
.sev-medium { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
.sev-low { background: #E0F2FE; color: #075985; border: 1px solid #BAE6FD; }

/* Filter & Search Bar */
.audit-toolbar {
  background: var(--surface);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.audit-search-input {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  font-size: 0.88rem;
  min-width: 240px;
  background: #F8FAFC;
}
.audit-filter-select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  font-size: 0.85rem;
  background: #fff;
  cursor: pointer;
}

/* Findings Card Layout */
.audit-finding-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}
.audit-finding-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}
.audit-finding-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  user-select: none;
}
.audit-finding-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}
.audit-finding-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.audit-finding-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.audit-finding-url {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: monospace;
  word-break: break-all;
}
.audit-finding-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.status-badge-pass { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.status-badge-fail { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.status-badge-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.status-badge-manual { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.status-badge-na { background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; }
.status-badge-not_tested { background: #F8FAFC; color: #64748B; border: 1px solid #CBD5E1; }

/* Finding Accordion Body */
.audit-finding-body {
  padding: 20px;
  border-top: 1px solid var(--surface-border);
  background: #FAFBFD;
  display: none;
}
.audit-finding-body.open {
  display: block;
}
.audit-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .audit-detail-grid { grid-template-columns: 1fr; }
}
.audit-detail-box {
  background: #fff;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.audit-detail-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.4px;
}
.audit-detail-val {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
  word-break: break-word;
}
.audit-evidence-box {
  background: #fff;
  border-left: 4px solid var(--admin-info);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.6;
}
.audit-fix-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--surface-border);
}
.audit-fix-rec {
  flex: 1;
  font-size: 0.86rem;
  color: #475569;
}

/* Rich Blog Editor Viewport Mode - Full Window 3-Column Experience */
.admin-content-viewport.editor-viewport-mode {
  padding: 0 !important;
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  display: flex !important;
  flex-direction: column !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 500 !important;
  background: #F8FAFC !important;
}

/* ========================================================
   RESPONSIVE LAYOUT & MOBILE DRAWER NAVIGATION
   ======================================================== */
@media (max-width: 992px) {
  .btn-sidebar-toggle {
    display: inline-flex;
  }
  .btn-sidebar-close {
    display: inline-flex;
  }
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 1000;
  }
  #admin-app.sidebar-mobile-open .admin-sidebar {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.6);
  }
  #admin-app.sidebar-mobile-open .sidebar-mobile-backdrop {
    display: block;
    opacity: 1;
  }
  .admin-topbar {
    padding: 0 16px;
    height: 60px;
    min-height: 60px;
  }
  .topbar-title {
    font-size: 1.12rem;
  }
  .admin-content-viewport {
    padding: 18px 14px;
  }
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
  }
}

@media (max-width: 640px) {
  .topbar-right .btn span,
  .topbar-right #backend-status-text {
    display: none;
  }
  .topbar-right .btn {
    padding: 6px 10px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}



