/* Root Variables */
:root {
    --dark-blue: #07111f;
    --medium-blue: #101f33;
    --light-blue: #29415f;
    --orange: #ff8a1f;
    --orange-hover: #e87812;
    --whitesmoke: #e8eef7;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--dark-blue);
    color: var(--whitesmoke);
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-blue);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--orange);
    border-radius: 10px;
    border: 2px solid var(--dark-blue);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--orange-hover);
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Business Card Styles */
.business-card {
    background: linear-gradient(145deg, rgba(20, 40, 66, .92), rgba(10, 23, 40, .96));
    border: 1px solid var(--light-blue);
    border-radius: 0.85rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--orange), var(--orange-hover));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.business-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .28);
    border-color: var(--orange);
}

.business-card:hover::before {
    transform: scaleX(1);
}

/* Map Container */
#map {
    z-index: 1;
    border-radius: 1rem;
}

.leaflet-popup-content-wrapper {
    background: var(--medium-blue) !important;
    color: var(--whitesmoke) !important;
    border: 2px solid var(--orange);
    border-radius: 0.5rem;
}

.leaflet-popup-tip {
    background: var(--medium-blue) !important;
}

/* AI Assistant */
#aiAssistant {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#aiAssistant.minimized {
    transform: translateY(calc(100% - 60px));
}

#aiAssistant.minimized #chatMessages,
#aiAssistant.minimized .border-t-2 {
    display: none;
}

#chatMessages {
    scrollbar-width: thin;
    scrollbar-color: var(--orange) var(--dark-blue);
}

#chatMessages::-webkit-scrollbar {
    width: 6px;
}

#chatMessages::-webkit-scrollbar-track {
    background: var(--dark-blue);
}

#chatMessages::-webkit-scrollbar-thumb {
    background: var(--orange);
    border-radius: 3px;
}

/* Loading Spinner */
.spinner {
    border: 4px solid var(--light-blue);
    border-radius: 50%;
    border-top: 4px solid var(--orange);
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Demand Level Badges */
.demand-low {
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.demand-medium {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}

.demand-high {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

/* Button Styles */
button, .btn {
    cursor: pointer;
    transition: all 0.2s ease;
}

button:active, .btn:active {
    transform: scale(0.98);
}

/* Input Focus Styles */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

/* Card Hover Effect for Results */
.business-card .copy-email,
.business-card .copy-sms {
    opacity: 0.9;
    transition: all 0.2s ease;
}

.business-card .copy-email:hover,
.business-card .copy-sms:hover {
    opacity: 1;
    transform: translateX(2px);
}

/* Header Shadow */
header {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

/* Link Styles */
a {
    transition: all 0.2s ease;
}

/* Toast Notification */
.toast {
    animation: slideInRight 0.3s ease-out;
}

/* Gradient Background for Hero */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--medium-blue), var(--dark-blue));
}

/* Social Icons */
.social-icon {
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    transform: translateY(-2px);
    color: var(--orange) !important;
}

/* Results Count Badge */
#resultsCount {
    background: var(--light-blue);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 1280px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 1024px) {
    #aiAssistant {
        width: 85%;
        right: 7.5%;
    }
}

@media (max-width: 768px) {
    #aiAssistant {
        width: 90%;
        right: 5%;
        bottom: 1rem;
    }

    .business-card {
        padding: 1rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 640px) {
    header .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    nav {
        flex-direction: column;
        width: 100%;
    }

    nav a, nav button {
        width: 100%;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--medium-blue) 25%, var(--light-blue) 50%, var(--medium-blue) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state svg {
    opacity: 0.5;
}

/* Contact Info Display */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Rating Stars */
.rating-stars {
    color: #FFD700;
    display: inline-flex;
    align-items: center;
}

/* Map Legend */
.map-legend {
    font-size: 0.875rem;
}

.map-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Business Category Badge */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light-blue);
    color: var(--whitesmoke);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Sticky Positioning for Map */
.sticky {
    position: sticky;
    top: 6rem;
}

/* Form Elements */
form label {
    font-weight: 500;
}

form input::placeholder {
    color: #9CA3AF;
}

/* Card Grid Layout */
.card-grid {
    display: grid;
    gap: 1.5rem;
}

