/* frontend/styles/00-tokens.css */
:root,
[data-theme=warm] {
  --bg-app: #f4f2ea;
  --bg-sidebar: #e8e5dc;
  --bg-canvas: #f4f2ea;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f1ea;
  --bg-card-subtle: #f6f5f0;
  --bg-input: #ffffff;
  --border-subtle: #ded9cd;
  --border-medium: #cbbfb0;
  --border-color: #cbbfb0;
  --border-focus: #1c1917;
  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #8c857b;
  --text-dim: #a8a29e;
  --accent-primary: #1c1917;
  --accent-hover: #292524;
  --accent-gradient:
    linear-gradient(
      135deg,
      #1c1917 0%,
      #44403c 100%);
  --accent-glow: rgba(28, 25, 23, 0.12);
  --success: #15803d;
  --success-bg: rgba(21, 128, 61, 0.1);
  --success-border: rgba(21, 128, 61, 0.25);
  --danger: #b91c1c;
  --danger-bg: rgba(185, 28, 28, 0.1);
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 10px 30px rgba(41, 37, 36, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme=dark] {
  --bg-app: #000000;
  --bg-sidebar: #09090b;
  --bg-canvas: #000000;
  --bg-card: #121214;
  --bg-card-hover: #1a1a1e;
  --bg-card-subtle: #0c0c0e;
  --bg-input: #09090b;
  --border-subtle: #222225;
  --border-medium: #333338;
  --border-color: #222225;
  --border-focus: #f59e0b;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-dim: #52525b;
  --accent-primary: #f59e0b;
  --accent-hover: #d97706;
  --accent-gradient:
    linear-gradient(
      135deg,
      #f59e0b 0%,
      #d97706 100%);
  --accent-glow: rgba(245, 158, 11, 0.2);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --success-border: rgba(34, 197, 94, 0.28);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.7);
  --shadow-card: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 0 1px #222225;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.48);
}
body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* frontend/styles/10-shell.css */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1rem 0.8rem;
  flex-shrink: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s ease;
}
.sidebar-brand:hover {
  opacity: 0.85;
}
.brand-logo {
  width: 54px;
  height: 54px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(245, 158, 11, 0.35));
}
.brand-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: block;
  line-height: 1.15;
}
.brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
  margin-top: 3px;
}
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}
.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  margin: 6px 0 3px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.nav-item:hover {
  background: var(--bg-card-subtle);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  flex: 1;
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.1s ease;
}
.history-item:hover {
  background: var(--bg-card-subtle);
  color: var(--text-primary);
}
.history-inn {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
}
.history-empty {
  font-size: 12px;
  color: var(--text-dim);
  padding: 8px;
  font-style: italic;
}
.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.api-quota-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.quota-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 6px;
  white-space: nowrap;
  gap: 4px;
}
.quota-title {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  font-size: 11px;
}
.quota-val {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  color: var(--success);
  white-space: nowrap;
  font-size: 11px;
}
.quota-bar-track {
  height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
}
.quota-bar-fill {
  height: 100%;
  background: var(--success);
}
.theme-switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}
.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}
[data-theme=dark] .sun-icon {
  display: block;
}
[data-theme=dark] .moon-icon {
  display: none;
}
[data-theme=warm] .sun-icon {
  display: none;
}
[data-theme=warm] .moon-icon {
  display: block;
}
.toast-card {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-primary);
  color: var(--bg-app);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 9999;
}
.toast-card.show {
  opacity: 1;
  transform: translateY(0);
}

/* frontend/styles/20-command.css */
.main-canvas {
  flex: 1;
  padding: 1.25rem 2rem 3rem 2rem;
  max-width: 100%;
  margin: 0;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
.search-command-bar {
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.command-bar-inner {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 6px 8px 6px 16px;
  min-height: 52px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}
.command-bar-inner:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-card);
}
.command-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  margin-right: 10px;
}
.command-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  outline: none;
  font-family: "JetBrains Mono", monospace;
}
.command-input::placeholder {
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 400;
}
.command-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.crawl-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  user-select: none;
  background: var(--bg-card-subtle);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.crawl-toggle-label input {
  display: none;
}
.toggle-track {
  width: 24px;
  height: 14px;
  background: var(--border-medium);
  border-radius: 9999px;
  position: relative;
  transition: all 0.15s ease;
}
.toggle-thumb {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: all 0.15s ease;
}
.crawl-toggle-label input:checked + .toggle-track {
  background: var(--success);
}
.crawl-toggle-label input:checked + .toggle-track .toggle-thumb {
  transform: translateX(10px);
}
.btn-execute {
  background: var(--text-primary);
  color: var(--bg-app);
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s ease;
}
.btn-execute:hover {
  opacity: 0.9;
}
.shortcut {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  opacity: 0.7;
  background: rgba(0, 0, 0, 0.15);
  padding: 1px 4px;
  border-radius: 2px;
}
.preset-chip {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-chip:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-medium);
}
.loading-banner {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--border-subtle);
  animation: fadeInSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.loading-spinner {
  position: relative;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 2.5px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-right-color: var(--accent-primary);
  border-radius: 50%;
  animation: spinSmooth 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
@keyframes spinSmooth {
  to {
    transform: rotate(360deg);
  }
}
.loading-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.loading-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.loading-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
.home-landing-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding-bottom: 0.5rem;
  animation: fadeIn 0.2s ease;
}
.home-hero-card {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}
@media (max-width: 1000px) {
  .home-hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .home-hero-card > div:last-child {
    align-items: flex-start !important;
  }
}
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-glow);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  width: fit-content;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}
.home-status-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.status-chip {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.status-chip .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
}
.home-hero-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.home-hero-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  max-width: 720px;
}
.home-quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.home-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.home-action-btn.primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.home-action-btn.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.home-action-btn.secondary {
  background: var(--bg-card-subtle);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.home-action-btn.secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}
.home-bento-grid {
  flex: 1.3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  min-height: 240px;
}
@media (max-width: 1280px) {
  .home-bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}
@media (max-width: 700px) {
  .home-bento-grid {
    grid-template-columns: 1fr;
  }
}
.home-bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.15rem 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.home-bento-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.bento-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 32px;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.home-bento-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bento-pill-badge {
  font-size: 10.5px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.bento-pill-badge.success {
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}
.bento-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  min-height: 52px;
  flex-shrink: 0;
}
.home-bento-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.home-bento-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
  margin: 0;
}
.bento-widget-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  flex: 1;
  min-height: 120px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.bento-feature-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bento-feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}
.bento-feature-item svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}
.bento-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.bento-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}
.home-bento-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.home-demo-chip {
  font-size: 10.5px;
  padding: 2px 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}
