/**
 * TOP Rating Engine — Compiled Production Styles
 * Generated automatically from resources/styles/
 */

/* === tokens.css === */
/**
 * Design Tokens for TOP Rating Engine
 * Light, Dark and System theme custom properties
 */

:root {
  --top-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --top-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Spacing */
  --top-space-1: 0.25rem;
  --top-space-2: 0.5rem;
  --top-space-3: 0.75rem;
  --top-space-4: 1rem;
  --top-space-5: 1.25rem;
  --top-space-6: 1.5rem;
  --top-space-8: 2rem;
  --top-space-10: 2.5rem;
  --top-space-12: 3rem;

  /* Radius */
  --top-radius-sm: 6px;
  --top-radius-md: 10px;
  --top-radius-lg: 14px;
  --top-radius-xl: 18px;
  --top-radius-full: 9999px;

  /* Shadows */
  --top-shadow-xs: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
  --top-shadow-sm: 0 1px 3px 0 rgba(16, 24, 40, 0.1), 0 1px 2px -1px rgba(16, 24, 40, 0.1);
  --top-shadow-md: 0 4px 6px -1px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.1);
  --top-shadow-lg: 0 10px 15px -3px rgba(16, 24, 40, 0.1), 0 4px 6px -4px rgba(16, 24, 40, 0.1);

  /* Light Theme (Default) */
  --top-bg: #f1f6fc;
  --top-surface: #ffffff;
  --top-surface-alt: #f6f8fb;
  --top-surface-hover: #eef3f9;
  --top-border: #d4dde8;
  --top-border-light: #e8eef5;

  --top-text: #142238;
  --top-text-muted: #53647e;
  --top-text-subtle: #8a9bb2;

  --top-primary: #005af9;
  --top-primary-hover: #0548b0;
  --top-primary-light: #e7f0fd;
  --top-primary-text: #ffffff;

  --top-accent: #10b981;
  --top-accent-hover: #059669;
  --top-accent-light: #ecfdf5;

  --top-warning: #f59e0b;
  --top-warning-light: #fef3c7;
  --top-warning-text: #92400e;

  --top-danger: #ef4444;
  --top-danger-light: #fee2e2;
  --top-danger-text: #b91c1c;

  --top-rank-1: #f59e0b;
  --top-rank-1-bg: #fef3c7;
  --top-rank-2: #64748b;
  --top-rank-2-bg: #f1f5f9;
  --top-rank-3: #b45309;
  --top-rank-3-bg: #ffedd5;

  color-scheme: light;
}

[data-theme="dark"] {
  --top-bg: #101925;
  --top-surface: #182332;
  --top-surface-alt: #1f2c3e;
  --top-surface-hover: #26364b;
  --top-border: #2d3d52;
  --top-border-light: #223042;

  --top-text: #eef4fc;
  --top-text-muted: #9ab0c8;
  --top-text-subtle: #6c8099;

  --top-primary: #136dff;
  --top-primary-hover: #3b82f6;
  --top-primary-light: rgba(37, 99, 235, 0.2);
  --top-primary-text: #ffffff;

  --top-accent: #10b981;
  --top-accent-hover: #34d399;
  --top-accent-light: rgba(16, 185, 129, 0.18);

  --top-warning: #fbbf24;
  --top-warning-light: rgba(251, 191, 36, 0.18);
  --top-warning-text: #fde68a;

  --top-danger: #f87171;
  --top-danger-light: rgba(248, 113, 113, 0.18);
  --top-danger-text: #fca5a5;

  --top-rank-1: #fbbf24;
  --top-rank-1-bg: rgba(251, 191, 36, 0.2);
  --top-rank-2: #94a3b8;
  --top-rank-2-bg: rgba(148, 163, 184, 0.2);
  --top-rank-3: #f97316;
  --top-rank-3-bg: rgba(249, 115, 22, 0.2);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --top-bg: #101925;
    --top-surface: #182332;
    --top-surface-alt: #1f2c3e;
    --top-surface-hover: #26364b;
    --top-border: #2d3d52;
    --top-border-light: #223042;

    --top-text: #eef4fc;
    --top-text-muted: #9ab0c8;
    --top-text-subtle: #6c8099;

    --top-primary: #2563eb;
    --top-primary-hover: #3b82f6;
    --top-primary-light: rgba(37, 99, 235, 0.2);
    --top-primary-text: #ffffff;

    --top-accent: #10b981;
    --top-accent-hover: #34d399;
    --top-accent-light: rgba(16, 185, 129, 0.18);

    --top-warning: #fbbf24;
    --top-warning-light: rgba(251, 191, 36, 0.18);
    --top-warning-text: #fde68a;

    --top-danger: #f87171;
    --top-danger-light: rgba(248, 113, 113, 0.18);
    --top-danger-text: #fca5a5;

    --top-rank-1: #fbbf24;
    --top-rank-1-bg: rgba(251, 191, 36, 0.2);
    --top-rank-2: #94a3b8;
    --top-rank-2-bg: rgba(148, 163, 184, 0.2);
    --top-rank-3: #f97316;
    --top-rank-3-bg: rgba(249, 115, 22, 0.2);

    color-scheme: dark;
  }
}


/* === base.css === */
/**
 * Base Resets and Typography
 */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--top-font-sans);
  background-color: var(--top-bg);
  color: var(--top-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--top-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

img, svg {
  display: inline-block;
  vertical-align: middle;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--top-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* === layout.css === */
/**
 * Layout Structure
 * Header, Sidebars, Responsive Containers and Grids
 */

.top-container {
  width: 100%;
  max-width: 1560px;
  margin-inline: auto;
  padding-inline: clamp(0.75rem, 2.5vw, 2rem);
}

.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--top-surface);
  border-bottom: 1px solid var(--top-border);
  height: 64px;
}

.top-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--top-space-4);
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: var(--top-space-6);
}

.top-nav-link {
  font-weight: 500;
  color: var(--top-text-muted);
  padding: var(--top-space-2) 0;
  position: relative;
}

.top-nav-link:hover, .top-nav-link.active {
  color: var(--top-primary);
  text-decoration: none;
}

.top-nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--top-primary);
  border-radius: var(--top-radius-full);
}

.top-main-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--top-space-5);
  padding-block: var(--top-space-5);
  min-height: calc(100vh - 64px);
}

.top-main-layout.three-col {
  grid-template-columns: 210px minmax(0, 1fr) 280px;
}

.top-main-layout.no-sidebar {
  grid-template-columns: 1fr;
}

.top-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--top-space-1);
}

.top-sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--top-space-3);
  padding: var(--top-space-3) var(--top-space-4);
  border-radius: var(--top-radius-md);
  color: var(--top-text-muted);
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.top-sidebar-nav-item:hover {
  background-color: var(--top-surface-hover);
  color: var(--top-text);
  text-decoration: none;
}

.top-sidebar-nav-item.active {
  background-color: var(--top-primary-light);
  color: var(--top-primary);
  text-decoration: none;
}

.top-sidebar-nav-item .top-badge {
  margin-left: auto;
}

