/* =============================================================
   SEO Hub — Front-end Design System
   Reprend les variables et composants de admin-global.css
   pour une utilisation hors wp-admin.
   ============================================================= */

:root {
  /* Colors */
  --sh-primary:        #4F46E5;
  --sh-primary-hover:  #4338CA;
  --sh-primary-light:  #EEF2FF;
  --sh-success:        #10B981;
  --sh-success-light:  #D1FAE5;
  --sh-warning:        #F59E0B;
  --sh-warning-light:  #FEF3C7;
  --sh-danger:         #EF4444;
  --sh-danger-light:   #FEE2E2;
  --sh-gray-50:        #F9FAFB;
  --sh-gray-100:       #F3F4F6;
  --sh-gray-200:       #E5E7EB;
  --sh-gray-300:       #D1D5DB;
  --sh-gray-400:       #9CA3AF;
  --sh-gray-500:       #6B7280;
  --sh-gray-600:       #4B5563;
  --sh-gray-700:       #374151;
  --sh-gray-800:       #1F2937;
  --sh-gray-900:       #111827;

  /* Spacing scale (4px base) */
  --sh-space-1:  4px;
  --sh-space-2:  8px;
  --sh-space-3:  12px;
  --sh-space-4:  16px;
  --sh-space-5:  20px;
  --sh-space-6:  24px;
  --sh-space-8:  32px;
  --sh-space-10: 40px;
  --sh-space-12: 48px;
  --sh-space-16: 64px;

  /* Typography scale */
  --sh-text-xs:   11px;
  --sh-text-sm:   12.5px;
  --sh-text-base: 13.5px;
  --sh-text-md:   14px;
  --sh-text-lg:   16px;
  --sh-text-xl:   18px;
  --sh-text-2xl:  22px;
  --sh-text-3xl:  28px;

  /* Radius */
  --sh-radius-sm:  6px;
  --sh-radius:     8px;
  --sh-radius-lg:  12px;
  --sh-radius-xl:  16px;

  /* Shadows (soft multi-layer) */
  --sh-shadow:     0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
  --sh-shadow-md:  0 2px 4px rgba(0,0,0,.04), 0 4px 8px rgba(0,0,0,.06);
  --sh-shadow-lg:  0 4px 8px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.08);
  --sh-shadow-xl:  0 8px 16px rgba(0,0,0,.06), 0 16px 48px rgba(0,0,0,.1);

  /* Transitions */
  --sh-transition:      0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sh-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sh-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sh-sidebar-w:  260px;
}

/* =============================================================
   Reset & base
   ============================================================= */
.seohub-app *, .seohub-login-page * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.seohub-app, .seohub-login-page {
  font-family: var(--sh-font);
  color: var(--sh-gray-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Focus-visible for accessibility */
.seohub-app :focus-visible {
  outline: 2px solid var(--sh-primary);
  outline-offset: 2px;
  border-radius: var(--sh-radius-sm);
}

.seohub-app input:focus-visible,
.seohub-app select:focus-visible,
.seohub-app textarea:focus-visible {
  outline: none; /* handled by .sh-form-control:focus */
}

/* Animations */
@keyframes sh-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sh-backdrop-in {
  from { background: rgba(0,0,0,0); }
  to   { background: rgba(0,0,0,0.4); }
}

@keyframes sh-modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes sh-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   App Layout (sidebar + main)
   ============================================================= */
.seohub-app {
  display: flex;
  min-height: 100vh;
  background: var(--sh-gray-50);
}

/* ===== Sidebar ===== */
.seohub-front-sidebar {
  width: var(--sh-sidebar-w);
  background: #fff;
  border-right: 1px solid var(--sh-gray-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform .25s ease;
}

.sh-front-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--sh-gray-100);
}

.sh-front-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sh-primary);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.sh-front-logo--lg {
  font-size: 24px;
  gap: 12px;
}

.sh-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sh-gray-400);
  padding: 4px;
}
.sh-sidebar-toggle:hover { color: var(--sh-gray-700); }

/* Navigation */
.sh-front-nav {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sh-front-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--sh-radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--sh-gray-600);
  text-decoration: none;
  transition: all .15s;
}

.sh-front-nav-link:hover {
  background: var(--sh-gray-50);
  color: var(--sh-gray-900);
}

.sh-front-nav-link.active {
  background: var(--sh-primary-light);
  color: var(--sh-primary);
  font-weight: 600;
}

.sh-front-nav-link svg {
  flex-shrink: 0;
}

/* Sidebar indicator badges */
.sh-sidebar-badge {
  display: none;
  margin-left: auto;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  background: var(--sh-primary-light);
  color: var(--sh-primary);
  border-radius: 10px;
  line-height: 1.5;
}
.sh-sidebar-badge.active { display: inline-flex; }

.sh-sidebar-dot {
  display: none;
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sh-sidebar-dot.active { display: inline-block; }
.sh-sidebar-dot--fresh { background: var(--sh-success); }
.sh-sidebar-dot--stale { background: var(--sh-warning); }
.sh-sidebar-dot--old   { background: var(--sh-danger); }

.sh-nav-disabled {
  opacity: .45;
  cursor: default;
  pointer-events: none;
}

.sh-nav-disabled .sh-badge {
  font-size: 9px;
}

.sh-front-nav-separator {
  height: 1px;
  background: var(--sh-gray-100);
  margin: 4px 16px;
}

/* --- Sidebar section label --- */
.sh-sidebar-section-label {
  padding: 14px 16px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sh-gray-400);
  user-select: none;
}

/* --- Client Switcher (dropdown trigger) --- */
.sh-client-switcher-wrap {
  position: relative;
  margin: 0 10px 4px;
}
.sh-client-switcher {
  padding: 8px 10px;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color var(--sh-transition-fast), background var(--sh-transition-fast);
  background: #fff;
  user-select: none;
  outline: none;
}
.sh-client-switcher:hover {
  border-color: var(--sh-gray-300);
  background: var(--sh-gray-50);
}
.sh-client-switcher:focus-visible {
  border-color: var(--sh-primary);
  box-shadow: 0 0 0 2px rgba(79,70,229,0.15);
}
.sh-client-switcher--open {
  border-color: var(--sh-primary);
  background: var(--sh-gray-50);
}
.sh-client-switcher--active {
  border-color: var(--sh-primary);
  background: var(--sh-primary-light);
}
.sh-client-switcher__avatar {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: var(--sh-radius-sm);
  background: var(--sh-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sh-client-switcher__info {
  flex: 1;
  min-width: 0;
}
.sh-client-switcher__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--sh-gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-client-switcher__placeholder {
  font-size: 12.5px;
  color: var(--sh-gray-400);
}
.sh-client-switcher__chevron {
  flex-shrink: 0;
  color: var(--sh-gray-400);
  transition: transform var(--sh-transition-fast);
}
.sh-client-switcher--open .sh-client-switcher__chevron {
  transform: rotate(180deg);
}

/* --- Client Dropdown Panel --- */
.sh-client-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius);
  box-shadow: var(--sh-shadow-lg);
  z-index: 120;
  max-height: 320px;
  overflow: hidden;
  flex-direction: column;
}
.sh-client-dropdown--open {
  display: flex;
}
.sh-client-dropdown__search {
  padding: 8px;
  border-bottom: 1px solid var(--sh-gray-100);
  flex-shrink: 0;
}
.sh-client-dropdown__search input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius-sm);
  font-size: 12.5px;
  font-family: var(--sh-font);
  outline: none;
  transition: border-color var(--sh-transition-fast);
  box-sizing: border-box;
}
.sh-client-dropdown__search input:focus {
  border-color: var(--sh-primary);
}
.sh-client-dropdown__list {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0;
}
.sh-client-dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  transition: background var(--sh-transition-fast);
  font-size: 13px;
  color: var(--sh-gray-700);
}
.sh-client-dropdown__item:hover {
  background: var(--sh-gray-50);
}
.sh-client-dropdown__item--active {
  background: var(--sh-primary-light);
  color: var(--sh-primary);
}
.sh-client-dropdown__item-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-client-dropdown__item-url {
  font-size: 11px;
  color: var(--sh-gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-client-dropdown__empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--sh-gray-400);
}

