/* ==========================================================================
   Drukas Nams Vendor Sync — design tokens and Bootstrap bridge.
   Same language as INDEED Padel (Halo-like): warm neutrals, DM Sans,
   4–8px corners, hairline borders, tinted chips, no heavy shadows.
   Light is the default; dark is opt-in via the theme toggle
   (html[data-theme="dark"], mirrored to data-bs-theme for Bootstrap).
   Loaded after style.css so these rules win.
   ========================================================================== */

:root {
  /* Drukas Nams logo orange drives the accent. */
  --brand: #e74c0a;
  --bg: #f7f5f1;
  --surface: #ffffff;
  --surface-2: #f2efea;
  --surface-3: #e9e5de;
  --line: #e4e0d8;
  --line-strong: #d4cfc5;
  --text: #1d1c1a;
  --text-2: #3c3a36;
  --muted: #6f6a62;
  --invert-bg: #1d1c1a;
  --invert-hover: #3c3a36;
  --invert-text: #ffffff;
  --accent: #e74c0a;
  --accent-text: #b83d07;
  --on-accent: #ffffff;
  --accent-tint: rgba(231, 76, 10, .08);
  --accent-line: rgba(231, 76, 10, .35);
  --red: #c9311a;
  --red-tint: rgba(201, 49, 26, .08);
  --green: #1f8a55;
  --green-tint: rgba(31, 138, 85, .1);
  --amber: #a86a00;
  --amber-tint: rgba(212, 160, 23, .14);
  --blue: #2f6fb3;
  --blue-tint: rgba(47, 111, 179, .1);
  --violet: #6d4bc4;
  --violet-tint: rgba(109, 75, 196, .1);
  --r-sm: 4px;
  --r: 6px;
  --r-lg: 8px;
  --font: "DM Sans Variable", "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --nav-h: 56px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #131211;
  --surface: #1b1a18;
  --surface-2: #232220;
  --surface-3: #2b2a27;
  --line: #302f2c;
  --line-strong: #3d3c38;
  --text: #ece9e4;
  --text-2: #c8c3bb;
  --muted: #a19b91;
  --invert-bg: #ece9e4;
  --invert-hover: #ffffff;
  --invert-text: #131211;
  --accent: #ff7a3d;
  --accent-text: #ff8a52;
  --on-accent: #1a0d06;
  --accent-tint: rgba(255, 122, 61, .12);
  --accent-line: rgba(255, 122, 61, .38);
  --red: #ff6a4d;
  --red-tint: rgba(255, 106, 77, .12);
  --green: #4fc98a;
  --green-tint: rgba(79, 201, 138, .12);
  --amber: #f0c04a;
  --amber-tint: rgba(240, 192, 74, .12);
  --blue: #7fb2ff;
  --blue-tint: rgba(127, 178, 255, .12);
  --violet: #b49cff;
  --violet-tint: rgba(180, 156, 255, .12);
  color-scheme: dark;
}

/* ---------- Bootstrap bridge: components read these variables. */
:root,
:root[data-bs-theme] {
  --bs-body-font-family: var(--font);
  --bs-font-sans-serif: var(--font);
  --bs-font-monospace: var(--mono);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-emphasis-color: var(--text);
  --bs-heading-color: var(--text);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-color: var(--muted);
  --bs-secondary-bg: var(--surface-2);
  --bs-tertiary-bg: var(--surface-2);
  --bs-border-color: var(--line);
  --bs-border-color-translucent: var(--line);
  --bs-link-color: var(--accent-text);
  --bs-link-hover-color: var(--text);
  --bs-link-color-rgb: 184, 61, 7;
  --bs-link-hover-color-rgb: 29, 28, 26;
  --bs-border-radius: var(--r);
  --bs-border-radius-sm: var(--r-sm);
  --bs-border-radius-lg: var(--r-lg);
  --bs-focus-ring-color: var(--accent-line);
  --bs-code-color: var(--accent-text);
}

