﻿
/* CardScout — Trader Bros-inspired dark UI */

:root {
    --cs-background: #00082B;
    --cs-sidebar: #07143A;
    --cs-surface: #101E43;
    --cs-primary: #157BDD;
    --cs-cyan: #0AE1FD;
    --cs-silver: #AAB4BD;
    --cs-white: #FFFFFF;
    --cs-border: #27375A;
}

html,
body {
    min-height: 100%;
    background-color: var(--cs-background);
    color: var(--cs-white);
}

body {
    font-family: "Roboto", "Segoe UI", sans-serif;
}

/* App shell */
.mud-layout {
    min-height: 100vh;
    background-color: var(--cs-background);
}

.mud-main-content {
    min-height: 100vh;
    background-color: var(--cs-background);
}

/* Top navigation */
.mud-appbar {
    border-bottom: 1px solid var(--cs-border);
    box-shadow: none !important;
}

/* Sidebar */
.mud-drawer {
    border-right: 1px solid var(--cs-border);
}

    .mud-drawer .mud-nav-link {
        margin: 3px 10px;
        border-radius: 8px;
        transition: background-color 0.15s ease;
    }

        .mud-drawer .mud-nav-link:hover {
            background-color: rgba(21, 123, 221, 0.12);
        }

        .mud-drawer .mud-nav-link.active {
            background-color: rgba(21, 123, 221, 0.20);
            color: var(--cs-cyan);
        }

            .mud-drawer .mud-nav-link.active .mud-nav-link-icon {
                color: var(--cs-cyan);
            }

/* Cards and panels */
.mud-paper {
    border-color: var(--cs-border);
}

.mud-card {
    border: 1px solid var(--cs-border);
    border-radius: 12px;
}

/* Tables */
.mud-table {
    border: 1px solid var(--cs-border);
    border-radius: 10px;
    overflow: hidden;
}

.mud-table-head {
    background-color: var(--cs-sidebar);
}

/* Buttons */
.mud-button-filled-primary {
    box-shadow: none;
}

    .mud-button-filled-primary:hover {
        box-shadow: 0 0 14px rgba(21, 123, 221, 0.25);
    }

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--cs-cyan);
    outline-offset: 2px;
}

/* Mobile */
@media (max-width: 959px) {
    .mud-main-content {
        padding-bottom: 24px;
    }
}



/* CardScout mobile bottom navigation */

.cs-mobile-bottom-nav {
    display: none;
}

@media (max-width: 959.98px) {

    .cs-mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1100;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        min-height: 68px;
        padding: 5px 4px;
        padding-bottom: calc( 5px + env(safe-area-inset-bottom) );
        background: #07143A;
        border-top: 1px solid #27375A;
        box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.2);
    }

    .cs-mobile-tab {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-width: 0;
        min-height: 58px;
        padding: 5px 2px;
        color: #AAB4BD;
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 500;
        line-height: 1.2;
        background: transparent;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }

        .cs-mobile-tab .mud-icon-root {
            color: inherit;
        }

        .cs-mobile-tab:hover {
            color: #FFFFFF;
            background: rgba(21, 123, 221, 0.10);
            text-decoration: none;
        }

        .cs-mobile-tab.active {
            color: #0AE1FD;
            background: rgba(21, 123, 221, 0.12);
            text-decoration: none;
        }

        .cs-mobile-tab:focus-visible {
            outline: 2px solid #0AE1FD;
            outline-offset: -2px;
        }

    .mud-main-content {
        padding-bottom: calc( 92px + env(safe-area-inset-bottom) );
    }
}



/* Dashboard metric cards */

