:root {
    --bg: #090e1b;
    --surface: #11182a;
    --surface-2: #171f34;
    --surface-3: #202a43;
    --text: #f7f8ff;
    --muted: #929cb5;
    --line: rgba(255, 255, 255, 0.08);
    --primary: #7c5cff;
    --primary-soft: #9d8bff;
    --green: #36d39a;
    --yellow: #f4bd50;
    --red: #ff6b81;
    --blue: #54a8ff;
    --radius: 18px;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(124, 92, 255, 0.18), transparent 28rem),
        var(--bg);
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    border-right: 1px solid var(--line);
    background: rgba(8, 13, 26, 0.92);
    backdrop-filter: blur(18px);
}

.brand,
.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    padding: 0 8px 28px;
}

.brand-mark,
.avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), #4ecdc4);
    box-shadow: 0 12px 32px rgba(124, 92, 255, 0.3);
}

.brand strong,
.user-card strong {
    display: block;
}

.brand small,
.user-card small,
.sidebar-card small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.nav {
    display: grid;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    color: var(--muted);
    border-radius: 13px;
    transition: 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text);
    background:
        linear-gradient(
            90deg,
            rgba(124, 92, 255, 0.22),
            rgba(124, 92, 255, 0.05)
        );
}

.nav-item.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

.nav-icon {
    width: 20px;
    text-align: center;
}

.sidebar-card {
    margin-top: auto;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background:
        linear-gradient(
            145deg,
            rgba(124, 92, 255, 0.15),
            rgba(255, 255, 255, 0.02)
        );
}

.sidebar-card strong {
    display: block;
    margin: 7px 0 3px;
    font-size: 18px;
}

.progress {
    height: 6px;
    margin-top: 13px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #4ecdc4);
}

.user-card {
    padding: 18px 8px 0;
}

.avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 12px;
}

.user-copy {
    min-width: 0;
    flex: 1;
}

.user-copy strong,
.user-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-link {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--muted);
    transition: 0.2s ease;
}

.logout-link:hover {
    color: var(--text);
    background: var(--surface-2);
}

.main-content {
    min-width: 0;
    padding: 0 30px 40px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: rgba(9, 14, 27, 0.78);
    backdrop-filter: blur(18px);
}

.topbar-title,
.topbar-actions,
.section-toolbar,
.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar h1 {
    margin: 3px 0 0;
    font-size: 25px;
}

.eyebrow {
    margin: 0;
    color: var(--primary-soft);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.search-box,
.field-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: var(--surface);
}

.search-box {
    width: 255px;
}

.search-box input,
.field-wrap input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.field {
    min-width: 190px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    color: var(--text);
    background: var(--surface);
}

.primary-button,
.secondary-button,
.icon-button,
.text-button,
.mobile-menu {
    border: 0;
    border-radius: 12px;
    color: var(--text);
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #6144e8);
    box-shadow: 0 12px 28px rgba(124, 92, 255, 0.22);
}