/* --- Contextual nav (scoped to client) --- */
.sh-front-nav--contextual {
  padding-top: 4px;
}
.sh-nav-context-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.sh-front-nav-admin .sh-front-nav-link {
  font-size: 13px;
  color: var(--sh-gray-400);
}
.sh-front-nav-admin .sh-front-nav-link:hover {
  color: var(--sh-gray-600);
}

/* User menu (bottom) */
.sh-front-user-menu {
  margin-top: auto;
  padding: var(--sh-space-4);
  border-top: 1px solid var(--sh-gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sh-space-3);
}

.sh-front-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sh-front-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sh-front-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--sh-gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-front-user-email {
  font-size: 11px;
  color: var(--sh-gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-front-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--sh-radius);
  color: var(--sh-gray-400);
  text-decoration: none;
  flex-shrink: 0;
  transition: all .15s;
}

.sh-front-logout:hover {
  background: var(--sh-danger-light);
  color: var(--sh-danger);
}

/* ===== Main content ===== */
.seohub-front-main {
  flex: 1;
  margin-left: var(--sh-sidebar-w);
  padding: 32px;
  min-height: 100vh;
  min-width: 0;
}

/* ===== Mobile header ===== */
.seohub-mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--sh-gray-200);
  padding: 0 16px;
  align-items: center;
  gap: 12px;
  z-index: 90;
}

.sh-mobile-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sh-gray-600);
  padding: 4px;
}

/* ===== Mobile overlay ===== */
.seohub-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 99;
}
.seohub-sidebar-overlay.active { display: block; }

/* =============================================================
   Responsive (mobile < 768px)
   ============================================================= */
@media (max-width: 768px) {
  .seohub-front-sidebar {
    transform: translateX(-100%);
  }
  .seohub-front-sidebar.open {
    transform: translateX(0);
    z-index: 200;
  }

  .sh-sidebar-toggle {
    display: flex;
  }

  .seohub-mobile-header {
    display: flex;
  }

  .seohub-front-main {
    margin-left: 0;
    padding: 72px 16px 24px;
  }
}

/* =============================================================
   Login page
   ============================================================= */
.seohub-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sh-gray-50);
  padding: 20px;
}

.seohub-login-card {
  background: #fff;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius-lg);
  box-shadow: var(--sh-shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
}

.seohub-login-header {
  text-align: center;
  margin-bottom: 32px;
}

.seohub-login-header .sh-front-logo {
  justify-content: center;
  margin-bottom: 12px;
}

.seohub-login-subtitle {
  font-size: 14px;
  color: var(--sh-gray-500);
}

.seohub-login-form .sh-form-group { margin-bottom: 18px; }

.seohub-login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 13px;
}

.seohub-login-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--sh-gray-600);
  cursor: pointer;
}

.seohub-login-remember input {
  accent-color: var(--sh-primary);
}

.seohub-login-forgot {
  color: var(--sh-primary);
  text-decoration: none;
  font-weight: 500;
}
.seohub-login-forgot:hover { text-decoration: underline; }

/* =============================================================
   Shared components (repris de admin-global.css)
   ============================================================= */

/* Page header */
.sh-front-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sh-space-8);
  gap: var(--sh-space-4);
}

.sh-front-page-header h1 {
  font-size: var(--sh-text-2xl);
  font-weight: 800;
  color: var(--sh-gray-900);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.sh-front-page-header p {
  font-size: var(--sh-text-md);
  color: var(--sh-gray-400);
  margin: var(--sh-space-1) 0 0;
}
.sh-front-page-header__actions {
  display: flex;
  align-items: center;
  gap: var(--sh-space-2);
  flex-shrink: 0;
}

/* Buttons */
.sh-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sh-space-2);
  padding: 8px 16px;
  border-radius: var(--sh-radius);
  font-size: var(--sh-text-base);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--sh-transition-fast);
  line-height: 1.4;
  font-family: var(--sh-font);
  white-space: nowrap;
}

.sh-btn:active:not(:disabled) { transform: scale(0.97); }

.sh-btn--primary {
  background: var(--sh-primary);
  color: #fff;
  border-color: var(--sh-primary);
  box-shadow: 0 1px 2px rgba(79,70,229,.3);
}
.sh-btn--primary:hover {
  background: var(--sh-primary-hover);
  color: #fff;
  box-shadow: 0 2px 4px rgba(79,70,229,.3);
}

.sh-btn--secondary {
  background: #fff;
  color: var(--sh-gray-700);
  border-color: var(--sh-gray-200);
}
.sh-btn--secondary:hover {
  background: var(--sh-gray-50);
  color: var(--sh-gray-900);
  border-color: var(--sh-gray-300);
}

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

.sh-btn--sm { padding: 5px 10px; font-size: var(--sh-text-sm); }
.sh-btn--lg { padding: 12px 24px; font-size: 15px; }
.sh-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Forms */
.sh-form-group { margin-bottom: 18px; }

.sh-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--sh-gray-700);
  margin-bottom: 6px;
}

.sh-form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius);
  font-size: var(--sh-text-base);
  color: var(--sh-gray-800);
  background: #fff;
  transition: all var(--sh-transition-fast);
  font-family: var(--sh-font);
}

.sh-form-control::placeholder { color: var(--sh-gray-300); }
.sh-form-control:hover:not(:focus) { border-color: var(--sh-gray-300); }