.top-footer {
  margin-top: auto;
  border-top: 1px solid var(--top-border);
  background-color: var(--top-surface);
  padding-block: var(--top-space-6);
  color: var(--top-text-muted);
  font-size: 0.875rem;
}

/* Mobile bottom bar */
.top-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--top-surface);
  border-top: 1px solid var(--top-border);
  z-index: 50;
  padding-inline: var(--top-space-2);
}

@media (max-width: 1240px) {
  .top-main-layout.three-col {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .top-main-layout.three-col .top-right-col {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--top-space-4);
  }
}

@media (max-width: 900px) {
  .top-main-layout.three-col {
    grid-template-columns: 1fr;
  }
  .top-main-layout.three-col .top-right-col {
    order: 3;
  }
}

@media (max-width: 768px) {
  .top-main-layout {
    grid-template-columns: 1fr;
    padding-bottom: 80px; /* space for mobile nav */
  }
  .top-sidebar {
    display: none; /* replaced by mobile nav/drawer */
  }
  .top-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
  .top-header-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .top-header-inner {
    gap: var(--top-space-2);
  }
  .top-user-name, .top-btn-label {
    display: none;
  }
}


/* === components.css === */
/**
 * UI Components
 * Buttons, Badges, Cards, Pills, Tables, Toasts, Modals
 */

.top-card {
  background-color: var(--top-surface);
  border: 1px solid var(--top-border);
  border-radius: var(--top-radius-lg);
  padding: var(--top-space-5);
  box-shadow: var(--top-shadow-xs);
}

.top-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--top-space-4);
}

.top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--top-space-2);
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--top-radius-md);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.top-btn:hover {
  text-decoration: none;
}

.top-btn-primary {
  background-color: var(--top-primary);
  color: var(--top-primary-text);
}
.top-btn-primary:hover {
  background-color: var(--top-primary-hover);
}

.top-btn-secondary {
  background-color: var(--top-surface-alt);
  color: var(--top-text);
  border-color: var(--top-border);
}
.top-btn-secondary:hover {
  background-color: var(--top-surface-hover);
}

.top-btn-danger {
  background-color: var(--top-danger);
  color: #fff;
}
.top-btn-danger:hover {
  filter: brightness(0.9);
}

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

.top-btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--top-radius-sm);
}

.top-btn-block {
  width: 100%;
}

.top-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--top-space-1);
  padding: 0.2rem 0.55rem;
  border-radius: var(--top-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.top-badge-success {
  background-color: var(--top-accent-light);
  color: var(--top-accent);
}

.top-badge-warning {
  background-color: var(--top-warning-light);
  color: var(--top-warning-text);
}

.top-badge-danger {
  background-color: var(--top-danger-light);
  color: var(--top-danger-text);
}

.top-badge-neutral {
  background-color: var(--top-surface-alt);
  color: var(--top-text-muted);
  border: 1px solid var(--top-border);
}

/* Rank badges (1, 2, 3) */
.top-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--top-radius-md);
  font-weight: 700;
  font-size: 0.875rem;
}

.top-rank-1 {
  background-color: var(--top-rank-1-bg);
  color: var(--top-rank-1);
}

.top-rank-2 {
  background-color: var(--top-rank-2-bg);
  color: var(--top-rank-2);
}

.top-rank-3 {
  background-color: var(--top-rank-3-bg);
  color: var(--top-rank-3);
}

.top-rank-normal {
  color: var(--top-text-muted);
  font-weight: 600;
}

/* Pills and tabs */
.top-pills {
  display: inline-flex;
  background-color: var(--top-surface-alt);
  padding: 3px;
  border-radius: var(--top-radius-md);
  border: 1px solid var(--top-border-light);
  gap: 2px;
}

.top-pill {
  padding: 0.35rem 0.75rem;
  border-radius: calc(var(--top-radius-md) - 3px);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--top-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.top-pill:hover {
  color: var(--top-text);
}

.top-pill.active {
  background-color: var(--top-primary);
  color: #fff;
}

/* Stat trend numbers */
.top-trend-up {
  color: var(--top-accent);
  font-weight: 600;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.top-trend-down {
  color: var(--top-danger);
  font-weight: 600;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* Modal and Drawer overlays */
.top-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(16, 25, 37, 0.6);
  backdrop-filter: blur(2px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.top-modal {
  background-color: var(--top-surface);
  border: 1px solid var(--top-border);
  border-radius: var(--top-radius-xl);
  max-width: 540px;
  width: 100%;
  padding: var(--top-space-6);
  box-shadow: var(--top-shadow-lg);
}

.top-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--top-space-2);
}

.top-toast {
  background-color: var(--top-surface);
  border: 1px solid var(--top-border);
  border-radius: var(--top-radius-md);
  padding: var(--top-space-3) var(--top-space-4);
  box-shadow: var(--top-shadow-md);
  color: var(--top-text);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: var(--top-space-3);
}


/* === forms.css === */
/**
 * Form Styles
 * Form Controls, Labels, Errors, Switches, Code Snippets
 */

.top-form-group,
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--top-space-2);
  margin-bottom: var(--top-space-4);
}

.top-label,
.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--top-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-label-required::after {
  content: " *";
  color: var(--top-danger);
}

.top-input,
.top-select,
.top-textarea,
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  display: block;
  box-sizing: border-box;
  padding: 0.625rem 0.875rem;
  background-color: var(--top-surface);
  border: 1px solid var(--top-border);
  border-radius: var(--top-radius-md);
  color: var(--top-text);
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.top-input:focus,
.top-select:focus,
.top-textarea:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--top-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--top-primary-light);
}

.top-input.is-invalid,
.top-select.is-invalid,
.top-textarea.is-invalid,
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--top-danger);
}

.top-input.is-invalid:focus,
.form-input.is-invalid:focus {
  box-shadow: 0 0 0 3px var(--top-danger-light);
}

.top-help-text,
.form-help {
  font-size: 0.8125rem;
  color: var(--top-text-muted);
}

.top-error-text,
.form-error {
  font-size: 0.8125rem;
  color: var(--top-danger);
  font-weight: 500;
}

.top-checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--top-space-2);
  font-size: 0.875rem;
  color: var(--top-text);
  cursor: pointer;
  user-select: none;
}

.top-checkbox {
  width: 18px;
  height: 18px;
  border-radius: var(--top-radius-sm);
  border: 1px solid var(--top-border);
  cursor: pointer;
  accent-color: var(--top-primary);
}