.cs-dashboard-metric {
    height: 100%;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #101E43;
    border: 1px solid #27375A;
    border-radius: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

    .cs-dashboard-metric:hover {
        border-color: #157BDD;
        transform: translateY(-2px);
    }

    .cs-dashboard-metric .mud-typography-h4 {
        font-weight: 700;
        letter-spacing: -0.5px;
        overflow-wrap: anywhere;
    }

/* Dashboard content panels */

.cs-dashboard-panel {
    height: 100%;
    background: #101E43;
    border: 1px solid #27375A;
    border-radius: 12px;
}

    .cs-dashboard-panel .mud-list {
        background: transparent;
    }

    .cs-dashboard-panel .mud-list-item {
        border-bottom: 1px solid #27375A;
    }

        .cs-dashboard-panel .mud-list-item:last-child {
            border-bottom: none;
        }


/* Financial dashboard refinements */

.cs-dashboard-metric .mud-typography-h4 {
    font-variant-numeric: tabular-nums;
}

.cs-dashboard-panel .mud-typography-h4 {
    font-weight: 700;
    letter-spacing: -0.5px;
    overflow-wrap: anywhere;
}

.cs-dashboard-panel .mud-alert {
    border-radius: 8px;
}

/* Allow financial labels to wrap on small screens */

.cs-dashboard-panel .mud-stack-row {
    flex-wrap: wrap;
    row-gap: 4px;
}


/* Dashboard inventory table */

.cs-inventory-table {
    background: transparent;
    border: 1px solid #27375A;
    border-radius: 10px;
    overflow-x: auto;
}

    .cs-inventory-table .mud-table-head {
        background: #07143A;
    }

    .cs-inventory-table .mud-table-cell {
        border-bottom: 1px solid #27375A;
    }

    .cs-inventory-table .mud-table-row:hover {
        background: rgba(21, 123, 221, 0.08);
    }

/* Pagination */

.cs-inventory-pagination {
    flex-wrap: wrap;
    gap: 12px;
}

/* Dashboard quick actions */

.cs-dashboard-actions {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

@media (max-width: 599.98px) {
    .cs-inventory-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .cs-dashboard-actions .mud-button-root {
        width: 100%;
    }
}


@media (max-width: 599.98px) {
    .cs-dashboard-panel {
        padding: 16px !important;
    }
}


/* Smaller screens */

@media (max-width: 599.98px) {
    .cs-dashboard-metric {
        min-height: 150px;
        padding: 14px !important;
    }

        .cs-dashboard-metric .mud-typography-h4 {
            font-size: 1.6rem;
        }
}


/* ========================================
   CardScout Sidebar Navigation
   ======================================== */

/* Drawer background and border */
.mud-drawer {
    background-color: #07143A !important;
    border-right: 1px solid #27375A !important;
}

/* Drawer header */
.mud-drawer-header {
    padding: 20px 16px 12px;
    min-height: auto;
}

/* Navigation menu spacing */
.mud-drawer .mud-navmenu {
    padding: 8px;
}

/* Individual navigation links */
.mud-drawer .mud-nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 3px 0;
    padding: 10px 12px;
    color: #AAB4BD !important;
    text-decoration: none !important;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    /* Navigation link labels */
    .mud-drawer .mud-nav-link .mud-nav-link-text {
        color: inherit !important;
        text-decoration: none !important;
        font-size: 0.9rem;
        font-weight: 500;
    }

    /* Navigation icons */
    .mud-drawer .mud-nav-link .mud-nav-link-icon {
        color: #8795B5 !important;
        margin-right: 12px;
    }

    /* Hover state */
    .mud-drawer .mud-nav-link:hover {
        background: rgba(21, 123, 221, 0.12);
        color: #FFFFFF !important;
    }

    /* Active page */
    .mud-drawer .mud-nav-link.active {
        background: rgba(21, 123, 221, 0.22);
        color: #0AE1FD !important;
        border-left: 3px solid #0AE1FD;
    }

        /* Active icon */
        .mud-drawer .mud-nav-link.active .mud-nav-link-icon {
            color: #0AE1FD !important;
        }

/* Remove inherited Bootstrap link styles */
.mud-drawer a,
.mud-drawer a:hover,
.mud-drawer a:focus {
    text-decoration: none !important;
}

/* Drawer dividers */
.mud-drawer .mud-divider {
    border-color: #27375A;
    margin: 12px 8px;
}

.cs-drawer-brand {
    padding: 4px 8px;
}

    .cs-drawer-brand .mud-typography-caption {
        font-size: 0.65rem;
        line-height: 1.4;
    }

/* Mobile drawer */
@media (max-width: 959.98px) {
    .mud-drawer {
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.35);
    }
}


/* CardScout collection page */

.cs-collection-heading {
    flex-wrap: wrap;
    gap: 12px;
}

.collection-library-panel .mud-input-control {
    margin-top: 0;
}

.collection-library-panel .mud-input-outlined {
    border-radius: 8px;
}

.collection-library-panel .mud-button-filled-primary {
    min-height: 40px;
}

@media (max-width: 599.98px) {
    .cs-collection-heading {
        align-items: flex-start;
    }
}


/* Collection advanced filters */

.cs-collection-filters {
    background: #101E43;
    border: 1px solid #27375A;
    border-radius: 12px;
}

.cs-filter-actions,
.cs-filter-buttons {
    flex-wrap: wrap;
    gap: 8px;
}

.cs-collection-filters .mud-input-control {
    margin-top: 0;
}

@media (max-width: 599.98px) {
    .cs-collection-filters {
        padding: 16px !important;
    }

    .cs-filter-buttons .mud-button-root {
        flex: 1 1 auto;
    }
}


/* ========================================
   CardScout Collection Results
   ======================================== */

.cs-collection-empty {
    background: #101E43;
    border: 1px dashed #27375A;
    border-radius: 12px;
    text-align: center;
}

.cs-collection-card {
    height: 100%;
    background: #101E43;
    border: 1px solid #27375A;
    border-radius: 12px;
}

.cs-collection-card-details {
    flex: 1;
    min-width: 0;
}

.cs-collection-photo {
    width: 86px;
    height: 116px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #07143A;
    border: 1px solid #27375A;
    border-radius: 8px;
    overflow: hidden;
}

    .cs-collection-photo img,
    .cs-collection-table-photo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.cs-collection-table-photo {
    width: 60px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #07143A;
    border: 1px solid #27375A;
    border-radius: 6px;
    overflow: hidden;
}

.cs-collection-table {
    background: transparent;
    border: 1px solid #27375A;
    border-radius: 10px;
    overflow: hidden;
}

    .cs-collection-table .mud-table-head {
        background: #07143A;
    }

    .cs-collection-table .mud-table-cell {
        border-bottom: 1px solid #27375A;
    }

.cs-collection-pagination {
    flex-wrap: wrap;
    gap: 12px;
}

.cs-collection-mobile {
    display: none;
}

.cs-collection-desktop {
    display: block;
}

@media (max-width: 959.98px) {
    .cs-collection-mobile {
        display: block;
    }

    .cs-collection-desktop {
        display: none;
    }
}

@media (max-width: 599.98px) {
    .cs-collection-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .cs-collection-photo {
        width: 72px;
        height: 98px;
    }
}


/* ========================================
   CardScout Add Card Form
   ======================================== */

.cs-add-card-panel {
    background: #101E43;
    border: 1px solid #27375A;
    border-radius: 12px;
}

.cs-card-file-input {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    background: #07143A;
    color: #FFFFFF;
    border: 1px solid #27375A;
    border-radius: 8px;
}

    .cs-card-file-input::file-selector-button {
        margin-right: 12px;
        padding: 8px 12px;
        background: #157BDD;
        color: #FFFFFF;
        border: none;
        border-radius: 6px;
        cursor: pointer;
    }

        .cs-card-file-input::file-selector-button:hover {
            background: #0F66BB;
        }

.cs-add-card-panel .mud-input-control {
    margin-top: 0;
}

.cs-add-card-panel .mud-button-filled-primary {
    min-height: 44px;
}

@media (max-width: 599.98px) {
    .cs-add-card-panel {
        padding: 16px !important;
    }
}


/* ==========================================
   Milestone 17D - Collection Theme Fix
   ========================================== */

.collection-page .collection-library-panel,
.collection-page .collection-add-panel,
.collection-page .cs-add-card-panel {
    background: #101E43 !important;
    color: #FFFFFF !important;
    border: 1px solid #27375A;
    border-radius: 12px;
}

/* Collection headings and descriptive text */
.collection-page .mud-typography {
    color: #FFFFFF;
}

    .collection-page .mud-typography.mud-typography-body2,
    .collection-page .mud-typography.mud-typography-caption {
        color: #AAB4BD;
    }

/* Input backgrounds */
.collection-page .mud-input-control {
    color: #FFFFFF;
}

.collection-page .mud-input-root {
    color: #FFFFFF !important;
}

.collection-page .mud-input-outlined {
    background: #07143A;
    border-radius: 8px;
}

.collection-page .mud-input-label {
    color: #AAB4BD !important;
}

.collection-page .mud-input-adornment {
    color: #AAB4BD;
}

/* Table styling */
.collection-page .cs-collection-table,
.collection-page .cs-collection-table .mud-table-container,
.collection-page .cs-collection-table .mud-table-root,
.collection-page .cs-collection-table .mud-table-body,
.collection-page .cs-collection-table .mud-table-row,
.collection-page .cs-collection-table .mud-table-cell {
    background-color: #101E43 !important;
    color: #FFFFFF !important;
}

    .collection-page .cs-collection-table .mud-table-head .mud-table-cell {
        background-color: #07143A !important;
        color: #FFFFFF !important;
    }

/* Keep links visibly interactive */
.collection-page .mud-link {
    color: #0AE1FD;
    text-decoration: none;
}

    .collection-page .mud-link:hover {
        text-decoration: underline;
    }

/* ========================================
   Milestone 17D.1 - Responsive Add Card
   ======================================== */

.cs-add-card-mobile-action {
    display: none;
}

.cs-add-card-desktop {
    display: block;
}

@media (max-width: 959.98px) {
    .cs-add-card-mobile-action {
        display: block;
    }

    .cs-add-card-desktop {
        display: none;
    }
}

@media (max-width: 959.98px) {
    .collection-page {
        padding-bottom: 110px !important;
    }
}


/* ========================================
   CardScout Mobile Add Card Dialog
   ======================================== */

.mud-dialog {
    background-color: #101E43;
    color: #FFFFFF;
}

    .mud-dialog .mud-dialog-title {
        background-color: #07143A;
        color: #FFFFFF;
        border-bottom: 1px solid #27375A;
    }

    .mud-dialog .mud-dialog-content {
        background-color: #101E43;
        color: #FFFFFF;
        overflow-y: auto;
        padding-bottom: 110px;
    }

@media (max-width: 959.98px) {
    .collection-page {
        padding-bottom: 110px !important;
    }
}


/* ========================================
   CardScout Inventory Page
   ======================================== */

.cs-inventory-page {
    color: #FFFFFF;
}

    .cs-inventory-page .page-heading {
        color: #FFFFFF;
    }

.cs-inventory-heading {
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 959.98px) {
    .cs-inventory-page {
        padding-bottom: 110px !important;
    }
}


/* Inventory results */

.cs-inventory-empty,
.cs-inventory-lot-card {
    background: #101E43;
    border: 1px solid #27375A;
    border-radius: 12px;
}

.cs-inventory-table {
    background: #101E43;
    border: 1px solid #27375A;
    border-radius: 10px;
    overflow: hidden;
}

    .cs-inventory-table .mud-table-head {
        background: #07143A;
    }

    .cs-inventory-table .mud-table-cell {
        border-bottom: 1px solid #27375A;
    }

.cs-inventory-mobile {
    display: none;
}

.cs-inventory-desktop {
    display: block;
}

@media (max-width: 959.98px) {
    .cs-inventory-mobile {
        display: block;
    }

    .cs-inventory-desktop {
        display: none;
    }
}


/* Inventory purchase form */

.cs-inventory-cost-summary {
    background: #07143A;
    border: 1px solid #27375A;
    border-radius: 10px;
}

.cs-inventory-date-input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    background: #07143A;
    color: #FFFFFF;
    border: 1px solid #27375A;
    border-radius: 8px;
    color-scheme: dark;
}

    .cs-inventory-date-input:focus {
        outline: 1px solid #157BDD;
        border-color: #157BDD;
    }