.sh-form-control:focus {
  outline: none;
  border-color: var(--sh-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

select.sh-form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Cards */
.sh-card {
  background: #fff;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius-lg);
  box-shadow: var(--sh-shadow);
  padding: 24px;
}

/* Client cards (dashboard) */
.sh-client-card {
  background: #fff;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius-lg);
  box-shadow: var(--sh-shadow);
  transition: all var(--sh-transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.sh-client-card:hover {
  box-shadow: var(--sh-shadow-lg);
  border-color: var(--sh-primary);
  transform: translateY(-2px);
}

/* Accent gradient bar */
.sh-client-card__accent {
  height: 3px;
  background: linear-gradient(90deg, var(--sh-primary) 0%, #818CF8 100%);
}

/* Body wrapper */
.sh-client-card__body {
  padding: var(--sh-space-5) var(--sh-space-5) var(--sh-space-4);
  position: relative;
}

/* Hover-only actions overlay */
.sh-client-card__actions {
  position: absolute;
  top: var(--sh-space-3);
  right: var(--sh-space-3);
  display: flex;
  gap: var(--sh-space-1);
  opacity: 0;
  transform: translateY(-4px);
  transition: all var(--sh-transition-fast);
}

.sh-client-card:hover .sh-client-card__actions {
  opacity: 1;
  transform: translateY(0);
}

/* Icon action buttons (28px squares) */
.sh-client-card__action-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--sh-radius-sm);
  border: 1px solid var(--sh-gray-200);
  background: #fff;
  color: var(--sh-gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--sh-transition-fast);
  padding: 0;
  box-shadow: var(--sh-shadow);
}

.sh-client-card__action-btn:hover {
  background: var(--sh-gray-50);
  color: var(--sh-gray-700);
  border-color: var(--sh-gray-300);
}

.sh-client-card__action-btn--danger:hover {
  background: var(--sh-danger-light);
  color: var(--sh-danger);
  border-color: var(--sh-danger);
}

/* Top section: avatar + info */
.sh-client-card__top {
  display: flex;
  align-items: center;
  gap: var(--sh-space-3);
  margin-bottom: var(--sh-space-3);
}

/* Avatar initials */
.sh-client-card__avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--sh-radius);
  background: var(--sh-primary-light);
  color: var(--sh-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--sh-text-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  user-select: none;
}

/* Info block */
.sh-client-card__info {
  min-width: 0;
  flex: 1;
}

.sh-client-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--sh-gray-900);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-client-card__brand {
  font-size: var(--sh-text-sm);
  color: var(--sh-gray-400);
  margin: 1px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* URL */
.sh-client-card__url {
  font-size: var(--sh-text-sm);
  color: var(--sh-gray-400);
  margin: 0 0 var(--sh-space-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Meta badges */
.sh-client-card__meta {
  display: flex;
  gap: var(--sh-space-2);
  flex-wrap: wrap;
}

/* Grid */
.sh-grid { display: grid; gap: 20px; }
.sh-grid-2 { grid-template-columns: repeat(2, 1fr); }
.sh-grid-3 { grid-template-columns: repeat(3, 1fr); }
.sh-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1200px) { .sh-grid-4, .sh-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .sh-grid-3, .sh-grid-2 { grid-template-columns: 1fr; } }

/* Badges */
.sh-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--sh-text-xs);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.sh-badge--green  { background: var(--sh-success-light); color: #065F46; }
.sh-badge--orange { background: var(--sh-warning-light); color: #92400E; }
.sh-badge--red    { background: var(--sh-danger-light);  color: #991B1B; }
.sh-badge--gray   { background: var(--sh-gray-100);      color: var(--sh-gray-600); }
.sh-badge--purple { background: var(--sh-primary-light); color: #3730A3; }
.sh-badge--blue   { background: #DBEAFE; color: #1E40AF; }
.sh-badge--xs     { padding: 1px 6px; font-size: 10px; }

/* Alerts */
.sh-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--sh-radius);
  font-size: 13.5px;
  margin-bottom: 20px;
}

.sh-alert--success { background: var(--sh-success-light); color: #065F46; border: 1px solid #A7F3D0; }
.sh-alert--warning { background: var(--sh-warning-light); color: #92400E; border: 1px solid #FDE68A; }
.sh-alert--error   { background: var(--sh-danger-light);  color: #991B1B; border: 1px solid #FCA5A5; }
.sh-alert--info    { background: var(--sh-primary-light); color: #3730A3; border: 1px solid #C7D2FE; }

/* Skeleton loaders */
@keyframes sh-skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.sh-skeleton {
  background: var(--sh-gray-200);
  border-radius: var(--sh-radius);
  animation: sh-skeleton-pulse 1.5s ease-in-out infinite;
}

.sh-skeleton--text    { height: 14px; margin-bottom: 8px; }
.sh-skeleton--text-lg { height: 20px; margin-bottom: 10px; }
.sh-skeleton--heading { height: 28px; width: 200px; margin-bottom: 12px; }
.sh-skeleton--kpi     { height: 80px; border-radius: var(--sh-radius-lg); }
.sh-skeleton--chart   { height: 280px; border-radius: var(--sh-radius-lg); }
.sh-skeleton--row     { height: 44px; margin-bottom: 4px; border-radius: var(--sh-radius-sm); }
.sh-skeleton--card    { height: 160px; border-radius: var(--sh-radius-lg); }
.sh-skeleton--avatar  { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.sh-skeleton--pill    { height: 30px; border-radius: 6px; }

/* Spinner */
.sh-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--sh-gray-200);
  border-top-color: var(--sh-primary);
  border-radius: 50%;
  animation: sh-spin .7s linear infinite;
}

@keyframes sh-spin { to { transform: rotate(360deg); } }

.sh-spinner--lg { width: 32px; height: 32px; border-width: 3px; }
.sh-spinner--sm { width: 14px; height: 14px; border-width: 2px; }
.sh-spinner--xs { width: 12px; height: 12px; border-width: 1.5px; }

.sh-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px;
  color: var(--sh-gray-500);
  font-size: 14px;
}

/* Empty state */
.sh-empty {
  text-align: center;
  padding: var(--sh-space-16) var(--sh-space-8);
  color: var(--sh-gray-400);
}

.sh-empty svg { color: var(--sh-gray-300); margin-bottom: var(--sh-space-2); }

.sh-empty h3 {
  font-size: var(--sh-text-lg);
  font-weight: 600;
  color: var(--sh-gray-600);
  margin: var(--sh-space-3) 0 var(--sh-space-2);
}

.sh-empty p {
  font-size: var(--sh-text-md);
  color: var(--sh-gray-400);
  margin: 0 0 var(--sh-space-6);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Modal */
.sh-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: sh-backdrop-in 0.2s ease forwards;
}

.sh-modal {
  background: #fff;
  border-radius: var(--sh-radius-xl);
  box-shadow: var(--sh-shadow-xl);
  width: 560px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 99999;
  animation: sh-modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sh-modal--lg { width: 800px; max-width: 95vw; }
.sh-modal--xl { width: 1200px; max-width: 95vw; }

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

.sh-modal-header h3 { margin: 0; font-size: 16px; font-weight: 700; }

.sh-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sh-gray-400);
  font-size: 20px;
  line-height: 1;
  padding: 4px;
}
.sh-modal-close:hover { color: var(--sh-gray-700); }

.sh-modal-body { padding: 24px; overflow: auto; max-height: 70vh; }

.sh-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--sh-gray-100);
}

/* Utilities */
.sh-w-full { width: 100%; }
.sh-hidden { display: none !important; }
.sh-flex { display: flex; }
.sh-items-center { align-items: center; }
.sh-gap-2 { gap: 8px; }
.sh-gap-3 { gap: 12px; }
.sh-justify-between { justify-content: space-between; }
.sh-mb-4 { margin-bottom: 16px; }
.sh-mb-6 { margin-bottom: 24px; }
.sh-text-muted { color: var(--sh-gray-400); }
.sh-text-sm { font-size: 12.5px; }
.sh-mb-0 { margin-bottom: 0; }

/* =============================================================
   Card header
   ============================================================= */
.sh-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--sh-gray-100);
}

.sh-card-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--sh-gray-800);
  margin: 0;
}