/* Code Snippet Box (for counter installation) */
.top-code-box {
  position: relative;
  background-color: var(--top-surface-alt);
  border: 1px solid var(--top-border);
  border-radius: var(--top-radius-md);
  padding: var(--top-space-4);
  font-family: var(--top-font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-x: auto;
  color: var(--top-text);
}

.top-code-copy-btn {
  position: absolute;
  top: var(--top-space-2);
  right: var(--top-space-2);
  background-color: var(--top-surface);
  border: 1px solid var(--top-border);
  padding: 0.25rem 0.6rem;
  border-radius: var(--top-radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--top-space-1);
}

.top-code-copy-btn:hover {
  background-color: var(--top-surface-hover);
}

/* Search input with inner icon */
.top-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.top-search-box svg {
  position: absolute;
  left: 14px;
  color: var(--top-text-subtle);
  pointer-events: none;
}

.top-search-box input {
  padding-left: 42px;
  padding-right: 90px;
}

.top-search-box .top-search-btn {
  position: absolute;
  right: 6px;
}

/* === views.css === */
/**
 * Views Styling (Rating, Account, Admin)
 * Matches Mockups 01, 02, 03
 */

/* KPI Stats Strip */
.top-rating-home { align-items: start; align-content: start; gap: 1rem; }
.top-rating-home > .top-sidebar { grid-row: 1 / span 2; }
.top-rating-home .top-sidebar-nav-item { padding: .58rem .7rem; color: var(--top-text); }
.top-rating-home .top-sidebar-nav-item.active { color: var(--top-primary); }
.top-rating-home .top-sidebar-nav-item svg { flex: 0 0 18px; }
.top-rating-home .top-sidebar-nav-item .top-badge { display: none; }
.top-rating-home .top-trend-up { color: #228710; font-weight: 650; }
[data-theme="dark"] .top-rating-home .top-trend-up { color: #8ae45e; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .top-rating-home .top-trend-up { color: #8ae45e; }
}
.top-rating-lead { grid-column: 2 / -1; min-width: 0; }
.top-rating-lead h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 2.35rem); line-height: 1.15; letter-spacing: -.035em; }
.top-rating-lead > p { margin: .25rem 0 .8rem; color: var(--top-text-muted); }
.top-rating-lead .top-kpi-bar { margin: .85rem 0 0; }
.top-rating-search { display: flex; align-items: center; gap: .65rem; border: 1px solid var(--top-border); border-radius: var(--top-radius-md); background: var(--top-surface); padding: .25rem .3rem .25rem .85rem; min-height: 44px; color: var(--top-text-muted); }
.top-rating-search:focus-within { border-color: var(--top-primary); }
.top-rating-search svg { flex-shrink: 0; }
.top-rating-search input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--top-text); font: inherit; }
.top-rating-search button { min-width: 6rem; }
.top-rating-list { min-width: 0; background: var(--top-surface); border: 1px solid var(--top-border); border-radius: var(--top-radius-md); box-shadow: var(--top-shadow-xs); padding: .7rem; }
.top-rating-list .top-table-wrapper { border: 0; }
.top-rating-list .top-table th, .top-rating-list .top-table td { padding: .5rem .4rem; }
.top-rating-list .top-rating-category-cell { display: none; }
.top-rating-controls { display: grid; gap: .65rem; }
.top-rating-periods, .top-rating-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.top-rating-periods h2 { font-size: 1.4rem; line-height: 1.2; margin: 0 auto 0 0; }
.top-rating-periods [data-secondary-period]:not(.active) { display: none; }
.top-rating-tabs { display: flex; align-items: center; gap: .85rem; margin-right: auto; }
.top-rating-tabs a { color: var(--top-text-muted); padding: .5rem .2rem; font-size: .875rem; font-weight: 600; border-bottom: 2px solid transparent; }
.top-rating-tabs a[aria-current] { color: var(--top-primary); border-color: currentColor; }
.top-rating-filter { position: relative; }
.top-rating-filter summary { list-style: none; cursor: pointer; }
.top-rating-filter summary::-webkit-details-marker { display: none; }
.top-rating-filter form { position: absolute; z-index: 5; right: 0; top: calc(100% + .35rem); display: grid; gap: .6rem; width: min(235px, 78vw); padding: .75rem; background: var(--top-surface); border: 1px solid var(--top-border); border-radius: var(--top-radius-md); box-shadow: var(--top-shadow-md); }
.top-rating-filter label { display: grid; gap: .2rem; font-size: .8rem; }
.top-rating-list .top-compare-cell { width: 2rem; text-align: center; }
.top-compare-button:disabled { opacity: .55; cursor: default; }
.top-rating-mobile-title, .top-rating-mobile-add { display: none; }
.top-favorite-button {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 32px;
  block-size: 32px;
  padding: 0;
  color: var(--top-text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--top-radius-md);
  cursor: pointer;
}
.top-favorite-button:hover { background: var(--top-surface-hover); }
.top-favorite-button:disabled { opacity: .55; cursor: default; }
.top-favorite-button[aria-pressed="true"] { color: var(--top-danger-text); }
.top-favorite-button[aria-pressed="false"] svg:nth-child(2),
.top-favorite-button[aria-pressed="true"] svg:first-child { display: none; }
.top-favorites { max-width: 840px; margin: 1.5rem auto; }
.top-favorites header { margin-bottom: 1rem; }
.top-favorites h1, .top-favorites h2, .top-favorites p { margin: 0; }
.top-favorites p { color: var(--top-text-muted); }
.top-favorites [hidden] { display: none; }
.top-favorites-items { display: grid; gap: .6rem; padding: 0; list-style: none; }
.top-favorites-empty { text-align: center; }
.top-favorites-empty .top-btn { margin-top: .75rem; }
.top-favorite-row { display: flex; align-items: center; gap: .6rem 1rem; }
.top-favorite-details { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.top-favorite-details a { font-weight: 700; }
.top-favorite-stats { display: flex; gap: .5rem 1rem; flex-wrap: wrap; font-size: .875rem; }
.top-dashboard-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.top-dashboard-kpis .top-card { display: grid; gap: .5rem; padding: .9rem 1.15rem; color: var(--top-text-muted); }
.top-dashboard-kpis strong { font-size: 1.8rem; line-height: 1.15; color: var(--top-text); }
.top-account-panels, .top-admin-insights { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .85rem; }
.top-admin-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.top-admin-attention { display: grid; gap: .45rem; }
.top-admin-attention > .top-card { border: 0; border-radius: 0; border-bottom: 1px solid var(--top-border-light); box-shadow: none; padding: .55rem 0 !important; }
.top-admin-attention > .top-card:last-child { border-bottom: 0; }
.top-counter-setup { align-self: start; }
.top-counter-setup p, .top-counter-setup select { margin-block: .65rem; }
.top-counter-setup button { width: 100%; }
.top-chart-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; max-width: 100%; }
.top-chart-controls .top-select { width: auto; max-width: 14rem; font-size: .8rem; padding: .45rem .6rem; }
.top-dashboard-chart { position: relative; width: 100%; height: 240px; }
.top-chart-legend { flex-basis: 100%; flex-wrap: wrap; }
.top-admin-overview .top-admin-grid { grid-template-columns: minmax(0, 1fr) !important; gap: .85rem !important; }
.top-admin-overview .top-card-header, .top-account-overview .top-card-header { flex-wrap: wrap; }

@media (min-width: 1081px) {
  .top-rating-home.three-col { grid-template-columns: minmax(155px, 17%) minmax(0, 1fr) minmax(185px, 21%); }
  .top-rating-home.three-col .top-right-col { grid-column: auto; display: flex; order: initial; }
}

