:root {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #1f2937;
    background: #f3f4f6;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #f3f4f6;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.container {
    width: min(100% - 32px, 1100px);
    margin-inline: auto;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.site-header__inner {
    min-height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    color: #111827;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
}

.logout-button {
    padding: 8px 12px;

    color: #374151;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 8px;

    font-size: 0.875rem;
    font-weight: 600;

    cursor: pointer;
}

.logout-button:hover {
    color: #111827;
    background: #f9fafb;
}

.main-content {
    padding-block: 48px;
}

.welcome-card,
.auth-card {
    max-width: 680px;

    padding: 32px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;

    box-shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
}

.auth-card {
    max-width: 460px;
    margin-inline: auto;
}

.auth-card__header {
    margin-bottom: 28px;
}

.auth-card__intro {
    margin: 14px 0 0;

    color: #4b5563;
    line-height: 1.6;
}

.eyebrow {
    margin: 0 0 8px;

    color: #6b7280;

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;

    color: #111827;

    font-size: clamp(1.75rem, 5vw, 2.5rem);
    line-height: 1.1;
}

.welcome-card__text {
    margin: 16px 0 24px;

    color: #4b5563;
    line-height: 1.6;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 10px 14px;

    color: #166534;
    background: #f0fdf4;

    border: 1px solid #bbf7d0;
    border-radius: 999px;

    font-size: 0.875rem;
    font-weight: 600;
}

.status__indicator {
    width: 8px;
    height: 8px;

    background: #22c55e;
    border-radius: 50%;
}

.auth-form {
    display: grid;
    gap: 20px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-label {
    color: #374151;

    font-size: 0.875rem;
    font-weight: 600;
}

.form-input {
    width: 100%;

    padding: 11px 12px;

    color: #111827;
    background: #ffffff;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    outline: none;
}

.form-input:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
}

.form-error {
    margin: 0;

    color: #b91c1c;
    font-size: 0.8125rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 16px;

    color: #ffffff;
    background: #111827;

    border: 0;
    border-radius: 8px;

    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;

    cursor: pointer;
}

.button:hover {
    background: #374151;
}

.button--full {
    width: 100%;
}

.flash-stack {
    display: grid;
    gap: 10px;

    max-width: 680px;
    margin: 0 0 24px;
}

.auth-card + .flash-stack {
    max-width: 460px;
}

.flash {
    padding: 12px 14px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    font-size: 0.875rem;
}

.flash--error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.flash--success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.flash--info {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, 1100px);
    }

    .main-content {
        padding-block: 24px;
    }

    .welcome-card,
    .auth-card {
        padding: 24px;
        border-radius: 12px;
    }
}