.secondary-button {
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.icon-button,
.mobile-menu {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.text-button {
    color: var(--primary-soft);
    background: transparent;
    font-weight: 800;
}

.mobile-menu {
    display: none;
}

.flash {
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    font-size: 14px;
}

.flash-success {
    color: var(--green);
    border-color: rgba(54, 211, 154, 0.3);
    background: rgba(54, 211, 154, 0.08);
}

.flash-error {
    color: #ff9aaa;
    border-color: rgba(255, 107, 129, 0.3);
    background: rgba(255, 107, 129, 0.08);
}

.hero-panel,
.research-header {
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 30px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(124, 92, 255, 0.25);
    border-radius: 24px;
    background:
        radial-gradient(circle at 90% 10%, rgba(78, 205, 196, 0.18), transparent 30%),
        linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(17, 24, 42, 0.92));
    box-shadow: var(--shadow);
}

.hero-panel h2,
.research-header h2 {
    margin: 8px 0;
    font-size: clamp(28px, 4vw, 43px);
    line-height: 1.08;
}

.hero-panel p:not(.eyebrow),
.research-header p:not(.eyebrow) {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.6;
}

.hero-score {
    min-width: 160px;
    padding: 22px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(9, 14, 27, 0.62);
}

.hero-score span,
.hero-score small {
    display: block;
    color: var(--muted);
}

.hero-score strong {
    display: block;
    margin: 4px 0;
    font-size: 48px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(145px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stats-grid-four {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.stat-card,
.panel {
    border: 1px solid var(--line);
    background: rgba(17, 24, 42, 0.84);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.13);
}

.stat-card {
    padding: 18px;
    border-radius: var(--radius);
}

.stat-card .label {
    color: var(--muted);
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin: 8px 0 5px;
    font-size: 25px;
}

.stat-card small {
    color: var(--green);
    font-weight: 750;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.panel {
    min-width: 0;
    padding: 20px;
    border-radius: var(--radius);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.panel-header h3 {
    margin: 5px 0 0;
    font-size: 18px;
}

.panel-kicker {
    color: var(--muted);
    font-size: 13px;
}

.chart {
    height: 280px;
    display: flex;
    align-items: end;
    gap: 14px;
    padding: 30px 10px 0;
    border-bottom: 1px solid var(--line);
}

.chart-column {
    flex: 1;
    min-width: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    gap: 8px;
}

.chart-bar {
    position: relative;
    width: min(56px, 80%);
    min-height: 8px;
    border-radius: 10px 10px 4px 4px;
    background: linear-gradient(180deg, var(--primary-soft), var(--primary));
    box-shadow: 0 12px 30px rgba(124, 92, 255, 0.28);
    transition: 0.25s ease;
}

.chart-bar:hover {
    filter: brightness(1.15);
    transform: translateY(-3px);
}

.chart-bar::before {
    content: attr(data-value);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.chart-label {
    color: var(--muted);
    font-size: 12px;
}

.donut-wrap {
    display: grid;
    justify-items: center;
    gap: 22px;
}

.donut {
    position: relative;
    width: 180px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        conic-gradient(
            var(--primary) 0 58%,
            var(--green) 58% 82%,
            var(--yellow) 82% 94%,
            var(--blue) 94% 100%
        );
}

.donut::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: var(--surface);
}

.donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
}

.donut-center strong {
    display: block;
    font-size: 25px;
}

.donut-center span {
    color: var(--muted);
    font-size: 12px;
}

.legend {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.legend span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.dot-purple { background: var(--primary); }
.dot-green { background: var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-blue { background: var(--blue); }

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

td {
    font-size: 13px;
}

tr[hidden],
.research-card[hidden] {
    display: none;
}

.product-cell strong,
.product-cell small {
    display: block;
}

.product-cell small {
    margin-top: 4px;
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.badge.available {
    color: var(--green);
    background: rgba(54, 211, 154, 0.12);
}

.badge.pending {
    color: var(--blue);
    background: rgba(84, 168, 255, 0.12);
}

.badge.slow {
    color: var(--red);
    background: rgba(255, 107, 129, 0.12);
}

.score {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--primary-soft);
    font-weight: 900;
    background: rgba(124, 92, 255, 0.15);
}

.action-list,
.insight-list {
    display: grid;
    gap: 10px;
}

.action-item,
.insight {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: var(--surface-2);
}

.action-symbol,
.insight > span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 11px;
    color: var(--primary-soft);
    font-weight: 900;
    background: rgba(124, 92, 255, 0.14);
}

.action-item strong,
.action-item small,
.insight strong,
.insight small {
    display: block;
}

.action-item small,
.insight small {
    margin-top: 3px;
    color: var(--muted);
}

.section-toolbar {
    justify-content: space-between;
    margin-bottom: 16px;
}

.category-bars {
    display: grid;
    gap: 18px;
}

.category-row {
    display: grid;
    grid-template-columns: 100px 1fr 90px 70px;
    gap: 12px;
    align-items: center;
}

.bar-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--green));
}

.insight.positive > span {
    color: var(--green);
    background: rgba(54, 211, 154, 0.12);
}

.insight.warning > span {
    color: var(--yellow);
    background: rgba(244, 189, 80, 0.12);
}

.insight.neutral > span {
    color: var(--blue);
    background: rgba(84, 168, 255, 0.12);
}

.analytics-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.analytic-card strong {
    display: block;
    margin: 9px 0 4px;
    font-size: 30px;
}

.analytic-card span {
    color: var(--muted);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 14px;
}

.research-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-2);
}

.research-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.research-card h3 {
    margin: 0;
    font-size: 16px;
}

.metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.metric {
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.metric span,
.metric strong {
    display: block;
}

.metric span {
    color: var(--muted);
    font-size: 11px;
}

.metric strong {
    margin-top: 4px;
    font-size: 14px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(3, 6, 15, 0.76);
    backdrop-filter: blur(10px);
}

.modal-backdrop.open {
    display: grid;
}

.modal {
    width: min(620px, 100%);
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.modal-header,
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.modal-header h3 {
    margin: 5px 0 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 22px 0;
}

.form-field {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.form-field > span:first-child {
    display: block;
    margin-bottom: 7px;
}

.form-field input {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    color: var(--text);
    background: var(--surface-2);
}

.form-field input:focus {
    border-color: rgba(124, 92, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12);
}

.modal-actions {
    justify-content: flex-end;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    padding: 13px 16px;
    border-radius: 13px;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    color: var(--bg);
    background: var(--text);
    font-weight: 800;
    transition: 0.25s ease;
}

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

.auth-body {
    background:
        radial-gradient(circle at 20% 10%, rgba(124, 92, 255, 0.25), transparent 35rem),
        var(--bg);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
}

.auth-showcase {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px clamp(30px, 6vw, 84px);
    overflow: hidden;
    border-right: 1px solid var(--line);
    background:
        radial-gradient(circle at 15% 15%, rgba(78, 205, 196, 0.16), transparent 26rem),
        linear-gradient(145deg, rgba(124, 92, 255, 0.12), rgba(9, 14, 27, 0.6));
}

.auth-showcase::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -180px;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    box-shadow:
        0 0 0 80px rgba(255, 255, 255, 0.02),
        0 0 0 160px rgba(255, 255, 255, 0.015);
}

.auth-brand {
    position: relative;
    z-index: 1;
    padding: 0;
}

.auth-copy {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.auth-copy h1 {
    margin: 12px 0 18px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.auth-copy > p:last-child {
    max-width: 640px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.auth-preview {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 700px;
}

.preview-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: rgba(17, 24, 42, 0.72);
    backdrop-filter: blur(12px);
}

.preview-card span,
.preview-card small,
.preview-card strong {
    display: block;
}

.preview-card span,
.preview-card small {
    color: var(--muted);
}

.preview-card strong {
    margin: 8px 0 4px;
    font-size: 28px;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-card {
    width: min(430px, 100%);
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(17, 24, 42, 0.9);
    box-shadow: var(--shadow);
}

.login-heading {
    margin-bottom: 24px;
}

.login-heading h2 {
    margin: 7px 0 6px;
    font-size: 34px;
}

.login-heading p:last-child {
    margin: 0;
    color: var(--muted);
}

.login-card .form-field {
    margin-bottom: 15px;
}

.password-wrap {
    position: relative;
    display: block;
}

.password-wrap input {
    padding-right: 88px;
}

.password-wrap button {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    color: var(--primary-soft);
    background: transparent;
    font-size: 12px;
    font-weight: 800;
}

.login-button {
    width: 100%;
    margin-top: 5px;
}

.demo-credentials {
    display: grid;
    gap: 4px;
    margin-top: 20px;
    padding: 14px;
    border: 1px dashed rgba(124, 92, 255, 0.35);
    border-radius: 13px;
    color: var(--muted);
    font-size: 12px;
    background: rgba(124, 92, 255, 0.06);
}

.demo-credentials strong {
    color: var(--text);
}

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .auth-shell {
        grid-template-columns: 1fr 420px;
    }
}

@media (max-width: 920px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        transition: 0.25s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        padding: 0 18px 30px;
    }

    .mobile-menu {
        display: grid;
    }

    .topbar {
        justify-content: flex-start;
    }

    .topbar-actions {
        margin-left: auto;
    }

    .search-box {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .analytics-cards {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-showcase {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
    }
}

@media (max-width: 650px) {
    .topbar-actions .icon-button {
        display: none;
    }

    .topbar-actions .primary-button {
        padding-inline: 12px;
    }

    .hero-panel,
    .research-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-score {
        width: 100%;
    }

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

    .research-grid {
        grid-template-columns: 1fr;
    }

    .section-toolbar,
    .filter-group {
        align-items: stretch;
        flex-direction: column;
    }

    .field,
    .field-wrap {
        width: 100%;
    }

    .category-row {
        grid-template-columns: 78px 1fr;
    }

    .category-row > :nth-child(3),
    .category-row > :nth-child(4) {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        padding: 18px;
    }

    .login-card {
        padding: 22px;
    }
}


/* Live application additions */
.badge.sold {
    color: var(--muted);
    background: rgba(146, 156, 181, 0.14);
}

.section-title {
    margin: 5px 0 0;
    font-size: 28px;
}

.empty-state {
    display: grid;
    justify-items: start;
    gap: 9px;
    min-height: 170px;
    align-content: center;
    padding: 24px;
    border: 1px dashed var(--line);
    border-radius: 15px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.018);
}

.empty-state strong {
    color: var(--text);
    font-size: 18px;
}

.empty-state p {
    max-width: 520px;
    margin: 0 0 5px;
    line-height: 1.55;
}

.platform-list {
    display: grid;
    gap: 18px;
}

.platform-row {
    display: grid;
    grid-template-columns: 90px minmax(100px, 1fr) 55px;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.platform-row strong {
    color: var(--text);
    text-align: right;
}

.auth-switch {
    margin: 20px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.auth-switch a {
    color: var(--primary-soft);
    font-weight: 800;
}

.form-field select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    color: var(--text);
    background: var(--surface-2);
}

.form-field-full {
    grid-column: 1 / -1;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.integration-warning,
.integration-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding: 24px;
    border: 1px solid rgba(244, 189, 80, 0.25);
    border-radius: var(--radius);
    background: rgba(244, 189, 80, 0.06);
}

.integration-warning h3,
.integration-hero h2 {
    margin: 6px 0;
}

.integration-warning p:not(.eyebrow),
.integration-hero p:not(.eyebrow) {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.market-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.market-form {
    display: grid;
    gap: 14px;
}

.category-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px;
}

.category-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface-2);
    transition: 0.2s ease;
}

.category-choice:hover {
    border-color: rgba(124, 92, 255, 0.55);
    transform: translateY(-2px);
}

.category-choice small {
    color: var(--muted);
}

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

.winning-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--surface-2);
}

.winning-image {
    position: relative;
    height: 210px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.025);
}