@media (min-width: 769px) and (max-width: 1080px) {
  .top-rating-home.three-col { grid-template-columns: 170px minmax(0, 1fr); }
  .top-rating-home.three-col .top-right-col { grid-column: 2; }
  .top-account-panels, .top-admin-insights { grid-template-columns: minmax(0, 1fr); }
  .top-dashboard-chart { height: 171px; }
  .top-admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --top-mobile-nav-height: calc(60px + env(safe-area-inset-bottom)); }
  .top-mobile-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: auto; min-height: var(--top-mobile-nav-height); padding-bottom: env(safe-area-inset-bottom); }
  .top-mobile-nav .top-sidebar-nav-item { min-width: 0; flex-direction: column; gap: .2rem; justify-content: center; padding: .35rem .1rem; text-align: center; }
  .top-mobile-nav .top-sidebar-nav-item span { font-size: clamp(.6rem, 2.8vw, .75rem) !important; }
  .top-mobile-nav.top-account-mobile-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .top-favorite-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: .75rem; }
  .top-favorite-row .top-favorite-button { grid-area: 1 / 2 / 3 / 3; min-width: 40px; min-height: 40px; }
  .top-rating-home > .top-sidebar, .top-rating-home .top-right-col, .top-rating-lead .top-kpi-bar,
  .top-rating-lead > p, .top-rating-desktop-title, .top-rating-periods h2, .top-compare-button,
  .top-public-add, .top-public-language { display: none !important; }
  .top-rating-lead { grid-column: 1; }
  .top-rating-mobile-title { display: inline; }
  .top-rating-search { margin-top: .5rem; }
  .top-rating-search button { min-width: unset; }
  .top-rating-list { display: flex; flex-direction: column; background: transparent; border: 0; padding: 0; box-shadow: none; }
  .top-rating-list .top-mobile-category-nav { order: -1; margin: -.3rem 0 .4rem; }
  .top-rating-list .top-rating-controls { grid-template-columns: minmax(0, 1fr) auto; gap: .25rem; margin-bottom: .7rem; }
  .top-rating-list .top-rating-tabs { display: none; }
  .top-rating-periods .top-pill { padding-inline: clamp(.35rem, 2vw, .75rem); }
  .top-rating-list .top-site-card { padding: .65rem; }
  .top-rating-home { padding-block-end: calc(var(--top-mobile-nav-height) + 66px); }
  .top-rating-mobile-add { display: flex; position: fixed; z-index: 35; inset: auto .75rem calc(var(--top-mobile-nav-height) + .75rem); }
  .top-footer { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  body:has(.top-rating-home) .top-footer { display: none; }
  .top-rating-list .top-mobile-cards { gap: .4rem; }
  .top-rating-list .top-site-card { gap: .3rem; border-radius: .75rem; }
  .top-site-card .top-site-favicon { width: 28px; height: 28px; flex-shrink: 0; color: var(--top-primary); font-weight: 700; }
  .top-site-card .top-favorite-button { inline-size: 36px; block-size: 36px; }
  .top-site-card-metrics { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .2rem .45rem; padding-left: 2.3rem; }
  .top-site-card-visitors { color: var(--top-text-muted); font-size: .75rem; }
  .top-site-card-visitors strong { color: var(--top-text); }
  .top-header .top-search-box.top-header-links { display: none; }
  .top-admin-header .top-header-inner { gap: .4rem; }
  .top-admin-header .top-admin-header-actions { gap: .3rem !important; }
  .top-admin-header .top-admin-header-actions .top-btn { padding-inline: .42rem; }
  .top-admin-header .top-user-name { display: none; }
  .top-admin-header .top-header-inner > div:first-child > a { gap: .25rem !important; }
  .top-admin-header .top-header-inner > div:first-child > a > span:nth-child(2) { font-size: 1.15rem !important; }
  .top-dashboard-kpis, .top-admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .top-dashboard-kpis .top-card, .top-admin-kpis .top-card { padding: .65rem !important; }
  .top-dashboard-kpis .top-card:last-child { grid-column: 1 / -1; }
  .top-account-panels, .top-admin-insights { grid-template-columns: minmax(0, 1fr); }
  .top-account-overview .top-dashboard-heading > a { width: 100%; }
  .top-account-panels { display: contents; }
  .top-account-panels > .top-card:nth-child(2) { order: 2; }
  .top-dashboard-chart { height: 171px; }
  .top-dashboard-table table, .top-dashboard-table tbody { display: block; }
  .top-dashboard-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .top-dashboard-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .6rem; border-bottom: 1px solid var(--top-border); }
  .top-dashboard-table td { display: block; padding: 0; border: 0; max-width: 100%; }
  .top-dashboard-table td:first-child { flex-basis: 100%; overflow-wrap: anywhere; }
  .top-account-overview .top-dashboard-table td:nth-child(2) { display: none; }
  .top-dashboard-table td:last-child { margin-left: auto; }
  .top-admin-mobile-menu { position: relative; min-width: 0; }
  .top-admin-mobile-menu summary { list-style: none; cursor: pointer; }
  .top-admin-mobile-menu div { position: absolute; bottom: calc(100% + .5rem); right: .4rem; display: grid; min-width: 10rem; background: var(--top-surface); border: 1px solid var(--top-border); border-radius: var(--top-radius-md); }
  .top-admin-mobile-menu div a { padding: .55rem .8rem; }
}

.top-kpi-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--top-space-6);
  background-color: var(--top-surface);
  border: 1px solid var(--top-border);
  border-radius: var(--top-radius-lg);
  padding: var(--top-space-3) var(--top-space-5);
  margin-block: var(--top-space-4);
  font-size: 0.875rem;
}

.top-kpi-item {
  display: flex;
  align-items: center;
  gap: var(--top-space-2);
}

.top-kpi-item strong {
  font-size: 1.125rem;
  color: var(--top-text);
}

.top-status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--top-radius-full);
  background-color: var(--top-accent);
  display: inline-block;
}



/* === traffic-and-tables.css === */
/* Rating Table */
.top-table-wrapper {
  overflow-x: auto;
  scrollbar-width: thin;
  background-color: var(--top-surface);
  border: 1px solid var(--top-border);
  border-radius: var(--top-radius-lg);
  -webkit-overflow-scrolling: touch;
}

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

.top-table th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--top-text-muted);
  border-bottom: 1px solid var(--top-border);
  background-color: var(--top-surface-alt);
}

.top-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--top-border-light);
  font-size: 0.875rem;
  vertical-align: middle;
}

.top-table tr:last-child td {
  border-bottom: none;
}

.top-table tr:hover td {
  background-color: var(--top-surface-hover);
}

/* Site entry inside table */
.top-site-info {
  display: flex;
  align-items: center;
  gap: var(--top-space-3);
}

.top-site-favicon {
  width: 32px;
  height: 32px;
  border-radius: var(--top-radius-md);
  object-fit: cover;
  background-color: var(--top-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-site-meta {
  display: flex;
  flex-direction: column;
}

.top-site-title {
  font-weight: 600;
  color: var(--top-text);
  display: inline-flex;
  align-items: center;
  gap: var(--top-space-2);
}

.top-site-domain {
  font-size: 0.8125rem;
  color: var(--top-text-muted);
}

/* Sparkline canvas container */
.top-sparkline-wrap {
  width: 80px;
  height: 28px;
  position: relative;
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .top-table td .top-sparkline-wrap {
    display: none;
  }
}

/* Timeline feed (Events in cabinet and admin) */
.top-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--top-space-4);
}

