/* AluScout Base Styles */
/* Note: Color variables are defined in themes.css with light/dark support */
/* This file uses those variables via --bg-primary, --card-bg, etc. */
/* Legacy color system removed - use --interactive, --active from themes.css */
:root {
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 8px;
}

/* ===========================
   ACCESSIBILITY: FOCUS INDICATORS
   =========================== */
/* Global focus-visible rule for keyboard navigation */
*:focus-visible {
    outline: var(--focus-ring, 3px solid #0369A1);
    outline-offset: var(--focus-ring-offset, 2px);
}

/* Remove focus ring for mouse clicks (but keep for keyboard) */
*:focus:not(:focus-visible) {
    outline: none;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-base, 0.875rem);
    background: var(--bg-gradient, var(--bg-primary));
    color: var(--text-primary, var(--text));
    line-height: var(--leading-normal, 1.5);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-theme, 0.25s) ease,
                color var(--transition-theme, 0.25s) ease;
}

/* Subtle noise texture overlay for depth */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--bg-noise);
    pointer-events: none;
    z-index: -1;
}

/* Display Font for Headings - Maritime Precision */
h1, h2, h3,
.hero-title,
.nav-brand a,
.page-title,
.section-title {
    font-family: var(--font-family-display);
    font-weight: 400;
    letter-spacing: var(--tracking-tight, -0.02em);
}

/* Navbar */
.navbar {
    background: var(--card-bg, var(--bg-card));
    border-bottom: 1px solid var(--card-border, var(--border));
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color var(--transition-speed, 0.25s) ease,
                border-color var(--transition-speed, 0.25s) ease;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--interactive);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-primary, var(--text));
    text-decoration: none;
    transition: color var(--transition-speed, 0.25s) ease;
}

.nav-links a:hover {
    color: var(--interactive);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user span {
    color: var(--text-muted, var(--text-muted));
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Auth */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--card-bg, var(--bg-card));
    border-radius: var(--radius);
    box-shadow: var(--card-shadow, 0 1px 3px rgba(0,0,0,0.1));
    transition: background-color var(--transition-speed, 0.25s) ease,
                box-shadow var(--transition-speed, 0.25s) ease;
}

.auth-container h1 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid var(--card-border, var(--border));
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--card-bg, var(--bg-card));
    color: var(--text-primary, var(--text));
    transition: background-color var(--transition-speed, 0.25s) ease,
                border-color var(--transition-speed, 0.25s) ease,
                color var(--transition-speed, 0.25s) ease;
}

.form-select {
    padding: 0.75rem;
    border: 1px solid var(--card-border, var(--border));
    border-radius: var(--radius);
    font-size: 1rem;
    width: 100%;
    background: var(--card-bg, var(--bg-card));
    color: var(--text-primary, var(--text));
    transition: background-color var(--transition-speed, 0.25s) ease,
                border-color var(--transition-speed, 0.25s) ease,
                color var(--transition-speed, 0.25s) ease;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--interactive);
    color: white;
}

.btn-primary:hover {
    background: var(--interactive-hover);
    opacity: 0.9;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-disabled,
.btn:disabled {
    background-color: #E2E8F0;  /* Light gray */
    color: #94A3B8;  /* Muted text */
    border: 2px dashed var(--border-strong, rgba(0, 0, 0, 0.2));
    cursor: not-allowed;
    position: relative;
}

[data-theme="dark"] .btn-disabled,
[data-theme="dark"] .btn:disabled {
    background-color: #334155;  /* Dark gray */
    color: #64748B;
    border-color: var(--border-strong, rgba(255, 255, 255, 0.2));
}

/* Strikethrough pattern for extra clarity */
.btn-disabled::after,
.btn:disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 4px,
        currentColor 4px,
        currentColor 8px
    );
    opacity: 0.3;
    pointer-events: none;
}

.btn-disabled:hover,
.btn:disabled:hover {
    /* No hover effect on disabled buttons */
    transform: none;
    box-shadow: none;
}

/* Delete confirmation state */
.btn.confirming {
    background-color: var(--warning, #f59e0b) !important;
    border-color: var(--warning, #f59e0b) !important;
    color: white !important;
    animation: pulse-subtle 1s infinite;
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Stat cards - themed version with accent bar from themes.css */
/* Basic stat-card styles moved to themes.css */
.stat-card {
    background: var(--card-bg, var(--bg-card));
    padding: 0;
    border-radius: var(--radius);
    border: 1px solid var(--card-border, var(--border));
    display: flex;
    overflow: hidden;
    transition: background-color var(--transition-speed, 0.25s) ease,
                border-color var(--transition-speed, 0.25s) ease,
                box-shadow var(--transition-speed, 0.25s) ease;
}

.stat-card:hover {
    box-shadow: var(--card-shadow, 0 4px 12px rgba(0,0,0,0.1));
}

.stat-content {
    padding: 1.5rem;
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--interactive);
}

.stat-label {
    color: var(--text-muted, var(--text-muted));
    font-size: 0.875rem;
}

.dashboard-section {
    background: var(--card-bg, var(--bg-card));
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--card-border, var(--border));
    margin-bottom: 1rem;
    transition: background-color var(--transition-speed, 0.25s) ease,
                border-color var(--transition-speed, 0.25s) ease;
}

.dashboard-section h2 {
    margin-bottom: 1rem;
}

.placeholder {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.status-ok {
    color: var(--success);
}

.status-warning {
    color: var(--warning);
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-error {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

/* Search Form */
.search-form .dashboard-section {
    margin-bottom: 1.5rem;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.helper-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
}

.checkbox-label:hover {
    background: var(--bg);
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--interactive);
}

.range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Search Summary */
.search-summary {
    margin-bottom: 1rem;
}

.search-summary p {
    margin-bottom: 0.25rem;
}

/* Listings Table */
.listings-table-container {
    overflow-x: auto;
}

.listings-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg, var(--bg-card));
    border-radius: var(--radius);
    overflow: hidden;
}

.listings-table th,
.listings-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--card-border, var(--border));
}