/* =============================================================
   Tables
   ============================================================= */
.sh-table-wrap { overflow-x: auto; }

.sh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.sh-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--sh-gray-400);
  background: var(--sh-gray-50);
  border-bottom: 1px solid var(--sh-gray-200);
}

.sh-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sh-gray-100);
  color: var(--sh-gray-700);
  vertical-align: middle;
}

.sh-table tr:last-child td { border-bottom: none; }
.sh-table tbody tr { transition: background-color var(--sh-transition-fast); }
.sh-table tbody tr:hover td { background: var(--sh-gray-50); }

/* =============================================================
   Stepper (briefs pipeline)
   ============================================================= */
.sh-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.sh-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}

.sh-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--sh-gray-200);
  z-index: 0;
}

.sh-step.done:not(:last-child)::after { background: var(--sh-primary); }

.sh-step__dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sh-gray-200);
  color: var(--sh-gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--sh-text-md);
  font-weight: 700;
  position: relative;
  z-index: 1;
  transition: all var(--sh-transition);
}

.sh-step.active .sh-step__dot {
  background: var(--sh-primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(79,70,229,.15);
}

.sh-step.done .sh-step__dot { background: var(--sh-success); color: #fff; }

.sh-step__label {
  font-size: var(--sh-text-sm);
  font-weight: 500;
  color: var(--sh-gray-400);
  text-align: center;
}

.sh-step.active .sh-step__label { color: var(--sh-primary); font-weight: 600; }
.sh-step.done   .sh-step__label { color: var(--sh-success); }

/* =============================================================
   Markdown preview
   ============================================================= */
.sh-markdown-preview h1 { font-size: 20px; margin: 16px 0 10px; font-weight: 700; }
.sh-markdown-preview h2 { font-size: 17px; margin: 14px 0 8px; color: var(--sh-gray-800); font-weight: 600; }
.sh-markdown-preview h3 { font-size: 15px; margin: 12px 0 6px; color: var(--sh-gray-700); font-weight: 600; }
.sh-markdown-preview h4 { font-size: 14px; margin: 10px 0 5px; color: var(--sh-gray-600); font-weight: 600; }
.sh-markdown-preview p { margin: 0 0 10px; }
.sh-markdown-preview ul, .sh-markdown-preview ol { padding-left: 20px; margin-bottom: 10px; }
.sh-markdown-preview li { margin-bottom: 4px; }
.sh-markdown-preview strong { color: var(--sh-gray-900); }
.sh-markdown-preview em { color: var(--sh-gray-500); font-style: italic; }
.sh-markdown-preview code { background: var(--sh-gray-100); padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.sh-markdown-preview pre { background: var(--sh-gray-50); padding: 12px; border-radius: 6px; overflow-x: auto; margin-bottom: 12px; }
.sh-markdown-preview pre code { background: none; padding: 0; }
.sh-markdown-preview table { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 13px; }
.sh-markdown-preview th, .sh-markdown-preview td { padding: 6px 10px; border: 1px solid var(--sh-gray-200); text-align: left; }
.sh-markdown-preview th { background: var(--sh-gray-50); font-weight: 600; }
.sh-markdown-preview hr { border: none; border-top: 1px solid var(--sh-gray-200); margin: 16px 0; }
.sh-markdown-preview blockquote { border-left: 3px solid var(--sh-primary); padding-left: 12px; margin: 12px 0; color: var(--sh-gray-600); }

/* Editor split (markdown source + preview) */
.sh-editor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .sh-editor-split { grid-template-columns: 1fr; }
}

/* Editor textarea (monospace code editor feel) */
.sh-editor-textarea {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: var(--sh-text-sm);
  line-height: 1.6;
  tab-size: 2;
  resize: vertical;
}

/* Markdown preview panel */
.sh-markdown-preview-panel {
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius);
  padding: var(--sh-space-4);
  max-height: 600px;
  overflow-y: auto;
  background: #fff;
}

/* Monospace form control (GSC textarea, code snippets) */
.sh-form-control--mono {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: var(--sh-text-xs);
  line-height: 1.5;
}

/* Compact form control (bulk table, inline forms) */
.sh-form-control--sm {
  padding: 5px 8px;
  font-size: var(--sh-text-sm);
}

/* Status select styled as inline badge */
.sh-status-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
  padding: 3px 22px 3px 8px;
  border-radius: 999px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 10px;
  transition: box-shadow 0.15s ease;
}
.sh-status-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--sh-primary-light);
}

/* =============================================================
   Responsive: tables + stepper on mobile
   ============================================================= */
@media (max-width: 900px) {
  .sh-stepper { gap: 0; }
  .sh-step__label { font-size: 10px; }
  .sh-step__dot { width: 30px; height: 30px; font-size: 12px; }
  .sh-step:not(:last-child)::after { top: 15px; }
}

@media (max-width: 600px) {
  .sh-stepper { flex-wrap: wrap; gap: 8px; }
  .sh-step:not(:last-child)::after { display: none; }
}

/* =============================================================
   Pipeline mini-stepper (6-step data pipeline)
   ============================================================= */
.sh-pipeline-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sh-space-4) var(--sh-space-3);
  background: #fff;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius-lg);
  box-shadow: var(--sh-shadow);
  gap: 4px;
}

.sh-pipe-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sh-gray-400);
  opacity: .45;
  transition: all .3s ease;
  white-space: nowrap;
}

.sh-pipe-step.sh-pipe-active {
  opacity: 1;
  color: var(--sh-primary);
  font-weight: 600;
}

.sh-pipe-step.sh-pipe-done {
  opacity: 1;
  color: var(--sh-success);
}

.sh-pipe-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.sh-pipe-step.sh-pipe-active .sh-pipe-dot {
  border-color: var(--sh-primary);
  border-top-color: transparent;
  animation: sh-spin .8s linear infinite;
}

.sh-pipe-step.sh-pipe-done .sh-pipe-dot {
  background: var(--sh-success);
  border-color: var(--sh-success);
  color: #fff;
}

.sh-pipe-step.sh-pipe-done .sh-pipe-dot::after {
  content: '\2713';
  font-size: 11px;
  font-weight: 700;
}

.sh-pipe-label {
  font-size: 12px;
}

@media (max-width: 900px) {
  .sh-pipeline-stepper { gap: 2px; }
  .sh-pipe-label { display: none; }
}

