:root {
    --primary: #2563eb;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --secondary-gradient: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --emerald-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --purple-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --amber-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --rose-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --dark-surface: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.7);
    --glass-shadow: 0 12px 32px 0 rgba(31, 38, 135, 0.08);
}

html {
    height: 100%;
}

body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Ambient Background Glow Orbs */
.bg-orb-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.45;
    animation: orbFloat 14s ease-in-out infinite alternate;
}

.bg-orb-1 {
    top: -10%;
    right: -5%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #38bdf8 0%, #3b82f6 100%);
}

.bg-orb-2 {
    bottom: -10%;
    left: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #818cf8 0%, #c084fc 100%);
    animation-duration: 18s;
}

.bg-orb-3 {
    top: 40%;
    left: 45%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #34d399 0%, #38bdf8 100%);
    opacity: 0.25;
    animation-duration: 20s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
    100% { transform: translate(-30px, 50px) scale(0.95); }
}

.main-content {
    flex: 1 0 auto;
    position: relative;
    z-index: 1;
}

/* Navbar */
.navbar-custom {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.18);
    transition: all 0.3s ease;
}

.brand-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    font-size: 1.45rem;
    box-shadow: 0 4px 18px rgba(56, 189, 248, 0.4);
    position: relative;
    overflow: hidden;
}

.brand-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.4) 50%, transparent 60%);
    transform: rotate(45deg);
    animation: iconShine 4s infinite;
}

@keyframes iconShine {
    0%, 75% { transform: translateX(-150%) rotate(45deg); }
    100% { transform: translateX(150%) rotate(45deg); }
}

/* Live Clock Chip */
.live-clock-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 0.35rem 0.85rem;
    color: #e2e8f0;
    font-size: 0.82rem;
    font-family: monospace;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Glassmorphism Card Styling */
.custom-card {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.custom-card:hover {
    box-shadow: 0 16px 40px 0 rgba(31, 38, 135, 0.12);
}

/* Step Number Badges */
.step-number-badge {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    margin-right: 0.65rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

/* Category Selectable Cards */
.category-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    user-select: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.category-card:hover {
    border-color: #3b82f6;
    background: #f8faff;
    transform: translateY(-5px) scale(1.015);
    box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.18);
}

.category-card.active {
    border-color: #2563eb;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25), 0 16px 32px -6px rgba(37, 99, 235, 0.22);
    transform: translateY(-3px);
}

.category-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #38bdf8, #2563eb, #8b5cf6);
}

.category-radio-indicator {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    font-size: 15px;
    background: #ffffff;
}

.category-card:hover .category-radio-indicator {
    border-color: #2563eb;
    transform: scale(1.1);
}

.category-card.active .category-radio-indicator {
    border-color: #2563eb;
    background: #2563eb;
    color: white;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.category-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: transform 0.25s ease;
}

.category-card:hover .category-icon-box {
    transform: scale(1.12) rotate(4deg);
}

.category-title {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    line-height: 1.3;
}

.category-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.company-pill {
    font-size: 0.74rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    display: inline-block;
    transition: all 0.2s ease;
}