.site-header__left {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.main-nav a {
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.main-nav a:hover {
    color: #111827;
}

.section-card {
    margin-top: 24px;
}

.section-card h2 {
    margin: 0;
    color: #111827;
    font-size: 1.25rem;
}

.source-preview {
    display: grid;
    gap: 16px;
    margin: 24px 0 0;
}

.source-preview div {
    padding: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.source-preview dt {
    margin-bottom: 4px;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.source-preview dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #111827;
}

.notice {
    margin: 20px 0 0;
    padding: 12px 14px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    line-height: 1.5;
}

.supported-sites {
    margin: 20px 0 0;
    padding-left: 20px;
    color: #4b5563;
    line-height: 1.8;
}

@media (max-width: 640px) {
    .site-header__left {
        gap: 16px;
    }

    .main-nav {
        gap: 10px;
    }

    .main-nav a {
        font-size: 0.8125rem;
    }
}

.sources-section {
    margin-top: 32px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 1.5rem;
}

.source-count {
    min-width: 36px;
    padding: 6px 10px;

    color: #374151;
    background: #ffffff;

    border: 1px solid #d1d5db;
    border-radius: 999px;

    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
}

.sources-list {
    display: grid;
    gap: 16px;
}

.source-card {
    padding: 22px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;

    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.04);
}

.source-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.source-card h3 {
    margin: 0;

    color: #111827;
    font-size: 1.05rem;
}

.source-status {
    flex: 0 0 auto;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 0.75rem;
    font-weight: 700;
}

.source-status--enabled {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.source-status--disabled {
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #d1d5db;
}

.source-url {
    display: inline-block;
    margin-top: 10px;

    overflow-wrap: anywhere;

    color: #2563eb;
    font-size: 0.875rem;
    text-decoration: none;
}

.source-url:hover {
    text-decoration: underline;
}

.source-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;

    margin: 20px 0 0;
}

.source-meta div {
    padding: 12px;

    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.source-meta dt {
    margin-bottom: 4px;

    color: #6b7280;

    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.source-meta dd {
    margin: 0;

    overflow-wrap: anywhere;

    color: #111827;
    font-size: 0.875rem;
}

.source-error {
    margin-top: 14px;
    padding: 10px 12px;

    color: #991b1b;
    background: #fef2f2;

    border: 1px solid #fecaca;
    border-radius: 8px;

    font-size: 0.8125rem;
}

.empty-state {
    padding: 32px;

    color: #6b7280;
    background: #ffffff;

    border: 1px dashed #d1d5db;
    border-radius: 12px;

    text-align: center;
}

.empty-state p {
    margin: 0;
}

@media (max-width: 700px) {
    .source-card__heading {
        align-items: flex-start;
    }

    .source-meta {
        grid-template-columns: 1fr;
    }
}

.source-actions {
    display: flex;
    margin-top: 18px;
}

.button--secondary {
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
}

.button--secondary:hover {
    color: #111827;
    background: #f9fafb;
}

.source-actions {
    flex-wrap: wrap;
    gap: 10px;
}

.button--danger-outline {
    color: #b91c1c;
    background: #ffffff;
    border: 1px solid #fecaca;
}

.button--danger-outline:hover {
    color: #991b1b;
    background: #fef2f2;
}

.button--danger {
    color: #ffffff;
    background: #b91c1c;
}

.button--danger:hover {
    background: #991b1b;
}

.confirm-card {
    max-width: 620px;
    padding: 32px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;

    box-shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
}

.confirm-card__text {
    margin: 16px 0 24px;

    color: #4b5563;
    line-height: 1.6;
}

.confirm-source {
    display: grid;
    gap: 6px;

    padding: 14px;

    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.confirm-source__label {
    color: #6b7280;

    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.confirm-source__value {
    overflow-wrap: anywhere;
    color: #111827;
}

.danger-notice {
    margin-top: 18px;
    padding: 12px 14px;

    color: #991b1b;
    background: #fef2f2;

    border: 1px solid #fecaca;
    border-radius: 8px;

    font-size: 0.875rem;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 24px;
}

@media (max-width: 640px) {
    .confirm-card {
        padding: 24px;
        border-radius: 12px;
    }
}
/* Dashboard */

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
}

.dashboard-hero h1 {
    max-width: 760px;
}

.dashboard-hero__intro {
    max-width: 720px;
    margin: 14px 0 0;
    color: #6b7280;
    font-size: 0.975rem;
    line-height: 1.65;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.brand__mark {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #111827;
    border-radius: 9px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.main-nav a {
    padding: 8px 10px;
    border-radius: 8px;
}

.main-nav a.is-active {
    color: #111827;
    background: #f3f4f6;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    min-width: 0;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.035);
}

.stat-card--accent {
    background: #111827;
    border-color: #111827;
}

.stat-card__label,
.stat-card__hint {
    display: block;
}

.stat-card__label {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stat-card__value {
    display: block;
    margin-top: 8px;
    color: #111827;
    font-size: 2rem;
    line-height: 1.05;
}

.stat-card__value--small {
    font-size: 1rem;
    line-height: 1.35;
}

.stat-card__hint {
    margin-top: 8px;
    overflow-wrap: anywhere;
    color: #9ca3af;
    font-size: 0.75rem;
    line-height: 1.4;
}

.stat-card--accent .stat-card__label,
.stat-card--accent .stat-card__hint {
    color: #d1d5db;
}

.stat-card--accent .stat-card__value {
    color: #ffffff;
}

.filter-panel {
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.035);
}

.filter-panel__header,
.results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.filter-panel__header h2,
.results-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 1.35rem;
}

.filter-reset {
    color: #4b5563;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
}

.filter-reset:hover {
    color: #111827;
    text-decoration: underline;
}

.dashboard-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.filter-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.filter-field--search {
    grid-column: span 2;
}

.filter-field label {
    color: #4b5563;
    font-size: 0.75rem;
    font-weight: 700;
}

.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    outline: none;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
}

.filter-input-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    overflow: hidden;
}

.filter-input-unit:focus-within {
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
}

.filter-input-unit input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.filter-input-unit input:focus {
    box-shadow: none;
}

.filter-input-unit span {
    padding-inline: 11px;
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 700;
}

.filter-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.results-section {
    margin-top: 32px;
}

.results-heading {
    margin-bottom: 16px;
}

.results-page-count {
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 700;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.035);
}

.product-card__media {
    position: relative;
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
    border-bottom: 1px solid #e5e7eb;
}

.product-card__media img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: contain;
}

.product-card__placeholder {
    display: flex;
    width: 92px;
    height: 72px;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.product-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
}

.badge--success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.badge--muted {
    color: #4b5563;
    background: #ffffff;
    border-color: #d1d5db;
}

.badge--info {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.badge--price-drop {
    color: #9f1239;
    background: #fff1f2;
    border-color: #fecdd3;
}

.product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.product-card__source-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.source-pill {
    min-width: 0;
    overflow: hidden;
    color: #4b5563;
    font-size: 0.72rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.availability {
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 700;
}

.availability--available {
    color: #15803d;
}

.availability--unavailable {
    color: #b91c1c;
}

.availability--unknown {
    color: #6b7280;
}

.product-card h3 {
    margin: 12px 0 0;
    color: #111827;
    font-size: 1rem;
    line-height: 1.4;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 12px;
}

.product-price {
    color: #111827;
    font-size: 1.45rem;
    line-height: 1;
}

.product-price--unknown {
    color: #6b7280;
    font-size: 1rem;
}

.product-old-price {
    color: #9ca3af;
    font-size: 0.8rem;
    text-decoration: line-through;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 18px 0 0;
}

.spec-grid div {
    min-width: 0;
    padding: 9px 10px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 9px;
}

.spec-grid__wide {
    grid-column: 1 / -1;
}

.spec-grid dt {
    color: #9ca3af;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.spec-grid dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.35;
}

.compatibility-details {
    margin-top: 12px;
    padding: 10px 11px;
    color: #6b7280;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    font-size: 0.75rem;
}

.compatibility-details summary {
    color: #4b5563;
    font-weight: 700;
    cursor: pointer;
}

.compatibility-details ul {
    margin: 9px 0 0;
    padding-left: 18px;
    line-height: 1.5;
}

.product-card__footer {
    display: grid;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
}

.product-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
    color: #9ca3af;
    font-size: 0.68rem;
}

.product-card__cta {
    width: 100%;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

.pagination__status {
    min-width: 64px;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}

.button.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.empty-state--dashboard {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.empty-state--dashboard strong {
    color: #374151;
}

.empty-state--dashboard .button {
    margin-top: 4px;
}

@media (max-width: 980px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 700px) {
    .site-header__inner {
        min-height: auto;
        align-items: flex-start;
        padding-block: 12px;
    }

    .site-header__left {
        min-width: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .main-nav {
        flex-wrap: wrap;
    }

    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .dashboard-stats,
    .dashboard-filters,
    .product-grid {
        grid-template-columns: 1fr;
    }

    .filter-field--search {
        grid-column: auto;
    }

    .product-card__media {
        min-height: 170px;
    }

    .product-card__media img {
        height: 145px;
    }
}

@media (max-width: 460px) {
    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card__value {
        font-size: 1.55rem;
    }

    .stat-card__value--small {
        font-size: 0.83rem;
    }

    .filter-panel {
        padding: 16px;
        border-radius: 12px;
    }

    .filter-panel__header,
    .results-heading {
        align-items: flex-start;
    }

    .filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .product-card {
        border-radius: 12px;
    }

    .pagination {
        gap: 8px;
    }

    .pagination .button {
        padding-inline: 11px;
    }
}

/* Settings */

.settings-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
}

.settings-hero__intro {
    max-width: 760px;
    margin: 14px 0 0;
    color: #6b7280;
    font-size: 0.975rem;
    line-height: 1.65;
}

.settings-form {
    display: grid;
    gap: 16px;
}

.settings-panel {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.035);
}

.settings-panel--compact {
    padding-bottom: 22px;
}

.settings-panel__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.settings-panel__heading h2 {
    margin: 0;
    color: #111827;
    font-size: 1.35rem;
}

.settings-panel__heading p:not(.eyebrow) {
    max-width: 760px;
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.55;
}

.settings-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.settings-field {
    min-width: 0;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.settings-field__label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 700;
}

.settings-input-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
}

.settings-input-unit:focus-within {
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
}

.settings-input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    color: #111827;
    background: #ffffff;
    border: 0;
    outline: none;
}

.settings-input-unit span {
    padding-inline: 12px;
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 800;
}

.settings-field__help {
    margin: 8px 0 0;
    color: #9ca3af;
    font-size: 0.75rem;
    line-height: 1.4;
}

.settings-choice-grid {
    display: grid;
    gap: 10px;
}

.settings-choice-grid--cpu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-choice-grid--gpu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-choice-grid--keyboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-choice {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 11px;
    cursor: pointer;
    transition:
        border-color 120ms ease,
        background-color 120ms ease,
        box-shadow 120ms ease;
}

.settings-choice:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.settings-choice:has(.settings-choice__input:checked) {
    background: #f0fdf4;
    border-color: #86efac;
    box-shadow: inset 0 0 0 1px rgba(22, 101, 52, 0.04);
}

.settings-choice:has(.settings-choice__input:focus-visible) {
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.14);
}

.settings-choice__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.settings-choice__control {
    position: relative;
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    background: #ffffff;
    border: 1px solid #9ca3af;
    border-radius: 5px;
}

.settings-choice__input:checked + .settings-choice__control {
    background: #111827;
    border-color: #111827;
}

.settings-choice__input:checked + .settings-choice__control::after {
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    content: "";
    transform: rotate(45deg);
}

.settings-choice__label {
    min-width: 0;
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
}

.settings-choice--large {
    align-items: flex-start;
    min-height: 74px;
    padding: 14px;
}

.settings-choice--large small {
    display: block;
    margin-top: 4px;
    color: #9ca3af;
    font-size: 0.72rem;
    line-height: 1.4;
}

.settings-stack {
    display: grid;
    gap: 12px;
}

.settings-toggle-card {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 15px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
}

.settings-toggle-card > span:first-child {
    min-width: 0;
}

.settings-toggle-card strong,
.settings-toggle-card small {
    display: block;
}

.settings-toggle-card strong {
    color: #111827;
    font-size: 0.875rem;
}

.settings-toggle-card small {
    margin-top: 5px;
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.4;
}

.settings-toggle-card .eyebrow {
    margin-bottom: 5px;
}

.settings-switch {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
}

.settings-switch__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.settings-switch__track {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    transition: background-color 120ms ease;
}

.settings-switch__track::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.2);
    content: "";
    transition: transform 120ms ease;
}

