/* ==========================================================================
   CONSIGNREV OS - MASTER CSS OVERRIDE
   Target: Blazor Web App / Mobile-First B2B SaaS
   Base: Bootstrap 5
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TYPOGRAPHY & CORE VARIABLES
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

:root {
    /* ConsignRev Brand Colors */
    --cr-primary: #0d6efd;
    --cr-purple: #6f42c1;
    --cr-purple-light: rgba(111, 66, 193, 0.1);

    /* Surface & Backgrounds */
    --cr-bg-light: #f8f9fc;
    --cr-border-color: #e2e8f0;

    /* Typography */
    --cr-text-main: #1e293b;
    --cr-text-muted: #64748b;
}

/*
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--cr-bg-light);
    color: var(--cr-text-main);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}
*/
/* Fix Material Icons vertical alignment */
/*
.material-icons {
    display: inline-flex;
    vertical-align: middle;
    line-height: 1;
}
*/

/* 1. TYPOGRAPHY & CORE VARIABLES (Scoped to avoid sidebar bleed) */

.cr-workspace {
    /* Explicitly inherit your legacy app's font stack, sizing, and colors */
    font-family: inherit !important;
    font-size: inherit;
    color: inherit;
    /* Keep the layout/surface settings specific to the new screens */
    background-color: var(--cr-bg-light);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

/* Fix Material Icons ONLY inside the new workspace, leaving sidebar alone */
.cr-workspace .material-icons {
    display: inline-flex;
    vertical-align: middle;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   2. CARDS, SURFACES & SHADOWS
   -------------------------------------------------------------------------- */
/* Soften the default Bootstrap shadow to match modern SaaS design */
.shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03) !important;
}
.shadow {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03) !important;
}

.card {
    border-radius: 0.75rem;
    border-color: var(--cr-border-color) !important;
}
.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--cr-border-color);
}

/* Interactive Hover Cards (For Dashboard Quick Actions) */
.cr-hover-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cr-hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05) !important;
    border-color: #cbd5e1 !important;
}

/* --------------------------------------------------------------------------
   3. CUSTOM GRADIENTS (Verification & Alert Cards)
   -------------------------------------------------------------------------- */
.card-cr-gradient-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #bbf7d0 !important;
}
.card-cr-gradient-primary {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-color: #bfdbfe !important;
}
.card-cr-gradient-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    border-color: #fecaca !important;
}

/* --------------------------------------------------------------------------
   4. FORMS, INPUTS & BUTTONS
   -------------------------------------------------------------------------- */
/* Refine inputs to look sharper and remove the aggressive default blue glow */
.form-control, .form-select {
    border-color: #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--cr-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* Dashed upload zones */
.border-dashed {
    border-style: dashed !important;
    border-width: 2px !important;
    border-color: #cbd5e1 !important;
    transition: border-color 0.2s, background-color 0.2s;
}
.border-dashed:hover {
    border-color: var(--cr-primary) !important;
    background-color: #f8fafc;
}

/* Custom Interactive Radio/Checkbox Cards (Sign-up & WO Request) */
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary {
    color: var(--cr-primary);
    background-color: #eff6ff;
    border-color: var(--cr-primary);
    border-width: 2px;
}
.btn-outline-primary {
    border-width: 2px;
    border-color: #e2e8f0;
    color: var(--cr-text-muted);
    border-radius: 0.75rem;
}
.btn-outline-primary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: var(--cr-text-main);
}

/* Pill buttons inside Navs */
.nav-pills .nav-link {
    border-radius: 50rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. NAVIGATION & TABS
   -------------------------------------------------------------------------- */
/* Clean bottom-border tabs for dense admin data screens */
.nav-tabs {
    border-bottom-color: var(--cr-border-color);
}
.nav-tabs .nav-link {
    border: none;
    color: var(--cr-text-muted);
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    margin-bottom: -1px;
}
.nav-tabs .nav-link.active {
    border: none !important;
    border-bottom: 3px solid var(--cr-primary) !important;
    color: var(--cr-text-main) !important;
    background-color: transparent !important;
}

/* Horizontal scrolling hide scrollbar (Mobile grids) */
.overflow-auto {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.overflow-auto::-webkit-scrollbar {
    display: none;
}

/* --------------------------------------------------------------------------
   6. CUSTOM COMPONENTS (Timelines & Progress Rings)
   -------------------------------------------------------------------------- */
/* Vertical Timeline for Delivery Tracking */
.cr-timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 1.5rem;
    border-left: 2px solid #e2e8f0;
    margin-left: 1rem;
}
.cr-timeline-item.active {
    border-left-color: #198754;
}
.cr-timeline-item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #e2e8f0;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #e2e8f0;
}
.cr-timeline-item.active::before {
    background-color: #198754;
    box-shadow: 0 0 0 1px #198754;
}
.cr-timeline-item.current::before {
    background-color: var(--cr-primary);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.2);
}

/* 90-Day Circular Progress Ring */
.cr-circle-progress {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: conic-gradient(#198754 60%, #e2e8f0 60%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cr-circle-progress-inner {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* --------------------------------------------------------------------------
   7. UTILITIES & OVERRIDES
   -------------------------------------------------------------------------- */
/* Tighter line heights for dense data tables */
.lh-sm { line-height: 1.25 !important; }

/* Custom Badge Overrides */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
}

/* Map Overlay Text Shadow */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* --------------------------------------------------------------------------
   8. BATCH 1 UI PATCH (For Dashboard & Browse Listings)
   -------------------------------------------------------------------------- */
/* Custom Purple Utilities for Timed Sales */
.text-purple { color: var(--cr-purple) !important; }
.bg-purple { background-color: var(--cr-purple) !important; }
.border-purple { border-color: var(--cr-purple) !important; }

/* Pointer utility for clickable cards */
.cursor-pointer { cursor: pointer !important; }