/* Traceback Core - Custom Styles */

:root {
    --ink-900: #0f172a;
    --ink-700: #334155;
    --ink-500: #64748b;
    --ink-300: #cbd5f5;
    --accent-600: #2563eb;
    --accent-500: #3b82f6;
    --accent-200: #bfdbfe;
    --success-600: #16a34a;
    --warning-600: #d97706;
    --danger-600: #dc2626;
    --surface-1: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #eef2ff;
    --border-color: #e2e8f0;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 6px 18px rgba(15, 23, 42, 0.08);
}

body {
    background: #eef2f7;
    color: var(--ink-700);
    font-family: "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .item-title, .match-title {
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    color: var(--ink-900);
}

.container-fluid {
    padding-bottom: 40px;
}

.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1030;
    overflow: visible;
    height: 75px;
    min-height: 75px;
    padding-top: 0;
    padding-bottom: 0;
}

.navbar .dropdown-menu {
    z-index: 1040;
}

.navbar .container-fluid {
    min-height: 75px;
    align-items: center;
}

.navbar-brand {
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-top: 0;
    padding-bottom: 0;
    margin-right: 0;
}

.brand-mark-image {
    width: 51px;
    height: 51px;
    display: block;
}

.brand-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    font-weight: 700;
    font-size: 21px;
    letter-spacing: 0.12em;
    color: #0c2f67;
    line-height: 1;
    white-space: nowrap;
}

.brand-text-finder {
    color: #2fa9df;
}

.brand-text .brand-arrow {
    color: #2fa9df;
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 900px) {
    .brand-text {
        font-size: 18px;
        letter-spacing: 0.09em;
    }
}

@media (max-width: 576px) {
    .navbar,
    .navbar .container-fluid {
        height: 64px;
        min-height: 64px;
    }

    .brand-mark-image {
        width: 45px;
        height: 45px;
    }

    .brand-text {
        font-size: 14px;
        letter-spacing: 0.05em;
    }

    .brand-text .brand-arrow {
        font-size: 14px;
    }
}

.badge {
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-600), var(--accent-500));
    border: none;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--ink-700);
}

.form-control,
.form-select,
.form-range {
    border-radius: 10px;
    border-color: var(--border-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-500);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

.card {
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.card-header {
    font-weight: 600;
}

.plan-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-current-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-price {
    font-size: 28px;
    line-height: 1.05;
    font-weight: 700;
    color: #0f172a;
}

.plan-equivalent {
    font-size: 14px;
    color: #334155;
}

.plan-summary {
    font-size: 14px;
    color: #475569;
}

.plan-benefit {
    border: 1px solid #dbeafe;
    background: #f8fbff;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    color: #1e3a8a;
}

.plan-benefit .bi {
    margin-right: 6px;
}

.plan-usage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.plan-usage-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
    background: #f8fafc;
}

.plan-usage-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 2px;
}

.plan-usage-value {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.plan-tier-buttons {
    margin-top: 4px;
}

.plan-popular-chip {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 4px 10px;
}

.plan-tier-buttons .btn-outline-secondary[data-plan-tier="supporter"] {
    border-color: #93c5fd;
    background: #f8fbff;
    color: #1e3a8a;
}

.plan-tier-buttons .btn-outline-secondary[data-plan-tier="supporter"]:hover,
.plan-tier-buttons .btn-outline-secondary[data-plan-tier="supporter"]:focus {
    border-color: #60a5fa;
    background: #eaf2ff;
    color: #1e3a8a;
}

.plan-tier-buttons .btn.plan-tier-supporter-active {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.plan-fine-print {
    font-size: 11px;
    color: #64748b;
}

.nav-tabs {
    border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--ink-500);
    padding: 10px 18px;
    font-weight: 600;
}

.nav-tabs .nav-link.active {
    color: var(--ink-900);
    background: var(--surface-1);
    border-bottom: 2px solid var(--accent-600);
}

/* Stat Cards */
.stat-item {
    padding: 12px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 12px;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--ink-900);
}

/* Item Cards */
.item-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.item-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink-900);
    margin: 0;
}

.item-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--ink-500);
    margin-bottom: 12px;
}

.item-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.item-description {
    color: var(--ink-700);
    margin-bottom: 16px;
    line-height: 1.6;
}

.item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Match Cards */
.match-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-left: 4px solid #cbd5f5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 1;
}

.match-card-enter {
    animation: match-card-enter 0.26s ease;
    animation-delay: var(--enter-delay, 0ms);
}

.match-card.dropdown-open {
    z-index: 30;
}

.match-card-exit {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
    transition: opacity 0.42s ease, transform 0.42s ease;
}