.settings-switch__input:checked + .settings-switch__track {
    background: #111827;
}

.settings-switch__input:checked + .settings-switch__track::after {
    transform: translateX(20px);
}

.settings-switch__input:focus-visible + .settings-switch__track {
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.16);
}

.settings-panel--availability {
    padding: 0;
    overflow: hidden;
}

.settings-panel--availability .settings-toggle-card {
    min-height: 92px;
    padding: 20px 24px;
    background: #ffffff;
    border: 0;
    border-radius: 0;
}

.settings-group-error {
    margin-top: 12px;
}

.settings-savebar {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 15px 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d1d5db;
    border-radius: 14px;
    box-shadow: 0 14px 38px rgba(17, 24, 39, 0.12);
    backdrop-filter: blur(10px);
}

.settings-savebar strong,
.settings-savebar span {
    display: block;
}

.settings-savebar strong {
    color: #111827;
    font-size: 0.875rem;
}

.settings-savebar span {
    margin-top: 3px;
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.4;
}

.settings-savebar__button {
    flex: 0 0 auto;
    min-width: 190px;
}

.settings-sources {
    margin-top: 44px;
}

.settings-sources__heading {
    align-items: flex-end;
}

.settings-sources__heading > div {
    min-width: 0;
}

.settings-sources__intro {
    max-width: 720px;
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.55;
}