.listings-table th {
    background: var(--bg-tertiary, var(--bg));
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, var(--text-muted));
}

.listing-row {
    cursor: pointer;
    transition: background var(--transition-speed, 0.25s) ease;
}

.listing-row:hover {
    background: var(--bg-tertiary, var(--bg));
}

.text-muted {
    color: var(--text-muted);
}

/* Score badges moved to themes.css with accessibility improvements */

/* Tab Content */
.tab-content-wrapper {
    margin-bottom: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Chart Area */
.chart-area {
    min-height: 350px;
}

.chart-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .chart-row {
        grid-template-columns: 1fr;
    }
}

/* Brand Selector */
.brand-selector {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-selector label {
    font-weight: 500;
}

.brand-selector select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--card-border, var(--border));
    border-radius: var(--radius);
    background: var(--card-bg, var(--bg-card));
    color: var(--text-primary, var(--text));
    font-size: 1rem;
    min-width: 200px;
}

/* Help Text */
.help-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Help Pages */
.help-content {
    max-width: 800px;
    margin: 0 auto;
}

.help-section {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--card-border, rgba(0,0,0,0.1));
    box-shadow: var(--card-shadow, 0 4px 20px rgba(0, 0, 0, 0.06));
}

/* Maritime wave accent at bottom of help sections */
.help-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-image: var(--wave-pattern-subtle);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: bottom;
    pointer-events: none;
    z-index: 0;
}

.help-section h2 {
    margin-top: 0;
    margin-bottom: var(--space-4);
    font-size: var(--font-xl);
    position: relative;
    z-index: 1;
}

.help-section p {
    line-height: 1.6;
    margin-bottom: var(--space-4);
    position: relative;
    z-index: 1;
}

.help-section p:last-child {
    margin-bottom: 0;
}

.help-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

.help-list li {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
}

.help-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.help-list li strong {
    color: var(--text-primary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted, var(--text-muted));
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .container {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Listing Detail */
.breadcrumb {
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--interactive);
}

.listing-header {
    margin-bottom: 2rem;
}

.listing-header h1 {
    margin-bottom: 0.25rem;
}

.boat-name {
    font-size: var(--font-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    /* font-style: italic; REMOVED for readability */
}

.listing-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
}

.listing-meta span:not(:last-child)::after {
    content: "\2022";
    margin-left: 1rem;
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.price-display {
    margin-bottom: 1rem;
}

.price-current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--interactive);
}

.price-original {
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.price-poa {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.score-display {
    margin-bottom: 1rem;
}

.score-display .score-badge {
    font-size: 2rem;
    padding: 0.5rem 1rem;
}

.score-details {
    font-size: 0.75rem;
    background: var(--bg-tertiary, #f8fafc);
    padding: 0.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
}

.score-help-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: var(--radius-full);
    text-decoration: none;
    margin-left: var(--space-1);
    transition: var(--transition-fast);
}

.score-help-link:hover {
    background: var(--interactive);
    color: white;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spec-value {
    font-weight: 500;
}

/* Filters */
.filters-section {
    margin-bottom: 1.5rem;
}

.filters-form .filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 120px;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group .form-input,
.filter-group .form-select {
    padding: 0.5rem;
    font-size: 0.875rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

/* Sort Controls */
.sort-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--card-border, var(--border));
}

.sort-controls span {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.sort-controls a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.sort-controls a:hover {
    color: var(--interactive);
}

.sort-controls a.active {
    color: var(--interactive);
    background: rgba(37, 99, 235, 0.1);
    font-weight: 500;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border, var(--border));
}

.page-info {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .filters-form .filters-row {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .sort-controls {
        flex-wrap: wrap;
    }

    .listing-meta {
        flex-wrap: wrap;
    }
}

/* Login Page Styling */
.login-page {
    display: flex;
    min-height: 100vh;
}

.login-hero {
    flex: 1;
    position: relative;
    background-image: url('/static/images/header_bg.jpeg');
    background-size: cover;
    background-position: center;
    display: none;
}

@media (min-width: 768px) {
    .login-hero {
        display: flex;
    }
}

.login-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 58, 95, 0.75) 100%);
}

.login-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    color: white;
}

.login-hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-hero-content p {
    font-size: 1.25rem;
    opacity: 0.8;
}

.login-form-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-primary);
}

.login-form-container .auth-container {
    width: 100%;
    max-width: 400px;
    margin: 0;
    background: var(--card-bg);
}

.login-form-container .auth-container h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.btn-full {
    width: 100%;
}

/* Info Overlay Component */
.info-button {
  background: none;
  border: none;
  color: var(--text-muted, var(--text-secondary));
  cursor: pointer;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background-color 0.2s;
}

.info-button:hover {
  color: var(--interactive);
  background-color: var(--bg-tertiary, rgba(0, 0, 0, 0.05));
}

.info-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.info-overlay.hidden {
  display: none;
}

.info-overlay-content {
  background: var(--card-bg, var(--bg-card));
  border-radius: var(--radius);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.info-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--card-border, var(--border));
}

.info-overlay-header h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary, var(--text));
}

.info-overlay-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted, var(--text-secondary));
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-overlay-close:hover {
  color: var(--text-primary, var(--text));
}

.info-overlay-body {
  padding: 1rem;
  color: var(--text-primary, var(--text));
}

.info-overlay-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
}

.info-overlay-body th,
.info-overlay-body td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--card-border, var(--border));
}

.info-overlay-body th {
  font-weight: 600;
  background: var(--bg-tertiary, var(--bg));
  color: var(--text-primary, var(--text));
}