.home-demo-chip:hover {
  color: var(--accent-primary);
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
}
.bento-footer-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  padding-top: 8px;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.bento-footer-action svg {
  transition: transform 0.15s ease;
}
.home-bento-card:hover .bento-footer-action svg {
  transform: translateX(3px);
}
.home-section-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.home-sources-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  min-height: 140px;
}
@media (max-width: 960px) {
  .home-sources-grid {
    grid-template-columns: 1fr;
  }
}
.home-source-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: var(--shadow-subtle);
  transition: all 0.15s ease;
}
.home-source-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
}
.home-source-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-source-icon-wrap {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  background: var(--accent-glow);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-source-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.home-source-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* frontend/styles/30-dossier.css */
#singleResultContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.bento-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 120px);
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.bento-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}
.hero-identity-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.entity-name-inline {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}
.hero-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-dossier-back {
  background: var(--accent-glow);
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.btn-dossier-back:hover {
  background: var(--accent-primary);
  color: #ffffff;
}
.btn-hero-action {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-hero-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}
.btn-fav-star-dossier {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}
.btn-fav-star-dossier:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-medium);
}
.btn-fav-star-dossier.is-fav {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}
.entity-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  margin: 2px 0 4px 0;
  line-height: 1.25;
}
.hero-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}
.hero-info-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.hero-info-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.hero-info-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hero-info-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.data-pill-inline {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
}
.data-pill-inline:hover {
  color: var(--accent-primary);
}
.hero-info-text {
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-info-sub {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-info-text.risk-safe {
  color: var(--success);
  font-weight: 600;
}
.hero-info-text.risk-warn {
  color: var(--danger);
  font-weight: 600;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: default;
}
.status-pill.active {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.status-pill.liquidated {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-secondary {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}
.bento-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  flex-shrink: 0;
}
.bento-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 74px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.bento-metric-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
}
.metric-caption {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.metric-big-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  line-height: 1.2;
}
.metric-foot-note {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
}
.bento-contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.25rem;
  align-items: center;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}
.contact-col-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.primary-phone-link {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.primary-phone-link:hover {
  text-decoration: underline;
}
.confidence-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--success);
  margin-top: 2px;
  font-weight: 500;
}
.external-live-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  word-break: break-all;
}
.external-live-link:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}
.bento-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  flex: 1;
  min-height: 240px;
}
.bento-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.6rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.detail-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4.5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
  font-size: 12.5px;
}
[data-theme=warm] .data-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.data-label {
  color: var(--text-muted);
  flex: 0 0 35%;
}
.data-value {
  color: var(--text-primary);
  text-align: right;
  flex: 1;
  font-weight: 500;
  word-break: break-word;
}
.data-value.mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}
.bento-audit-dock {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}
.audit-dock-title {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.audit-dock-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.audit-pill-link {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.audit-pill-link:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* frontend/styles/40-batch.css */
#batchResultContainer {
  display: flex;
  flex-direction: column;
  margin-bottom: 40px;
}
.batch-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.batch-table-head {
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.coverage-analytics-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.coverage-metric-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.15s ease;
}
.coverage-metric-item:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
}
.coverage-metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.coverage-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.coverage-metric-pct {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}
.pct-high {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}
.pct-mid {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.pct-low {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
}
.coverage-metric-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.filter-pills-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-subtle);
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.filter-pills-left {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
}
.filter-pills-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.btn-reset-filters {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-reset-filters:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}
.btn-reset-filters svg {
  stroke: currentColor;
  transition: transform 0.25s ease;
}
.btn-reset-filters:hover svg {
  transform: rotate(-45deg);
}
.table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.table-wrapper::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}
.b2b-table {
  width: 100%;
  min-width: 950px;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}
.b2b-table th {
  position: sticky;
  top: 0;
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  padding: 7px 5px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  z-index: 2;
  user-select: none;
}
.b2b-table th.th-sortable {
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.b2b-table th.th-sortable:hover {
  color: var(--accent-primary);
  background: var(--bg-card-hover);
}
.sort-icon-caret {
  display: inline-block;
  margin-left: 3px;
  font-size: 10px;
  transition: transform 0.12s ease;
}
.sort-icon-caret.inactive {
  opacity: 0.35;
}
.sort-icon-caret.active {
  color: var(--accent-primary);
  opacity: 1;
  font-weight: 900;
}
.btn-fav-star {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
}
.btn-fav-star:hover {
  transform: scale(1.25);
  color: #f59e0b;
}
.btn-fav-star.is-fav {
  color: #f59e0b;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}
.b2b-table td {
  padding: 6px 5px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  white-space: nowrap;
}
.batch-table-row {
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.batch-table-row:hover td {
  background: var(--bg-card-hover) !important;
}
.table-org-name {
  color: var(--text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.email-compact-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  max-width: 100%;
}
.email-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  cursor: help;
}
.email-status-dot.status-green {
  background-color: #10b981;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
}
.email-status-dot.status-yellow {
  background-color: #f59e0b;
  box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
}
.email-status-dot.status-red {
  background-color: #ef4444;
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}
.email-status-dot.status-gray {
  background-color: #64748b;
  opacity: 0.5;
}
.email-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}
.badge-more {
  font-size: 9.5px;
  background: var(--bg-card-hover);
  color: var(--accent-primary);
  border: 1px solid var(--border-medium);
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
}
.table-site-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.table-site-link:hover {
  text-decoration: underline;
}
.badge {
  display: inline-block;
}
.view-mode-toggle-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.btn-view-mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 600;
  border: none;
  background: transparent;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-view-mode:hover {
  color: var(--text-primary);
}
.btn-view-mode.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.batch-cards-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.batch-cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
  width: 100%;
}
.company-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  min-height: 105px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}
.company-card-item:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}
.company-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.btn-fav-card {
  background: transparent;
  border: none;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.12s ease, color 0.12s ease;
}
.btn-fav-card:hover {
  transform: scale(1.2);
  color: #f59e0b;
}
.btn-fav-card.is-fav {
  color: #f59e0b;
  text-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}
.card-index-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}
.card-company-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.card-risk-wrap {
  flex-shrink: 0;
}
.card-risk-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.card-risk-pill.clean {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}
.card-risk-pill.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.card-risk-pill.warn {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.card-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.card-inn-text {
  font-family: "JetBrains Mono", monospace;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.1s ease;
}
.card-inn-text:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}
.card-meta-dot {
  color: var(--border-medium);
  font-size: 10px;
}
.card-rev-text strong {
  color: var(--text-primary);
}
.card-staff-text {
  color: var(--text-muted);
}
.card-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 2px;
}
.card-contacts-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.card-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  height: 26px;
  transition: all 0.12s ease;
  white-space: nowrap;
}
.card-contact-btn.phone {
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.22);
}
.card-contact-btn.phone:hover {
  background: rgba(16, 185, 129, 0.18);
}
.card-contact-btn.site {
  background: var(--bg-card-subtle);
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
}
.card-contact-btn.site:hover {
  border-color: var(--border-medium);
}
.card-contact-btn.email {
  background: var(--bg-card-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.card-no-contacts {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}
.card-open-arrow {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 3px 6px;
  flex-shrink: 0;
  margin-left: auto;
  transition: color 0.12s ease;
}
.company-card-item:hover .card-open-arrow {
  color: var(--accent-primary);
}
.b2b-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  flex-shrink: 0;
}
.pagination-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.page-size-selector {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card-subtle);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}
.page-size-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.page-size-btn:hover {
  color: var(--text-primary);
}
.page-size-btn.active {
  background: var(--accent-primary);
  color: #fff;
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.page-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card-subtle);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}
.page-nav-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-medium);
}
.page-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.page-nav-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 700;
}
.page-ellipsis {
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 12px;
}

/* frontend/styles/45-leadgen.css */
.modal-leadgen-card {
  max-width: 1060px;
  width: min(1060px, 95vw);
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.leadgen-body {
  padding: 1.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-x: hidden;
  box-sizing: border-box;
}
.leadgen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 860px) {
  .leadgen-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .leadgen-body {
    padding: 1.25rem 1.25rem;
  }
}
.leadgen-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
.leadgen-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.leadgen-label-hint {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted);
}
.custom-select-box {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
.custom-select-trigger,
.leadgen-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13.5px;
  outline: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.custom-select-trigger {
  cursor: pointer;
  user-select: none;
}
.custom-select-trigger:hover,
.leadgen-input:hover {
  border-color: var(--border-medium);
  background: var(--bg-card);
}
.custom-select-trigger:focus,
.custom-select-trigger.active,
.leadgen-input:focus {
  border-color: var(--accent-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.custom-select-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}
.custom-select-label.placeholder {
  color: var(--text-muted);
}
.custom-select-arrow {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 10px;
}
.custom-select-trigger.active .custom-select-arrow {
  transform: rotate(180deg);
  color: var(--accent-primary);
}
.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32), 0 2px 8px rgba(0, 0, 0, 0.14);
  max-height: 360px;
  overflow: hidden;
  z-index: 1200;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.custom-select-search-wrap {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
  flex-shrink: 0;
  box-sizing: border-box;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}
.custom-select-search {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12.5px;
  outline: none;
  box-sizing: border-box;
}
.custom-select-search:focus {
  border-color: var(--accent-primary);
}
.custom-select-options {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 300px;
  padding: 4px 0;
  flex: 1;
}
.custom-option {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.12s ease;
  word-break: break-word;
}
.custom-option:hover {
  background: rgba(16, 185, 129, 0.12);
}
.custom-option.selected {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-primary);
  font-weight: 600;
}
.custom-option-check {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 13px;
}
.leadgen-searchable-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
}
.leadgen-searchable-wrapper .leadgen-input {
  flex: 1;
  padding-right: 36px;
}
.leadgen-input-clear {
  position: absolute;
  right: 140px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s;
  z-index: 2;
}
.leadgen-input-clear:hover {
  color: var(--text-primary);
}
.btn-open-catalog {
  height: 44px;
  padding: 0 16px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-primary);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-open-catalog:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}