.category-card:hover .company-pill {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

/* Category Unique Icon Styles */
.cat-icon-blower { background: #e0f2fe; color: #0284c7; }
.cat-icon-carton { background: #fef3c7; color: #d97706; }
.cat-icon-coil { background: #fee2e2; color: #dc2626; }
.cat-icon-contactor { background: #e0e7ff; color: #4f46e5; }
.cat-icon-cooler { background: #ccfbf1; color: #0f766e; }
.cat-icon-filter { background: #dcfce7; color: #15803d; }
.cat-icon-foam { background: #f3e8ff; color: #7e22ce; }
.cat-icon-motor { background: #dbeafe; color: #1d4ed8; }

/* Dropzone Upload */
.upload-dropzone {
    border: 2.5px dashed #3b82f6;
    background: linear-gradient(135deg, #f8faff 0%, #eff6ff 100%);
    border-radius: 18px;
    padding: 2.4rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.upload-dropzone::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transition: all 0.5s ease;
}

.upload-dropzone:hover::before {
    left: 100%;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    background: #e0f2fe;
    border-color: #1d4ed8;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -5px rgba(37, 99, 235, 0.2);
}

.upload-icon {
    font-size: 3.2rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.25));
}

.upload-dropzone:hover .upload-icon {
    transform: scale(1.15) translateY(-4px);
}

/* File Selected Info Box */
.file-selected-box {
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-left: 5px solid #2563eb;
    border-radius: 14px;
    padding: 1.15rem 1.35rem;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.1);
    animation: fadeInSlide 0.35s ease;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Action CTA Button */
.btn-gradient-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.85rem 1.6rem;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-gradient-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 35%, rgba(255,255,255,0.3) 50%, transparent 65%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.btn-gradient-primary:hover::after {
    transform: translate(80%, 80%) rotate(45deg);
}

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.45);
}

.btn-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.8rem 1.6rem;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.btn-gradient-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.45);
}

/* Active Category Banner */
.active-category-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    border-radius: 18px;
    color: white;
    padding: 1.4rem 1.8rem;
    box-shadow: 0 12px 30px -5px rgba(30, 58, 138, 0.35);
    position: relative;
    overflow: hidden;
}

.active-category-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Stat Cards */
.stat-card {
    border-radius: 18px;
    padding: 1.35rem 1.45rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px -5px rgba(0, 0, 0, 0.08);
}

.stat-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: transform 0.25s ease;
}

.stat-card:hover .stat-icon-wrapper {
    transform: scale(1.1);
}

.stat-val {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0.35rem;
    font-family: 'Prompt', sans-serif;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Company specific badge & card colors */
.bg-grand-light { background-color: #dcfce7; color: #15803d; }
.bg-weight-light { background-color: #fee2e2; color: #b91c1c; }
.bg-item-light { background-color: #f1f5f9; color: #334155; }
.bg-month-light { background-color: #ccfbf1; color: #0f766e; }

/* Nav Pills Custom */
.nav-pills-custom .nav-link {
    color: #475569;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-pills-custom .nav-link.active {
    background: #1e3a8a;
    color: white;
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.3);
}

.nav-pills-custom .nav-link:hover:not(.active) {
    background: #e2e8f0;
}

/* DataTable Styling */
table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
}

table.dataTable thead th {
    background-color: #1e293b;
    color: #ffffff;
    font-weight: 600;
    border: none !important;
    padding: 14px 16px;
    font-size: 0.9rem;
    vertical-align: middle;
}

table.dataTable thead th:first-child {
    border-top-left-radius: 12px;
}

table.dataTable thead th:last-child {
    border-top-right-radius: 12px;
}

table.dataTable tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

table.dataTable tbody tr:hover {
    background-color: #f1f5f9 !important;
}

table.dataTable tfoot th {
    background-color: #f8fafc;
    border-top: 2px solid #cbd5e1 !important;
    border-bottom: 2px solid #cbd5e1 !important;
    font-weight: 700;
    color: #0f172a;
    padding: 12px 16px;
}

/* Badges */
.badge-item {
    background-color: #e2e8f0;
    color: #1e293b;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.88rem;
    border: 1px solid #cbd5e1;
}

.badge-month {
    background-color: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #bae6fd;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 320px;
    width: 100%;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.pulse-spinner {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #38bdf8;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse Highlight Animation */
@keyframes attentionPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.pulse-highlight {
    animation: attentionPulse 0.8s ease-in-out 2;
    border-color: #2563eb !important;
}

/* Premium Sticky Footer Styling */
.footer-custom {
    flex-shrink: 0;
    background: linear-gradient(135deg, #0b132b 0%, #1c2541 100%);
    color: #cbd5e1;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
    padding: 1.35rem 0;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.footer-dev-badge {
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}

.footer-dev-badge:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.8);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.footer-company-badge {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}

.footer-company-badge:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.8);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.footer-status-dot {
    width: 9px;
    height: 9px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px #10b981;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-back-to-top {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    cursor: pointer;
}

.btn-back-to-top:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    color: white;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