.top-timeline-item {
  display: flex;
  gap: var(--top-space-3);
}

.top-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--top-radius-full);
  margin-top: 6px;
  flex-shrink: 0;
}

.top-timeline-dot.success { background-color: var(--top-accent); }
.top-timeline-dot.primary { background-color: var(--top-primary); }
.top-timeline-dot.warning { background-color: var(--top-warning); }

.top-timeline-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8125rem;
}

.top-timeline-title {
  font-weight: 600;
  color: var(--top-text);
}

.top-timeline-time {
  color: var(--top-text-subtle);
  font-size: 0.75rem;
}

/* Responsive mobile cards */
.top-mobile-cards {
  display: none;
  flex-direction: column;
  gap: var(--top-space-3);
}

.top-site-card {
  background-color: var(--top-surface);
  border: 1px solid var(--top-border);
  border-radius: var(--top-radius-lg);
  padding: var(--top-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--top-space-3);
}

.top-mobile-category-nav {
  display: none;
  min-inline-size: 0;
  margin-bottom: 1rem;
}

.top-mobile-category-bar {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  white-space: nowrap;
  gap: var(--top-space-2);
  padding-block: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.top-category-scroll-hint {
  display: block;
  visibility: hidden;
  color: var(--top-text-muted);
  font-size: .6875rem;
  line-height: 1.25;
  text-align: end;
  pointer-events: none;
}

.top-mobile-category-nav.has-more .top-category-scroll-hint { visibility: visible; }

.top-mobile-category-bar > a { flex-shrink: 0; scroll-snap-align: start; }
.top-mobile-category-bar.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.top-mobile-category-bar.is-dragging > a { cursor: inherit; }

.top-mobile-category-bar::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  .top-rating-table {
    display: none;
  }
  .top-mobile-cards {
    display: flex;
  }
  .top-mobile-category-nav {
    display: block;
  }
}

.top-network { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-block: 1.25rem 2rem; min-width: 0; }
.top-network h1, .top-network h2 { margin: 0; }
.top-network h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -.035em; }
.top-network h2 { font-size: 1.125rem; }
.top-network-header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.top-network-header p, .top-network-method p { margin: .35rem 0 0; color: var(--top-text-muted); }
.top-network-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 0; }
.top-network-kpis .top-card { min-width: 0; }
.top-network-kpis dt { color: var(--top-text-muted); font-size: .875rem; }
.top-network-kpis dd { margin: .35rem 0 0; font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 750; line-height: 1.15; overflow-wrap: anywhere; }
.top-network-chart .top-dashboard-chart { margin-top: .75rem; min-width: 0; }
.top-network-chart canvas { max-width: 100%; }
@media (max-width: 768px) {
  .top-network-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .top-network-kpis .top-card { padding: .65rem; }
}

.top-rating-list .top-trend-up, .top-rating-list .top-trend-down { white-space: nowrap; }
.top-rating-home .top-sidebar-nav-item span { min-width: 0; overflow-wrap: anywhere; }
.top-rating-lead .top-kpi-item + .top-kpi-item { border-inline-start: 1px solid var(--top-border); padding-inline-start: 1.15rem; }
.top-rating-list .top-table th:first-child { width: 2rem; }

.top-dashboard-heading h1, .top-admin-overview h1 { font-size: clamp(1.5rem, 2.7vw, 2.15rem) !important; }
.top-dashboard-kpis .top-card, .top-admin-kpis .top-card { border-radius: var(--top-radius-md); }
.top-admin-overview .top-admin-insights .top-card-header { margin-bottom: .65rem; }
.top-admin-overview .top-chart-controls .top-btn { gap: .2rem; }
@media (max-width: 768px) {
  html { scroll-padding-block-end: calc(70px + env(safe-area-inset-bottom)); }
  .top-account-overview .top-dashboard-heading { gap: .5rem !important; }
  .top-account-overview .top-dashboard-heading p, .top-account-overview .top-dashboard-kpis > :last-child { display: none; }
  .top-account-overview, .top-admin-overview { gap: .75rem !important; }
  .top-admin-overview > div:first-child > div > p { display: none; }
  .top-admin-overview .top-admin-insights > .top-card { padding: .75rem; }
  .top-account-overview .top-account-panels > .top-card { padding: .75rem; }
  .top-account-overview .top-dashboard-table tbody { display: grid; gap: .5rem; background: var(--top-bg); }
  .top-account-overview .top-dashboard-table tr { border: 1px solid var(--top-border); border-radius: var(--top-radius-md); background: var(--top-surface-alt); }
  .top-account-overview .top-dashboard-table { border: 0; }
}

.top-traffic-review-form { display: flex; flex-wrap: wrap; align-items: end; gap: .45rem; }
.top-traffic-review-form label { display: grid; gap: .1rem; font-size: .78rem; text-align: start; }
@media (max-width: 768px) {
  .top-traffic-table table, .top-traffic-table tbody { display: block; }
  .top-traffic-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .top-traffic-table tr { display: flex; flex-wrap: wrap; gap: .25rem .5rem; padding: .6rem; border-bottom: 1px solid var(--top-border); }
  .top-traffic-table td { display: block; padding: 0; border: 0; }
  .top-traffic-table td:nth-child(1), .top-traffic-table td:nth-child(4), .top-traffic-table td:last-child { flex-basis: 100%; }
  .top-traffic-review-form label, .top-traffic-review-form label input { width: 100%; min-width: 0; }
  .top-traffic-review-form input[name="reason"] { flex: 1; min-width: 8rem; }
}

.top-kpi-label { display: flex; align-items: center; gap: .45rem; }
.top-kpi-label svg { flex-shrink: 0; }
.top-site-manage { color: var(--top-primary); font-weight: 650; }
.top-account-overview .top-dashboard-table td:last-child .top-btn { padding-inline: .4rem; }
@media (min-width: 769px) {
  .top-admin-overview .top-admin-grid > .top-card:last-child .top-timeline {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem;
  }
}

.top-verified-label { margin-inline-start: .25rem; padding: .08rem .35rem; font-size: .66rem; }
.top-verified-label svg { flex-shrink: 0; }

@media (max-width: 768px) {
  .top-account-overview .top-chart-controls .top-select { flex: 1 1 7rem; width: auto; min-width: 0; max-width: 100%; }
  .top-account-overview .top-chart-controls .top-btn,
  .top-admin-overview .top-chart-controls .top-btn { padding-inline: .4rem; font-size: .73rem; }
  .top-account-overview .top-chart-controls { width: 100%; }
  .top-admin-overview .top-admin-kpis .top-card > div:last-child { font-size: 1.35rem !important; line-height: 1.1; }
  .top-admin-overview .top-attention-panel { border-color: var(--top-warning); background: var(--top-warning-light); }
  .top-admin-overview .top-attention-panel h2,
  .top-admin-overview .top-admin-attention > :not(.top-traffic-alert) { display: none !important; }
  .top-admin-overview .top-admin-attention > .top-traffic-alert { border: 0; background: transparent; padding: 0 !important; gap: .7rem !important; }
  .top-admin-overview .top-traffic-alert > div:first-child { padding: .35rem !important; }
  .top-admin-overview .top-admin-grid > .top-card { padding: .7rem; }
}