.settings-source-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.settings-source-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.035);
}

.settings-source-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.settings-source-card h3 {
    margin: 0;
    color: #111827;
    font-size: 1rem;
}

.settings-source-card__scraper {
    display: block;
    margin-top: 5px;
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 700;
}

.settings-source-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 16px 0 0;
}

.settings-source-meta div {
    min-width: 0;
    padding: 10px 11px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 9px;
}

.settings-source-meta dt {
    color: #9ca3af;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.settings-source-meta dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.35;
}

.run-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
}

.run-status--success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.run-status--error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.run-status--pending {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.run-status--muted {
    color: #4b5563;
    background: #f9fafb;
    border-color: #d1d5db;
}

.settings-source-card__error {
    margin-bottom: 0;
}

.settings-source-card__action {
    margin-top: auto;
    padding-top: 16px;
}

.settings-source-card__archive-note {
    margin: 16px 0 0;
    color: #6b7280;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.settings-sources__link {
    display: inline-flex;
    margin-top: 16px;
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
}

.settings-sources__link:hover {
    color: #111827;
    text-decoration: underline;
}

@media (max-width: 980px) {
    .settings-choice-grid--cpu {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .settings-source-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .settings-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .settings-metric-grid,
    .settings-choice-grid--gpu {
        grid-template-columns: 1fr;
    }

    .settings-choice-grid--cpu,
    .settings-choice-grid--keyboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-savebar {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }

    .settings-savebar__button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 460px) {
    .settings-panel {
        padding: 18px;
        border-radius: 12px;
    }

    .settings-choice-grid--cpu,
    .settings-choice-grid--keyboard {
        grid-template-columns: 1fr;
    }

    .settings-toggle-card {
        gap: 14px;
    }

    .settings-panel--availability .settings-toggle-card {
        padding: 18px;
    }

    .settings-source-meta {
        grid-template-columns: 1fr;
    }
}

/* Settings V1.1.1 — mobile polish */
@media (max-width: 700px) {
    .site-header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 12px;
        row-gap: 10px;
        padding-block: 10px;
    }

    .site-header__left {
        display: contents;
    }

    .brand {
        grid-column: 1;
        grid-row: 1;
    }

    .site-header__inner > form {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
    }

    .main-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .main-nav a {
        min-width: 0;
        padding: 8px 6px;
        text-align: center;
        white-space: nowrap;
    }
}

@media (max-width: 460px) {
    .settings-choice-grid--cpu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .settings-choice {
        min-height: 42px;
        padding: 10px 11px;
    }

    .settings-source-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 350px) {
    .settings-choice-grid--cpu,
    .settings-source-meta {
        grid-template-columns: 1fr;
    }
}


/* Dashboard V1.2 */

.filter-panel__intro {
    max-width: 620px;
    margin: 6px 0 0;
    color: #9ca3af;
    font-size: 0.75rem;
    line-height: 1.45;
}

.product-card {
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.product-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.07);
    transform: translateY(-1px);
}