.cs-inventory-page .mud-input-control {
    margin-top: 0;
}


/* ========================================
   Inventory Add/Edit Responsive Layout
   ======================================== */

.cs-inventory-form-panel {
    background: #101E43;
    border: 1px solid #27375A;
    border-radius: 12px;
}

.cs-inventory-mobile-add {
    display: none;
}

.cs-inventory-desktop-form {
    display: block;
}

@media (max-width: 959.98px) {
    .cs-inventory-mobile-add {
        display: block;
    }

    .cs-inventory-desktop-form {
        display: none;
    }

    .cs-inventory-page {
        padding-bottom: 110px !important;
    }
}



/* ========================================
   Inventory Library Panel - Dark Theme
   ======================================== */

.cs-inventory-page .cs-inventory-library-panel {
    background: #101E43 !important;
    color: #FFFFFF !important;
    border: 1px solid #27375A;
    border-radius: 12px;
    padding: 24px;
    box-shadow: none;
}

/* Inventory heading */
.cs-inventory-library-panel .mud-typography {
    color: #FFFFFF;
}

/* Secondary text */
.cs-inventory-library-panel .mud-typography-secondary {
    color: #AAB4BD !important;
}

/* Empty state */
.cs-inventory-library-panel .cs-inventory-empty {
    background: #07143A;
    border: 1px solid #27375A;
    border-radius: 12px;
}