@media (max-width: 600px) {
  .sh-pipeline-stepper { flex-wrap: wrap; gap: 8px; }
  .sh-pipe-label { display: inline; font-size: 11px; }
}

/* =============================================================
   Metric boxes (keyword overview stats)
   ============================================================= */
.sh-metric-box {
  flex: 1;
  min-width: 110px;
  padding: var(--sh-space-4) var(--sh-space-3);
  background: var(--sh-gray-50);
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius);
  text-align: center;
  transition: box-shadow var(--sh-transition-fast);
}

.sh-metric-box:hover { box-shadow: var(--sh-shadow); }

.sh-metric-box__value {
  display: block;
  font-size: var(--sh-text-2xl);
  font-weight: 800;
  color: var(--sh-gray-900);
  margin-bottom: var(--sh-space-1);
}

.sh-metric-box__label {
  font-size: var(--sh-text-xs);
  color: var(--sh-gray-500);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* =============================================================
   Competitor cards (collapsible with Hn tree)
   ============================================================= */
.sh-comp-card {
  background: #fff;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius);
  overflow: hidden;
  transition: box-shadow .15s ease;
  margin-bottom: 10px;
}

.sh-comp-card:hover { box-shadow: var(--sh-shadow); }

.sh-comp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--sh-gray-50);
  border-bottom: 1px solid var(--sh-gray-200);
  cursor: pointer;
}

.sh-comp-url {
  font-size: 13px;
  font-weight: 600;
  color: var(--sh-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80%;
}

.sh-comp-toggle {
  font-size: 12px;
  color: var(--sh-gray-400);
  transition: transform .2s ease;
}

.sh-comp-toggle.open {
  transform: rotate(180deg);
}

.sh-comp-body {
  padding: 12px 14px;
}

.sh-comp-meta {
  font-size: 12.5px;
  color: var(--sh-gray-500);
  margin-bottom: 8px;
  line-height: 1.5;
}

.sh-comp-meta strong {
  color: var(--sh-gray-800);
}

/* =============================================================
   Hn structure tree (heading hierarchy display)
   ============================================================= */
.sh-hn-tree {
  font-size: 13px;
  line-height: 1.6;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

.sh-hn-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.sh-hn-tag {
  font-weight: 700;
  font-size: 11px;
  color: var(--sh-primary);
  flex-shrink: 0;
  min-width: 24px;
}

.sh-hn-h1 { padding-left: 0; }
.sh-hn-h2 { padding-left: 18px; }
.sh-hn-h3 { padding-left: 36px; }
.sh-hn-h4 { padding-left: 54px; }

.sh-hn-text {
  color: var(--sh-gray-800);
}

/* =============================================================
   Question items (PAA display)
   ============================================================= */
.sh-question-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius);
  font-size: 13px;
  transition: box-shadow .15s ease;
  margin-bottom: 4px;
}

.sh-question-item:hover { box-shadow: var(--sh-shadow); }

.sh-question-item .sh-badge { flex-shrink: 0; }

/* =============================================================
   Compact tables (keyword data)
   ============================================================= */
.sh-table--compact th {
  padding: 7px 10px;
  font-size: 10px;
}

.sh-table--compact td {
  padding: 7px 10px;
  font-size: 12.5px;
}

/* =============================================================
   Additional button + utility classes
   ============================================================= */
.sh-btn--xs {
  padding: 3px 8px;
  font-size: 11.5px;
}

.sh-kw-tab.active {
  background: var(--sh-primary) !important;
  color: #fff !important;
  border-color: var(--sh-primary) !important;
}

/* Margin / padding utilities */
.sh-mt-2 { margin-top: var(--sh-space-2); }
.sh-mt-3 { margin-top: var(--sh-space-3); }
.sh-mt-4 { margin-top: var(--sh-space-4); }
.sh-mt-5 { margin-top: var(--sh-space-5); }
.sh-mb-2 { margin-bottom: var(--sh-space-2); }
.sh-mb-3 { margin-bottom: var(--sh-space-3); }
.sh-p-3  { padding: var(--sh-space-3); }
.sh-ml-auto { margin-left: auto; }

/* Panel cards (content blocks inside editors) */
.sh-card-panel {
  padding: var(--sh-space-3);
}

.sh-card-panel--scroll {
  max-height: 300px;
  overflow-y: auto;
}

/* Step footer (flex row between buttons) */
.sh-step-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sh-space-5);
  gap: var(--sh-space-3);
}

/* Table footer / pagination row */
.sh-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sh-space-4);
  padding: var(--sh-space-3) var(--sh-space-4);
  border-top: 1px solid var(--sh-gray-100);
}

/* Hidden field (conditional form fields) */
.sh-field-hidden { display: none; }

/* Toast notification */
.sh-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  padding: 12px 20px;
  border-radius: var(--sh-radius);
  font-size: var(--sh-text-base);
  font-weight: 500;
  box-shadow: var(--sh-shadow-lg);
  animation: sh-toast-in 0.25s ease;
  max-width: 400px;
}

/* Comp extras (separator + small text for competitor forms/CTAs) */
.sh-comp-extras {
  border-top: 1px solid var(--sh-gray-100);
  padding-top: var(--sh-space-3);
  margin-top: var(--sh-space-3);
  font-size: var(--sh-text-sm);
  color: var(--sh-gray-500);
}

/* Form hint (helper text under fields) */
.sh-form-hint {
  font-size: var(--sh-text-xs);
  color: var(--sh-gray-400);
  margin-bottom: var(--sh-space-2);
}

/* Form label inline (label + checkbox on same line) */
.sh-form-label--inline {
  display: flex;
  align-items: center;
  gap: var(--sh-space-2);
  font-size: 13px;
  font-weight: 500;
  color: var(--sh-gray-700);
  cursor: pointer;
}

.sh-text-right { text-align: right; }
.sh-text-xs { font-size: 11px; }
.sh-gap-1 { gap: 4px; }
.sh-filter-active {
  background: var(--sh-primary);
  color: #fff;
  border-color: var(--sh-primary);
}

/* Breadcrumb back-link (legacy) */
.sh-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: var(--sh-space-1);
  font-size: var(--sh-text-sm);
  color: var(--sh-gray-400);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--sh-transition-fast);
}

.sh-breadcrumb:hover { color: var(--sh-gray-600); }

/* Breadcrumb nav (unified multi-level) */
.sh-breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: var(--sh-text-sm);
  color: var(--sh-gray-400);
}

.sh-breadcrumb-nav a {
  color: var(--sh-gray-400);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--sh-transition-fast);
}

.sh-breadcrumb-nav a:hover { color: var(--sh-primary); }

.sh-breadcrumb-nav span:last-child {
  color: var(--sh-gray-500);
  font-weight: 600;
}

/* Primary link (inline) */
.sh-link-primary {
  font-weight: 600;
  color: var(--sh-primary);
  text-decoration: none;
  transition: color var(--sh-transition-fast);
}

.sh-link-primary:hover { color: var(--sh-primary-hover); }

/* Card header h3 variant */
.sh-card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--sh-gray-800);
  margin: 0;
}