.leadgen-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35), 0 3px 10px rgba(0, 0, 0, 0.15);
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1250;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.leadgen-dropdown-group-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  padding: 8px 16px 4px 16px;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
}
.leadgen-dropdown-group-title:first-child {
  border-top: none;
}
.leadgen-dropdown-item {
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.12s ease;
  font-size: 13px;
  color: var(--text-primary);
}
.leadgen-dropdown-item:hover,
.leadgen-dropdown-item.selected {
  background: rgba(16, 185, 129, 0.12);
}
.leadgen-dropdown-item.highlighted {
  background: rgba(16, 185, 129, 0.22);
}
.leadgen-item-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.leadgen-item-name {
  flex: 1;
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
}
.leadgen-dropdown-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.leadgen-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.leadgen-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.leadgen-pill:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}
.leadgen-pill input[type=checkbox] {
  accent-color: var(--accent-primary);
  cursor: pointer;
  width: 15px;
  height: 15px;
}
.leadgen-pill.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
}
.leadgen-preview-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}
.leadgen-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.leadgen-counter-badge {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.leadgen-quota-badge {
  font-size: 12.5px;
  color: var(--text-muted);
}
.leadgen-samples {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  max-height: 140px;
  overflow-y: auto;
  overflow-x: hidden;
}
.leadgen-sample-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}
.btn-leadgen-radar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background:
    linear-gradient(
      135deg,
      rgba(16, 185, 129, 0.15) 0%,
      rgba(5, 150, 105, 0.25) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-primary);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-leadgen-radar:hover {
  background:
    linear-gradient(
      135deg,
      rgba(16, 185, 129, 0.25) 0%,
      rgba(5, 150, 105, 0.35) 100%);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.modal-catalog-card {
  max-width: 1100px;
  width: min(1100px, 95vw);
  height: 86vh;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
.catalog-search-bar {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}
.catalog-search-input-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
.catalog-search-input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 48px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.18s ease;
  box-sizing: border-box;
}
.catalog-search-input:focus {
  border-color: var(--accent-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.catalog-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.catalog-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.catalog-search-clear:hover {
  color: var(--text-primary);
}
.catalog-main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.catalog-categories-sidebar {
  width: 270px;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-card-subtle);
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .catalog-categories-sidebar {
    display: none;
  }
}
.catalog-cat-btn {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.12s ease;
}
.catalog-cat-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}
.catalog-cat-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-primary);
  font-weight: 700;
}
.catalog-cat-count {
  font-size: 11px;
  opacity: 0.75;
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
.catalog-cards-canvas {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.catalog-section-title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}
.catalog-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.catalog-card:hover {
  background: var(--bg-card);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.18);
}
.catalog-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.catalog-card-code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
}
.catalog-card-group {
  font-size: 11.5px;
  color: var(--text-muted);
}
.catalog-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}
.catalog-empty {
  padding: 3.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

/* frontend/styles/50-workspaces.css */
.nav-group-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
  margin-bottom: 0.25rem;
  padding: 0 4px;
}
.btn-icon-small {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  border-radius: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  transition: all 0.15s ease;
}
.btn-icon-small:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: var(--accent-glow);
}
.workspaces-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 1px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}
.workspaces-list::-webkit-scrollbar {
  width: 3px;
}
.workspaces-list::-webkit-scrollbar-track {
  background: transparent;
}
.workspaces-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 3px;
}
[data-theme=dark] .workspaces-list {
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
[data-theme=dark] .workspaces-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
}
.ws-group {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s ease;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.ws-group:hover {
  border-color: var(--border-medium);
}
.ws-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  cursor: pointer;
  user-select: none;
  background: var(--bg-card);
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}
.ws-header:hover {
  background: var(--bg-card-hover);
}
.ws-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.ws-icon-wrap {
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.ws-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.ws-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.ws-badge {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  background: var(--bg-input);
  color: var(--text-muted);
  padding: 1px 5px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  line-height: 1.2;
}
.ws-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}
.ws-header:hover .ws-actions {
  opacity: 1;
}
.ws-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.ws-action-btn:hover {
  color: var(--accent-primary);
  background: var(--bg-card-hover);
}
.ws-action-btn.btn-archive:hover {
  color: #f59e0b;
}
.ws-action-btn.btn-delete:hover {
  color: #ef4444;
}
.ws-action-btn.btn-restore:hover {
  color: var(--accent-primary);
}
.ws-folders-list {
  display: flex;
  flex-direction: column;
  padding: 2px 0 3px 0;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-subtle);
  width: 100%;
  box-sizing: border-box;
}
.ws-folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 6px 3px 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
  border-left: 2px solid transparent;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.ws-folder-item:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.ws-folder-item.active {
  color: var(--accent-primary);
  background: var(--accent-glow);
  border-left-color: var(--accent-primary);
  font-weight: 600;
}
.ws-folder-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.ws-folder-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}
.ws-folder-title svg {
  width: 12px !important;
  height: 12px !important;
  min-width: 12px !important;
  max-width: 12px !important;
  flex-shrink: 0 !important;
  opacity: 0.75;
}
.ws-folder-right {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 4px;
}
.ws-folder-count {
  font-size: 10.5px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  color: var(--text-muted);
  flex-shrink: 0;
  line-height: 1;
  white-space: nowrap;
}
.ws-folder-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}
.ws-folder-item:hover .ws-folder-actions {
  opacity: 1;
}
.ws-mini-spinner {
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
.ws-archive-group {
  border-top: 1px dashed var(--border-subtle);
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.03);
}
.ws-archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 6px 18px;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  color: var(--text-muted);
  transition: all 0.12s ease;
}
.ws-archive-header:hover {
  color: var(--text-secondary);
  background: var(--bg-card-hover);
}
.ws-archive-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.ws-archive-arrow {
  transition: transform 0.2s ease;
  color: var(--text-muted);
}
.ws-archive-group.open .ws-archive-arrow {
  transform: rotate(180deg);
}
.ws-archive-folders {
  display: none;
  flex-direction: column;
  padding: 2px 0 4px 0;
}
.ws-archive-group.open .ws-archive-folders {
  display: flex;
}
.ws-folder-item.ws-folder-archived {
  opacity: 0.8;
  color: var(--text-muted);
  border-left-style: dashed;
}
.ws-folder-item.ws-folder-archived:hover {
  opacity: 1;
  color: var(--text-primary);
}
.ws-folder-item.ws-folder-archived.active {
  opacity: 1;
  color: var(--accent-primary);
}
.ws-archive-badge {
  font-size: 9.5px;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0 4px;
  border-radius: 3px;
  margin-left: 4px;
}

/* frontend/styles/55-save-modal.css */
.modal-card.modal-save-ws-card {
  max-width: 620px;
  width: min(620px, 94vw);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: visible !important;
  position: relative;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-save-ws-card .modal-header {
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  padding: 22px 28px;
  border-bottom: 1px solid var(--border-subtle);
}
.save-ws-modal-body {
  padding: 24px 28px !important;
  gap: 16px !important;
  overflow: visible !important;
  position: relative;
}
.save-ws-form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
}
.save-ws-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.save-ws-btn-new-folder {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.save-ws-btn-new-folder:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--accent-primary);
}
.save-ws-select-box {
  position: relative;
  width: 100%;
}
.save-ws-trigger {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
.save-ws-trigger:hover {
  border-color: var(--border-medium);
  background: var(--bg-card);
}
.save-ws-trigger:focus,
.save-ws-trigger.active {
  border-color: var(--accent-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.save-ws-trigger-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.save-ws-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-primary);
}
.save-ws-trigger-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.save-ws-trigger-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(16, 185, 129, 0.25);
  white-space: nowrap;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}