/* Inventory action buttons */
.cs-inventory-library-panel .mud-button-outlined {
    border-color: #27375A;
}

/* Inventory footer/help text */
.cs-inventory-library-panel p.small {
    color: #AAB4BD !important;
}

    .cs-inventory-library-panel p.small a {
        color: #0AE1FD;
    }

/* Mobile adjustments */
@media (max-width: 959.98px) {
    .cs-inventory-page .cs-inventory-library-panel {
        padding: 16px;
    }
}


/* Inventory delete confirmation */

.mud-dialog .mud-dialog-actions {
    background: #101E43;
    padding: 16px 24px;
    border-top: 1px solid #27375A;
}

@media (max-width: 599.98px) {
    .mud-dialog .mud-dialog-actions {
        gap: 8px;
    }
}


/* ========================================
   CardScout Home Page
   ======================================== */

.cs-home-page {
    background: #00082B;
    color: #FFFFFF;
    min-height: 100vh;
    overflow: hidden;
}

/* Hero layout */

.cs-home-hero {
    padding-top: 80px;
    padding-bottom: 90px;
}

.cs-home-copy {
    max-width: 680px;
}

.cs-home-eyebrow {
    color: #0AE1FD !important;
    font-weight: 700;
    letter-spacing: 2px;
}

.cs-home-title {
    font-weight: 800 !important;
    font-size: clamp(2.5rem, 4.5vw, 4.5rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -1.5px;
}

    .cs-home-title span {
        display: block;
        color: #0AE1FD;
    }

.cs-home-description {
    max-width: 580px;
    color: #AAB4BD !important;
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
}

/* Buttons */

.cs-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

    .cs-home-actions .mud-button-root {
        border-radius: 9px;
        min-height: 46px;
        font-weight: 600;
        text-transform: none;
    }

/* Benefits */

.cs-home-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 8px;
}

    .cs-home-benefits > div {
        display: flex;
        align-items: center;
        gap: 7px;
        color: #AAB4BD;
        font-size: 0.85rem;
    }