.product-card--compatible {
    border-color: #dbeee1;
}

.product-card__media {
    min-height: 150px;
    padding: 14px 18px;
    background: linear-gradient(145deg, #fafbfc, #f4f5f7);
}

.product-card__media img {
    width: min(100%, 230px);
    height: 128px;
    object-fit: contain;
    filter: drop-shadow(0 8px 12px rgba(17, 24, 39, 0.07));
}

.product-card__placeholder {
    position: relative;
    width: 76px;
    height: 58px;
    border-radius: 10px;
    font-size: 0.9rem;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.055);
}

.product-card__placeholder::before {
    position: absolute;
    inset: 7px;
    content: "";
    border: 1px solid #eef0f3;
    border-radius: 6px;
}

.product-card__placeholder span {
    position: relative;
}

.product-card__body {
    padding: 16px;
}

.product-card__source-row {
    min-height: 20px;
}

.source-pill {
    padding: 4px 7px;
    color: #374151;
    background: #f9fafb;
    border: 1px solid #eef0f2;
    border-radius: 999px;
    font-size: 0.66rem;
    line-height: 1;
}

.availability {
    position: relative;
    padding-left: 9px;
}

.availability::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 5px;
    height: 5px;
    content: "";
    background: currentColor;
    border-radius: 999px;
    transform: translateY(-50%);
}