/* ---------- base */
body {
  padding-top: var(--nav-h);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { letter-spacing: -0.015em; color: var(--text); }
code, kbd, pre, .font-monospace { font-family: var(--mono); }
code { background: var(--surface-2); padding: 1px 5px; border-radius: var(--r-sm); font-size: .85em; }
a { color: var(--accent-text); }
.text-muted, .text-secondary, .text-body-secondary { color: var(--muted) !important; }
.text-dark, .text-body { color: var(--text) !important; }
.bg-light, .bg-body-tertiary, .bg-body-secondary { background-color: var(--surface-2) !important; }
.bg-white, .bg-body { background-color: var(--surface) !important; }
.border, .border-top, .border-bottom, .border-start, .border-end { border-color: var(--line) !important; }
hr { border-color: var(--line); opacity: 1; }
::selection { background: var(--accent-tint); }

/* ---------- top bar */
.app-navbar {
  --bs-navbar-color: var(--text-2);
  --bs-navbar-hover-color: var(--text);
  --bs-navbar-active-color: var(--text);
  --bs-navbar-brand-color: var(--text);
  --bs-navbar-brand-hover-color: var(--text);
  min-height: var(--nav-h);
  padding-block: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.app-navbar .container-fluid { min-height: var(--nav-h); padding-inline: 1.25rem; }
.app-navbar .navbar-brand { display: flex; align-items: center; gap: 12px; margin-right: 1.25rem; padding-block: 0; text-decoration: none; }
.brand-logo { display: block; height: 26px; width: auto; }
.brand-sep { width: 1px; height: 22px; background: var(--line-strong); }
.brand-app { font-weight: 700; font-size: 14px; line-height: 1.1; display: flex; flex-direction: column; color: var(--text); }
.brand-app small { font-weight: 500; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.app-navbar .navbar-nav { gap: 2px; }
.app-navbar .navbar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-weight: 500;
}
.app-navbar .navbar-nav .nav-link .bi { font-size: 15px; color: var(--muted); }
.app-navbar .navbar-nav .nav-link:hover,
.app-navbar .navbar-nav .nav-link:focus-visible { color: var(--text); background: var(--surface-2); }
.app-navbar .navbar-nav .nav-link.active,
.app-navbar .navbar-nav .show > .nav-link {
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.app-navbar .navbar-nav .nav-link.active .bi { color: var(--accent); }

.navbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn,
.navbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  min-width: 34px;
  padding: 0 8px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.icon-btn:hover,
.navbar-icon-btn:hover,
.navbar-icon-btn.active { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.navbar-icon-btn.active { box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--accent-text); }
.navbar-icon-label { display: none; }
.theme-toggle .bi-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .bi-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .bi-moon { display: none; }

.dropdown-menu {
  --bs-dropdown-bg: var(--surface);
  --bs-dropdown-color: var(--text);
  --bs-dropdown-border-color: var(--line);
  --bs-dropdown-link-color: var(--text-2);
  --bs-dropdown-link-hover-color: var(--text);
  --bs-dropdown-link-hover-bg: var(--surface-2);
  --bs-dropdown-link-active-color: var(--text);
  --bs-dropdown-link-active-bg: var(--accent-tint);
  --bs-dropdown-divider-bg: var(--line);
  --bs-dropdown-header-color: var(--muted);
  border-radius: var(--r-lg);
  padding: 4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
  font-size: 0.88rem;
}
.dropdown-item { border-radius: var(--r-sm); padding: 6px 10px; }
.dropdown-item .bi { color: var(--muted); }
.dropdown-item.active .bi { color: var(--accent); }
.dropdown-header { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

@media (max-width: 1199.98px) {
  .app-navbar .navbar-collapse { max-height: calc(100vh - var(--nav-h)); overflow-y: auto; padding: 0.25rem 0 0.85rem; }
  .app-navbar .navbar-nav .nav-link { padding: 10px 10px; }
  .app-navbar .dropdown-menu { border: 0; box-shadow: none; background: transparent; margin: 0 0 4px 22px; padding: 0; }
  .navbar-actions { flex-wrap: wrap; padding-top: 0.75rem; margin-top: 0.5rem; border-top: 1px solid var(--line); }
  .navbar-actions > *, .navbar-actions form .btn, .navbar-actions form .navbar-icon-btn { flex: 1 1 0; width: 100%; }
  .navbar-icon-label { display: inline; }
}
.navbar-toggler { border-color: var(--line); padding: 4px 8px; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px var(--accent-tint); }

/* ---------- surfaces */
.card {
  --bs-card-bg: var(--surface);
  --bs-card-cap-bg: var(--surface);
  --bs-card-border-color: var(--line);
  --bs-card-color: var(--text);
  border-radius: var(--r-lg);
  box-shadow: none;
}
.card-header, .card-footer, .modal-header, .modal-footer { background: var(--surface); border-color: var(--line); }
.card-footer { color: var(--muted); }
.modal { --bs-modal-bg: var(--surface); --bs-modal-border-color: var(--line); --bs-modal-header-border-color: var(--line); --bs-modal-footer-border-color: var(--line); }
.modal-content { border-radius: var(--r-lg); box-shadow: 0 24px 60px rgba(0, 0, 0, .18); }
.offcanvas { --bs-offcanvas-bg: var(--surface); --bs-offcanvas-color: var(--text); --bs-offcanvas-border-color: var(--line); }
.list-group { --bs-list-group-bg: var(--surface); --bs-list-group-color: var(--text); --bs-list-group-border-color: var(--line); --bs-list-group-action-hover-bg: var(--surface-2); --bs-list-group-active-bg: var(--accent-tint); --bs-list-group-active-color: var(--text); --bs-list-group-active-border-color: var(--accent-line); }
.accordion { --bs-accordion-bg: var(--surface); --bs-accordion-border-color: var(--line); --bs-accordion-active-bg: var(--surface-2); --bs-accordion-active-color: var(--text); --bs-accordion-btn-focus-box-shadow: 0 0 0 3px var(--accent-tint); }
.progress { --bs-progress-bg: var(--surface-3); --bs-progress-bar-bg: var(--accent); border-radius: 999px; }
.popover, .tooltip { --bs-popover-bg: var(--surface); --bs-popover-border-color: var(--line); }

/* ---------- tables */
.table {
  --bs-table-bg: var(--surface);
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--line);
  --bs-table-striped-bg: var(--surface-2);
  --bs-table-striped-color: var(--text);
  --bs-table-hover-bg: var(--surface-2);
  --bs-table-hover-color: var(--text);
  --bs-table-active-bg: var(--accent-tint);
  --bs-table-active-color: var(--text);
}
.table > thead,
.table-light,
.table > thead.table-light {
  --bs-table-bg: var(--surface);
  --bs-table-color: var(--muted);
  --bs-table-border-color: var(--line);
}
.table > thead th { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.table-warning { --bs-table-bg: var(--amber-tint); --bs-table-color: var(--text); }
.table-danger { --bs-table-bg: var(--red-tint); --bs-table-color: var(--text); }
.table-success { --bs-table-bg: var(--green-tint); --bs-table-color: var(--text); }
.table-info, .table-primary { --bs-table-bg: var(--blue-tint); --bs-table-color: var(--text); }
.table-secondary { --bs-table-bg: var(--surface-2); --bs-table-color: var(--text); }

/* ---------- forms */
.form-control, .form-select {
  background-color: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
  border-radius: var(--r);
}
.form-control::placeholder { color: var(--muted); opacity: .8; }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background-color: var(--surface-2); }
.form-control:focus, .form-select:focus {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.form-check-input { background-color: var(--surface); border-color: var(--line-strong); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-check-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.form-switch .form-check-input:focus { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23e74c0a'/%3e%3c/svg%3e"); }
.input-group-text { background: var(--surface-2); border-color: var(--line-strong); color: var(--muted); }
.form-label, .filter-label { color: var(--text-2); }
.filter-label { font-size: 12px; font-weight: 600; letter-spacing: .02em; }

/* ---------- buttons: one strong (invert) style, everything else quiet. */
.btn { border-radius: var(--r-sm); font-weight: 600; box-shadow: none !important; }
.btn-primary,
.btn-dark {
  --bs-btn-color: var(--invert-text);
  --bs-btn-bg: var(--invert-bg);
  --bs-btn-border-color: var(--invert-bg);
  --bs-btn-hover-color: var(--invert-text);
  --bs-btn-hover-bg: var(--invert-hover);
  --bs-btn-hover-border-color: var(--invert-hover);
  --bs-btn-active-color: var(--invert-text);
  --bs-btn-active-bg: var(--invert-hover);
  --bs-btn-active-border-color: var(--invert-hover);
  --bs-btn-disabled-color: var(--muted);
  --bs-btn-disabled-bg: var(--surface-2);
  --bs-btn-disabled-border-color: var(--line-strong);
  background: var(--bs-btn-bg);
  border-color: var(--bs-btn-border-color);
  color: var(--bs-btn-color);
}
.btn-primary:hover, .btn-primary:focus-visible, .btn-dark:hover { background: var(--bs-btn-hover-bg); border-color: var(--bs-btn-hover-border-color); color: var(--bs-btn-hover-color); }
.btn-primary.active, .btn-primary:active, .show > .btn-primary.dropdown-toggle { background: var(--bs-btn-active-bg); border-color: var(--bs-btn-active-border-color); }
.btn-primary:disabled, .btn-primary.disabled { background: var(--bs-btn-disabled-bg); border-color: var(--bs-btn-disabled-border-color); color: var(--bs-btn-disabled-color); }

.btn-secondary, .btn-light, .btn-outline-primary, .btn-outline-secondary, .btn-outline-dark, .btn-outline-light {
  --bs-btn-color: var(--text);
  --bs-btn-bg: var(--surface);
  --bs-btn-border-color: var(--line-strong);
  --bs-btn-hover-color: var(--text);
  --bs-btn-hover-bg: var(--surface-2);
  --bs-btn-hover-border-color: var(--line-strong);
  --bs-btn-active-color: var(--text);
  --bs-btn-active-bg: var(--surface-3);
  --bs-btn-active-border-color: var(--line-strong);
  --bs-btn-disabled-color: var(--muted);
  --bs-btn-disabled-bg: var(--surface);
  --bs-btn-disabled-border-color: var(--line);
}
.btn-outline-primary.active, .btn-check:checked + .btn-outline-primary { --bs-btn-active-bg: var(--accent-tint); --bs-btn-active-border-color: var(--accent-line); --bs-btn-active-color: var(--accent-text); }

.btn-success, .btn-outline-success { --role: var(--green); --role-tint: var(--green-tint); }
.btn-warning, .btn-outline-warning { --role: var(--amber); --role-tint: var(--amber-tint); }
.btn-danger, .btn-outline-danger { --role: var(--red); --role-tint: var(--red-tint); }
.btn-info, .btn-outline-info { --role: var(--blue); --role-tint: var(--blue-tint); }
.btn-success, .btn-warning, .btn-danger, .btn-info,
.btn-outline-success, .btn-outline-warning, .btn-outline-danger, .btn-outline-info {
  --bs-btn-color: var(--role);
  --bs-btn-bg: var(--role-tint);
  --bs-btn-border-color: color-mix(in srgb, var(--role) 35%, transparent);
  --bs-btn-hover-color: var(--role);
  --bs-btn-hover-bg: color-mix(in srgb, var(--role) 18%, transparent);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--role) 55%, transparent);
  --bs-btn-active-color: var(--role);
  --bs-btn-active-bg: color-mix(in srgb, var(--role) 24%, transparent);
  --bs-btn-active-border-color: var(--role);
  --bs-btn-disabled-color: var(--muted);
  --bs-btn-disabled-bg: var(--surface);
  --bs-btn-disabled-border-color: var(--line);
}
.btn-outline-success, .btn-outline-warning, .btn-outline-danger, .btn-outline-info { --bs-btn-bg: var(--surface); --bs-btn-border-color: var(--line-strong); }
.btn-link { --bs-btn-color: var(--accent-text); --bs-btn-hover-color: var(--text); }
.btn-close { filter: none; }
:root[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* ---------- chips: badges become tinted chips */
.badge {
  border-radius: var(--r-sm);
  font-weight: 600;
  letter-spacing: .01em;
  padding: .32em .55em;
  border: 1px solid transparent;
}
.badge.bg-success, .text-bg-success { background: var(--green-tint) !important; color: var(--green) !important; border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.badge.bg-danger, .text-bg-danger { background: var(--red-tint) !important; color: var(--red) !important; border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.badge.bg-warning, .text-bg-warning { background: var(--amber-tint) !important; color: var(--amber) !important; border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.badge.bg-info, .text-bg-info { background: var(--blue-tint) !important; color: var(--blue) !important; border-color: color-mix(in srgb, var(--blue) 30%, transparent); }
.badge.bg-primary, .text-bg-primary { background: var(--accent-tint) !important; color: var(--accent-text) !important; border-color: var(--accent-line); }
.badge.bg-secondary, .text-bg-secondary, .badge.bg-dark, .text-bg-dark, .badge.bg-light, .text-bg-light {
  background: var(--surface-2) !important; color: var(--text-2) !important; border-color: var(--line);
}
.badge.text-dark { color: inherit !important; }
.badge.rounded-pill { border-radius: 999px; }

/* ---------- alerts */
.alert { border-radius: var(--r-lg); font-size: 0.88rem; }
.alert-success { --bs-alert-bg: var(--green-tint); --bs-alert-color: var(--text); --bs-alert-border-color: color-mix(in srgb, var(--green) 30%, transparent); --bs-alert-link-color: var(--green); }
.alert-danger { --bs-alert-bg: var(--red-tint); --bs-alert-color: var(--text); --bs-alert-border-color: color-mix(in srgb, var(--red) 30%, transparent); --bs-alert-link-color: var(--red); }
.alert-warning { --bs-alert-bg: var(--amber-tint); --bs-alert-color: var(--text); --bs-alert-border-color: color-mix(in srgb, var(--amber) 30%, transparent); --bs-alert-link-color: var(--amber); }
.alert-info, .alert-primary { --bs-alert-bg: var(--blue-tint); --bs-alert-color: var(--text); --bs-alert-border-color: color-mix(in srgb, var(--blue) 30%, transparent); --bs-alert-link-color: var(--blue); }
.alert-secondary, .alert-light { --bs-alert-bg: var(--surface-2); --bs-alert-color: var(--text); --bs-alert-border-color: var(--line); }

/* ---------- nav, pagination */
.nav-tabs { --bs-nav-tabs-border-color: var(--line); --bs-nav-tabs-link-active-bg: var(--surface); --bs-nav-tabs-link-active-color: var(--text); --bs-nav-tabs-link-active-border-color: var(--line) var(--line) var(--surface); --bs-nav-link-color: var(--muted); --bs-nav-link-hover-color: var(--text); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--invert-bg); --bs-nav-pills-link-active-color: var(--invert-text); --bs-nav-link-color: var(--text-2); --bs-nav-link-hover-color: var(--text); }
.pagination {
  --bs-pagination-bg: var(--surface);
  --bs-pagination-color: var(--text-2);
  --bs-pagination-border-color: var(--line);
  --bs-pagination-hover-bg: var(--surface-2);
  --bs-pagination-hover-color: var(--text);
  --bs-pagination-hover-border-color: var(--line-strong);
  --bs-pagination-active-bg: var(--invert-bg);
  --bs-pagination-active-color: var(--invert-text);
  --bs-pagination-active-border-color: var(--invert-bg);
  --bs-pagination-disabled-bg: var(--surface);
  --bs-pagination-disabled-color: var(--muted);
  --bs-pagination-disabled-border-color: var(--line);
  --bs-pagination-font-size: 13px;
}
.pagination .page-link { color: var(--text-2); border-radius: var(--r-sm); min-width: 2rem; }
.pagination .page-item.active .page-link { background: var(--invert-bg); border-color: var(--invert-bg); color: var(--invert-text); }

/* ---------- KPI tiles (flat) */
.kpi-card { border-color: var(--line); box-shadow: none; border-radius: var(--r-lg); }
a.kpi-card:hover { border-color: var(--line-strong); box-shadow: none; transform: none; }
.kpi-card.is-active { border-color: var(--accent-line); box-shadow: inset 0 0 0 1px var(--accent-line); }
.kpi-icon { border-radius: var(--r); }
.kpi-label { font-size: 12px; font-weight: 600; }
.kpi-value { font-weight: 700; letter-spacing: -0.02em; }
.kpi-blue { --kpi-bg: var(--accent-tint); --kpi-color: var(--accent-text); }
.kpi-cyan { --kpi-bg: var(--blue-tint); --kpi-color: var(--blue); }

/* ---------- footer */
.app-footer { margin-top: auto; padding: 14px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; background: transparent; }
.app-footer .status-dot { width: 7px; height: 7px; }

/* Code and log panes stay dark in both themes. */
pre.bg-light { background: var(--surface-2) !important; color: var(--text); }

@media (max-width: 767.98px) {
  :root { --nav-h: 52px; }
  .app-navbar .container-fluid { padding-inline: 0.75rem; }
  .brand-app small { display: none; }
}

/* ---------- login */
.login-body { background: var(--bg); }
.login-brand { display: flex; justify-content: center; margin-bottom: 1.25rem; }
.login-brand .brand-logo { height: 36px; }
.login-card { background: var(--surface); border-color: var(--line); box-shadow: none; }
.login-eyebrow { color: var(--muted); letter-spacing: .08em; font-weight: 600; }
.login-card h1 { font-weight: 700; }

/* ==========================================================================
   Products page (Halo-style list): header, status tabs, toolbar, table,
   selection bar.
   ========================================================================== */
/* Shared page header: optional back link, title, subtitle, actions on the right.
   .page-head is the component for every page; .pp-header is the Products alias.
   .is-sticky pins it under the top bar for long workflow pages. */
.page-head, .pp-header { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1, .pp-header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.page-head-sub, .pp-subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-head-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 4px; color: var(--muted); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.page-head-back:hover { color: var(--text); }
.page-head-actions, .pp-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pp-vendor-select { width: auto; min-width: 190px; height: 32px; }
.page-head-actions .btn, .pp-header-actions .btn { height: 32px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.page-head.is-sticky {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  margin: -1.25rem -1.5rem 1rem;
  padding: 14px 1.5rem 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

/* Stat strip: one hairline-divided row of figures instead of a grid of cards. */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--line); overflow: hidden; }
.stat { min-width: 0; padding: 10px 14px; background: var(--surface); }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-value { margin-top: 2px; color: var(--text); font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-value.is-text { font-size: 14px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value.is-ok { color: var(--green); }
.stat-value.is-danger { color: var(--red); }
.stat-value.is-warn { color: var(--amber); }

/* Card section heading with an inline count. */
.section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.section-title { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -0.005em; }
.section-meta { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; }

/* Segmented control for small exclusive filters. */
.seg { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface-2); }
.seg-btn { height: 100%; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.seg-btn:hover { color: var(--text); }
.seg-btn.is-on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.seg-btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--accent-tint); }

.pp-card { overflow: hidden; }
.pp-tabs.products-filter-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.pp-tabs::-webkit-scrollbar { display: none; }
.pp-tabs .pp-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 9px 10px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: none;
}
.pp-tabs .pp-tab:hover { color: var(--text); background: transparent; border-color: transparent; }
.pp-tabs .pp-tab.active { color: var(--text); background: transparent; border-bottom-color: var(--accent); box-shadow: none; }
.pp-count {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pp-count.is-warn { background: var(--amber-tint); color: var(--amber); }
.pp-count.is-danger { background: var(--red-tint); color: var(--red); }
.pp-count.is-ok { background: var(--green-tint); color: var(--green); }

.pp-toolbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pp-search { position: relative; flex: 1 1 260px; min-width: 200px; display: flex; align-items: center; margin: 0; }
.pp-search > .bi-search { position: absolute; left: 10px; color: var(--muted); font-size: 13px; pointer-events: none; }
.pp-search .form-control { height: 32px; padding-left: 30px; padding-right: 30px; }
.pp-search-clear { position: absolute; right: 8px; color: var(--muted); font-size: 12px; text-decoration: none; }
.pp-search-clear:hover { color: var(--text); }
.pp-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pp-filter { display: inline-flex; align-items: center; height: 32px; margin: 0; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.pp-filter > span { padding: 0 2px 0 10px; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pp-filter .form-select { border: 0; height: 30px; min-width: 0; background-color: transparent; font-size: 13px; font-weight: 600; padding-left: 6px; box-shadow: none; }
.pp-filter .form-select:focus { box-shadow: none; }
.pp-filter:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.products-marking-filter { min-width: 0; }
.pp-chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.pp-chip-toggle:hover { background: var(--surface-2); }
.pp-chip-toggle.is-on, .pp-chip-toggle:has(input:checked) { background: var(--accent-tint); border-color: var(--accent-line); color: var(--accent-text); }
.pp-chip-toggle:focus-within { box-shadow: 0 0 0 3px var(--accent-tint); }
.pp-note { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 12.5px; }
.pp-empty { display: grid; place-items: center; gap: 6px; padding: 48px 16px; color: var(--muted); text-align: center; }
.pp-empty .bi { font-size: 22px; }
.pp-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
#syncToWooStatus:not(:empty) { margin-bottom: 1rem; }

/* Table */
.pp-card .products-table-scroll { overflow: auto; }
.products-table { border-collapse: collapse; }
.products-table th, .products-table td { border-right: 0 !important; font-size: 13px; padding: 9px 10px; }
.products-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: 0; }
.products-table tbody td { border-bottom: 1px solid var(--line); }
.products-table tbody tr:last-child td { border-bottom: 0; }
.products-table tbody tr { background: var(--surface); }
.products-table .sort-icon { opacity: .35; font-size: 11px; }
.products-table .sortable-header { cursor: pointer; }
.products-table .sortable-header.sort-active .sort-icon { opacity: 1; color: var(--accent); }
.th-name { min-width: 260px; }
.td-name { max-width: 420px; white-space: normal; }
.pp-name { color: var(--text); font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pp-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 12px; }
.pp-sku { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); }
.pp-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 11px; font-weight: 600; color: var(--text-2); }
.pp-vendor::before { content: "\00B7"; margin-right: 6px; }
.pp-meta .badge { font-size: 10.5px; }
.pp-dash { color: var(--line-strong); }
.group-toggle { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); font-size: 10px; cursor: pointer; }
.group-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.group-header-row, .group-header-row > td { background: var(--surface) !important; }
.variation-row > td { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.variation-row .td-name { padding-left: 1.6rem; }
.variation-row .pp-name { font-weight: 500; }
.product-thumb, .product-thumb-placeholder { width: 36px; height: 36px; border-radius: var(--r); border: 1px solid var(--line); object-fit: cover; background: var(--surface-2); }
.product-thumb-placeholder { color: var(--muted); }
.price-diff, .stock-diff { color: var(--red); font-weight: 600; font-size: 11.5px; }
.td-price, .td-stock { font-variant-numeric: tabular-nums; }
.row-status-active, .row-status-needs-update, .row-status-discontinued, .row-status-not-in-woo { border-left: 0 !important; }
.row-status-needs-update > td:first-child { box-shadow: inset 2px 0 0 var(--amber); }
.row-status-discontinued > td:first-child { box-shadow: inset 2px 0 0 var(--red); }

.hide-col-vendor .td-vendor, .hide-col-vendor .th-vendor,
.hide-col-type .td-type, .hide-col-type .th-type,
.hide-col-color .td-color, .hide-col-color .th-color { display: none; }

.td-actions { white-space: nowrap; text-align: right; }
.row-action {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: 2px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.row-action:hover { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.row-action.is-danger { color: var(--red); }
.row-action.is-danger:hover { background: var(--red-tint); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.row-action.is-success { color: var(--green); }
.row-action.is-success:hover { background: var(--green-tint); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
@media (hover: hover) {
  .products-table tbody tr .td-actions .row-action:not(.is-danger):not(.is-success) { opacity: .55; }
  .products-table tbody tr:hover .td-actions .row-action { opacity: 1; }
}

/* Floating selection bar */
.sticky-action-bar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 16px;
  z-index: 1050;
  width: min(760px, calc(100% - 24px));
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: translate(-50%, calc(100% + 24px));
  transition: transform .2s ease;
}
.sticky-action-bar.visible { transform: translate(-50%, 0); }
.sab-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .14);
}
.sab-count { font-weight: 700; font-size: 13px; white-space: nowrap; }
.sab-clear { border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; padding: 0 4px; }
.sab-clear:hover { color: var(--text); text-decoration: underline; }
.sab-spacer { flex: 1; }
.sab-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sab-actions .btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; }
body:has(.sticky-action-bar.visible) .app-main { padding-bottom: 5rem; }

/* Preview workflow pages (create, marking, image refresh). */
.pp-toolbar-info { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.preview-progress { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.preview-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.preview-progress-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.preview-progress .progress { height: 6px; margin-bottom: 6px; }
.preview-table thead th, .marking-preview-table thead th, .image-refresh-preview-table thead th { background: var(--surface); border-bottom: 1px solid var(--line); }
.preview-table td, .marking-preview-table td, .image-refresh-preview-table td { font-size: 13px; }
.preview-page .card-header[data-bs-toggle="collapse"] { cursor: pointer; }

@media (max-width: 767.98px) {
  .page-head, .pp-header { align-items: stretch; flex-direction: column; }
  .page-head h1, .pp-header h1 { font-size: 1.3rem; }
  .page-head-actions, .pp-header-actions { width: 100%; }
  .page-head.is-sticky { position: static; margin: 0 0 1rem; padding: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; }
  .pp-toolbar-info { margin-left: 0; }
  .pp-filters .seg { grid-column: 1 / -1; width: 100%; }
  .pp-filters .seg-btn { flex: 1 1 0; padding: 0 4px; }
  .pp-vendor-select { flex: 1; min-width: 0; }
  .pp-toolbar { padding: 10px; }
  .pp-search { flex-basis: 100%; }
  .pp-filters { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .pp-filter, .pp-filters .pp-chip-toggle, .pp-filters .dropdown { width: 100%; }
  .pp-filter .form-select { flex: 1; }
  .pp-filters .pp-chip-toggle { justify-content: center; }
  .th-name { min-width: 200px; }
  .sab-inner { flex-wrap: wrap; }
  .sab-actions { width: 100%; justify-content: stretch; }
  .sab-actions .btn { flex: 1 1 auto; justify-content: center; }
  .sab-actions .btn-outline-secondary span { display: none; }
}

.products-table tbody tr:has(.product-checkbox:checked) > td { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }

/* Marking mapping: AI-suggested label waiting for review */
.mapping-ai-suggested { background-color: var(--amber-tint); }

/* ---------- Products quick view (offcanvas): header, tabs, overview, compare, description, images */
.product-drawer.offcanvas { --bs-offcanvas-width: min(860px, 100vw); }
.qv-header { align-items: flex-start; gap: 12px; padding: 16px 18px 12px; }
.qv-head { display: flex; gap: 14px; min-width: 0; flex: 1; }
.qv-thumb { flex: 0 0 auto; display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--muted); overflow: hidden; }
.qv-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.qv-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.qv-meta { margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.qv-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.qv-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.qv-links .btn { height: 28px; display: inline-flex; align-items: center; gap: 5px; }
.qv-chip { display: inline-flex; align-items: center; min-height: 20px; padding: 1px 7px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 11.5px; font-weight: 600; margin: 0 4px 4px 0; }
.qv-chips .qv-chip { margin: 0; }
.qv-chip.is-ok { background: var(--green-tint); border-color: color-mix(in srgb, var(--green) 30%, transparent); color: var(--green); }
.qv-chip.is-warn { background: var(--amber-tint); border-color: color-mix(in srgb, var(--amber) 30%, transparent); color: var(--amber); }
.qv-chip.is-danger { background: var(--red-tint); border-color: color-mix(in srgb, var(--red) 30%, transparent); color: var(--red); }
.qv-tabs { padding: 0 14px; border-bottom: 1px solid var(--line); display: flex; gap: 2px; overflow-x: auto; }
.qv-tabs .pp-tab { padding: 9px 9px 8px; }
.qv-body { padding: 16px 18px 24px; }
.qv-stats .stat-value.is-warn { color: var(--amber); }
.qv-sub { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.qv-section { margin-top: 16px; }
.qv-section h3, .qv-columns h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.qv-dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13px; }
.qv-dl dt { color: var(--muted); font-weight: 500; }
.qv-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.qv-loading { display: flex; align-items: center; gap: 8px; padding: 12px 0; color: var(--muted); font-size: 13px; }
.qv-compare { width: 100%; font-size: 13px; border-collapse: collapse; }
.qv-compare th, .qv-compare td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: top; white-space: pre-line; overflow-wrap: anywhere; }
.qv-compare thead th { border-top: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.qv-compare tbody th { width: 150px; font-weight: 600; white-space: nowrap; }
.qv-compare tbody th .bi { margin-right: 4px; }
.qv-compare tr.is-ok th .bi { color: var(--green); }
.qv-compare tr.is-diff th .bi { color: var(--amber); }
.qv-compare tr.is-diff td { background: color-mix(in srgb, var(--amber-tint) 60%, transparent); }
.qv-compare tr.is-missing th .bi, .qv-compare tr.is-info th .bi { color: var(--muted); }
.qv-compare tr.is-missing td:last-child { color: var(--muted); }
.qv-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.qv-text { max-height: 60vh; overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.qv-empty { padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--r); color: var(--muted); font-size: 13px; }
.qv-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.qv-images a { display: block; aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.qv-images img { width: 100%; height: 100%; object-fit: contain; }
.qv-images a.is-broken { background: var(--red-tint); }
.qv-images a.is-broken img { display: none; }
@media (max-width: 767.98px) {
  .qv-columns { grid-template-columns: 1fr; }
  .qv-dl { grid-template-columns: 110px minmax(0, 1fr); }
  .qv-compare tbody th { width: auto; white-space: normal; }
}

/* Products: marking states that are not "Imported". */
.pp-marking-pending { color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pp-marking-error { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- SEO page: task cards, Google-style previews, score, sticky action bar, review drawer */
.seo-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.seo-task { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); text-align: left; color: var(--text); }
.seo-task:hover { border-color: var(--line-strong); }
.seo-task.is-active { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-tint); }
.seo-task.is-done { opacity: .65; }
.seo-task-top { display: flex; align-items: center; gap: 8px; }
.seo-task-top .bi { font-size: 15px; color: var(--muted); }
.seo-task.is-danger .seo-task-top .bi { color: var(--red); }
.seo-task.is-warn .seo-task-top .bi { color: var(--amber); }
.seo-task.is-next .seo-task-top .bi { color: var(--accent); }
.seo-task.is-ok .seo-task-top .bi { color: var(--green); }
.seo-task-title { font-size: 13px; font-weight: 700; }
.seo-task-count { margin-left: auto; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.seo-task-text { color: var(--muted); font-size: 12px; line-height: 1.4; flex: 1; }
.seo-task-btn { align-self: flex-start; margin-top: 4px; }

.seo-summary { cursor: pointer; list-style: none; }
.seo-summary::-webkit-details-marker { display: none; }
.seo-summary-icon { transition: transform .15s; color: var(--muted); }
details[open] > .seo-summary .seo-summary-icon { transform: rotate(90deg); }

.seo-stage-hint:empty { display: none; }
.seo-table .seo-col-check { width: 34px; }
.seo-table .seo-col-fields { width: 150px; }
.seo-table .seo-col-score { width: 170px; }
.seo-table .seo-col-actions { width: 150px; text-align: right; }
.seo-table tbody tr { cursor: pointer; }
.seo-table tbody tr:hover > td { background: var(--surface-2); }
.seo-table tbody tr.is-selected > td { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.seo-name { font-weight: 600; line-height: 1.3; }
.seo-name-meta { color: var(--muted); font-size: 12px; }

.seo-serp { min-width: 0; max-width: 560px; font-family: Arial, Helvetica, sans-serif; }
.seo-serp-url { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seo-serp-title { color: #1a0dab; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seo-serp-desc { color: var(--text-2); font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seo-serp-desc.is-empty, .seo-serp-desc.is-auto { color: var(--muted); font-style: italic; }
.seo-serp-old { margin-top: 4px; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: line-through; }
:root[data-theme="dark"] .seo-serp-title { color: #8ab4f8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seo-serp-title { color: #8ab4f8; } }
.seo-serp.is-large .seo-serp-title { font-size: 18px; white-space: normal; }
.seo-serp.is-large .seo-serp-desc { font-size: 13.5px; -webkit-line-clamp: 3; }

.seo-fields { display: flex; flex-wrap: wrap; gap: 4px; }
.seo-field-dot { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: var(--r-sm); border: 1px solid var(--line); font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.seo-field-dot.is-ok { color: var(--green); background: var(--green-tint); border-color: transparent; }
.seo-field-dot.is-auto { color: var(--amber); background: var(--amber-tint); border-color: transparent; }
.seo-field-dot.is-missing { color: var(--red); background: var(--red-tint); border-color: transparent; }

.seo-score { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 22px; padding: 0 6px; border-radius: 11px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.seo-score.is-good { background: var(--green-tint); color: var(--green); }
.seo-score.is-mid { background: var(--amber-tint); color: var(--amber); }
.seo-score.is-bad { background: var(--red-tint); color: var(--red); }
.seo-score-arrow { color: var(--muted); margin: 0 3px; }
.seo-top-issue { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.3; }

.seo-actionbar { position: sticky; bottom: 12px; z-index: 1020; margin-top: 12px; }
.seo-actionbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.seo-actionbar-info { font-size: 13px; }
.seo-actionbar-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.seo-actionbar-progress { display: flex; align-items: center; gap: 10px; flex: 1 1 320px; }
.seo-actionbar-progress .progress { height: 6px; }

.seo-drawer.offcanvas { --bs-offcanvas-width: min(820px, 100vw); }
.seo-drawer .offcanvas-body { padding-bottom: 12px; }
.seo-drawer-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.seo-drawer-footer .seo-footer-main { display: flex; gap: 6px; margin-left: auto; }
.seo-preview-box { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.seo-field { padding: 12px 0; border-top: 1px solid var(--line); }
.seo-field-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.seo-field-label { font-size: 13px; font-weight: 700; }
.seo-field-current { margin-bottom: 6px; color: var(--muted); font-size: 12.5px; }
.seo-field-current span { color: var(--text-2); }
.seo-meter { display: flex; align-items: center; gap: 8px; margin-top: 5px; font-size: 12px; }
.seo-meter-bar { position: relative; flex: 0 0 140px; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.seo-meter-bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--green); }
.seo-meter.is-warn .seo-meter-bar > span { background: var(--amber); }
.seo-meter.is-bad .seo-meter-bar > span { background: var(--red); }
.seo-meter.is-warn .seo-meter-text { color: var(--amber); }
.seo-meter.is-bad .seo-meter-text { color: var(--red); }
.seo-issue-list { list-style: none; margin: 0; padding: 0; }
.seo-issue-list li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 12.5px; }
.seo-issue-list li:first-child { border-top: 0; }
.seo-issue-list .bi { margin-top: 2px; }
.seo-issue-list .is-error .bi { color: var(--red); }
.seo-issue-list .is-warn .bi { color: var(--amber); }
.seo-issue-list .is-info .bi { color: var(--muted); }
.seo-issue-hint { color: var(--muted); }
@media (max-width: 767.98px) {
  .seo-table .seo-col-fields, .seo-table td.seo-col-fields { display: none; }
  .seo-actionbar-actions { margin-left: 0; }
}