.save-ws-trigger-arrow {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 10px;
}
.save-ws-trigger.active .save-ws-trigger-arrow {
  transform: rotate(180deg);
  color: var(--accent-primary);
}
.save-ws-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38), 0 2px 8px rgba(0, 0, 0, 0.16);
  max-height: 260px;
  overflow: hidden;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  animation: fadeIn 0.15s ease-out;
}
.save-ws-options {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 250px;
  padding: 5px 0;
}
.save-ws-option {
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.12s ease;
  gap: 12px;
}
.save-ws-option:hover {
  background: rgba(16, 185, 129, 0.1);
}
.save-ws-option.selected {
  background: rgba(16, 185, 129, 0.16);
  color: var(--accent-primary);
}
.save-ws-opt-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.save-ws-opt-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-primary);
}
.save-ws-opt-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.save-ws-opt-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.save-ws-option.selected .save-ws-opt-name {
  font-weight: 600;
  color: var(--accent-primary);
}
.save-ws-opt-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.save-ws-opt-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-left: 6px;
  display: inline-block;
}
.save-ws-opt-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.save-ws-opt-count {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-card-subtle);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}
.save-ws-opt-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}
.save-ws-empty-folders {
  padding: 18px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.save-ws-new-folder-box {
  background: var(--bg-card-subtle);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--accent-primary);
  animation: fadeIn 0.15s ease-out;
}
.save-ws-new-folder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.save-ws-btn-cancel-inline {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.save-ws-btn-cancel-inline:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.save-ws-preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-md);
}
.save-ws-preview-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.save-ws-preview-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.save-ws-preview-count {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.save-ws-preview-dest {
  font-size: 12px;
  color: var(--text-secondary);
}
.save-ws-preview-dest strong {
  color: var(--accent-primary);
  font-weight: 600;
}
.save-ws-modal-footer {
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
  padding: 16px 28px !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}

/* frontend/styles/60-modals.css */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease-out;
}
.modal-card.modal-card-large {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 94vw;
  max-width: 1240px;
  height: 84vh;
  max-height: 820px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card-subtle);
  flex-shrink: 0;
}
.modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.modal-header-icon {
  width: 42px;
  height: 42px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  margin-bottom: 2px;
}
.modal-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}
.modal-close-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--text-secondary);
}
.modal-body-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  padding: 24px 28px;
  flex: 1;
  min-height: 0;
  background: var(--bg-canvas);
}
.modal-panel-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 10px;
}
.panel-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.inn-counter-badge {
  background: var(--accent-glow);
  color: var(--accent-primary);
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--accent-primary);
}
.file-format-badge {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}
.btn-text-action {
  background: transparent;
  border: none;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.12s ease;
}
.btn-text-action:hover {
  color: #ef4444;
}
.textarea-wrapper {
  flex: 1;
  display: flex;
  min-height: 0;
}
.textarea-wrapper textarea {
  width: 100%;
  height: 100%;
  resize: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: border-color 0.15s ease;
}
.textarea-wrapper textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.modal-quick-templates {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 2px;
}
.quick-tmpl-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.tmpl-chip {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tmpl-chip:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: var(--accent-glow);
}
.drop-area.drop-area-large {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 12px;
}
.drop-area.drop-area-large:hover,
.drop-area.drop-area-large.dragover {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
  transform: translateY(-1px);
}
.drop-icon-wrap {
  width: 68px;
  height: 68px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  margin-bottom: 4px;
  transition: transform 0.2s ease;
}
.drop-area.drop-area-large:hover .drop-icon-wrap {
  transform: scale(1.08);
}
.drop-prompt-big {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.drop-sub-big {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.4;
}
.drop-features-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
.drop-feat-tag {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
}
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card-subtle);
  flex-shrink: 0;
}
.modal-footer-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-quota-info {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: 6px;
}
.footer-quota-info strong {
  color: var(--accent-primary);
}
.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-btn-cancel {
  padding: 9px 18px;
  font-size: 13px;
}
.modal-btn-submit {
  padding: 9px 24px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.modal-card.modal-prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 92%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-card.modal-save-ws-card {
  max-width: 600px;
  width: min(600px, 94vw);
  overflow: visible;
}
.modal-save-ws-card .modal-header {
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}
.modal-save-ws-card .modal-footer {
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}
.modal-card.modal-enrich-folder-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.modal-enrich-folder-card .modal-header {
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}
.modal-enrich-folder-card .modal-footer {
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}
.modal-body-prompt {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
}
.prompt-input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.prompt-input-field {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}
.prompt-input-field:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-card);
}
.prompt-input-field::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}
.btn-danger-execute {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}
.btn-danger-execute:hover {
  background: #b91c1c;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
  transform: translateY(-1px);
}
.auth-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 16, 14, 0.65);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease-out;
}
[data-theme=dark] .auth-modal-backdrop {
  background: rgba(4, 5, 8, 0.85);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 32px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.18),
    0 4px 16px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
[data-theme=dark] .auth-card {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      transparent,
      var(--accent-primary),
      transparent);
  opacity: 0.8;
}
.auth-header {
  text-align: center;
  margin-bottom: 30px;
}
.auth-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background:
    linear-gradient(
      135deg,
      #1c1917 0%,
      #44403c 100%);
  color: #f5f5f4;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 10px 25px rgba(28, 25, 23, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.3s ease;
}
[data-theme=dark] .auth-icon-badge {
  background:
    linear-gradient(
      135deg,
      rgba(245, 158, 11, 0.15),
      rgba(217, 119, 6, 0.25));
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
}
.auth-card:hover .auth-icon-badge {
  transform: scale(1.04) rotate(2deg);
}
.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
  letter-spacing: -0.025em;
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
}
.auth-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.auth-input-container {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-icon {
  position: absolute;
  left: 15px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}
.auth-input {
  width: 100%;
  height: 50px;
  padding: 0 46px 0 44px;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}
.auth-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: var(--bg-card);
}
.auth-input:focus + .auth-input-icon,
.auth-input-container:focus-within .auth-input-icon {
  color: var(--text-primary);
}
.auth-input-toggle {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.18s ease;
}
.auth-input-toggle:hover {
  color: var(--text-primary);
}
.auth-error {
  background: rgba(185, 28, 28, 0.08);
  border: 1px solid rgba(185, 28, 28, 0.25);
  color: var(--danger);
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  animation: fadeIn 0.2s ease-out;
}
.auth-submit-btn {
  width: 100%;
  height: 50px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  margin-top: 4px;
  letter-spacing: -0.01em;
}
[data-theme=dark] .auth-submit-btn {
  background:
    linear-gradient(
      135deg,
      #f59e0b 0%,
      #d97706 100%);
  color: #0b0c10;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}
.auth-submit-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}
.auth-submit-btn:active {
  transform: translateY(0.5px);
}
.auth-footer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* frontend/styles/65-verifier.css */
.modal-card.modal-verifier-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 95vw;
  max-width: 1200px;
  height: 88vh;
  max-height: 840px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.verifier-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  padding: 18px 24px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-canvas);
}
@media (max-width: 720px) {
  .verifier-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}
.verifier-pane-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.verifier-textarea-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}
.verifier-textarea {
  width: 100%;
  flex: 1;
  min-height: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 14px 16px;
  resize: none;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.verifier-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.verifier-textarea::placeholder {
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-size: 12px;
}
.verifier-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.verifier-tools-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-tool-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all 0.15s ease;
}
.btn-tool-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-medium, var(--text-secondary));
}
.verifier-options-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.verifier-options-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.verifier-options-row input[type=checkbox] {
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.btn-verifier-run {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--text-primary);
  color: var(--bg-canvas);
  font-weight: 600;
  font-size: 13.5px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.btn-verifier-run:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-verifier-run:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.verifier-pane-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}