/* Collapsible Section Component */
.collapsible-section {
  border: 1px solid var(--card-border, var(--border));
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: var(--card-bg, var(--bg-card));
  transition: background-color var(--transition-speed, 0.25s) ease,
              border-color var(--transition-speed, 0.25s) ease;
}

.collapsible-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  list-style: none;
  color: var(--text-primary, var(--text));
  transition: background-color 0.2s ease;
}

.collapsible-header:hover {
  background-color: var(--bg-tertiary, var(--bg));
}

.collapsible-header::-webkit-details-marker {
  display: none;
}

.collapsible-icon {
  display: flex;
  transition: transform 0.2s;
  color: var(--text-muted, var(--text-secondary));
}

.collapsible-section[open] .collapsible-icon {
  transform: rotate(90deg);
}

.collapsible-title {
  flex: 1;
}

.collapsible-content {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--card-border, var(--border));
  color: var(--text-primary, var(--text));
}

/* Importance Dropdown Component */
.importance-dropdown {
  padding: 0.5rem;
  border: 1px solid var(--card-border, var(--border));
  border-radius: 0.25rem;
  background: var(--card-bg, var(--bg-card));
  color: var(--text-primary, var(--text));
  font-size: 0.9rem;
  min-width: 140px;
  transition: background-color var(--transition-speed, 0.25s) ease,
              border-color var(--transition-speed, 0.25s) ease,
              box-shadow 0.2s ease;
}

.importance-dropdown:focus-visible {
  outline: 3px solid var(--interactive);
  outline-offset: 2px;
  border-color: var(--interactive);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.15);
}

/* Color coding for importance levels */
.importance-dropdown option[value="deal_breaker"] {
  color: var(--error, #ef4444);
  font-weight: 600;
}

.importance-dropdown option[value="important"] {
  color: var(--warning);
}

.importance-dropdown option[value="nice_to_have"] {
  color: var(--success, #22c55e);
}

.importance-dropdown option[value="irrelevant"] {
  color: var(--text-muted, var(--text-secondary));
}
/* Deal Breaker Styles */
.badge-deal-breaker {
  background-color: var(--error, #ef4444);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.deal-breaker-failure {
  /* Muted/grayed appearance to indicate "doesn't meet requirements" */
  /* Avoids red which conflicts with score-low badge color */
  background-color: var(--bg-tertiary);
  opacity: 0.65;
  border-left: 3px solid var(--text-muted);
}

.deal-breaker-failure:hover {
  opacity: 0.85;
}

[data-theme="dark"] .deal-breaker-failure {
  background-color: rgba(100, 116, 139, 0.15);
  border-left-color: var(--text-muted);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  cursor: pointer;
  width: 1.1rem;
  height: 1.1rem;
}
/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--card-bg, var(--bg-card));
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: background-color var(--transition-speed, 0.25s) ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted, var(--text-muted));
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color var(--transition-speed, 0.25s) ease,
                color var(--transition-speed, 0.25s) ease;
}

.modal-close:hover {
    background: var(--bg-tertiary, var(--bg));
    color: var(--text-primary, var(--text));
}