/* Trading card visual */

.cs-home-visual {
    position: relative;
    height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-home-card-back {
    position: absolute;
    width: 265px;
    height: 365px;
    border: 1px solid #157BDD;
    border-radius: 18px;
    background: linear-gradient( 145deg, #101E43, #07143A );
    transform: rotate(10deg) translate(14px, -5px);
    opacity: 0.65;
}

.cs-home-trading-card {
    position: relative;
    width: 265px;
    min-height: 365px;
    padding: 16px;
    border: 2px solid #157BDD;
    border-radius: 18px;
    background: linear-gradient( 155deg, #152E65, #07143A 75% );
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    transform: rotate(-5deg);
    z-index: 2;
}

.cs-home-card-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #AAB4BD;
    margin-bottom: 12px;
}

.cs-home-card-art {
    height: 190px;
    background: linear-gradient( 135deg, #157BDD, #0AE1FD );
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #00082B;
}

.cs-home-card-logo {
    font-size: 72px;
    font-weight: 900;
    letter-spacing: -6px;
}

.cs-home-card-edition {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.cs-home-card-player {
    margin-top: 14px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.cs-home-card-subtitle {
    color: #AAB4BD;
    font-size: 12px;
    margin-top: 4px;
}

.cs-home-card-footer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #27375A;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .cs-home-card-footer span {
        font-size: 11px;
        color: #AAB4BD;
    }

    .cs-home-card-footer strong {
        color: #46E0A0;
        font-size: 22px;
    }

.cs-home-floating-label {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #101E43;
    border: 1px solid #27375A;
    padding: 12px 16px;
    border-radius: 30px;
    font-size: 12px;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 3;
}

.cs-home-status-dot {
    width: 8px;
    height: 8px;
    background: #46E0A0;
    border-radius: 50%;
}

/* Features */

.cs-home-features {
    padding-bottom: 80px;
}

.cs-home-feature {
    height: 100%;
    background: #101E43 !important;
    border: 1px solid #27375A;
    border-radius: 14px;
    color: #FFFFFF;
}

.cs-home-feature-number {
    color: #0AE1FD !important;
    font-size: 22px !important;
    font-weight: 800 !important;
}

.cs-home-comps-action {
    margin-top: 30px;
    text-align: center;
}

/* Mobile */

@media (max-width: 959.98px) {

    .cs-home-page {
        padding-bottom: 110px;
    }

    .cs-home-hero {
        padding-top: 35px;
        padding-bottom: 35px;
    }

    .cs-home-title {
        font-size: clamp(2.2rem, 8vw, 3.5rem) !important;
    }

    .cs-home-description {
        font-size: 1rem !important;
    }

    .cs-home-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

        .cs-home-actions .mud-button-root {
            width: 100%;
            font-size: 12px;
        }

    .cs-home-benefits {
        gap: 12px;
    }

    .cs-home-visual {
        height: 400px;
        margin-top: 15px;
    }

    .cs-home-floating-label {
        right: 5%;
    }

    .cs-home-features {
        padding-bottom: 35px;
    }
}

@media (max-width: 420px) {

    .cs-home-actions {
        grid-template-columns: 1fr;
    }

    .cs-home-visual {
        transform: scale(0.9);
        margin: -10px 0;
    }
}


/* Deal Analyzer — Marketplace Sales */

.cs-analyzer-market-panel {
    background: #101E43 !important;
    border: 1px solid #27375A;
    border-radius: 14px;
}

.cs-analyzer-sale {
    background: #07143A !important;
    border: 1px solid #27375A;
    border-radius: 10px;
}

    .cs-analyzer-sale:hover {
        border-color: #157BDD;
    }

.cs-analyzer-market-panel .mud-button-root {
    text-transform: none;
    font-weight: 600;
}



/* ========================================
   Deal Analyzer - Deal Details
   ======================================== */

.cs-analyzer-input-panel {
    background: #101E43 !important;
    border: 1px solid #27375A;
    border-radius: 14px;
    color: #FFFFFF;
}

.cs-analyzer-section-heading {
    font-weight: 700 !important;
    color: #FFFFFF !important;
}

.cs-analyzer-input-panel .mud-input-control {
    margin-top: 4px;
}

.cs-analyzer-input-panel .mud-input-outlined {
    border-radius: 8px;
}

.cs-analyzer-input-panel .mud-divider {
    border-color: #27375A;
}

.cs-analyzer-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

    .cs-analyzer-form-actions .mud-button-root {
        min-height: 46px;
        border-radius: 9px;
        font-weight: 600;
        text-transform: none;
    }

@media (max-width: 599.98px) {
    .cs-analyzer-input-panel {
        padding: 20px !important;
    }

    .cs-analyzer-form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

        .cs-analyzer-form-actions .mud-button-root {
            width: 100%;
        }
}

/* Milestone 17D.4C — Deal Analyzer Snapshot */

.cs-analyzer-result-panel {
    background: #101E43;
    border: 1px solid #27375A;
    border-radius: 16px;
    color: #F5F7FA;
    overflow-wrap: anywhere;
}

    .cs-analyzer-result-panel .mud-typography-h3 {
        font-weight: 800;
        letter-spacing: -0.04em;
    }

    .cs-analyzer-result-panel .mud-typography-h6 {
        font-weight: 700;
    }

@media (max-width: 600px) {
    .cs-analyzer-result-panel {
        border-radius: 12px;
    }

        .cs-analyzer-result-panel .mud-typography-h3 {
            font-size: 2rem;
        }
}

/* Milestone 17D.4E — Deal Analyzer responsive polish */

.cs-analyzer-input-panel,
.cs-analyzer-result-panel,
.cs-analyzer-market-panel {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.cs-analyzer-sale {
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .analyzer-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .cs-analyzer-input-panel,
    .cs-analyzer-result-panel,
    .cs-analyzer-market-panel {
        padding: 16px !important;
    }

    .cs-analyzer-form-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

        .cs-analyzer-form-actions .mud-button-root {
            width: 100%;
        }
}

/* Milestone 17D.4F — Marketplace card images */

.cs-market-image-button {
    padding: 0 !important;
    min-width: 76px !important;
    flex-shrink: 0;
    border-radius: 8px !important;
    overflow: hidden;
    border: 1px solid #27375A !important;
    background: #07143A !important;
}

.cs-market-image-thumb {
    width: 76px;
    height: 106px;
    object-fit: contain;
    display: block;
}

.cs-market-image-button:hover {
    border-color: #0AE1FD !important;
}

.cs-market-image-placeholder {
    width: 76px;
    height: 106px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #07143A;
    border: 1px solid #27375A;
    border-radius: 8px;
}

.cs-market-image-large {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .cs-market-image-thumb,
    .cs-market-image-placeholder {
        width: 60px;
        height: 84px;
    }

    .cs-market-image-button {
        min-width: 60px !important;
    }
}