.verifier-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  flex-shrink: 0;
}
.verifier-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-subtle);
  transition: border-color 0.15s ease;
}
.verifier-stat-card:hover {
  border-color: var(--border-medium, var(--border-subtle));
}
.stat-label-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.stat-val-big {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  line-height: 1.1;
}
.verifier-stat-card.stat-deliverable .stat-val-big {
  color: var(--success, #15803d);
}
.verifier-stat-card.stat-unverified .stat-val-big {
  color: #d97706;
}
.verifier-stat-card.stat-dead .stat-val-big {
  color: var(--danger, #b91c1c);
}
.verifier-table-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.verifier-filter-tabs {
  display: flex;
  gap: 6px;
}
.dot-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-indicator.dot-green {
  background: var(--success, #15803d);
}
.dot-indicator.dot-yellow {
  background: #d97706;
}
.dot-indicator.dot-red {
  background: var(--danger, #b91c1c);
}
.tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all 0.15s ease;
}
.tab-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.tab-pill.active {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent-primary);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent-primary);
}
.verifier-table-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}
.verifier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.verifier-table th {
  position: sticky;
  top: 0;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 9px 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}
.verifier-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
.verifier-table tr:hover td {
  background: var(--bg-card-hover);
}
.verifier-email-cell {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  word-break: break-all;
}
.verifier-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.verifier-status-pill.status-green {
  background: rgba(21, 128, 61, 0.12);
  color: var(--success, #15803d);
  border: 1px solid rgba(21, 128, 61, 0.3);
}
.verifier-status-pill.status-yellow {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.3);
}
.verifier-status-pill.status-red {
  background: rgba(185, 28, 28, 0.12);
  color: var(--danger, #b91c1c);
  border: 1px solid rgba(185, 28, 28, 0.3);
}
[data-theme=dark] .verifier-status-pill.status-green {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.35);
}
[data-theme=dark] .verifier-status-pill.status-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}
[data-theme=dark] .verifier-status-pill.status-red {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}
.verifier-reason-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  line-height: 1.4;
}
.verifier-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
}
.verifier-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 28px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card-subtle);
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .modal-overlay {
    padding: 6px !important;
  }
  .modal-card.modal-verifier-card {
    width: 98vw !important;
    max-width: 100% !important;
    height: 96vh !important;
    height: 96dvh !important;
    max-height: 96dvh !important;
    border-radius: var(--radius-lg) !important;
  }
  .modal-verifier-card .modal-header {
    padding: 10px 14px !important;
    gap: 8px !important;
  }
  .modal-verifier-card .modal-header-icon {
    width: 32px !important;
    height: 32px !important;
  }
  .modal-verifier-card .modal-title {
    font-size: 15px !important;
  }
  .modal-verifier-card .modal-sub {
    font-size: 11px !important;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .verifier-body {
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 12px !important;
    gap: 12px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .verifier-pane-left {
    flex-shrink: 0 !important;
    gap: 8px !important;
  }
  .verifier-textarea-wrap {
    min-height: 85px !important;
    flex: none !important;
  }
  .verifier-textarea {
    min-height: 85px !important;
    height: 85px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
  .verifier-tools-row {
    gap: 6px !important;
  }
  .btn-verifier-run {
    padding: 9px 12px !important;
    font-size: 13px !important;
  }
  .verifier-pane-right {
    overflow: visible !important;
    gap: 10px !important;
  }
  .verifier-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
  .verifier-stat-card {
    padding: 8px 10px !important;
    gap: 2px !important;
  }
  .stat-label-wrap {
    font-size: 10px !important;
  }
  .stat-val-big {
    font-size: 18px !important;
  }
  .verifier-filter-tabs {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .tab-pill {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
  .verifier-table-wrap {
    min-height: 180px !important;
    max-height: 380px !important;
    overflow-y: auto !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .verifier-table {
    display: block !important;
    width: 100% !important;
    border-collapse: separate !important;
  }
  .verifier-table thead {
    display: none !important;
  }
  .verifier-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .verifier-table tr {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 12px !important;
    box-shadow: var(--shadow-subtle) !important;
    width: 100% !important;
  }
  .verifier-table tr:hover td {
    background: transparent !important;
  }
  .verifier-table td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
  }
  .verifier-table tr td:first-child {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
  }
  .verifier-email-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    line-height: 1.4 !important;
  }
  .verifier-email-cell span {
    word-break: break-all !important;
  }
  .verifier-table tr td:nth-child(3) {
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
    word-break: break-all !important;
  }
  .verifier-table tr td:nth-child(3)::before {
    content: "\421\435\440\432\435\440: ";
    font-weight: 600;
    color: var(--text-secondary);
  }
  .verifier-reason-badge {
    display: block !important;
    width: 100% !important;
    font-size: 11.5px !important;
    line-height: 1.4 !important;
    padding: 5px 9px !important;
    background: var(--bg-card-subtle) !important;
    border-radius: 6px !important;
  }
  .verifier-footer {
    padding: 8px 12px !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  .verifier-footer > div {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .verifier-footer .btn-tool-pill {
    padding: 8px 8px !important;
    font-size: 11.5px !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .verifier-footer .btn-secondary {
    width: 100% !important;
    padding: 8px !important;
    font-size: 12px !important;
    text-align: center !important;
  }
}

/* frontend/styles/70-filters.css */
.advanced-filter-drawer {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  animation: fadeIn 0.15s ease-out;
}
.filter-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.filter-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.btn-save-preset {
  background: var(--accent-glow);
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.btn-save-preset:hover {
  background: var(--accent-primary);
  color: #fff;
}
.btn-filter-reset {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-filter-reset:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}
.filter-presets-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.presets-bar-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.presets-chips-list,
.custom-presets-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.preset-badge-btn {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.preset-badge-btn:hover {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
  color: var(--accent-primary);
  transform: translateY(-1px);
}
.preset-badge-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  font-weight: 600;
}
.preset-badge-btn.preset-berkana {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  font-weight: 600;
}
.preset-badge-btn.preset-berkana:hover {
  background: #f59e0b;
  color: #000;
}
.custom-preset-chip {
  background: var(--bg-canvas);
  border: 1px dashed var(--accent-primary);
  color: var(--text-primary);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.custom-preset-chip:hover {
  background: var(--accent-glow);
}
.custom-preset-del {
  color: var(--text-muted);
  font-size: 10px;
  margin-left: 2px;
  cursor: pointer;
}
.custom-preset-del:hover {
  color: #ef4444;
}
.filter-drawer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 18px;
}
@media (max-width: 1200px) {
  .filter-drawer-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}
.filter-geo-minus-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
@media (max-width: 900px) {
  .filter-geo-minus-bar {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.filter-geo-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.filter-geo-col .custom-select-box {
  position: relative;
  width: 100%;
}
.filter-geo-col .custom-select-trigger {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}
.filter-geo-col .custom-select-trigger:hover {
  border-color: var(--border-medium);
}
.filter-geo-col .custom-select-trigger.active,
.filter-geo-col .custom-select-trigger:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.filter-geo-col .custom-select-label {
  font-size: 12.5px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: left;
}
.filter-geo-col .custom-select-arrow {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}
.filter-geo-col .custom-select-trigger.active .custom-select-arrow {
  transform: rotate(180deg);
  color: var(--accent-primary);
}
.filter-geo-col .custom-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
  z-index: 2500;
  max-height: 360px;
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.filter-geo-col .custom-select-options {
  overflow-y: auto;
  max-height: 280px;
  display: flex;
  flex-direction: column;
}
.filter-geo-col .custom-option {
  padding: 9px 14px;
  font-size: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.12s ease;
  gap: 8px;
}
.filter-geo-col .custom-option:hover {
  background: var(--accent-glow);
  color: var(--accent-primary);
}
.filter-geo-col .custom-option.selected {
  background: var(--accent-glow);
  color: var(--accent-primary);
  font-weight: 600;
}
.filter-geo-col .custom-option-check {
  color: var(--accent-primary);
  display: none;
  flex-shrink: 0;
}
.filter-geo-col .custom-option.selected .custom-option-check {
  display: inline-block;
}
.custom-option-group-title {
  padding: 8px 14px 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
  cursor: default;
}
.custom-option-group-title:first-child {
  border-top: none;
}
.filter-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-block-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.filter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}
.filter-checkbox-label input[type=checkbox] {
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.filter-range-inputs {
  display: flex;
  gap: 6px;
}
.filter-range-inputs input {
  width: 100%;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 12px;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
}
.filter-range-inputs input:focus {
  outline: none;
  border-color: var(--accent-primary);
}
.filter-quick-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.filter-quick-chips button {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.filter-quick-chips button:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}
.filter-badge-count {
  background: var(--accent-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}
.filter-exclusion-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.filter-exclusion-col .filter-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.filter-exclusion-col .exclusion-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-exclusion-col .exclusion-total-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}
.filter-exclusion-col .btn-exclusion-reset {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-exclusion-col .btn-exclusion-reset:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}
.filter-exclusion-col .exclusion-select-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.filter-exclusion-col .custom-select-box {
  position: relative;
  flex: 1;
  min-width: 0;
}
.filter-exclusion-col .btn-exclusion-inn-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.filter-exclusion-col .btn-exclusion-inn-trigger:hover {
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}
.filter-exclusion-col .exclusion-inns-box {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.15s ease;
}
.filter-exclusion-col .exclusion-inns-box-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.filter-exclusion-col .exclusion-inns-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 11.5px;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
}
.filter-exclusion-col .exclusion-inns-textarea:focus {
  border-color: #ef4444;
}
.filter-exclusion-col .exclusion-inns-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.filter-exclusion-col .btn-exclusion-apply {
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.filter-exclusion-col .btn-exclusion-apply:hover {
  opacity: 0.9;
}
.filter-exclusion-col .btn-exclusion-cancel {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
}
.filter-exclusion-col .btn-exclusion-cancel:hover {
  color: var(--text-primary);
}
.filter-exclusion-col .active-exclusion-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.filter-exclusion-col .exclusion-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--text-primary);
  max-width: 100%;
}
.filter-exclusion-col .exclusion-badge-icon {
  font-size: 11px;
  line-height: 1;
}
.filter-exclusion-col .exclusion-badge-title {
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}
.filter-exclusion-col .exclusion-badge-count {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  font-weight: 700;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
}
.filter-exclusion-col .exclusion-badge-del {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 2px;
  transition: all 0.12s ease;
}
.filter-exclusion-col .exclusion-badge-del:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}
.exclusion-math-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background:
    linear-gradient(
      90deg,
      rgba(59, 130, 246, 0.06),
      rgba(239, 68, 68, 0.08),
      rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  flex-wrap: wrap;
}
.math-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.math-bar-label {
  color: var(--text-secondary);
  font-size: 11.5px;
}
.math-bar-val {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
}
.math-bar-operator {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  padding: 0 2px;
}
.math-bar-excluded .math-bar-val {
  color: #ef4444;
}
.math-bar-result {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.math-bar-result .math-bar-label {
  color: #10b981;
  font-weight: 600;
}
.math-bar-result .math-bar-val {
  color: #10b981;
  font-weight: 800;
  font-size: 13px;
}

/* frontend/styles/75-registry.css */
.nav-badge-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  padding: 2px 6px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
}
.nav-item.active .nav-badge-pill {
  background: var(--accent-glow);
  color: var(--text-primary);
  border-color: var(--border-medium);
}
.custom-cloud-tooltip {
  position: absolute;
  z-index: 99999;
  max-width: 320px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), 0 8px 24px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(-4px);
}
.custom-cloud-tooltip.tooltip-bottom {
  transform: translateY(4px);
}
.help-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 11px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-secondary);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 50%;
  cursor: help;
  margin-left: 6px;
  transition: all 0.15s ease;
  user-select: none;
  vertical-align: middle;
  flex-shrink: 0;
}
.help-tooltip-icon:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  background: var(--accent-glow);
  transform: scale(1.12);
}
.reg-input-tooltip {
  position: absolute;
  right: 12px;
  margin-left: 0;
  z-index: 2;
}
.registry-result-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  animation: fadeIn 0.2s ease;
}
.registry-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  gap: 1.5rem;
}
.reg-hero-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.reg-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-glow);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  width: fit-content;
}
.reg-hero-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}
.reg-hero-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  max-width: 720px;
  line-height: 1.45;
}
.reg-stats-box {
  display: flex;
  gap: 10px;
}
.reg-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-width: 85px;
}
.reg-stat-v {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
}
.reg-stat-k {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.registry-toolbar-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.reg-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}
.reg-input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.reg-main-search {
  flex: 1 1 auto;
  min-width: 260px;
}
.reg-input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
.reg-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  outline: none;
  font-family: "JetBrains Mono", monospace;
  transition: all 0.15s ease;
}
.reg-input::placeholder {
  font-family: "Inter", sans-serif;
  color: var(--text-muted);
}
.reg-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.reg-region-select-wrap {
  width: 250px !important;
  min-width: 220px !important;
  max-width: 280px !important;
  flex: 0 0 250px !important;
  position: relative;
}
.reg-select-trigger {
  height: 38px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  border-radius: var(--radius-md) !important;
  background: var(--bg-input) !important;
  border: 1px solid var(--border-subtle) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}