.product-card h3 {
    display: -webkit-box;
    min-height: 2.8em;
    margin-top: 10px;
    overflow: hidden;
    font-size: 0.96rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-price-row {
    min-height: 31px;
    margin-top: 9px;
}

.product-price {
    font-size: 1.55rem;
    letter-spacing: -0.025em;
}

.product-old-price {
    font-size: 0.74rem;
}

.product-quick-specs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 14px 0 0;
}

.product-quick-specs div {
    min-width: 0;
    padding: 8px 9px;
    background: #f8f9fb;
    border: 1px solid #f0f1f3;
    border-radius: 9px;
}

.product-quick-specs dt,
.product-spec-list dt {
    color: #9ca3af;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.product-quick-specs dd {
    margin: 3px 0 0;
    overflow: hidden;
    color: #1f2937;
    font-size: 0.75rem;
    font-weight: 750;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-spec-list {
    display: grid;
    gap: 0;
    margin: 10px 0 0;
    border-top: 1px solid #f0f1f3;
}

.product-spec-list div {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 9px;
    align-items: baseline;
    min-width: 0;
    padding: 8px 0;
    border-bottom: 1px solid #f0f1f3;
}

.product-spec-list dd {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #374151;
    font-size: 0.73rem;
    font-weight: 650;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.compatibility-details {
    margin-top: 10px;
    padding: 8px 10px;
    font-size: 0.7rem;
}

.product-card__footer {
    gap: 10px;
    padding-top: 12px;
}

.product-card__meta {
    min-height: 16px;
    justify-content: space-between;
    gap: 4px 10px;
    font-size: 0.64rem;
}

.product-card__seller {
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card__cta {
    min-height: 38px;
    padding-block: 8px;
}

@media (max-width: 980px) {
    .product-card__media {
        min-height: 145px;
    }

    .product-card__media img {
        height: 122px;
    }
}

@media (max-width: 700px) {
    .product-card__media {
        min-height: 138px;
    }

    .product-card__media img {
        height: 116px;
    }

    .product-card__body {
        padding: 15px;
    }

    .product-card h3 {
        min-height: auto;
    }
}

@media (max-width: 380px) {
    .product-quick-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-quick-specs div:last-child {
        grid-column: 1 / -1;
    }
}

/* Dashboard V1.2.1 — mobile compact */

@media (max-width: 700px) {
    .product-card {
        border-radius: 12px;
    }

    .product-card__media {
        min-height: 104px;
        padding: 10px 14px;
    }

    .product-card__media img {
        width: min(100%, 190px);
        height: 88px;
    }

    .product-card__placeholder {
        width: 62px;
        height: 46px;
        border-radius: 9px;
        font-size: 0.76rem;
    }

    .product-card__placeholder::before {
        inset: 6px;
    }

    .product-card__badges {
        top: 9px;
        left: 9px;
        gap: 4px;
    }

    .badge {
        min-height: 21px;
        padding: 3px 6px;
        font-size: 0.59rem;
    }

    .product-card__body {
        padding: 12px;
    }

    .product-card__source-row {
        min-height: 17px;
        gap: 7px;
    }

    .source-pill {
        padding: 3px 6px;
        font-size: 0.6rem;
    }

    .availability {
        padding-left: 8px;
        font-size: 0.59rem;
    }

    .availability::before {
        width: 4px;
        height: 4px;
    }

    .product-card h3 {
        min-height: 2.55em;
        margin-top: 8px;
        font-size: 0.88rem;
        line-height: 1.28;
        -webkit-line-clamp: 2;
    }

    .product-price-row {
        min-height: 26px;
        margin-top: 7px;
        gap: 7px;
    }

    .product-price {
        font-size: 1.32rem;
    }

    .product-old-price {
        font-size: 0.66rem;
    }

    .product-quick-specs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
        margin-top: 10px;
    }

    .product-quick-specs div {
        padding: 6px 7px;
        border-radius: 7px;
    }

    .product-quick-specs dt,
    .product-spec-list dt {
        font-size: 0.52rem;
    }

    .product-quick-specs dd {
        margin-top: 2px;
        font-size: 0.68rem;
        line-height: 1.2;
    }

    .product-spec-list {
        margin-top: 7px;
    }

    .product-spec-list div {
        grid-template-columns: 39px minmax(0, 1fr);
        gap: 7px;
        padding: 5px 0;
    }

    .product-spec-list dd {
        font-size: 0.67rem;
        line-height: 1.28;
        -webkit-line-clamp: 2;
    }

    .compatibility-details {
        margin-top: 7px;
        padding: 7px 8px;
        font-size: 0.65rem;
    }

    .product-card__footer {
        gap: 7px;
        padding-top: 8px;
    }

    .product-card__meta {
        min-height: 13px;
        gap: 3px 7px;
        font-size: 0.58rem;
    }

    .product-card__cta {
        min-height: 34px;
        padding-block: 7px;
        font-size: 0.76rem;
    }
}

@media (max-width: 350px) {
    .product-quick-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-quick-specs div:last-child {
        grid-column: 1 / -1;
    }
}

/* Settings section navigation, reusing the existing card and panel palette. */
.settings-subnav { display:flex; gap:8px; overflow-x:auto; padding:2px 0 12px; margin:0 0 20px; scrollbar-width:thin; }
.settings-subnav a { flex:0 0 auto; padding:10px 16px; border:1px solid #d1d5db; border-radius:999px; background:#fff; color:#374151; text-decoration:none; font-weight:700; }
.settings-subnav a[aria-current="page"] { color:#166534; background:#f0fdf4; border-color:#86efac; }
.settings-entry-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.settings-entry { display:block; padding:24px; border:1px solid #d1d5db; border-radius:16px; background:#fff; color:inherit; text-decoration:none; }
.settings-entry:hover { border-color:#86efac; box-shadow:0 6px 20px rgba(22,101,52,.08); }
.settings-entry h2 { margin:8px 0; } .settings-entry span { color:#166534; font-weight:800; }
.settings-test-form { margin:18px 0 28px; }
@media (max-width:760px) { .settings-entry-grid { grid-template-columns:1fr; } .settings-subnav { margin-inline:-4px; padding-inline:4px; } }