/* Accessible Dialog Component (native <dialog>) */
.dialog {
    border: none;
    border-radius: var(--radius-lg, 12px);
    padding: 0;
    max-width: min(90vw, 420px);
    box-shadow: var(--shadow-xl, 0 20px 40px rgba(0, 0, 0, 0.15));
    background: var(--card-bg, #ffffff);
}

.dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.dialog-content {
    padding: var(--space-6, 1.5rem);
}

.dialog-title {
    font-size: var(--font-lg, 1.125rem);
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    margin: 0 0 var(--space-3, 0.75rem);
}

.dialog-message {
    font-size: var(--font-base, 1rem);
    color: var(--text-secondary, #475569);
    margin: 0 0 var(--space-6, 1.5rem);
    line-height: 1.5;
}

.dialog-actions {
    display: flex;
    gap: var(--space-3, 0.75rem);
    justify-content: flex-end;
}

/* Alert dialog variants */
.dialog-alert .dialog-title::before {
    display: inline-block;
    margin-right: var(--space-2, 0.5rem);
    font-size: 1.25em;
}

.dialog-error .dialog-title {
    color: var(--negative, #dc2626);
}

.dialog-error .dialog-title::before {
    content: "!";
}

.dialog-success .dialog-title {
    color: var(--positive, #059669);
}

.dialog-success .dialog-title::before {
    content: "\2713";
}

.dialog-warning .dialog-title {
    color: var(--warning, #f59e0b);
}

.dialog-warning .dialog-title::before {
    content: "\26A0";
}

/* Dark mode support */
[data-theme="dark"] .dialog {
    background: var(--card-bg, #1e293b);
}

[data-theme="dark"] .dialog-title {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .dialog-message {
    color: var(--text-secondary, #94a3b8);
}

[data-theme="dark"] .dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
}

/* Sponsor link */
.sponsor-link {
    color: #db61a2;
    text-decoration: none;
}

.sponsor-link:hover {
    color: #bf4b8a;
}

.heart-icon {
    font-size: 1.125rem;
}

/* Admin nav */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-nav {
    display: flex;
    gap: 0.5rem;
}

.admin-nav .btn.active {
    background: var(--interactive);
    color: white;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
}

.badge-primary {
    background: var(--interactive);
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-danger {
    background: #ef4444;
    color: white;
}

.badge-info {
    background: #3b82f6;
    color: white;
}

.badge-secondary {
    background: var(--secondary);
    color: white;
}

/* Admin tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg, var(--bg-card));
    border-radius: var(--radius);
    overflow: hidden;
    transition: background-color var(--transition-speed, 0.25s) ease;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--card-border, var(--border));
}

.data-table th {
    background: var(--bg-tertiary, var(--bg));
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, var(--text-muted));
    transition: background-color var(--transition-speed, 0.25s) ease;
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary, var(--bg));
    transition: background-color var(--transition-speed, 0.25s) ease;
}

.message-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    color: var(--text-muted, var(--text-muted));
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Status form select styling */
.status-form select {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--card-border, var(--border));
    background: var(--card-bg, var(--bg-card));
    color: var(--text-primary, var(--text));
    font-size: 0.875rem;
    transition: background-color var(--transition-speed, 0.25s) ease,
                border-color var(--transition-speed, 0.25s) ease,
                color var(--transition-speed, 0.25s) ease;
}

.status-form select:hover {
    border-color: var(--interactive);
}

/* Success and sponsor messages */
.success-message {
    color: #10b981;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
}

.sponsor-message {
    text-align: center;
    color: var(--text-muted, var(--text-muted));
    margin-bottom: 1rem;
}

.sponsor-message a {
    color: #db61a2;
    text-decoration: none;
    font-weight: 500;
}

.sponsor-message a:hover {
    color: #bf4b8a;
    text-decoration: underline;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    color: var(--text-muted, var(--text-muted));
    padding: 2.5rem;
    font-size: 1rem;
}

/* Filter form styling */
.filters {
    margin-bottom: 1.5rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-form select {
    padding: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--card-border, var(--border));
    background: var(--card-bg, var(--bg-card));
    color: var(--text-primary, var(--text));
    font-size: 0.875rem;
    transition: background-color var(--transition-speed, 0.25s) ease,
                border-color var(--transition-speed, 0.25s) ease,
                color var(--transition-speed, 0.25s) ease;
}

.filter-form select:hover {
    border-color: var(--interactive);
}

.filter-form select:focus-visible {
    outline: 3px solid var(--interactive);
    outline-offset: 2px;
    border-color: var(--interactive);
}

/* Equipment list styling */
.equipment-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.equipment-list li {
    padding: 0.25rem 0;
    color: var(--text-primary);
}

/* Information subsections - visual grouping within cards */
.info-subsection {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--divider);
}

.info-subsection:first-child {
    padding-top: 0;
}

.info-subsection:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-subsection h3 {
    font-size: var(--font-md);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

/* Specification categories - visual grouping within technical specs */
.spec-category {
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--divider);
}

.spec-category:first-child {
    padding-top: 0;
}

.spec-category:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.spec-category h3 {
    font-size: var(--font-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

/* Admin tabs styling */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.5rem;
}

.admin-tab {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 0.25rem 0.25rem 0 0;
    transition: color 0.2s, background-color 0.2s;
}

.admin-tab:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.admin-tab.active {
    color: var(--active);
    border-bottom: 2px solid var(--active);
    margin-bottom: -1px;
}

/* Score Breakdown Component */
.score-breakdown {
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--card-border, rgba(0,0,0,0.1));
}

/* Maritime wave accent at bottom of score breakdown */
.score-breakdown::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-image: var(--wave-pattern-subtle);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: bottom;
    pointer-events: none;
    z-index: 0;
}

.score-breakdown-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.score-total {
    font-size: 2rem;
    font-weight: 700;
    color: var(--interactive);
}

.score-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.score-criteria {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.criterion {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.criterion-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.criterion-name {
    color: var(--text-secondary);
}

.criterion-score {
    color: var(--text-primary);
    font-weight: 500;
}

.criterion-bar {
    height: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 0.25rem;
    overflow: hidden;
}

.criterion-fill {
    height: 100%;
    border-radius: 0.25rem;
    transition: width 0.3s ease;
}

.criterion-fill.fill-high {
    background: var(--positive);
}

.criterion-fill.fill-medium {
    background: var(--warning);
}

.criterion-fill.fill-low {
    background: var(--negative);
}

.criterion-warning {
    font-size: 0.75rem;
    color: var(--negative);
    margin-top: 0.25rem;
}

.score-details-toggle {
    margin-top: 1rem;
    border-top: 1px solid var(--card-border);
    padding-top: 0.75rem;
    position: relative;
    z-index: 1;
}

.score-details-toggle summary {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.score-details-toggle summary:hover {
    color: var(--text-primary);
}

.score-details-content {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.detail-item strong {
    color: var(--text-primary);
}

.detail-warning {
    color: var(--negative);
}

.equipment-matched,
.equipment-missing {
    margin: 0.25rem 0 0 1rem;
    padding: 0;
    list-style: disc;
}

.equipment-matched li {
    color: var(--positive);
}

.equipment-missing li {
    color: var(--negative);
}

/* Deal-breaker warning */
.deal-breaker-warning {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--negative-bg, rgba(239, 68, 68, 0.1));
    border: 1px solid var(--negative);
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.deal-breaker-warning strong {
    color: var(--negative);
}

.deal-breaker-warning ul {
    margin: 0.5rem 0 0 1rem;
    padding: 0;
    color: var(--negative);
}

/* Platform Selector */
.platform-selector {
    margin-bottom: 0.5rem;
    background: var(--bg-primary, var(--bg));
    border: 1px solid var(--card-border, var(--border));
    border-radius: var(--radius);
    padding: 0.5rem;
}

.platform-selector summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary, var(--secondary));
}

.platform-selector[open] summary {
    margin-bottom: 0.5rem;
}

.platform-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.25rem;
}

.platform-checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.platform-checkboxes label:hover {
    background: var(--card-bg, var(--bg-card));
    border-radius: 4px;
}

.platform-checkboxes input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

/* Analysis markdown content */
.analysis-markdown {
    line-height: 1.7;
    color: var(--text-primary, var(--text));
}

.analysis-markdown h1,
.analysis-markdown h2,
.analysis-markdown h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary, var(--text));
}

.analysis-markdown h1 { font-size: 1.5rem; }
.analysis-markdown h2 { font-size: 1.25rem; }
.analysis-markdown h3 { font-size: 1.1rem; }

.analysis-markdown p {
    margin-bottom: 1rem;
}

.analysis-markdown ul,
.analysis-markdown ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.analysis-markdown li {
    margin-bottom: 0.25rem;
}

.analysis-markdown code {
    background: var(--bg-tertiary, var(--bg));
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.analysis-markdown pre {
    background: var(--bg-tertiary, var(--bg));
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.analysis-markdown pre code {
    background: none;
    padding: 0;
}

.analysis-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.analysis-markdown th,
.analysis-markdown td {
    border: 1px solid var(--border-color, var(--border));
    padding: 0.5rem;
    text-align: left;
}

.analysis-markdown th {
    background: var(--bg-secondary, var(--bg));
    font-weight: 600;
}

.analysis-timestamp {
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Suggestion form */
.suggestion-form {
    max-width: 600px;
}

.suggestion-form .form-group {
    margin-bottom: 1rem;
}

.suggestion-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.suggestion-form input,
.suggestion-form select,
.suggestion-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.suggestion-form input:disabled {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.suggestion-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.field-row {
    margin-bottom: 1rem;
}

.btn-remove {
    background: var(--negative, #ef4444);
    color: white;
    border: none;
    border-radius: 0.25rem;
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    margin-bottom: 0.25rem;
}

.btn-remove:hover {
    opacity: 0.8;
}

.btn-remove-placeholder {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.25rem;
}

.btn-add-field {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.btn-add-field:hover {
    background: var(--bg-tertiary);
}

.form-message {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.form-message.success {
    background: var(--positive-bg, rgba(34, 197, 94, 0.1));
    color: var(--positive);
}

.form-message.error {
    background: var(--negative-bg, rgba(239, 68, 68, 0.1));
    color: var(--negative);
}

@media (max-width: 768px) {
    .suggestion-form .form-row {
        grid-template-columns: 1fr;
    }

    .btn-remove-placeholder {
        display: none;
    }
}

/* Model suggestions table */
.value-cell {
    font-family: monospace;
}

.value-cell .old-value {
    color: var(--text-secondary);
    text-decoration: line-through;
}

.value-cell .arrow {
    margin: 0 0.5rem;
    color: var(--text-muted);
}

.value-cell .new-value {
    color: var(--positive);
    font-weight: 500;
}

.notes-row {
    background: var(--bg-secondary);
}

.notes-cell {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

/* =================================
   Scan Progress Component
   ================================= */

.job-progress {
    padding: 1rem;
    background: var(--card-bg, var(--bg-card));
    border-radius: var(--radius);
    border: 1px solid var(--card-border, var(--border));
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scan-header {
    margin-bottom: 0.25rem;
}

.scan-platform {
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.scan-activity {
    color: var(--text-muted, var(--text-muted));
    font-weight: normal;
    font-size: 0.9375rem;
}

.scan-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary, var(--text-muted));
}

.meta-separator {
    color: var(--border-color, var(--border));
    user-select: none;
}

.scan-issues {
    color: var(--warning, #f59e0b);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.scan-issues::before {
    content: "⚠️";
    font-size: 0.8125rem;
}

.scan-listings {
    margin: 0.25rem 0;
    font-size: 0.9375rem;
}

/* Progress bar */
.progress-bar {
    height: 8px;
    background: var(--bg-secondary, #e2e8f0);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--interactive) 0%, var(--interactive-hover) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    min-width: 2%;
}

/* Status states */
.progress-complete {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-failed {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Pending animation */
.status-pending {
    color: var(--text-secondary, var(--text-muted));
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-pending::after {
    content: "";
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border);
    border-top-color: var(--interactive);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* =================================
   DESIGN SYSTEM: CUSTOM CHECKBOXES
   ================================= */

/* Custom checkbox styling - replaces native appearance */
.checkbox-custom,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-3, 0.75rem);
    padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    user-select: none;
    transition: background-color var(--transition-fast, 0.15s);
    min-height: 40px;
}

.checkbox-custom:hover,
.checkbox-label:hover {
    background: var(--bg-tertiary, rgba(0, 0, 0, 0.03));
}

/* Hide native checkbox, create custom appearance */
.checkbox-custom input[type="checkbox"],
.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: var(--checkbox-size, 20px);
    height: var(--checkbox-size, 20px);
    min-width: var(--checkbox-size, 20px);
    border: 2px solid var(--input-border, rgba(0, 0, 0, 0.15));
    border-radius: var(--radius-sm, 4px);
    background: var(--input-bg, #ffffff);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast, 0.15s);
}

/* Hover state */
.checkbox-custom input[type="checkbox"]:hover,
.checkbox-label input[type="checkbox"]:hover {
    border-color: var(--input-border-hover, rgba(0, 0, 0, 0.25));
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Focus state for accessibility */
.checkbox-custom input[type="checkbox"]:focus-visible,
.checkbox-label input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--interactive);
    outline-offset: 2px;
    border-color: var(--interactive);
}

/* Checked state */
.checkbox-custom input[type="checkbox"]:checked,
.checkbox-label input[type="checkbox"]:checked {
    background: var(--accent, #3B82F6);
    border-color: var(--accent, #3B82F6);
}

/* Checkmark using pseudo-element */
.checkbox-custom input[type="checkbox"]:checked::after,
.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkmark-pop 0.15s ease;
}

/* Checkbox label text */
.checkbox-custom span,
.checkbox-label span {
    font-size: var(--font-base, 0.875rem);
    color: var(--text-primary, #0F172A);
}

/* =================================
   DESIGN SYSTEM: FORM INPUTS
   ================================= */

/* Enhanced input styling with better visibility */
.form-input,
.form-select,
.form-group input,
.form-group select,
.form-group textarea {
    padding: var(--field-padding-y, 0.75rem) var(--field-padding-x, 0.75rem);
    border: 2px solid var(--input-border, rgba(0, 0, 0, 0.15));
    border-radius: var(--radius-md, 8px);
    font-size: var(--font-base, 0.875rem);
    font-family: var(--font-family, inherit);
    background: var(--input-bg, #ffffff);
    color: var(--text-primary, #0F172A);
    width: 100%;
    transition: border-color 0.15s ease,
                box-shadow 0.15s ease,
                background-color 0.25s ease;
}

/* Placeholder styling */
.form-input::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--input-placeholder, rgba(0, 0, 0, 0.4));
}

/* Hover state for inputs */
.form-input:hover,
.form-select:hover,
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--input-border-hover, rgba(0, 0, 0, 0.25));
}

/* Focus state with ring */
.form-input:focus,
.form-select:focus-visible,
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
    outline: 3px solid var(--interactive);
    outline-offset: 2px;
    border-color: var(--interactive);
}

/* Select dropdown arrow enhancement */
.form-select,
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--input-bg, #ffffff);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}

/* Dark mode select arrow */
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-group select {
    background-color: var(--input-bg, rgba(255, 255, 255, 0.05));
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
}

/* Enhanced importance dropdown */
.importance-dropdown {
    padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
    padding-right: 36px;
    border: 2px solid var(--input-border, rgba(0, 0, 0, 0.15));
    border-radius: var(--radius-md, 8px);
    color: var(--text-primary, #0F172A);
    font-size: var(--font-sm, 0.8125rem);
    font-family: var(--font-family, inherit);
    min-width: 150px;
    cursor: pointer;
    transition: all 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--input-bg, #ffffff);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
}

.importance-dropdown:hover {
    border-color: var(--input-border-hover, rgba(0, 0, 0, 0.25));
}

.importance-dropdown:focus-visible {
    outline: 3px solid var(--interactive);
    outline-offset: 2px;
    border-color: var(--interactive);
}

/* Dark mode importance dropdown */
[data-theme="dark"] .importance-dropdown {
    background-color: var(--input-bg, rgba(255, 255, 255, 0.05));
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
}

/* =================================
   DESIGN SYSTEM: FORM LABELS
   ================================= */

.form-label {
    display: block;
    font-size: var(--font-sm, 0.8125rem);
    font-weight: var(--font-medium, 500);
    color: var(--text-secondary, #475569);
    margin-bottom: var(--space-2, 0.5rem);
}

/* =================================
   DESIGN SYSTEM: DIVIDERS
   ================================= */

/* Subtle dividers */
.divider {
    border: none;
    border-top: 1px solid var(--divider, rgba(0, 0, 0, 0.08));
    margin: var(--space-4, 1rem) 0;
}

/* Subtle section dividers */
.divider-subtle {
    border-top-color: var(--divider-subtle, rgba(0, 0, 0, 0.04));
}

/* =================================
   DESIGN SYSTEM: BUTTONS
   ================================= */

/* Pill-shaped buttons */
.btn-pill {
    border-radius: var(--radius-full, 9999px);
    padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
    font-size: var(--font-sm, 0.8125rem);
}

/* Button group */
.btn-group {
    display: inline-flex;
    gap: var(--space-2, 0.5rem);
    flex-wrap: wrap;
}

/* Small outline button */
.btn-outline {
    background: transparent;
    border: 2px solid var(--input-border, rgba(0, 0, 0, 0.15));
    color: var(--text-secondary, #475569);
}

.btn-outline:hover {
    border-color: var(--accent, #3B82F6);
    color: var(--accent, #3B82F6);
    background: rgba(59, 130, 246, 0.05);
}

.btn-outline.active {
    border-color: var(--accent, #3B82F6);
    background: var(--accent, #3B82F6);
    color: white;
}

/* =================================
   DESIGN SYSTEM: PLATFORM SELECTOR
   ================================= */

/* Updated platform selector - cleaner look */
.platform-selector {
    margin-bottom: 0.5rem;
    background: transparent;
    border: 1px solid var(--divider, rgba(0, 0, 0, 0.08));
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-3, 0.75rem);
}

.platform-selector summary {
    cursor: pointer;
    font-weight: var(--font-medium, 500);
    color: var(--text-primary, #0F172A);
    padding: var(--space-2, 0.5rem);
}

.platform-selector[open] summary {
    margin-bottom: var(--space-3, 0.75rem);
    padding-bottom: var(--space-3, 0.75rem);
    border-bottom: 1px solid var(--divider, rgba(0, 0, 0, 0.08));
}

/* Platform checkbox grid - tighter spacing */
.platform-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-1, 0.25rem);
}

.platform-checkboxes label {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-2, 0.5rem);
    cursor: pointer;
    font-size: var(--font-base, 0.875rem);
    border-radius: var(--radius-md, 8px);
    transition: background-color 0.15s ease;
}

.platform-checkboxes label:hover {
    background: var(--bg-tertiary, rgba(0, 0, 0, 0.03));
}

/* =================================
   DESIGN SYSTEM: TIER HEADERS
   ================================= */

.tier-header {
    font-size: var(--font-sm, 0.8125rem);
    font-weight: var(--font-semibold, 600);
    color: var(--text-secondary, #475569);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide, 0.05em);
    margin: var(--space-4, 1rem) 0 var(--space-3, 0.75rem) 0;
    padding-left: var(--space-3, 0.75rem);
    border-left: 3px solid var(--accent, #3B82F6);
}

.tier-header:first-child {
    margin-top: 0;
}

/* Brand grid - tighter spacing */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-1, 0.25rem);
}

/* =================================
   DESIGN SYSTEM: SEARCH CONFIG GRID
   ================================= */

.search-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4, 1rem);
}

.config-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3, 0.75rem);
    padding: var(--space-3, 0.75rem);
    background: var(--bg-tertiary, rgba(0, 0, 0, 0.02));
    border-radius: var(--radius-md, 8px);
    transition: background-color var(--transition-theme, 0.25s);
}

.config-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent, #3B82F6);
    color: white;
    border-radius: var(--radius-md, 8px);
}

.config-icon svg {
    width: 18px;
    height: 18px;
}

.config-content {
    flex: 1;
    min-width: 0;
}

.config-label {
    display: block;
    font-size: var(--font-xs, 0.6875rem);
    font-weight: var(--font-semibold, 600);
    color: var(--text-muted, #94A3B8);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide, 0.05em);
    margin-bottom: var(--space-1, 0.25rem);
}

.config-value {
    font-size: var(--font-base, 0.875rem);
    font-weight: var(--font-medium, 500);
    color: var(--text-primary, #0F172A);
}

/* Chips for brand display */
.config-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1, 0.25rem);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1, 0.25rem) var(--space-2, 0.5rem);
    font-size: var(--font-xs, 0.6875rem);
    font-weight: var(--font-medium, 500);
    color: var(--text-secondary, #475569);
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--divider, rgba(0, 0, 0, 0.08));
    border-radius: var(--radius-full, 9999px);
}

.chip-more,
.chip--more {
    color: var(--text-muted, #94A3B8);
    background: transparent;
    border-style: dashed;
}

/* ===================================
   SEARCH PROFILE COMPONENT
   Maritime-inspired instrument panel
   =================================== */

/* Container */
.search-profile {
    position: relative;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    padding-bottom: calc(var(--space-6) + 20px);
    margin-bottom: var(--space-6);
}

/* Wave pattern decorative footer */
.search-profile::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-image: var(--wave-pattern-subtle);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: bottom;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    pointer-events: none;
}

.search-profile__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-4);
}

.search-profile__title {
    font-family: var(--font-family-display);
    font-size: var(--font-lg);
    color: var(--text-primary);
    margin: 0;
}

.search-profile__link {
    font-size: var(--font-sm);
    color: var(--interactive);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    transition: color var(--transition-fast);
}

.search-profile__link:hover {
    color: var(--interactive-hover);
}

.search-profile__link--footer {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-4);
}

/* Card Grid */
.search-profile__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-3);
}

/* Individual Cards */
.search-profile-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-5);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 2px solid transparent;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 150ms ease-out;
    overflow: hidden;
}

/* Ripple pattern background texture */
.search-profile-card::before {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background-image: var(--ripple-pattern);
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 150ms ease;
}

.search-profile-card:hover::before {
    opacity: 1;
}

.search-profile-card:hover {
    transform: translateY(-2px);
    border-left-color: var(--active);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.search-profile-card:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

/* Icon Circle */
.search-profile-card__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--active), var(--active-hover));
    border-radius: var(--radius-full);
    color: white;
}

.search-profile-card__icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
}

/* Card Content */
.search-profile-card__content {
    flex: 1;
    min-width: 0;
}

.search-profile-card__label {
    display: block;
    font-size: 11px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.search-profile-card__value {
    font-size: var(--font-base);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.search-profile-card__value.brand-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

/* Edit Pencil */
.search-profile-card__pencil {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(4px);
    transition: all 200ms ease;
}

.search-profile-card:hover .search-profile-card__pencil {
    opacity: 1;
    transform: translateX(0);
    background: var(--active-light);
    color: var(--active);
}

/* Editing State */
.search-profile-card--editing {
    cursor: default;
    flex-direction: column;
    align-items: stretch;
    border-left-color: var(--active);
    box-shadow: 0 8px 32px rgba(15, 118, 110, 0.12);
    z-index: 10;
}

.search-profile-card--editing:hover {
    transform: none;
    border-left-color: var(--active);
}

.search-profile-card--editing .search-profile-card__pencil {
    display: none;
}

.search-profile-card--editing .search-profile-card__icon {
    display: none;
}

.search-profile-card--editing .search-profile-card__content {
    display: none;
}

/* Dimmed siblings when one card is editing */
.search-profile__grid:has(.search-profile-card--editing) .search-profile-card:not(.search-profile-card--editing) {
    opacity: 0.5;
    pointer-events: none;
}

/* Edit form inside card */
.search-profile-card__edit-form {
    width: 100%;
    animation: slide-up 200ms ease-out;
}

.search-profile-card__edit-header {
    font-size: var(--font-sm);
    font-weight: var(--font-semibold);
    color: var(--active);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.search-profile-card__edit-form .search-profile-card__inputs {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.search-profile-card__edit-form .input-group {
    width: 100%;
}

.search-profile-card__inputs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.search-profile-card__input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.search-profile-card__input-label {
    font-size: 10px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.search-profile-card__input {
    height: 40px;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: var(--font-base);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-profile-card__input:focus {
    outline: none;
    border-color: var(--active);
    box-shadow: 0 0 0 3px var(--active-light);
}

.search-profile-card__input::placeholder {
    color: var(--input-placeholder);
}

.search-profile-card__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
}

.search-profile-card__btn {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-profile-card__btn--cancel {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
}

.search-profile-card__btn--cancel:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
}

.search-profile-card__btn--save {
    background: var(--active);
    border: 1px solid var(--active);
    color: white;
}

.search-profile-card__btn--save:hover {
    background: var(--active-hover);
    border-color: var(--active-hover);
}

/* Input Group Styles (used by JS edit forms) */
.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.input-group--single {
    max-width: 160px;
}

.input-label {
    font-size: 10px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-wrapper:focus-within {
    border-color: var(--active);
    box-shadow: 0 0 0 3px var(--active-light);
}

.input-prefix,
.input-suffix {
    padding: 0 var(--space-2);
    font-size: var(--font-sm);
    color: var(--text-muted);
    user-select: none;
    flex-shrink: 0;
}

.input-prefix {
    padding-left: var(--space-3);
}

.input-suffix {
    padding-right: var(--space-3);
}

.input {
    flex: 1;
    height: 40px;
    padding: var(--space-2) var(--space-3);
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: var(--font-base);
    min-width: 0;
}

.input:focus {
    outline: none;
}

.input::placeholder {
    color: var(--input-placeholder);
}

.input--number {
    text-align: right;
    padding-right: var(--space-2);
}

.input-wrapper:has(.input-prefix) .input {
    padding-left: 0;
}

.input-wrapper:has(.input-suffix) .input {
    padding-right: 0;
}

.input-help {
    display: block;
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* Chips Editor (brands) */
.chips-editor {
    padding: var(--space-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.chips-editor__loading {
    color: var(--text-muted);
    font-size: var(--font-sm);
    text-align: center;
    padding: var(--space-4);
}

.chips-editor__search {
    margin-bottom: var(--space-3);
}

.chips-editor__search input {
    width: 100%;
    height: 36px;
    padding: var(--space-2) var(--space-3);
    padding-left: 36px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 12px center;
    font-size: var(--font-sm);
}

.chips-editor__tiers {
    max-height: 280px;
    overflow-y: auto;
}

.chips-editor__tier {
    margin-bottom: var(--space-3);
}

.chips-editor__tier:last-child {
    margin-bottom: 0;
}

.chips-editor__tier-header {
    font-size: 10px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
    position: sticky;
    top: 0;
    background: var(--bg-tertiary);
    padding: var(--space-1) 0;
}

.chips-editor__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.chip--selectable {
    cursor: pointer;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    transition: all var(--transition-fast);
}

.chip--selectable:hover {
    border-color: var(--active);
}

.chip--selectable.chip--selected {
    background: var(--active);
    border-color: var(--active);
    color: white;
}

.chip--selectable.chip--selected::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: var(--space-1);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
    animation: chip-check 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes chip-check {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Faded state for siblings */
.search-profile-card--faded {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 150ms ease;
}

/* Empty state */
.search-profile__empty {
    text-align: center;
    padding: var(--space-8) var(--space-4);
}

.search-profile__empty p {
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

/* ===================================
   COLLAPSIBLE VARIANT (Listings Page)
   =================================== */

.search-profile--collapsible {
    padding: 0;
    padding-bottom: 0;
    border: 1px solid var(--card-border);
    overflow: hidden;
}

.search-profile--collapsible::after {
    display: none;
}

.search-profile__collapse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-4) var(--space-6);
    background: var(--card-bg);
    border: none;
    cursor: pointer;
    transition: background 150ms ease;
    text-align: left;
}

.search-profile__collapse-header:hover {
    background: var(--bg-tertiary);
}

.search-profile__collapse-header:focus-visible {
    outline: var(--focus-ring);
    outline-offset: -3px;
}

.search-profile__summary {
    font-size: var(--font-sm);
    color: var(--text-secondary);
}

.search-profile__summary strong {
    color: var(--text-primary);
    font-weight: var(--font-semibold);
}

.search-profile__chevron {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 200ms ease;
    flex-shrink: 0;
}

.search-profile--expanded .search-profile__chevron {
    transform: rotate(180deg);
}

.search-profile__collapse-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 250ms ease;
}

.search-profile--expanded .search-profile__collapse-content {
    grid-template-rows: 1fr;
}

.search-profile__collapse-inner {
    overflow: hidden;
    padding: 0 var(--space-6);
}

/* Allow overflow when editing a card */
.search-profile__collapse-inner:has(.search-profile-card--editing) {
    overflow: visible;
}

.search-profile--expanded .search-profile__collapse-inner {
    padding-bottom: var(--space-6);
}

/* Wave pattern at bottom when expanded */
.search-profile--collapsible.search-profile--expanded::after {
    display: block;
    position: relative;
    height: 30px;
    margin-top: -10px;
}

/* ===================================
   BRAND CHIPS (Inline Editor)
   =================================== */

.brand-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--font-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 150ms ease;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text-secondary);
}

.brand-chip:hover {
    border-color: var(--active);
    color: var(--active);
}

.brand-chip--selected {
    background: var(--active);
    border-color: var(--active);
    color: white;
}

.brand-chip--selected:hover {
    background: var(--active-hover);
    border-color: var(--active-hover);
    color: white;
}

.brand-chip__check {
    width: 14px;
    height: 14px;
    animation: chip-check-pop 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes chip-check-pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ===================================
   IMPORTANCE BADGES
   =================================== */

.importance-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.importance-badge--deal-breaker {
    background: linear-gradient(135deg, var(--negative), #F87171);
    color: white;
}

.importance-badge--important {
    background: linear-gradient(135deg, var(--warning), #FBBF24);
    color: #1F2937;
}

.importance-badge--nice-to-have {
    background: linear-gradient(135deg, var(--active), #2DD4BF);
    color: white;
}

.importance-badge--irrelevant {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* Card with irrelevant importance */
.search-profile-card--irrelevant {
    opacity: 0.6;
}

.search-profile-card--irrelevant .search-profile-card__icon {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* ===================================
   RESPONSIVE: SEARCH PROFILE
   =================================== */

@media (max-width: 768px) {
    .search-profile__grid {
        grid-template-columns: 1fr;
    }

    .search-profile__header {
        flex-direction: column;
        gap: var(--space-2);
        align-items: flex-start;
    }

    .search-profile-card__inputs {
        flex-direction: column;
    }
}

/* ===================================
   DEAL BREAKER SECTION (Listings)
   =================================== */

.deal-breaker-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.deal-breaker-section .checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
}

.deal-breaker-help {
    color: var(--text-muted);
    font-size: var(--font-sm);
    margin-left: calc(var(--checkbox-size) + var(--space-3));
}