.winning-image img,
.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--text);
    background: rgba(9, 14, 27, 0.82);
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.winning-content {
    padding: 16px;
}

.winning-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-height: 58px;
}

.winning-heading h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
}

.winning-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin: 15px 0;
}

.winning-metrics span {
    padding: 10px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
}

.winning-metrics small,
.winning-metrics strong {
    display: block;
}

.winning-metrics small {
    color: var(--muted);
    font-size: 10px;
}

.winning-metrics strong {
    margin-top: 4px;
    font-size: 13px;
}

.card-button,
.full-button {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.market-note {
    margin: -6px 0 18px;
    color: var(--muted);
    font-size: 13px;
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 13px;
}

.listing-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
    transition: 0.2s ease;
}

.listing-card:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 92, 255, 0.45);
}

.listing-image {
    height: 150px;
    background: rgba(255, 255, 255, 0.025);
}

.listing-card > div:last-child {
    display: grid;
    gap: 6px;
    padding: 13px;
}

.listing-card strong {
    overflow: hidden;
    display: -webkit-box;
    min-height: 39px;
    font-size: 13px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.listing-card span {
    color: var(--green);
    font-weight: 800;
}

.listing-card small {
    color: var(--muted);
}

.connection-badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 850;
}

.connection-badge.connected {
    color: var(--green);
    background: rgba(54, 211, 154, 0.12);
}

.connection-badge.disconnected {
    color: var(--yellow);
    background: rgba(244, 189, 80, 0.12);
}

.setup-steps {
    display: grid;
    gap: 12px;
    padding-left: 22px;
    color: var(--muted);
    line-height: 1.55;
}

.code-panel {
    overflow-x: auto;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #d9ddff;
    background: #090d18;
}

.integration-status-list {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.integration-status-list > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.integration-status-list span {
    color: var(--muted);
}

@media (max-width: 1180px) {
    .winning-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    .listing-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

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

    .category-choices {
        grid-template-columns: 1fr 1fr;
    }

    .listing-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .integration-warning,
    .integration-hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .winning-grid,
    .listing-grid,
    .category-choices {
        grid-template-columns: 1fr;
    }

    .platform-row {
        grid-template-columns: 75px minmax(80px, 1fr) 50px;
    }
}

.field-help {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.form-field input[list]::-webkit-calendar-picker-indicator {
    opacity: 0.75;
    cursor: pointer;
}
\n\n/* Inventory market range */\n.price-range-cell strong,\n.price-range-cell small {\n    display: block;\n}\n\n.price-range-cell small {\n    margin-top: 4px;\n    color: var(--muted);\n}\n\n.market-search-box {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 18px;\n    padding: 14px;\n    border: 1px solid var(--line);\n    border-radius: 14px;\n    background: rgba(124, 92, 255, 0.07);\n}\n\n.market-search-title {\n    display: block;\n    margin-bottom: 4px;\n    color: var(--text);\n    font-weight: 800;\n}\n\n.market-search-box small {\n    color: var(--muted);\n}\n\n.market-search-actions {\n    display: flex;\n    gap: 9px;\n    flex-wrap: wrap;\n}\n\n.price-helper textarea {\n    width: 100%;\n    min-height: 82px;\n    resize: vertical;\n    padding: 11px 12px;\n    border: 1px solid var(--line);\n    border-radius: 12px;\n    outline: 0;\n    color: var(--text);\n    background: var(--surface-2);\n}\n\n.price-helper textarea:focus {\n    border-color: rgba(124, 92, 255, 0.7);\n    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12);\n}\n\n.price-calc-button {\n    margin-top: 8px;\n    padding: 0;\n    text-align: left;\n}\n\n@media (max-width: 650px) {\n    .market-search-box {\n        align-items: stretch;\n        flex-direction: column;\n    }\n\n    .market-search-actions {\n        display: grid;\n    }\n}\n
/* Modal reliability fix */
.modal {
    max-height: 92vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

body.modal-open {
    overflow: hidden;
}