.reg-select-trigger:hover {
  border-color: var(--border-medium) !important;
}
.reg-select-trigger:focus,
.reg-select-trigger.active {
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
}
.reg-region-select-wrap .custom-select-menu {
  width: 330px !important;
  min-width: 300px !important;
  max-width: 360px !important;
  max-height: 360px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}
.reg-region-select-wrap .custom-options-list,
.reg-region-select-wrap .custom-select-options {
  max-height: 270px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
.reg-okved-input-wrap {
  width: 170px !important;
  min-width: 140px !important;
  flex: 0 0 170px !important;
}
.reg-okved-input-wrap .reg-input {
  padding-left: 12px;
}
.reg-submit-btn {
  flex-shrink: 0 !important;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.reg-quick-presets-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reg-presets-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.reg-presets-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.reg-chip {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.reg-chip:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-medium);
}
.registry-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px;
}
.registry-meta-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.latency-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: "JetBrains Mono", monospace;
}
.db-source-tag {
  font-size: 11.5px;
  color: var(--text-muted);
}
.registry-batch-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.registry-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 14px;
}
.registry-company-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
  transition: all 0.15s ease;
  cursor: pointer;
}
.registry-company-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.registry-company-card:hover .reg-card-title {
  color: #2563eb;
}
[data-theme=dark] .registry-company-card:hover .reg-card-title {
  color: #60a5fa;
}
.reg-card-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.reg-checkbox-label {
  margin-top: 3px;
  cursor: pointer;
}
.reg-card-checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.reg-card-title-group {
  flex: 1;
  min-width: 0;
}
.reg-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  min-height: 38px;
}
.reg-card-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.reg-badge-inn,
.reg-badge-ogrn,
.reg-region-pill {
  font-size: 11px;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  padding: 2px 6px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
}
.reg-status-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}
.reg-status-pill.status-active {
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}
.reg-status-pill.status-liquidated {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid rgba(185, 28, 28, 0.25);
}
.reg-card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}
.reg-info-row {
  display: flex;
  gap: 6px;
}
.reg-k {
  color: var(--text-muted);
  font-weight: 500;
  min-width: 70px;
}
.reg-v {
  color: var(--text-primary);
}
.reg-okved-code {
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
}
.reg-addr {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.reg-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}
.btn-reg-relations {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-reg-relations:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-medium);
}
.btn-reg-add-ws {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-reg-add-ws:hover {
  background: var(--accent-primary);
  color: #ffffff;
}
.registry-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 14px 0;
}
.btn-load-more {
  padding: 10px 24px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.modal-relations-card {
  max-width: 1120px;
  width: 95%;
  height: 86vh;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--border-medium);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-relations-card.is-fullscreen {
  position: fixed;
  inset: 12px;
  width: calc(100vw - 24px);
  max-width: none;
  height: calc(100vh - 24px);
  max-height: none;
  z-index: 100000;
  background: var(--bg-card);
  border-radius: var(--radius-md);
}
.modal-relations-card .modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.modal-header-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.btn-modal-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-modal-tab:hover {
  color: var(--text-primary);
}
.btn-modal-tab.active {
  color: var(--text-primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-subtle);
}
.modal-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.modal-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.modal-action-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}
.relations-graph-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
  background: #f8fafc;
}
[data-theme=dark] .relations-graph-view {
  background: #09090b;
}
.graph-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
}
.graph-filters {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.graph-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.graph-filter-chip input {
  display: none;
}
.graph-filter-chip.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-subtle);
}
.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.graph-controls-hud {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-hud {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-hud:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}
.relations-canvas-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  background: #f8fafc;
}
[data-theme=dark] .relations-canvas-wrap {
  background: #09090b;
}
#relationsCanvas {
  display: block;
  width: 100%;
  height: 100%;
}
.graph-legend-hud {
  position: absolute;
  bottom: 12px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-subtle);
  pointer-events: none;
}
[data-theme=dark] .graph-legend-hud {
  background: rgba(18, 18, 20, 0.85);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.legend-tip {
  color: var(--text-muted);
  border-left: 1px solid var(--border-subtle);
  padding-left: 10px;
  font-size: 10.5px;
}
.rel-graph-tooltip {
  position: fixed;
  z-index: 100005;
  min-width: 240px;
  max-width: 320px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-primary);
  animation: fadeIn 0.12s ease;
}
[data-theme=dark] .rel-graph-tooltip {
  background: rgba(18, 18, 20, 0.95);
}
.tip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}
.tip-svg-wrap {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}
.tip-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
}
.tip-type {
  font-size: 11px;
  color: var(--text-muted);
}
.tip-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 11.5px;
}
.tip-k {
  color: var(--text-muted);
}
.tip-v {
  color: var(--text-primary);
  text-align: right;
}
.tip-search-btn {
  width: 100%;
  margin-top: 10px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}