@media (max-width: 768px) {
  .sh-metric-box { min-width: unset; }
  .sh-comp-url { max-width: 70%; }
}

/* =============================================================
   GSC Dashboard
   ============================================================= */

/* --- Tabs (reusable) --- */
.sh-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: var(--sh-text-sm);
  font-weight: 500;
  color: var(--sh-gray-500);
  background: transparent;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius);
  cursor: pointer;
  transition: all var(--sh-transition-fast);
  white-space: nowrap;
}

.sh-tab:hover:not(:disabled) {
  color: var(--sh-gray-700);
  border-color: var(--sh-gray-300);
  background: var(--sh-gray-50);
}

.sh-tab--active, .sh-tab--active:hover {
  color: var(--sh-primary);
  border-color: var(--sh-primary);
  background: var(--sh-primary-light);
}

.sh-tab:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* --- Chips (small toggles) --- */
.sh-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: var(--sh-text-xs);
  font-weight: 500;
  color: var(--sh-gray-500);
  background: var(--sh-gray-100);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--sh-transition-fast);
}

.sh-chip:hover { color: var(--sh-gray-700); background: var(--sh-gray-200); }
.sh-chip--active, .sh-chip--active:hover {
  color: #fff;
  background: var(--sh-primary);
}
/* Metric-specific chip colors */
.sh-chip--active[data-chart-metric="clicks"] { background: #4F46E5; }
.sh-chip--active[data-chart-metric="impressions"] { background: #8B5CF6; }
.sh-chip--active[data-chart-metric="ctr"] { background: #10B981; }
.sh-chip--active[data-chart-metric="position"] { background: #F97316; }

/* --- Breadcrumb --- */
.sh-gsc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: var(--sh-text-sm);
  color: var(--sh-gray-400);
}

.sh-gsc-breadcrumb .sh-link {
  color: var(--sh-gray-400);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--sh-transition-fast);
}

.sh-gsc-breadcrumb .sh-link:hover { color: var(--sh-primary); }

/* --- Filter bar --- */
.sh-gsc-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sh-gsc-brand-tabs,
.sh-gsc-period-tabs,
.sh-gsc-dimension-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

/* --- Custom period picker --- */
.sh-gsc-custom-period {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--sh-gray-50);
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius-lg);
  flex-wrap: wrap;
}
.sh-gsc-custom-period label { font-weight: 500; color: var(--sh-gray-500); }
.sh-gsc-custom-period input[type="date"] { max-width: 160px; }

/* --- Dimension bar (tabs + buttons) --- */
.sh-gsc-dimension-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.sh-gsc-dimension-bar .sh-gsc-dimension-tabs { margin-bottom: 0; }

/* --- Advanced filters panel --- */
.sh-gsc-filters-panel {
  padding: 16px;
  background: var(--sh-gray-50);
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius-lg);
  margin-bottom: 16px;
}
.sh-gsc-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.sh-gsc-filter-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

/* --- KPI row --- */
.sh-gsc-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.sh-gsc-kpi {
  background: #fff;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius-lg);
  padding: 16px 20px;
  text-align: center;
}

.sh-gsc-kpi__label {
  font-size: var(--sh-text-xs);
  font-weight: 600;
  color: var(--sh-gray-400);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}

.sh-gsc-kpi__value {
  font-size: 24px;
  font-weight: 700;
  color: var(--sh-gray-800);
  line-height: 1.2;
}

.sh-gsc-kpi__delta {
  font-size: var(--sh-text-sm);
  font-weight: 600;
  margin-top: 4px;
}

.sh-gsc-kpi__delta--up { color: var(--sh-success); }
.sh-gsc-kpi__delta--down { color: var(--sh-danger); }
.sh-gsc-kpi__delta--neutral { color: var(--sh-gray-400); }

/* --- Chart --- */
.sh-gsc-chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sh-gsc-chart-metrics { display: flex; gap: 6px; }

.sh-gsc-chart-wrap {
  background: #fff;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius-lg);
  padding: 16px;
  margin-bottom: 24px;
  position: relative;
  height: 320px;
}

/* --- Table --- */
.sh-gsc-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
}

.sh-gsc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--sh-text-sm);
  background: #fff;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius-lg);
  overflow: hidden;
}

.sh-gsc-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: var(--sh-text-xs);
  font-weight: 600;
  color: var(--sh-gray-500);
  text-transform: uppercase;
  letter-spacing: .3px;
  background: var(--sh-gray-50);
  border-bottom: 1px solid var(--sh-gray-200);
  white-space: nowrap;
}

.sh-gsc-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--sh-gray-100);
  color: var(--sh-gray-700);
  white-space: nowrap;
}

.sh-gsc-table tbody tr:hover td { background: var(--sh-gray-50); }
.sh-gsc-table tbody tr:last-child td { border-bottom: none; }

.sh-gsc-th-sort {
  cursor: pointer;
  user-select: none;
  transition: color var(--sh-transition-fast);
}

.sh-gsc-th-sort:hover { color: var(--sh-gray-700); }
.sh-gsc-th-sort--active { color: var(--sh-primary) !important; }

.sh-gsc-th-delta,
th[data-sort^="delta"] {
  width: 60px;
  text-align: right !important;
  font-size: var(--sh-text-xs);
}

.sh-gsc-td-key {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.sh-text-right { text-align: right; }
.sh-text-center { text-align: center; }

/* --- Deltas --- */
.sh-delta {
  font-size: var(--sh-text-xs);
  font-weight: 600;
}

.sh-delta--up { color: var(--sh-success); }
.sh-delta--down { color: var(--sh-danger); }
.sh-delta--neutral { color: var(--sh-gray-300); }

/* --- GSC Delta toggle button --- */
.sh-gsc-delta-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--sh-gray-100);
  border: 1px solid var(--sh-gray-200);
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
  font-size: var(--sh-text-xs);
  line-height: 1;
  gap: 0;
  transition: border-color var(--sh-transition-fast);
}
.sh-gsc-delta-toggle:hover { border-color: var(--sh-gray-300); }
.sh-gsc-delta-opt {
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--sh-gray-400);
  font-weight: 500;
  transition: all var(--sh-transition-fast);
}
.sh-gsc-delta-opt.active {
  background: #fff;
  color: var(--sh-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

/* --- GSC property row (client modal) --- */
.sh-gsc-property-row {
  display: flex;
  gap: 8px;
}

.sh-gsc-property-row .sh-form-control { flex: 1; }
.sh-gsc-property-row .sh-btn { white-space: nowrap; }

/* --- Brand keywords editor (client modal) --- */
.sh-brand-kw-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sh-brand-kw-row .sh-brand-kw-term { flex: 1; }
.sh-brand-kw-row .sh-brand-kw-match { width: 120px; }
.sh-brand-kw-row .sh-brand-kw-remove {
  flex-shrink: 0;
  width: 30px;
  padding: 4px;
  text-align: center;
}

/* --- Client card quick actions --- */
.sh-client-card__quick {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--sh-gray-100);
  display: flex;
  gap: 6px;
}

.sh-btn--icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* --- Client card link variant (GSC selector) --- */
.sh-client-card--link {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  transition: transform var(--sh-transition-fast), box-shadow var(--sh-transition-fast);
}

.sh-client-card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

/* --- Anomaly section --- */
.sh-anomaly-section {
  margin-bottom: 16px;
  border: 1px solid var(--sh-gray-200);
  border-radius: var(--sh-radius-lg);
  background: #fff;
  overflow: hidden;
}

.sh-anomaly-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background var(--sh-transition-fast);
}