.top-domain-verification .top-card { min-width: 0; }
.top-domain-verification p code, .top-domain-verification h1 { overflow-wrap: anywhere; }
.top-domain-verification pre { max-width: 100%; }


/* === dashboard-layouts.css === */
/* Shared geometry for the rating, owner dashboard and moderation dashboard. */
.top-profile-menu, .top-filter-menu { position: relative; }
.top-profile-menu summary, .top-filter-menu summary { list-style: none; cursor: pointer; }
.top-profile-menu summary::-webkit-details-marker, .top-filter-menu summary::-webkit-details-marker { display: none; }
.top-profile-menu summary { display: flex; align-items: center; gap: .45rem; font-size: .875rem; font-weight: 650; }
.top-avatar, .top-header [data-theme-toggle], .top-header-bell, .top-public-login-icon {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50% !important;
}
.top-avatar, .top-public-login-icon { background: var(--top-primary-light); color: var(--top-text); }
.top-header [data-theme-toggle], .top-header-bell { padding: 0 !important; }
.top-header-bell { background: transparent; }
.top-header-popover {
  position: absolute; inset: calc(100% + .4rem) 0 auto auto; z-index: 45; min-width: 9rem;
  padding: .25rem; border: 1px solid var(--top-border); border-radius: var(--top-radius-md);
  background: var(--top-surface); box-shadow: var(--top-shadow-md);
}
.top-header-popover a, .top-header-popover button { display: block; width: 100%; padding: .45rem .65rem; text-align: start; color: var(--top-text); white-space: nowrap; }
.top-header-popover a:hover, .top-header-popover button:hover { background: var(--top-surface-hover); text-decoration: none; }
.top-admin-header .top-search-box { width: min(38vw, 470px); }
.top-admin-header .top-search-box input { width: 100%; background: var(--top-surface-alt); }
.top-public-login-icon, .top-mobile-open, .top-account-row-visitors > span, .top-search-submit-mobile { display: none; }
.top-rating-home .top-right-col { flex-direction: column; gap: .75rem; }
.top-rating-home .top-right-col .top-card { padding: .85rem; }
.top-rating-home .top-right-col .top-card-header { margin-bottom: .45rem; }
.top-rating-promo { background: linear-gradient(145deg, var(--top-primary-light), var(--top-surface-alt)); }
.top-growth-icon { margin-inline-end: .15rem; color: var(--top-accent); }
.top-growth-chart { position: relative; height: 112px; margin-block-start: .6rem; }
.top-kpi-value { display: flex; align-items: baseline; justify-content: space-between; gap: .35rem; }
.top-kpi-value > span { font-size: .86rem; font-weight: 680; white-space: nowrap; }
.top-queue-actions { display: inline-flex; gap: .35rem; }
.top-mobile-verified { display: inline-grid; place-items: center; width: 15px; height: 15px; flex-shrink: 0; border-radius: 50%; background: #2d981b; color: white; }
.top-sidebar .top-category-nav-label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 960px) {
  .top-rating-home.three-col { grid-template-columns: minmax(146px, 17%) minmax(0, 1fr) minmax(178px, 21%); gap: .8rem; }
  .top-rating-home.three-col .top-right-col { display: flex; grid-column: auto; order: initial; }
  .top-rating-home .top-table th, .top-rating-home .top-table td { padding-block: .37rem; }
  .top-rating-home .top-table th { font-size: .68rem; text-transform: none; }
  .top-rating-home .top-table .top-site-favicon { width: 27px; height: 27px; }
  .top-rating-home .top-sidebar-nav-item { padding-block: .52rem; }
  .top-dashboard-layout { grid-template-columns: minmax(158px, 17%) minmax(0, 1fr); gap: 1.05rem; }
  .top-dashboard-layout > .top-sidebar { border-inline-end: 1px solid var(--top-border); padding-inline-end: .65rem; }
  .top-account-panels, .top-admin-insights { grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); }
  .top-admin-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .top-account-overview > .top-account-panels .top-dashboard-chart,
  .top-admin-overview .top-dashboard-chart { height: clamp(190px, 21vw, 244px); }
  .top-admin-overview { gap: .85rem !important; }
  .top-admin-overview .top-card, .top-account-overview .top-card { padding: .9rem; }
}

@media (max-width: 768px) {
  .top-header { height: 54px; }
  .top-profile-chevron, .top-public-login-text { display: none; }
  .top-public-login { border: 0; padding: 0; background: transparent; }
  .top-public-login-icon { display: inline-grid; }
  .top-search-submit-mobile { display: inline-grid; padding: 0; }
  .top-rating-home .top-search-submit-desktop { display: none; }
  .top-rating-home .top-site-card { min-block-size: clamp(4.875rem, 24vw, 5.75rem); padding: .375rem .55rem; gap: .18rem; justify-content: space-between; }
  .top-site-card .top-site-meta { line-height: 1.25; }
  .top-site-card .top-site-domain {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    overflow: hidden; overflow-wrap: anywhere; font-size: .75rem;
  }
  .top-rating-home .top-site-card .top-rank-badge { width: 23px; height: 22px; border-radius: 5px; }
  .top-rating-home .top-site-card-metrics { padding-inline-start: 2rem; }
  .top-rating-home .top-mobile-category-bar .top-pill span { display: none; }
  .top-rating-home .top-rating-search { min-height: 38px; }
  .top-account-overview .top-dashboard-table tr:not(:has(td[colspan])) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
  .top-account-overview .top-dashboard-table td:first-child { grid-area: 1 / 1 / 2 / 3; }
  .top-account-overview .top-dashboard-table td:nth-child(2) { display: block; grid-area: 1 / 3; justify-self: end; }
  .top-account-overview .top-dashboard-table td:nth-child(3) { grid-area: 2 / 1; align-self: center; }
  .top-account-overview .top-dashboard-table td:nth-child(4) { grid-area: 2 / 2; align-self: center; }
  .top-account-overview .top-dashboard-table td:nth-child(5) { grid-area: 2 / 3; }
  .top-account-overview .top-owned-site-counter { display: none; }
  .top-account-overview .top-account-row-visitors > span { display: inline; }
  .top-admin-overview .top-admin-grid .top-dashboard-table tbody { display: grid; gap: .45rem; }
  .top-admin-overview .top-admin-grid .top-dashboard-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; background: var(--top-surface-alt); border: 1px solid var(--top-border); border-radius: .65rem; }
  .top-admin-overview .top-dashboard-table td:first-child { grid-area: 1 / 1; }
  .top-admin-overview .top-dashboard-table td:nth-child(4) { grid-area: 1 / 2; justify-self: end; }
  .top-admin-overview .top-dashboard-table td:nth-child(2) > div:last-child { display: none; }
  .top-admin-overview .top-dashboard-table td:nth-child(3) { justify-self: end; }
  .top-admin-overview .top-dashboard-table td:last-child { grid-column: 1 / -1; width: 100%; }
  .top-admin-overview .top-queue-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .top-admin-overview .top-mobile-open { display: inline-flex; }
  .top-admin-overview .top-quick-approve { display: none; }
  .top-admin-overview .top-dashboard-table { border: 0; }
}