.tip-search-btn:hover {
  background: var(--accent-hover);
}
#registryRelationsContent {
  background: var(--bg-app);
  border-top: 1px solid var(--border-subtle);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
[data-theme=dark] #registryRelationsContent {
  background: #09090b;
}
.rel-dossier-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.rel-kpi-card {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rel-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.rel-kpi-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rel-kpi-val {
  font-size: 22px;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-primary);
}
.rel-kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.rel-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.rel-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-subtle);
}
.rel-sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}
.rel-sec-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.rel-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rel-person-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.rel-person-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}
.rel-person-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background:
    linear-gradient(
      135deg,
      #3b82f6,
      #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.rel-person-avatar.avatar-owner {
  background:
    linear-gradient(
      135deg,
      #a855f7,
      #7c3aed);
}
.rel-person-avatar.avatar-hist {
  background: #64748b;
  opacity: 0.8;
}
.rel-person-body {
  flex: 1;
  min-width: 0;
}
.rel-person-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.rel-person-role {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rel-person-inn {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  margin-top: 4px;
}
.pill-dual {
  background: rgba(124, 58, 237, 0.12) !important;
  color: #7c3aed !important;
  border-color: rgba(124, 58, 237, 0.28) !important;
  font-weight: 600;
}
[data-theme=dark] .pill-dual {
  background: rgba(168, 85, 247, 0.18) !important;
  color: #c084fc !important;
  border-color: rgba(168, 85, 247, 0.35) !important;
}
.btn-find-other {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--radius-xs);
  cursor: pointer;
  outline: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.2;
  user-select: none;
}
.btn-find-other svg {
  color: #2563eb;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.btn-find-other .btn-arrow {
  opacity: 0.7;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-find-other:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}
.btn-find-other:hover svg {
  color: #ffffff;
}
.btn-find-other:hover .btn-arrow {
  opacity: 1;
  transform: translateX(2px);
}
.btn-find-other:active {
  transform: translateY(0);
  box-shadow: none;
}
[data-theme=dark] .btn-find-other {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.28);
}
[data-theme=dark] .btn-find-other svg {
  color: #60a5fa;
}
[data-theme=dark] .btn-find-other:hover {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 3px 12px rgba(59, 130, 246, 0.38);
}
.rel-notice-card {
  padding: 14px;
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.rel-notice-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.rel-sec-svg {
  flex-shrink: 0;
}
.rel-archive-accordion {
  margin-top: 8px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}
.rel-archive-accordion summary {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}
.rel-archive-accordion summary:hover {
  color: var(--text-primary);
}
.rel-timeline-flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rel-timeline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.rel-timeline-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.rel-timeline-badge.succ {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.rel-timeline-badge.pred {
  background: rgba(217, 119, 6, 0.15);
  color: #d97706;
}
.pill-active {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-full);
}
.pill-hist {
  font-size: 10px;
  padding: 1px 5px;
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
  border-radius: var(--radius-full);
}
.rel-okved-tags {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.okved-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 12px;
  transition: all 0.15s ease;
}
.okved-item-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}
.okved-item-row.okved-main-row {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}
.okved-desc {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
  flex: 1;
}
.okved-pill {
  font-size: 11.5px;
  padding: 3px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  flex-shrink: 0;
}
.okved-pill.okved-main {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.35);
  font-weight: 700;
}
.rel-notice-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
}
.filter-custom-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
}
.filter-hint-micro {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.reg-filters-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 12px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 8px;
}
.reg-filter-switches {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.reg-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}
.reg-filter-toggle:hover {
  color: var(--text-primary);
}
.reg-filter-toggle input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.toggle-text {
  letter-spacing: -0.01em;
}
.reg-view-switch-wrap {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.btn-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-view-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.btn-view-toggle.active {
  color: var(--text-primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-subtle);
}
.registry-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.registry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: left;
}
.registry-table thead {
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}
.registry-table th {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.registry-table td {
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  transition: background 0.1s ease;
}
.reg-table-row {
  cursor: pointer;
}
.reg-table-row:hover td {
  background: var(--bg-card-hover);
}
.reg-table-row:hover .reg-name-text {
  color: #2563eb;
}
[data-theme=dark] .reg-table-row:hover .reg-name-text {
  color: #60a5fa;
}
.reg-table-row.row-liquidated td {
  opacity: 0.72;
}
.reg-table-row.row-liquidated:hover td {
  opacity: 1;
}
.reg-th-cb,
.reg-td-cb {
  width: 36px;
  text-align: center;
}
.reg-th-inn,
.reg-td-inn {
  width: 140px;
  white-space: nowrap;
}
.reg-th-status,
.reg-td-status {
  width: 110px;
  white-space: nowrap;
}
.reg-th-reg,
.reg-td-reg {
  width: 70px;
  text-align: center;
  white-space: nowrap;
}
.reg-th-okved,
.reg-td-okved {
  width: 100px;
  white-space: nowrap;
}
.reg-th-actions,
.reg-td-actions {
  width: 190px;
  text-align: right;
  white-space: nowrap;
}
.reg-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 360px;
}
.reg-name-text {
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.12s ease;
}
.reg-sub-date {
  font-size: 11px;
  color: var(--text-muted);
}
.reg-inn-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: "JetBrains Mono", monospace;
}
.reg-badge-inn {
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 1px 5px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  display: inline-block;
  width: fit-content;
  transition: all 0.12s ease;
}
.reg-badge-inn:hover {
  background: var(--accent-glow);
  border-color: var(--border-medium);
}
.reg-sub-ogrn {
  font-size: 10.5px;
  color: var(--text-muted);
}
.reg-region-badge {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
}
.reg-okved-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  background: var(--accent-glow);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
}
.reg-contacts-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 260px;
}
.reg-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reg-contact-pill.web {
  color: var(--accent-primary);
  font-weight: 500;
}
.reg-contact-pill.web:hover {
  text-decoration: underline;
}
.reg-table-addr {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reg-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.btn-reg-relations,
.btn-reg-add-ws {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.btn-reg-relations {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.btn-reg-relations:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-medium);
}
.btn-reg-add-ws {
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  color: #ffffff;
}
.btn-reg-add-ws:hover {
  background: var(--accent-hover);
}
.rel-dossier-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 14px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  gap: 12px;
}
.rel-dossier-info-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.rel-dossier-info-meta svg {
  color: var(--text-muted);
  flex-shrink: 0;
}
.btn-enrich-executive {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  color: var(--accent-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}
.btn-enrich-executive svg {
  color: var(--accent-primary);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.btn-enrich-executive:hover {
  background: var(--accent-glow);
  color: var(--accent-hover);
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
}
.btn-enrich-executive:hover svg {
  color: var(--accent-hover);
  transform: scale(1.1);
}
.btn-enrich-executive:active {
  transform: translateY(0);
  box-shadow: none;
}
[data-theme=dark] .btn-enrich-executive {
  background: rgba(255, 255, 255, 0.04);
  color: #60a5fa;
  border-color: rgba(255, 255, 255, 0.12);
}
[data-theme=dark] .btn-enrich-executive svg {
  color: #60a5fa;
}
[data-theme=dark] .btn-enrich-executive:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(96, 165, 250, 0.4);
  color: #93c5fd;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.25);
}

/* frontend/styles/80-responsive.css */
.mobile-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  margin-right: 6px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.mobile-sidebar-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}
.mobile-sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-sidebar-backdrop.show {
  display: block;
  opacity: 1;
}
@media (max-width: 1024px) {
  .bento-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .bento-contact-card {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 1.25rem !important;
  }
  .bento-details-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .coverage-analytics-bar {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 900px) {
  body {
    overflow: hidden;
  }
  .app-shell {
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    box-shadow: none !important;
    visibility: hidden !important;
    pointer-events: none;
    padding: 1.25rem 1rem;
    background: var(--bg-sidebar);
    border-right: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.45) !important;
    visibility: visible !important;
    pointer-events: auto;
    border-right: 1px solid var(--border-subtle);
  }
  .mobile-sidebar-toggle {
    display: inline-flex;
  }
  .main-canvas {
    padding: 8px 10px 18px;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .search-command-bar {
    margin-bottom: 8px;
  }
  .command-bar-inner {
    padding: 4px 8px;
    min-height: 46px;
    border-radius: 12px;
    gap: 4px;
  }
  .command-icon {
    display: none;
  }
  .search-ws-tag {
    max-width: 110px;
    padding: 3px 6px !important;
    font-size: 11px !important;
    margin-right: 2px !important;
  }
  .search-ws-tag svg {
    display: none;
  }
  .command-input {
    font-size: 13px;
    min-width: 60px;
  }
  .command-actions {
    gap: 4px;
  }
  .command-actions .crawl-toggle-label {
    padding: 3px 6px;
    font-size: 11px;
  }
  .command-actions button.btn-secondary {
    padding: 6px 9px;
    min-width: 34px;
    height: 34px;
  }
  .command-actions button.btn-secondary span:not(.filter-badge-count) {
    display: none;
  }
  .command-actions button.btn-execute {
    padding: 6px 10px;
    font-size: 12px;
    height: 34px;
  }
  .command-actions button.btn-execute .shortcut {
    display: none;
  }
  .quick-search-presets {
    margin-bottom: 8px;
  }
  .presets-label {
    display: none;
  }
  .quick-presets-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
  }
  .quick-presets-row::-webkit-scrollbar {
    display: none;
  }
  .preset-chip {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 11.5px;
    padding: 4px 10px;
  }
  .batch-table-card {
    border-radius: 14px;
  }
  .batch-table-head {
    padding: 8px 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .batch-table-head h3 {
    font-size: 13.5px !important;
    margin: 0;
  }
  .batch-table-head p {
    display: none !important;
  }
  .batch-table-head div[style*="display:flex"] {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    width: 100%;
  }
  .batch-table-head .view-mode-toggle-group {
    flex-shrink: 0;
  }
  .batch-table-head .btn-secondary,
  .batch-table-head .btn-execute {
    flex: 1 1 0;
    padding: 5px 6px !important;
    font-size: 11px !important;
    height: 32px !important;
    justify-content: center !important;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .coverage-analytics-bar {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 6px 8px !important;
    gap: 6px !important;
    scrollbar-width: none;
  }
  .coverage-analytics-bar::-webkit-scrollbar {
    display: none;
  }
  .coverage-metric-item {
    flex: 0 0 110px !important;
    min-width: 110px !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
    gap: 2px !important;
    box-sizing: border-box !important;
  }
  .coverage-metric-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    width: 100% !important;
  }
  .coverage-metric-label {
    font-size: 10px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .coverage-metric-pct {
    font-size: 9.5px !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
  }
  .coverage-metric-val {
    font-size: 13.5px !important;
    font-weight: 700 !important;
  }
  .filter-pills-bar {
    padding: 6px 10px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 6px !important;
    scrollbar-width: none;
  }
  .filter-pills-bar::-webkit-scrollbar {
    display: none;
  }
  .filter-pills-left {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    flex: unset !important;
  }
  .filter-pills-left .preset-chip {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    padding: 4px 9px !important;
  }
  .filter-pills-right {
    flex-shrink: 0 !important;
  }
  .btn-reset-filters {
    padding: 4px 9px !important;
    font-size: 11px !important;
  }
  .table-wrapper {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    width: 100% !important;
  }
  .b2b-table {
    min-width: 1150px !important;
  }
  .b2b-table th,
  .b2b-table td {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
  }
  .batch-cards-container {
    padding: 8px 10px 18px !important;
  }
  .batch-cards-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .company-card-item {
    border-radius: 10px !important;
    padding: 10px 12px !important;
  }
  .bento-root {
    gap: 12px !important;
  }
  .bento-hero-card {
    padding: 14px 16px !important;
    border-radius: 14px !important;
    gap: 10px !important;
  }
  .hero-top-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .hero-identity-left {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .entity-name-inline {
    font-size: 17px !important;
    white-space: normal !important;
    width: 100% !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    margin: 2px 0 !important;
  }
  .hero-actions button {
    justify-content: center !important;
    padding: 6px 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    height: 34px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .bento-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .bento-metric-card {
    padding: 10px 12px !important;
    min-height: 60px !important;
    border-radius: 10px !important;
    gap: 2px !important;
    justify-content: center !important;
  }
  .metric-caption {
    font-size: 10px !important;
    margin-bottom: 1px !important;
  }
  .metric-big-val {
    font-size: 16px !important;
    line-height: 1.2 !important;
  }
  .metric-foot-note {
    font-size: 9.5px !important;
    margin-top: 1px !important;
  }
  .bento-contact-card {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 16px 18px !important;
    border-radius: 14px !important;
  }
  .bento-details-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .bento-detail-card {
    padding: 16px 18px !important;
    border-radius: 14px !important;
  }
  .detail-card-title {
    font-size: 13.5px !important;
    padding-bottom: 6px !important;
    margin-bottom: 6px !important;
  }
  .data-row {
    padding: 6px 0 !important;
    font-size: 12.5px !important;
  }
  .bento-audit-dock {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 14px 18px !important;
    border-radius: 14px !important;
  }
  .audit-dock-title {
    font-size: 12px !important;
  }
  .audit-dock-links {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .audit-pill-link {
    padding: 5px 6px !important;
    font-size: 11px !important;
    height: 32px !important;
    justify-content: center !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .filter-drawer-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .modal-overlay {
    padding: 10px;
  }
  .modal-card.modal-card-large {
    width: 100%;
    max-width: 100%;
    height: 94vh;
    height: 94dvh;
    border-radius: 16px;
  }
  .auth-card {
    padding: 28px 20px 22px;
    border-radius: 20px;
  }
}
@media (max-width: 480px) {
  .main-canvas {
    padding: 6px 6px 14px;
  }
  .search-ws-tag {
    display: none !important;
  }
  .command-input::placeholder {
    font-size: 12px;
  }
  .auth-title {
    font-size: 19px;
  }
  .auth-icon-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }
}

/* frontend/styles/90-print.css */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .sidebar,
  .search-command-bar,
  .hero-actions,
  .bento-audit-dock,
  .batch-view-card,
  .table-open-btn,
  .modal-overlay,
  .advanced-filter-drawer,
  .dossier-carousel-bar,
  .toast-card {
    display: none !important;
  }
  .main-canvas {
    padding: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }
  .bento-hero-card,
  .bento-metric-card,
  .bento-contact-card,
  .bento-detail-card,
  .batch-table-card {
    border: 1px solid #cccccc !important;
    background: #fafafa !important;
    box-shadow: none !important;
    color: #000000 !important;
  }
  .entity-name,
  .metric-big-val,
  .primary-phone-link {
    color: #000000 !important;
  }
}

/* frontend/style.css */