.sh-anomaly-header:hover { background: var(--sh-gray-50); }

.sh-anomaly-list { padding: 0 16px 12px; }
.sh-anomaly-list.sh-collapsed { display: none; }

.sh-anomaly-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--sh-radius);
  margin-bottom: 6px;
  font-size: var(--sh-text-sm);
}

.sh-anomaly-card--danger  { background: var(--sh-danger-light); }
.sh-anomaly-card--warning { background: var(--sh-warning-light); }
.sh-anomaly-card--success { background: var(--sh-success-light); }

/* --- Regenerate section button (brief preview H2) --- */
.sh-regen-section-btn {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--sh-gray-100);
  border: 1px solid var(--sh-gray-200);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--sh-gray-400);
  opacity: 0;
  transition: opacity var(--sh-transition-fast), background var(--sh-transition-fast), color var(--sh-transition-fast);
}
h2:hover .sh-regen-section-btn { opacity: 1; }
.sh-regen-section-btn:hover {
  background: var(--sh-primary-light);
  border-color: var(--sh-primary);
  color: var(--sh-primary);
}

/* --- Sidebar Pipeline Widget --- */
.sh-pipeline-widget {
  margin: 0 12px;
  padding: 10px 12px;
  border-radius: var(--sh-radius);
  cursor: pointer;
  transition: background 0.2s, opacity 0.4s;
  border: 1px solid transparent;
}
.sh-pipeline-widget:hover {
  filter: brightness(0.96);
}
.sh-pipeline-widget--running {
  background: var(--sh-primary-light);
  border-color: var(--sh-primary);
}
.sh-pipeline-widget--paused {
  background: var(--sh-warning-light);
  border-color: var(--sh-warning);
}
.sh-pipeline-widget--done {
  background: var(--sh-success-light);
  border-color: var(--sh-success);
}
.sh-pipeline-widget--errors {
  background: var(--sh-danger-light);
  border-color: var(--sh-danger);
}
.sh-pipeline-widget__header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--sh-text-xs);
  font-weight: 600;
  color: var(--sh-gray-700);
  line-height: 1.2;
}
.sh-pipeline-widget--running .sh-pipeline-widget__header { color: var(--sh-primary); }
.sh-pipeline-widget--done .sh-pipeline-widget__header { color: var(--sh-success); }
.sh-pipeline-widget--errors .sh-pipeline-widget__header { color: var(--sh-danger); }
.sh-pipeline-widget--paused .sh-pipeline-widget__header { color: var(--sh-warning); }
.sh-pipeline-widget__label {
  flex-shrink: 0;
}
.sh-pipeline-widget__count {
  margin-left: auto;
  font-weight: 500;
  white-space: nowrap;
}
.sh-pipeline-widget__bar-wrap {
  margin-top: 6px;
  height: 4px;
  background: rgba(0,0,0,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.sh-pipeline-widget__bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
  min-width: 0;
}
.sh-pipeline-widget--running .sh-pipeline-widget__bar { background: var(--sh-primary); }
.sh-pipeline-widget--done .sh-pipeline-widget__bar { background: var(--sh-success); }
.sh-pipeline-widget--errors .sh-pipeline-widget__bar { background: var(--sh-danger); }
.sh-pipeline-widget--paused .sh-pipeline-widget__bar { background: var(--sh-warning); }

/* --- Bulk Pipeline Progress View --- */
.sh-bulk-progress-header {
  max-width: 100%;
  overflow: hidden;
}
.sh-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--sh-gray-200);
  border-radius: 4px;
  overflow: hidden;
}
.sh-progress-bar__fill {
  height: 100%;
  background: var(--sh-primary);
  border-radius: 4px;
  transition: width 0.4s ease;
  min-width: 0;
}
.sh-bulk-progress-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
}
.sh-bulk-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--sh-gray-50);
  border-radius: var(--sh-radius);
  font-size: var(--sh-text-sm);
  transition: background 0.2s;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.sh-bulk-progress-row.sh-bulk-row--active {
  background: var(--sh-primary-light);
  border: 1px solid var(--sh-primary);
}
.sh-bulk-progress-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.sh-bulk-progress-keyword {
  flex: 1;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sh-bulk-progress-status {
  flex-shrink: 0;
  white-space: nowrap;
}
.sh-bulk-progress-actions {
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .sh-gsc-kpis { grid-template-columns: repeat(2, 1fr); }
  .sh-gsc-kpi__value { font-size: 20px; }
  .sh-gsc-chart-wrap { height: 240px; }

  .sh-gsc-period-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .sh-gsc-period-tabs .sh-tab { font-size: var(--sh-text-xs); padding: 5px 10px; }

  .sh-gsc-td-key { max-width: 160px; }
  .sh-brand-kw-row { flex-wrap: wrap; }
  .sh-brand-kw-row .sh-brand-kw-match { width: 100%; }

  .sh-pipeline-widget { margin: 0 8px; padding: 8px 10px; }
  .sh-bulk-progress-row { flex-wrap: wrap; gap: 6px; padding: 6px 10px; }
  .sh-bulk-progress-keyword { width: calc(100% - 30px); }
  .sh-bulk-progress-status { margin-left: 30px; }
}

@media (max-width: 480px) {
  .sh-gsc-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sh-gsc-kpi { padding: 12px; }
  .sh-gsc-chart-wrap { height: 200px; }
}

/* =============================================================
   Client Profile
   ============================================================= */
.sh-client-card__avatar--lg {
  width: 56px;
  height: 56px;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.sh-empty--sm {
  padding: 24px 16px;
  text-align: center;
}
.sh-empty--sm p { color: var(--sh-gray-400); font-size: var(--sh-text-sm); margin: 0; }

.sh-profile-status-bar {
  padding: 12px 16px 16px;
}

.sh-profile-monthly-recap {
  padding: 16px;
  border-top: 1px solid var(--sh-gray-100);
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════
   Cannibalization Module
   ═══════════════════════════════════════════════ */

.sh-cannib-settings { padding: var(--sh-space-5); }

.sh-cannib-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sh-space-4);
  margin-bottom: var(--sh-space-3);
}

.sh-cannib-field label {
  display: block;
  font-size: var(--sh-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sh-gray-500);
  margin-bottom: var(--sh-space-1);
}

.sh-cannib-label-inline {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.sh-cannib-label-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--sh-primary);
  cursor: pointer;
  margin: 0;
}

.sh-cannib-slider-row {
  display: flex;
  align-items: center;
  gap: var(--sh-space-2);
}