.top-site-title-line { display: flex; align-items: center; gap: .25rem; min-width: 0; }
.top-site-title-line .top-site-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-site-title-line .top-verified-label { white-space: nowrap; flex-shrink: 0; }
.top-growth-icon { vertical-align: -.2rem; }
.top-account-event-list { display: grid; gap: .7rem; overflow-wrap: anywhere; }
.top-dashboard-kpis .top-trend-up { color: #219220; }
[data-theme="dark"] .top-dashboard-kpis .top-trend-up { color: #90df4c; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .top-dashboard-kpis .top-trend-up { color: #90df4c; }
}
@media (min-width: 960px) {
  .top-rating-home .top-table td .top-sparkline-wrap { display: inline-block; width: 54px; }
  .top-rating-home .top-sidebar-nav-item { font-size: .85rem; }
  .top-rating-home .top-rating-lead h1 { font-size: clamp(1.8rem, 3vw, 2.35rem); }
  .top-account-overview .top-account-panels:not(.top-account-sites-panels) .top-card-header { margin-bottom: .6rem; }
  .top-admin-overview .top-admin-attention > .top-card { gap: .6rem !important; }
  .top-admin-overview .top-admin-attention > .top-card > div:first-child { padding: .5rem !important; }
  .top-dashboard-layout .top-sidebar-nav-item { font-size: .86rem; padding: .58rem .62rem; }
}
@media (max-width: 768px) {
  .top-account-overview .top-dashboard-kpis .top-kpi-label { font-size: .8rem; line-height: 1.15; }
  .top-account-overview .top-dashboard-kpis .top-kpi-label svg { width: 17px; height: 17px; }
  .top-account-overview .top-kpi-value > span { font-size: .73rem; }
  .top-account-overview .top-dashboard-kpis .top-card { gap: .25rem; }
  .top-account-overview .top-card-header { margin-bottom: .55rem; }
  .top-account-overview .top-dashboard-chart, .top-admin-overview .top-dashboard-chart { height: 135px; }
  .top-admin-overview .top-admin-insights .top-card-header > div:first-child > span { display: none; }
  .top-admin-overview .top-card-header { gap: .3rem; }
  .top-admin-overview .top-chart-legend { font-size: .69rem !important; gap: .45rem !important; }
  .top-admin-overview .top-admin-kpis .top-card { min-height: 63px; }
  .top-account-overview .top-dashboard-table tr:not(:has(td[colspan])) { padding: .38rem .5rem; min-block-size: 4.75rem; line-height: 1.25; }
  .top-account-overview .top-account-row-rank { font-size: .78rem; }
  .top-account-overview .top-account-row-visitors { font-size: .78rem; }
}

@media (min-width: 960px) {
  .top-dashboard-layout .top-dashboard-table .top-table td { padding: .42rem .55rem; font-size: .8rem; }
  .top-dashboard-layout .top-dashboard-table .top-table th { padding: .45rem .55rem; font-size: .68rem; text-transform: none; }
  .top-account-overview .top-counter-setup h2 { font-size: 1.05rem; }
  .top-account-overview .top-owned-sites .top-table { width: 100%; table-layout: fixed; }
  .top-account-overview .top-owned-sites th:nth-child(2) { width: 18%; }
  .top-account-overview .top-owned-sites th:nth-child(3) { width: 13%; }
  .top-account-overview .top-owned-sites th:nth-child(4) { width: 18%; }
  .top-account-overview .top-owned-sites th:nth-child(5) { width: 7.75rem; }
  .top-account-overview .top-owned-sites .top-btn-sm { padding-inline: .35rem; }
  .top-admin-overview .top-admin-insights .top-dashboard-chart { height: 180px; }
  .top-admin-overview .top-admin-grid .top-card-header { margin-block-end: .45rem; }
}
@media (max-width: 768px) {
  .top-mobile-nav .top-sidebar-nav-item.active { background: transparent; color: var(--top-primary); }
  .top-rating-home .top-mobile-category-bar .top-pill:not(.active) { border: 1px solid var(--top-border); background: var(--top-surface-alt); }
  .top-account-overview .top-dashboard-table tr { gap: .14rem .32rem; }
  .top-account-overview .top-dashboard-table .top-btn { padding-block: .25rem; }
  .top-account-overview .top-dashboard-table .top-badge { max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-admin-overview .top-chart-controls, .top-account-overview .top-chart-controls { gap: .25rem; }
  .top-admin-overview .top-chart-controls .top-btn, .top-account-overview .top-chart-controls .top-btn { padding-block: .24rem; }
  .top-admin-overview .top-admin-grid > .top-card:first-child { padding-inline: .55rem; }
}

/* Chart options share one set of controls on both layouts. */
.top-chart-settings { position: relative; min-width: 0; }
.top-chart-settings > summary { list-style: none; }
.top-chart-settings > summary::-webkit-details-marker { display: none; }
.top-chart-trigger { display: flex; align-items: center; gap: .3rem; cursor: pointer; font-size: .78rem; color: var(--top-text-muted); white-space: nowrap; }
.top-chart-trigger:focus-visible { outline-offset: 4px; }
.top-admin-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.top-admin-heading h1 { line-height: 1.13; }
.top-admin-insights h2, .top-owned-sites h2 { margin: 0; font-size: 1.125rem; line-height: 1.25; }
.top-owned-site-caption { color: var(--top-text-muted); font-size: .75rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-owned-site-name { min-width: 0; }
.top-owned-site-name > a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-owned-site-actions { display: inline-flex; align-items: center; gap: .2rem; }
.top-site-manage, .top-queue-all { white-space: nowrap; }
.top-site-manage .icon { display: none; }
.top-account-row-rank { white-space: nowrap; }
.top-compare-icon { width: .88rem; height: .88rem; border: 1px solid currentColor; border-radius: .2rem; }
.top-rating-home .top-compare-button { color: var(--top-text); }
.top-rating-home .top-compare-button:disabled { opacity: .72; }
.top-rating-home .top-rating-periods .top-pills { gap: .15rem; }
.top-chart-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--top-primary); flex: none; }
.top-chart-dot-previous { background: #929fc7; }
.top-admin-chart-period { margin-inline-start: auto; }
.top-attention-title { font-size: .85rem; font-weight: 700; color: var(--top-text); }
.top-attention-caption { font-size: .75rem; color: var(--top-text-muted); margin-block-start: .2rem; }
.top-queue-header { justify-content: flex-start; gap: .65rem; }
.top-queue-all { margin-inline-start: auto; color: var(--top-primary); }
.top-queue-cell .top-quick-approve .top-header-popover { inset: auto 0 100% auto; }
.top-admin-overview .top-queue-cell { overflow: visible; }
.top-admin-overview .top-queue-cell .top-header-popover button { background: transparent; border: 0; cursor: pointer; }
.top-admin-overview .top-queue-cell .top-header-popover button:hover { background: var(--top-surface-hover); }
.top-alert-cta { margin-inline-start: auto; align-self: center; color: var(--top-primary); background: var(--top-primary-light); font-size: .72rem; }

@media (min-width: 769px) {
  @supports selector(details::details-content) {
    .top-chart-settings::details-content { content-visibility: visible; }
    .top-chart-settings > summary { display: none; }
  }
}

@media (min-width: 960px) {
  .top-rating-home .top-rating-table tbody td { padding-block: .26rem; }
  .top-rating-home .top-rating-table .top-site-info { line-height: 1.25; }
  .top-rating-home .top-rating-table .top-site-domain { font-size: .76rem; }
  .top-rating-home .top-rating-tabs a { font-size: .9rem; }
  .top-rating-home .top-rating-periods .top-pill { min-width: 4.15rem; text-align: center; }
  .top-dashboard-layout .top-dashboard-table .top-table th { font-size: .75rem; }
  .top-account-overview .top-owned-site-counter { min-width: 30px; }
  .top-admin-overview .top-admin-attention > a { align-items: center !important; }
  .top-admin-overview .top-admin-attention .top-alert-cta { padding-inline: .45rem; }
  .top-rating-home .top-rating-promo p { font-size: .8rem !important; margin-bottom: .65rem !important; }
  .top-admin-overview .top-admin-kpis > .top-card { padding: .85rem .95rem !important; }
  .top-admin-overview .top-admin-kpis > .top-card > div:last-child { line-height: 1.15; }
  .top-admin-overview .top-admin-insights .top-dashboard-chart { height: 174px; }
  .top-admin-overview .top-admin-attention { gap: .2rem; }
  .top-admin-overview .top-admin-attention > .top-card { padding-block: .38rem !important; line-height: 1.23; }
  .top-admin-overview .top-admin-attention > .top-card > div:first-child { padding: .4rem !important; }
  .top-admin-overview .top-admin-attention > .top-card > div:first-child svg { width: 20px; height: 20px; }
  .top-admin-overview .top-admin-insights .top-card-header > div:first-child > span { display: none; }
}

@media (max-width: 768px) {
  .top-dashboard-layout { padding-block-start: .7rem; }
  .top-dashboard-layout .top-dashboard-table .top-table td { padding: 0; border: 0; }
  .top-admin-overview .top-dashboard-table .top-site-meta { min-width: 0; }
  .top-admin-overview .top-dashboard-table td:first-child .top-site-title {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .top-dashboard-layout .top-dashboard-table tbody tr { align-items: center; }
  .top-admin-overview .top-dashboard-table tbody tr { min-block-size: 5.375rem; gap: .22rem .4rem; padding: .4rem .55rem; line-height: 1.25; }
  .top-admin-overview .top-dashboard-table .top-site-favicon { width: 26px; height: 26px; }
  .top-admin-overview .top-dashboard-table td:nth-child(2),
  .top-admin-overview .top-dashboard-table td:nth-child(3) { display: none; }
  .top-queue-site-caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
  .top-admin-overview .top-dashboard-table .top-queue-actions .top-btn { min-block-size: 32px; padding-block: .28rem; }
  .top-account-overview .top-account-panels .top-dashboard-chart,
  .top-admin-overview .top-admin-insights .top-dashboard-chart { height: 110px; }
  .top-chart-settings[open] > :is(.top-chart-controls, .top-pills) {
    position: absolute; z-index: 12; inset: calc(100% + .45rem) 0 auto auto;
    display: flex; flex-wrap: wrap; width: max-content; max-width: min(270px, 75vw); min-width: 136px;
    padding: .5rem; background: var(--top-surface); border: 1px solid var(--top-border);
    border-radius: var(--top-radius-md); box-shadow: var(--top-shadow-md);
  }
  .top-chart-settings[open] select { flex-basis: 100%; }
  .top-account-overview .top-account-panels:not(.top-account-sites-panels) .top-card-header { justify-content: flex-start; gap: .5rem; }
  .top-account-overview .top-chart-settings > .top-chart-controls { inset-inline: 0 auto; }
  .top-admin-overview .top-admin-insights .top-card-header { margin-bottom: .3rem; }
  .top-admin-overview .top-admin-kpis .top-card { min-height: 56px; }
  .top-admin-overview .top-admin-kpis .top-card > div:first-child { margin-bottom: .2rem !important; line-height: 1.15; }
  .top-admin-overview .top-admin-insights { gap: .42rem; }
  .top-admin-overview .top-admin-insights > .top-attention-panel { padding: .5rem; }
  .top-admin-overview .top-traffic-alert { align-items: center !important; }
  .top-admin-overview .top-admin-grid > .top-card:first-child {
    background: transparent; border: 0; padding: .15rem 0; box-shadow: none;
  }
  .top-admin-overview .top-admin-grid .top-table-wrapper { background: transparent; }
  .top-account-overview .top-account-panels > .top-owned-sites { background: transparent; border: 0; padding-inline: 0; box-shadow: none; }
  .top-account-overview .top-owned-sites .top-table-wrapper { background: transparent; }
  .top-account-overview .top-site-manage .icon { display: block; }
  .top-account-overview .top-dashboard-heading > a,
  .top-rating-home .top-rating-mobile-add { font-size: .92rem; min-height: 42px; }
  .top-account-overview .top-owned-site-name > a,
  .top-admin-overview .top-dashboard-table .top-site-title { font-size: .9rem; }
  .top-account-overview .top-owned-site-caption,
  .top-admin-overview .top-queue-site-caption { font-size: .73rem; }
  .top-admin-overview .top-queue-settings { margin-inline-start: auto; }
  .top-admin-overview .top-queue-settings summary { width: 32px; min-height: 32px; justify-content: center; }
  .top-admin-overview .top-queue-all { margin-inline-start: 0; }
  .top-admin-overview .top-admin-insights .top-chart-legend { flex-basis: auto; margin-inline-start: auto; }
  .top-admin-overview .top-admin-insights > .top-card:first-child .top-chart-settings { order: 1; }
  .top-admin-overview .top-admin-insights > .top-card:first-child .top-chart-trigger { font-size: 0; min-height: 32px; padding-inline: .2rem; }
  .top-admin-chart-period { margin-inline-start: 0; }
  .top-admin-chart-period .top-header-popover { inset-inline: 0 auto; min-width: 7rem; }
  .top-admin-overview .top-traffic-alert .top-alert-cta { background: var(--top-warning-light); color: var(--top-warning-text); border: 1px solid var(--top-warning); }
  .top-rating-home .top-rating-filter summary { min-width: 36px; min-height: 32px; padding: .25rem; }
  .top-rating-home .top-rating-search input { font-size: .875rem; }
  .top-rating-home .top-rating-periods .top-pill,
  .top-rating-home .top-mobile-category-bar .top-pill { font-size: .76rem; font-weight: 650; }
  .top-rating-home .top-mobile-category-bar .top-pill {
    flex: 0 0 calc((100% - 3 * var(--top-space-2)) / 4);
    min-inline-size: max-content;
    padding-inline: .2rem;
    font-size: clamp(.67rem, 3vw, .76rem);
    text-align: center;
  }
  .top-rating-home .top-filter-caption { display: none; }
}