/* Success State */
.success-message {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease-out;
}

/* Error State */
.error-message {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease-out;
}

/* Copy Button Animation */
@keyframes copySuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.copy-success {
    animation: copySuccess 0.3s ease;
}

/* Footer Links */
footer a {
    color: var(--whitesmoke);
    text-decoration: none;
}

footer a:hover {
    color: var(--orange);
}

/* Dropdown Menu (if needed) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--medium-blue);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    border: 2px solid var(--light-blue);
    z-index: 1;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--whitesmoke);
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background-color: var(--light-blue);
    color: var(--orange);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Search Form Enhancement */
#searchForm input:focus {
    transform: translateY(-2px);
}

/* Business Card Content Sections */
.business-card-section {
    padding: 1rem 0;
    border-top: 1px solid var(--light-blue);
    margin-top: 1rem;
}

.business-card-section:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

/* Icon Containers */
.icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--orange);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.icon-container:hover {
    transform: rotate(5deg) scale(1.05);
}

/* Text Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--orange), var(--orange-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Z-Index Management */
.z-highest {
    z-index: 9999;
}

/* Print Styles */
@media print {
    header, footer, #aiAssistant {
        display: none;
    }
    
    .business-card {
        page-break-inside: avoid;
        border: 1px solid #000;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: var(--orange);
    color: white;
}

::-moz-selection {
    background-color: var(--orange);
    color: white;
}

/* Acquisition workspace shell */
.mining-hero::after {
    background: radial-gradient(circle, rgba(59, 130, 246, .24), transparent 67%);
    content: '';
    height: 440px;
    pointer-events: none;
    position: absolute;
    right: -180px;
    top: -180px;
    width: 440px;
}

.mining-hero::before {
    background-image: linear-gradient(rgba(92, 124, 160, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(92, 124, 160, .08) 1px, transparent 1px);
    background-size: 28px 28px;
    bottom: 0;
    content: '';
    left: 0;
    opacity: .6;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
}

.mining-empty-icon {
    align-items: center;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .28);
    border-radius: 14px;
    color: #75adff;
    display: inline-flex;
    font-size: 2rem;
    height: 56px;
    justify-content: center;
    width: 56px;
}

#searchForm input:focus { transform: none; }
#resultsTable tbody tr { transition: background .15s ease; }
#resultsTable tbody tr:hover { background: rgba(41, 65, 95, .32); }
#map { filter: saturate(.78) contrast(1.04); }