.sh-cannib-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--sh-gray-200);
  border-radius: 3px;
  outline: none;
}

.sh-cannib-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--sh-primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(79,70,229,.35);
  transition: transform .1s;
}
.sh-cannib-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.sh-cannib-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--sh-primary);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.sh-cannib-slider-value {
  min-width: 3rem;
  text-align: center;
  font-size: var(--sh-text-sm);
  font-weight: 700;
  color: var(--sh-primary);
  background: var(--sh-primary-light);
  padding: 2px 8px;
  border-radius: var(--sh-radius-sm);
}

/* Progress bar */
.sh-cannib-progress-bar {
  height: 6px;
  background: var(--sh-gray-100);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: var(--sh-space-2);
}

.sh-cannib-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sh-primary), #06B6D4);
  border-radius: 3px;
  transition: width .3s ease;
  width: 0%;
}

/* Stats KPIs */
.sh-cannib-stat { text-align: center; padding: var(--sh-space-4); }
.sh-cannib-stat strong {
  display: block;
  font-size: var(--sh-text-xl);
  color: var(--sh-gray-800);
  line-height: 1.3;
}
.sh-cannib-stat span {
  font-size: var(--sh-text-xs);
  color: var(--sh-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sh-cannib-stat--warning { border-color: var(--sh-warning-light); background: linear-gradient(135deg, #FFFBEB, var(--sh-warning-light)); }
.sh-cannib-stat--warning strong { color: #D97706; }
.sh-cannib-stat--danger { border-color: var(--sh-danger-light); background: linear-gradient(135deg, #FEF2F2, var(--sh-danger-light)); }
.sh-cannib-stat--danger strong { color: var(--sh-danger); }

/* Filters */
.sh-cannib-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sh-space-3);
  align-items: flex-end;
  padding: var(--sh-space-4);
}

.sh-cannib-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sh-cannib-filter-group label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sh-gray-500);
}

/* Results table */
.sh-cannib-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--sh-text-sm);
}

.sh-cannib-table th {
  text-align: left;
  padding: var(--sh-space-3) var(--sh-space-4);
  background: var(--sh-gray-50);
  border-bottom: 2px solid var(--sh-gray-200);
  font-weight: 600;
  font-size: var(--sh-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--sh-gray-600);
  white-space: nowrap;
}

.sh-cannib-table td {
  padding: var(--sh-space-3) var(--sh-space-4);
  border-bottom: 1px solid var(--sh-gray-100);
  vertical-align: middle;
}

.sh-cannib-table tbody tr:hover { background: var(--sh-gray-50); }

/* Sortable headers */
.sh-cannib-th-sortable {
  cursor: pointer;
  user-select: none;
  transition: background .12s ease;
}
.sh-cannib-th-sortable:hover { background: var(--sh-gray-100); }
.sh-cannib-sorted-asc::after  { content: ' \25B2'; font-size: 9px; }
.sh-cannib-sorted-desc::after { content: ' \25BC'; font-size: 9px; }

/* Expand button */
.sh-cannib-btn-expand {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--sh-gray-400);
  padding: 2px 4px;
  border-radius: 4px;
  transition: color .1s;
  line-height: 1;
}
.sh-cannib-btn-expand:hover { color: var(--sh-primary); }

/* Severity badges */
.sh-cannib-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.sh-cannib-badge--critical { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.sh-cannib-badge--high     { background: #FFF7ED; color: #9A3412; border: 1px solid #FED7AA; }
.sh-cannib-badge--medium   { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.sh-cannib-badge--low      { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }

/* Recommendation badges */
.sh-cannib-reco {
  display: inline-block;
  font-size: var(--sh-text-xs);
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: help;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-cannib-reco--merge         { background: #FEF2F2; color: #991B1B; }
.sh-cannib-reco--canonical     { background: #EFF6FF; color: #1E40AF; }
.sh-cannib-reco--low           { background: #F0FDF4; color: #166534; }
.sh-cannib-reco--differentiate { background: #FFFBEB; color: #92400E; }
.sh-cannib-reco--review        { background: var(--sh-gray-50); color: var(--sh-gray-600); border: 1px solid var(--sh-gray-200); }

/* Detail sub-table (expanded) */
.sh-cannib-detail-row td {
  padding: 0 var(--sh-space-4) var(--sh-space-4) !important;
  background: var(--sh-gray-50);
  border-bottom: 2px solid var(--sh-gray-200) !important;
}

.sh-cannib-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--sh-text-xs);
  margin-top: var(--sh-space-2);
  border-radius: var(--sh-radius-sm);
  overflow: hidden;
  border: 1px solid var(--sh-gray-200);
}

.sh-cannib-detail-table th {
  background: var(--sh-gray-100);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--sh-gray-500);
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--sh-gray-200);
}

.sh-cannib-detail-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--sh-gray-100);
  font-size: var(--sh-text-xs);
}
.sh-cannib-detail-table tr:last-child td { border-bottom: none; }

.sh-cannib-detail-best td { font-weight: 600; background: var(--sh-success-light); }

.sh-cannib-detail-table td a {
  color: var(--sh-primary);
  text-decoration: none;
  font-size: var(--sh-text-xs);
  word-break: break-all;
}
.sh-cannib-detail-table td a:hover { text-decoration: underline; }

/* Ignored rows */
.sh-cannib-row-ignored { opacity: 0.4; }
.sh-cannib-row-ignored td { text-decoration: line-through; }

/* Ignore/restore button */
.sh-cannib-btn-ignore {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  background: var(--sh-gray-50);
  border: 1px solid var(--sh-gray-200);
  border-radius: 4px;
  cursor: pointer;
  color: var(--sh-gray-600);
  font-family: inherit;
  transition: all .12s ease;
}
.sh-cannib-btn-ignore:hover { background: var(--sh-danger); color: #fff; border-color: var(--sh-danger); }
.sh-cannib-row-ignored .sh-cannib-btn-ignore:hover { background: var(--sh-success); border-color: var(--sh-success); }

/* No results */
.sh-cannib-no-results {
  text-align: center;
  padding: 32px !important;
  color: var(--sh-gray-400);
  font-style: italic;
}

/* Pagination */
.sh-cannib-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sh-space-1);
  padding: var(--sh-space-4);
  flex-wrap: wrap;
}

.sh-cannib-page-active {
  background: var(--sh-primary) !important;
  color: #fff !important;
  border-color: var(--sh-primary) !important;
}

.sh-cannib-page-ellipsis {
  color: var(--sh-gray-400);
  font-size: var(--sh-text-sm);
  padding: 0 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .sh-cannib-settings-grid { grid-template-columns: 1fr; }
  .sh-cannib-filters { flex-direction: column; align-items: stretch; }
  .sh-cannib-table { font-size: var(--sh-text-xs); }
  .sh-cannib-table th, .sh-cannib-table td { padding: 6px 8px; }
  .sh-cannib-reco { max-width: 130px; font-size: 10px; }
}

@media (max-width: 480px) {
  .sh-cannib-table th:nth-child(6),
  .sh-cannib-table td:nth-child(6) { display: none; }
}