@keyframes match-card-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.match-card.high-confidence {
    border-left-color: var(--success-600);
    background: #f0fdf4;
}

.match-card.medium-confidence {
    border-left-color: var(--warning-600);
    background: #fffbeb;
}

.match-card.low-confidence {
    border-left-color: var(--danger-600);
    background: #fef2f2;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.match-title {
    font-weight: 700;
    color: var(--ink-900);
    flex: 1;
}

.confidence-badge {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.match-status-filter .btn-outline-secondary {
    background: #ffffff;
    color: var(--ink-700);
    border-color: var(--border-color);
}

.match-status-filter .btn-outline-secondary:hover,
.match-status-filter .btn-outline-secondary:focus {
    background: #6c757d;
    color: #ffffff;
    border-color: #6c757d;
}

.match-status-filter .btn-outline-secondary:active,
.match-status-filter .btn-outline-secondary.active,
.match-status-filter .show > .btn-outline-secondary.dropdown-toggle {
    background: #6c757d;
    color: #ffffff;
    border-color: #6c757d;
}

.listings-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.listings-filter-group .btn {
    border-radius: 999px;
    white-space: nowrap;
}

.listings-filter-group .btn-outline-secondary {
    background: #ffffff;
    color: var(--ink-700);
    border-color: var(--border-color);
}

.listings-filter-group .btn-outline-secondary:hover,
.listings-filter-group .btn-outline-secondary:focus {
    background: #6c757d;
    color: #ffffff;
    border-color: #6c757d;
}

.listings-filter-group .btn-outline-secondary:active,
.listings-filter-group .btn-outline-secondary.active,
.listings-filter-group .show > .btn-outline-secondary.dropdown-toggle {
    background: #6c757d;
    color: #ffffff;
    border-color: #6c757d;
}

.match-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.match-status-pending {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

.match-status-confirmed {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.match-status-rejected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.confidence-high {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.confidence-medium {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.confidence-low {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.match-details {
    font-size: 14px;
    color: var(--ink-500);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.match-reason {
    font-size: 14px;
    color: var(--ink-700);
    background: var(--surface-2);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.match-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.match-actions .btn {
    border-radius: 9px;
    box-shadow: none;
}

.match-actions .dropdown-menu {
    z-index: 40;
}

.match-btn-primary {
    min-width: 118px;
}

.match-btn-confirm {
    background: #0f9f6e;
    border-color: #0f9f6e;
    min-width: 92px;
}

.match-btn-confirm:hover {
    background: #0a7f58;
    border-color: #0a7f58;
}

.match-btn-reject {
    background: #e11d48;
    border-color: #e11d48;
    min-width: 84px;
}

.match-btn-reject:hover {
    background: #be123c;
    border-color: #be123c;
}

.match-btn-more {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.match-btn-more:hover,
.match-btn-more:focus {
    background: #eef2f7;
    border-color: #94a3b8;
    color: #0f172a;
}

.tb-toast-host {
    position: fixed;
    right: 18px;
    bottom: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.tb-toast {
    background: rgba(15, 23, 42, 0.93);
    color: #f8fafc;
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
    font-size: 13px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tb-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Listing Cards */
.listing-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.listing-image-placeholder {
    width: 80px;
    height: 80px;
    background: #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-500);
    flex-shrink: 0;
}

.listing-content {
    flex: 1;
}

.listing-title {
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: 4px;
}

.listing-meta {
    font-size: 13px;
    color: var(--ink-500);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.marketplace-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.marketplace-ebay {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.marketplace-craigslist {
    background: #ede9fe;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

.marketplace-facebook {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.marketplace-offerup {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.marketplace-nextdoor {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.marketplace-swappa {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

.marketplace-reverb {
    background: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

.marketplace-unclehenrys {
    background: #ecfccb;
    color: #3f6212;
    border: 1px solid #d9f99d;
}

.tb-ad-slot {
    border: 1px dashed #cbd5e1;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    padding: 12px 14px;
}

.tb-ad-slot-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 10px;
    color: #64748b;
}

.tb-ad-slot-title {
    font-weight: 700;
    color: #0f172a;
    margin-top: 4px;
}

.tb-ad-slot-copy {
    font-size: 13px;
    color: #334155;
    margin-top: 4px;
}

.tb-ad-mock {
    --ad-min-height: 90px;
    border: 2px dashed #93c5fd;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02)),
        repeating-linear-gradient(
            -45deg,
            rgba(30, 64, 175, 0.04),
            rgba(30, 64, 175, 0.04) 10px,
            rgba(30, 64, 175, 0.01) 10px,
            rgba(30, 64, 175, 0.01) 20px
        );
    min-height: var(--ad-min-height);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tb-ad-mock-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    font-weight: 700;
    color: #1d4ed8;
}

.tb-ad-mock-title {
    margin-top: 4px;
    font-weight: 700;
    color: #0f172a;
}

.tb-ad-mock-meta {
    margin-top: 4px;
    font-size: 13px;
    color: #334155;
}

.tb-ad-mock--leaderboard {
    --ad-min-height: 110px;
}

.tb-ad-mock--sidebar {
    --ad-min-height: 260px;
}

.tb-ad-mock--infeed {
    --ad-min-height: 130px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.status-active {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.status-recovered {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.status-closed {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-500);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 8px;
}

.listings-empty-scan-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.listings-empty-scan-select {
    min-width: 280px;
    max-width: 420px;
}

.listings-empty-scan-btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    white-space: nowrap;
}

.listings-empty-scan-icon {
    font-size: 14px;
    line-height: 1;
    margin-bottom: 0;
    opacity: 1;
}

.empty-state .listings-empty-scan-btn i {
    font-size: 14px;
    margin-bottom: 0;
    opacity: 1;
}

@media (max-width: 768px) {
    .listings-empty-scan-controls {
        max-width: 460px;
    }

    .listings-empty-scan-select {
        min-width: 100%;
        max-width: 100%;
    }

    .listings-empty-scan-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clickable {
    cursor: pointer;
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    display: inline-block;
    animation: spin 2s linear infinite;
}

/* Custom Modal */
.tb-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1060;
}

.tb-modal.show {
    display: block;
}

.tb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
}

.tb-modal-dialog {
    position: relative;
    width: min(520px, 92vw);
    margin: 10vh auto 0;
    background: var(--surface-1);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    padding: 20px 20px 16px;
}

.tb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.tb-modal-title {
    font-weight: 700;
    margin: 0;
}

.tb-modal-body {
    color: var(--ink-700);
    line-height: 1.6;
    margin-bottom: 14px;
    white-space: pre-wrap;
}

.tb-modal-input {
    margin-bottom: 16px;
}

.tb-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.tb-icon-btn {
    border: none;
    background: transparent;
    color: var(--ink-500);
    padding: 4px 6px;
}

/* Bootstrap modal polish */
.modal-content {
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

/* Public / Auth Pages */
.tb-public {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 90% -10%, rgba(59, 130, 246, 0.14), transparent 60%),
        radial-gradient(900px 500px at -10% 30%, rgba(37, 99, 235, 0.12), transparent 55%),
        linear-gradient(180deg, #f8fbff 0%, #eef2f7 100%);
    color: var(--ink-700);
}

.public-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px;
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.public-brand {
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    color: var(--ink-900);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.public-brand .brand-mark-image {
    width: 57px;
    height: 57px;
}

.public-brand .brand-text {
    font-size: 24px;
}

.public-brand .brand-text .brand-arrow {
    font-size: 22px;
}

.public-actions {
    display: flex;
    gap: 10px;
}

.public-actions .btn.nav-active {
    border-color: #60a5fa;
    background: #eaf2ff;
    color: #1e3a8a;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.public-hero {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 48px 36px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.public-hero::after {
    content: "";
    position: absolute;
    inset: auto -120px -140px auto;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0) 70%);
    pointer-events: none;
}

.public-hero h1 {
    font-size: clamp(32px, 5vw, 54px);
    margin-bottom: 12px;
}

.public-hero p {
    font-size: 19px;
    color: var(--ink-500);
    margin-bottom: 28px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.public-feature,
.public-step {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    padding: 20px;
}

.public-feature h3,
.public-step h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.public-feature p,
.public-step p {
    margin: 0;
    color: var(--ink-500);
    line-height: 1.6;
}

.public-proof {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--ink-500);
    font-size: 14px;
}

.public-proof .bi {
    color: var(--accent-600);
}

.public-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-500);
    margin-bottom: 14px;
}

.public-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: #eff6ff;
    color: var(--accent-600);
    font-size: 20px;
}

.public-footer {
    text-align: center;
    padding: 26px 0 12px;
    color: var(--ink-500);
    font-size: 14px;
}

.pricing-preview {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    padding: 20px;
}

.pricing-preview-head p {
    color: var(--ink-500);
}

.pricing-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.pricing-mini-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #ffffff;
    padding: 14px;
}

.pricing-mini-card h4 {
    margin: 0;
    font-size: 18px;
}

.pricing-mini-price {
    margin-top: 6px;
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
    color: #0f172a;
}

.pricing-mini-price span {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-left: 3px;
}

.pricing-mini-meta {
    margin-top: 6px;
    font-size: 13px;
    color: #475569;
}

.pricing-mini-card--featured {
    border-color: #93c5fd;
    background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.pricing-mini-badge {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.pricing-hero {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 30px 24px;
    margin-bottom: 16px;
    text-align: center;
}

.pricing-hero h1 {
    font-size: clamp(30px, 4vw, 46px);
    margin-bottom: 10px;
}

.pricing-hero p {
    color: var(--ink-500);
    margin: 0;
}

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

.pricing-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.pricing-card--featured {
    border-color: #60a5fa;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
    position: relative;
}

.pricing-card-badge {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
}

.pricing-card-price {
    font-size: 34px;
    line-height: 1;
    font-weight: 700;
    color: #0f172a;
    margin: 8px 0 10px;
}

.pricing-card-price span {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    margin-left: 4px;
}

.pricing-card-note {
    color: #475569;
    margin-bottom: 12px;
}

.pricing-card-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 14px;
}

.pricing-card-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-card-list .bi {
    color: #2563eb;
}

.pricing-compare,
.pricing-faq {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    padding: 18px;
    margin-bottom: 16px;
}

.pricing-compare h3,
.pricing-faq h3 {
    margin-bottom: 12px;
}

.pricing-compare-table {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.pricing-compare-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
}

.pricing-compare-row > div {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    font-size: 14px;
}

.pricing-compare-row > div:last-child {
    border-right: none;
}

.pricing-compare-row:last-child > div {
    border-bottom: none;
}

.pricing-compare-head {
    background: #f8fafc;
    font-weight: 700;
}

.policy-hero {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 26px 24px;
    margin-bottom: 14px;
}

.policy-hero h1 {
    font-size: clamp(28px, 4vw, 40px);
    margin-bottom: 8px;
}

.policy-meta {
    color: #64748b;
    font-size: 13px;
}

.policy-section {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    padding: 16px;
    margin-bottom: 12px;
}

.policy-section h3 {
    margin-bottom: 8px;
}

.policy-section p:last-child,
.policy-section ul:last-child {
    margin-bottom: 0;
}

.policy-list {
    margin: 0;
    padding-left: 18px;
    color: #334155;
}

.policy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.public-footer-links {
    margin-top: 6px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.public-footer-links a {
    color: #475569;
    text-decoration: none;
}

.public-footer-links a:hover {
    color: #1d4ed8;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: min(460px, 100%);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    padding: 30px 28px;
}

.auth-card .btn-primary {
    font-weight: 600;
}

.auth-title {
    text-align: center;
    margin-bottom: 6px;
}

.auth-brand-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-brand-title .brand-mark-image {
    width: 42px;
    height: 42px;
}

.auth-brand-title .brand-text .brand-arrow {
    font-size: 17px;
}

.auth-subtitle {
    text-align: center;
    color: var(--ink-500);
    margin-bottom: 24px;
}

.auth-links {
    text-align: center;
    margin-top: 18px;
    color: var(--ink-500);
}

.auth-links a {
    color: var(--accent-600);
    font-weight: 600;
    text-decoration: none;
}

.auth-back {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
}

.auth-back a {
    color: var(--ink-500);
    text-decoration: none;
}

.auth-legal-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
}

.auth-legal-links a {
    color: #64748b;
    text-decoration: none;
}

.auth-legal-links a:hover {
    color: #1d4ed8;
}

.auth-message {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 16px;
    display: none;
    font-size: 14px;
}

.auth-message.show {
    display: block;
}

.auth-message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.auth-message.success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-hint {
    font-size: 12px;
    color: var(--ink-500);
    margin-top: 6px;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #64748b;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.password-toggle:hover,
.password-toggle:focus {
    background: #eef2f7;
    color: #1e3a8a;
}

/* Responsive */
@media (max-width: 768px) {
    .public-shell {
        padding: 16px;
    }

    .public-nav {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }

    .public-hero {
        padding: 32px 20px;
    }

    .pricing-preview-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-compare-row {
        grid-template-columns: 1.3fr 1fr 1fr 1fr;
    }

    .item-meta,
    .match-details,
    .listing-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .item-actions {
        flex-direction: column;
    }
    
    .item-actions .btn {
        width: 100%;
    }

    .match-actions {
        flex-direction: column;
    }

    .match-actions .btn,
    .match-actions .match-btn-primary {
        width: 100%;
    }

    .tb-ad-mock--sidebar {
        --ad-min-height: 170px;
    }

    .plan-usage-grid {
        grid-template-columns: 1fr;
    }

    .plan-price {
        font-size: 24px;
    }
}