.ops-run-preview {
    align-items: center;
    border-top: 1px solid #29415f;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    padding: .85rem 0;
}
.ops-run-preview:first-child { border-top: 0; }
.ops-stage-dots { display: flex; gap: 4px; }
.ops-stage-dot { background: #607089; border-radius: 999px; height: 7px; width: 22px; }
.ops-stage-dot.completed { background: #24c875; }
.ops-stage-dot.completed_with_warnings { background: #f2b84b; }
.ops-stage-dot.failed { background: #f05252; }
.ops-stage-dot.processing { background: #3b82f6; }

@media (max-width: 760px) {
    header nav { flex-wrap: nowrap !important; max-width: 100%; overflow-x: auto; padding-bottom: .2rem; }
    header nav > * { flex: 0 0 auto; }
    .ops-run-preview { grid-template-columns: 1fr; }
    #aiAssistant { bottom: .75rem; right: .75rem; }
}

/* Grouped data-mining control room */
.dashboard-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.dashboard-sidebar {
    background: linear-gradient(180deg, #0b192b 0%, #081321 100%);
    border-right: 1px solid #263b57;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 1.25rem 1rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

.dashboard-brand { align-items: center; display: flex; gap: .75rem; padding: .25rem .5rem 1.25rem; }
.dashboard-brand img { height: 38px; width: 38px; }
.dashboard-brand span { display: flex; flex-direction: column; line-height: 1.25; }
.dashboard-brand strong { color: #f8fbff; font-size: 1rem; }
.dashboard-brand small { color: #8293ab; font-size: .67rem; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-nav { display: flex; flex: 1; flex-direction: column; gap: 1.3rem; overflow-y: auto; }
.nav-group { display: flex; flex-direction: column; gap: .2rem; }
.nav-group > p { color: #64758d; font-size: .64rem; font-weight: 800; letter-spacing: .14em; margin: 0 .65rem .35rem; text-transform: uppercase; }
.nav-group a { align-items: center; border: 1px solid transparent; border-radius: 10px; color: #aebbd0; display: flex; font-size: .82rem; gap: .7rem; padding: .65rem .7rem; }
.nav-group a i { color: #6f86a4; text-align: center; width: 17px; }
.nav-group a:hover { background: rgba(43, 70, 103, .35); color: white; }
.nav-group a.active { background: linear-gradient(90deg, rgba(30, 104, 255, .2), rgba(30, 104, 255, .06)); border-color: rgba(74, 135, 255, .25); color: #fff; }
.nav-group a.active i { color: #5d9cff; }
.sidebar-footer { border-top: 1px solid #263b57; display: grid; gap: .75rem; padding: 1rem .5rem 0; }
.system-state { color: #90a0b7; font-size: .7rem; }
.system-state i { background: #22c875; border-radius: 50%; box-shadow: 0 0 0 4px rgba(34, 200, 117, .1); display: inline-block; height: 7px; margin-right: .45rem; width: 7px; }
.sidebar-logout { color: #9eacc0; font-size: .76rem; text-align: left; }
.sidebar-logout i { margin-right: .45rem; }

.dashboard-main { min-width: 0; padding: 1.8rem clamp(1rem, 2.5vw, 2.6rem) 0; }
.workspace-header { align-items: flex-end; box-shadow: none; display: flex; gap: 1.5rem; justify-content: space-between; margin: 0 auto 1.5rem; max-width: 1600px; }
.workspace-header h1 { color: #f7faff; font-size: clamp(1.75rem, 3vw, 2.45rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; margin-top: .25rem; }
.workspace-header > div:first-child > p:last-child, .section-title > div > p:last-child { color: #8293ab; font-size: .84rem; margin-top: .45rem; }
.header-actions, .output-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .55rem; }
.range-control { color: #7f90a9; font-size: .67rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.range-control select { display: block; font-size: .76rem; margin-top: .25rem; min-width: 130px; padding: .48rem .65rem; text-transform: none; }

.metric-grid { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 auto 1rem; max-width: 1600px; }
.metric-card { min-height: 112px; overflow: hidden; position: relative; }
.metric-card::after { background: var(--metric-color, #3b82f6); border-radius: 50%; content: ''; filter: blur(38px); height: 90px; opacity: .15; position: absolute; right: -20px; top: -25px; width: 90px; }
.metric-label { align-items: center; color: #8d9db3; display: flex; font-size: .72rem; font-weight: 700; justify-content: space-between; letter-spacing: .04em; text-transform: uppercase; }
.metric-label i { align-items: center; background: color-mix(in srgb, var(--metric-color) 15%, transparent); border: 1px solid color-mix(in srgb, var(--metric-color) 30%, transparent); border-radius: 8px; color: var(--metric-color); display: flex; height: 28px; justify-content: center; width: 28px; }
.metric-value { color: #f8fbff; font-size: 1.75rem; font-weight: 800; line-height: 1.1; margin-top: .7rem; }
.metric-note { color: #73849b; font-size: .7rem; margin-top: .25rem; }
.skeleton-card { min-height: 112px; }

.analytics-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); margin: 0 auto 1rem; max-width: 1600px; }
.analytics-card, .operations-card { padding: 1.15rem 1.25rem; }
.analytics-wide { min-width: 0; }
.panel-heading { align-items: center; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: .9rem; }
.panel-heading h2 { color: #edf4fd; font-size: .95rem; font-weight: 750; margin-top: .12rem; }
.panel-heading > a { color: #6ea6ff; font-size: .72rem; white-space: nowrap; }
.chart-frame { height: 255px; position: relative; }
.chart-frame.compact { height: 255px; }
.chart-legend { align-items: center; color: #74859c; display: flex; font-size: .68rem; gap: .4rem; }
.chart-legend i { border-radius: 2px; display: inline-block; height: 7px; margin-left: .4rem; width: 12px; }
.records-dot { background: #2879ff; }
.runs-dot { background: #ff9c3b; }

.operations-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr); margin: 0 auto 2.8rem; max-width: 1600px; }
.table-scroll { overflow-x: auto; }
.operations-table { border-collapse: collapse; font-size: .74rem; min-width: 650px; width: 100%; }
.operations-table th { border-bottom: 1px solid #2a405c; color: #71839a; font-size: .62rem; letter-spacing: .08em; padding: .6rem; text-align: left; text-transform: uppercase; }
.operations-table td { border-bottom: 1px solid rgba(42, 64, 92, .65); color: #bdc9d9; padding: .68rem .6rem; }
.operations-table tr:last-child td { border-bottom: 0; }
.run-link { color: #73aaff; font-weight: 700; }

.workspace-section { border-top: 1px solid #263b57; margin: 0 auto; max-width: 1600px; padding: 2.5rem 0; scroll-margin-top: 1rem; }
.section-title { align-items: center; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1.15rem; }
.section-title h2 { color: #f4f8fd; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.workspace-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) 340px; }
.mining-context { padding: 1.5rem; }
.mining-context h3 { font-size: 1.15rem; font-weight: 750; margin-top: .35rem; }
.lineage-steps { display: grid; gap: 1.15rem; margin-top: 1.5rem; }
.lineage-steps li { align-items: flex-start; display: flex; gap: .8rem; position: relative; }
.lineage-steps li:not(:last-child)::after { background: #2d4665; content: ''; height: 25px; left: 17px; position: absolute; top: 36px; width: 1px; }
.lineage-steps li > span { align-items: center; background: #122946; border: 1px solid #315478; border-radius: 9px; color: #6ba6ff; display: flex; flex: 0 0 35px; font-size: .64rem; font-weight: 800; height: 35px; justify-content: center; }
.lineage-steps div { display: flex; flex-direction: column; }
.lineage-steps strong { color: #dbe6f5; font-size: .78rem; }
.lineage-steps small { color: #71839b; font-size: .68rem; margin-top: .15rem; }
.records-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) 400px; }
.workspace-footer { border-top: 1px solid #263b57; color: #687a92; display: flex; font-size: .67rem; justify-content: space-between; padding: 1.2rem 0; }

@media (max-width: 1180px) {
    .analytics-grid, .operations-grid { grid-template-columns: 1fr 1fr; }
    .analytics-wide, .operations-grid > :first-child { grid-column: 1 / -1; }
    .workspace-grid, .records-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .dashboard-shell { display: block; }
    .dashboard-sidebar { border-bottom: 1px solid #263b57; border-right: 0; height: auto; padding: .7rem 1rem; position: sticky; }
    .dashboard-brand { padding: 0; }
    .dashboard-brand small, .dashboard-nav .nav-group > p, .sidebar-footer { display: none; }
    .dashboard-nav { flex-direction: row; gap: .35rem; margin-top: .65rem; overflow-x: auto; }
    .nav-group { display: contents; }
    .nav-group a { flex: 0 0 auto; padding: .5rem .65rem; }
    .dashboard-main { padding-top: 1.25rem; }
    .workspace-header { align-items: flex-start; flex-direction: column; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    .dashboard-brand img { height: 30px; width: 30px; }
    .dashboard-brand strong { font-size: .9rem; }
    .nav-group a span { display: none; }
    .nav-group a { justify-content: center; width: 39px; }
    .metric-grid, .analytics-grid, .operations-grid { grid-template-columns: 1fr; }
    .analytics-wide, .operations-grid > :first-child { grid-column: auto; }
    .header-actions, .output-actions { width: 100%; }
    .section-title { align-items: flex-start; flex-direction: column; }
    .chart-frame { height: 220px; }
    .workspace-footer { flex-direction: column; gap: .25rem; }
}

/* AI acquisition worker progress */
.job-progress-overlay { align-items: center; background: rgba(2,8,17,.82); display: flex; inset: 0; justify-content: center; opacity: 0; padding: 1rem; pointer-events: none; position: fixed; transition: opacity .22s ease; z-index: 100; }
.job-progress-overlay.open { opacity: 1; pointer-events: auto; }
.job-progress-card { background: radial-gradient(circle at 85% 0, rgba(54,126,255,.15), transparent 19rem), #0d1b2d; border: 1px solid #315071; border-radius: 20px; box-shadow: 0 35px 90px rgba(0,0,0,.55); max-height: calc(100vh - 2rem); overflow-y: auto; padding: clamp(1.15rem,3vw,2rem); transform: translateY(12px) scale(.985); transition: transform .22s ease; width: min(760px,100%); }
.job-progress-overlay.open .job-progress-card { transform: translateY(0) scale(1); }
.job-worker-head { align-items: center; display: grid; gap: 1rem; grid-template-columns: auto 1fr auto; }
.job-worker-head h2 { font-size: clamp(1.15rem,2.5vw,1.6rem); font-weight: 800; margin-top: .15rem; }
.job-worker-head p:last-child { color: #8da0b8; font-size: .78rem; margin-top: .25rem; }
.job-worker-head > button { color: #8497af; font-size: 1.5rem; }
.job-worker-orbit { align-items: center; border: 1px solid #38618f; border-radius: 15px; color: #6ea7ff; display: flex; height: 50px; justify-content: center; position: relative; width: 50px; }
.job-worker-orbit span { animation: workerOrbit 1.6s linear infinite; border: 2px solid transparent; border-right-color: #ff9d42; border-top-color: #4e8fff; border-radius: 50%; inset: -5px; position: absolute; }
.job-progress-meta { display: grid; gap: .7rem; grid-template-columns: repeat(3,1fr); margin-top: 1.5rem; }
.job-progress-meta > div { background: #0a1728; border: 1px solid #29415f; border-radius: 11px; padding: .7rem .8rem; }
.job-progress-meta span { display: block; font-size: 1rem; font-weight: 800; }
.job-progress-meta small { color: #72859e; display: block; font-size: .62rem; margin-top: .08rem; text-transform: uppercase; }
.job-progress-track { background: #07111f; border-radius: 99px; height: 7px; margin: 1rem 0 1.25rem; overflow: hidden; }
.job-progress-track span { background: linear-gradient(90deg,#2f7dff,#24c875); border-radius: inherit; display: block; height: 100%; position: relative; transition: width .45s ease; width: 2%; }
.job-progress-track span::after { animation: progressGlint 1.3s linear infinite; background: linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent); content: ''; inset: 0; position: absolute; transform: translateX(-100%); }
.job-stage-list { display: grid; gap: .35rem; }
.job-stage-list li { align-items: center; border: 1px solid transparent; border-radius: 11px; color: #708199; display: grid; gap: .75rem; grid-template-columns: 30px 1fr 12px; padding: .58rem .7rem; transition: .25s ease; }
.job-stage-list li > i { text-align: center; }
.job-stage-list li div { display: flex; flex-direction: column; }
.job-stage-list strong { font-size: .75rem; }
.job-stage-list small { font-size: .64rem; margin-top: .08rem; }
.job-stage-list li > span { border: 1px solid #4a5d75; border-radius: 50%; height: 9px; width: 9px; }
.job-stage-list li.complete { color: #74dca5; }
.job-stage-list li.complete > span { background: #24c875; border-color: #24c875; }
.job-stage-list li.active { background: rgba(51,119,229,.11); border-color: rgba(74,141,255,.3); color: #e4edf8; }
.job-stage-list li.active > i { color: #65a1ff; }
.job-stage-list li.active > span { animation: tracePulse .9s infinite; background: #4e8fff; border-color: #4e8fff; box-shadow: 0 0 0 4px rgba(78,143,255,.12); }
.job-live-log { align-items: center; background: rgba(8,19,33,.76); border: 1px solid #29415f; border-radius: 10px; color: #92a4ba; display: flex; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: .67rem; gap: .6rem; margin-top: 1rem; padding: .65rem .75rem; }
.job-live-dot { animation: tracePulse .9s infinite; background: #24c875; border-radius: 50%; flex: 0 0 7px; height: 7px; width: 7px; }
.job-progress-card.complete .job-worker-orbit { color: #24c875; }
.job-progress-card.failed .job-worker-orbit { color: #f05252; }
@keyframes workerOrbit { to { transform: rotate(360deg); } }
@keyframes progressGlint { to { transform: translateX(100%); } }
@media (max-width: 560px) { .job-progress-meta { grid-template-columns: 1fr 1fr; } .job-progress-meta > div:last-child { grid-column: 1 / -1; } .job-stage-list small { display: none; } }
