/* Modern EMS Application Styling */

/* Enhanced Tab Styling with Progress Bar as Bottom Border */
.nav-tabs {
    border-bottom: none !important;
    background: white !important;
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

/* Progress Bar Background as Tab Bottom Border */
.nav-tabs::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: #dee2e6 !important;
    z-index: 1 !important;
}

/* Progress Bar Fill */
.nav-tabs::before {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 4px !important;
    background: #2563eb !important;
    transition: width 0.5s ease !important;
    z-index: 2 !important;
    width: var(--progress-width, 0%) !important;
}

.nav-tabs .nav-link {
    border: none !important;
    margin: 0 !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    border-bottom: 3px solid transparent !important;
    background: transparent !important;
    color: #495057 !important;
    text-align: center !important;
    flex: 1 1 20% !important;
    min-width: 0 !important;
    padding: 15px 90px !important;
    white-space: nowrap !important;
    position: relative !important;
    margin-bottom: -1px !important;
}

.nav-tabs .nav-link:hover {
    color: #2563eb !important;
}

.nav-tabs .nav-link.active {
    color: #2563eb !important;
    border-bottom: none !important;
    font-weight: 600 !important;
    background: transparent !important;
}

.tab-content {
    background: white !important;
    padding: 0 !important;
    min-height: 500px !important;
}

/* Enhanced Card Styling */
.card {
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

.card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Global card header styling - but NOT for simulation layers */
.card-header:not(.simulation-layer .card-header) {
    border-bottom: none !important;
    padding: 8px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Enhanced Button Styling */
.btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.btn-primary {
    background: #2563eb !important;
    border-color: #2563eb !important;
    box-shadow: none !important;
}

.btn-primary:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    box-shadow: none !important;
}

.btn-primary:active, .btn-primary.active {
    background: #1e40af !important;
    border-color: #1e40af !important;
}

.btn-success {
    background: #2563eb !important;
    border-color: #2563eb !important;
    box-shadow: none !important;
}

.btn-success:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    box-shadow: none !important;
}

.btn-danger {
    background: linear-gradient(145deg, #dc3545, #b02a37) !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3) !important;
}

.btn-warning {
    background: linear-gradient(145deg, #fd7e14, #e55100) !important;
    box-shadow: 0 4px 15px rgba(253, 126, 20, 0.3) !important;
}

/* Enhanced Progress Bar */
.progress {
    border-radius: 15px !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1) !important;
    background: linear-gradient(145deg, #e9ecef, #f8f9fa) !important;
    height: 20px !important;
}

.progress-bar {
    border-radius: 15px !important;
    background: #2563eb !important;
    transition: all 0.3s ease !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

/* Progress Bar Below Tabs - Flat Design */
.progress[style*="borderRadius: 0"] {
    border-radius: 0 !important;
    box-shadow: none !important;
    border-top: 1px solid #dee2e6 !important;
}

.progress[style*="borderRadius: 0"] .progress-bar {
    border-radius: 0 !important;
}

/* Time Resolution Button Styling */
.btn-outline-primary {
    color: #2563eb !important;
    border-color: #2563eb !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    color: white !important;
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

.btn-outline-primary.active,
.btn-outline-primary:active {
    color: white !important;
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

/* Consistent Button Group Styling */
.btn-group .btn {
    flex: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.btn-outline-success {
    color: #198754 !important;
    border-color: #198754 !important;
}

.btn-outline-success:hover {
    color: white !important;
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.btn-outline-warning {
    color: #fd7e14 !important;
    border-color: #fd7e14 !important;
}

.btn-outline-warning:hover {
    color: white !important;
    background-color: #fd7e14 !important;
    border-color: #fd7e14 !important;
}

/* Enhanced Input Styling */
.form-control, .form-select {
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
    transition: all 0.3s ease !important;
    padding: 10px 15px !important;
}

.form-control:focus, .form-select:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25) !important;
    transform: translateY(-1px) !important;
}

/* Upload Area Styling */
.upload-area {
    background: linear-gradient(145deg, #ffffff, #f8f9fa) !important;
    border: 3px dashed #3498db !important;
    border-radius: 20px !important;
    transition: all 0.3s ease !important;
}

.upload-area:hover {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef) !important;
    border-color: #2980b9 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.2) !important;
}

/* Animation for loading states */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.loading {
    animation: pulse 2s infinite !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-tabs .nav-link {
        font-size: 12px !important;
        padding: 8px 15px !important;
    }
    
    .tab-content {
        padding: 20px !important;
    }
    
    .card {
        margin-bottom: 15px !important;
    }
}

/* Dropdown z-index fixes */
.dropdown-menu {
    z-index: 9999 !important;
    position: absolute !important;
}

/* Bootstrap Select dropdown fixes */
.bootstrap-select .dropdown-menu {
    z-index: 9999 !important;
    position: absolute !important;
}

.bootstrap-select.btn-group .dropdown-menu {
    z-index: 9999 !important;
}

/* DBC Select dropdown fixes */
.Select__menu {
    z-index: 9999 !important;
    position: absolute !important;
}

/* General select dropdown fixes */
.form-select {
    z-index: auto !important;
}

.form-select:focus {
    z-index: 9999 !important;
}

/* Card container fixes to prevent overlap */
.card {
    position: relative !important;
    z-index: 1 !important;
}

.card:hover {
    z-index: 2 !important;
}

/* Action Buttons - Uniform Styling with Transparent Hover Effects */
.action-button {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.action-button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.action-button:hover::before {
    opacity: 1 !important;
}

.action-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

.action-button:active {
    transform: translateY(0px) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Text-Only Buttons - No borders, no boxes, just text */
.text-only-button {
    border: none !important;
    background: transparent !important;
    padding: 6px 12px !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.text-only-button:hover {
    background: transparent !important;
    transform: translateY(-1px) !important;
    opacity: 0.8 !important;
    box-shadow: none !important;
}

.text-only-button:active,
.text-only-button:focus,
.text-only-button:focus-visible {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Override Bootstrap link button defaults */
.btn-link.text-only-button {
    border: none !important;
    text-decoration: none !important;
}

.btn-link.text-only-button:hover {
    text-decoration: none !important;
    border: none !important;
}

/* Time Resolution Buttons - Clean transparent style with no boxes */
.time-resolution-btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: transparent !important;
    border-width: 2px !important;
}

/* Remove all backgrounds and boxes from active/focus states */
.time-resolution-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    background: transparent !important;
}

.time-resolution-btn:active,
.time-resolution-btn.active,
.time-resolution-btn:focus,
.time-resolution-btn:focus-visible {
    background: transparent !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.05) !important;
    transform: translateY(0px) !important;
}

/* Override Bootstrap default active state that creates blue boxes */
.btn-light.time-resolution-btn:active,
.btn-light.time-resolution-btn.active,
.btn-light.time-resolution-btn:focus {
    background-color: transparent !important;
    border-color: #dee2e6 !important;
}

.btn-light.time-resolution-btn:hover {
    background-color: transparent !important;
    border-color: #adb5bd !important;
}

/* Chart Cards - Better spacing */
.chart-card {
    margin-bottom: 20px !important;
}

.chart-card .card-body {
    padding: 15px !important;
}

/* Toast Notification Styling */
.toast {
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
}

.toast-header {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef) !important;
    border-bottom: none !important;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600 !important;
}

.toast-body {
    padding: 15px 20px !important;
    font-size: 0.95rem !important;
}

/* Better spacing for results section */
#chart-tabs {
    margin-top: 20px !important;
}

#chart-tabs .tab-content {
    padding-top: 0 !important;
}

/* Hover effects for strategy guide cards */
.hover-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-left-width: 5px !important;
}

/* Hover effect for entire strategy guide container */
.hover-card-container:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25) !important;
}

/* Hover effect for system specification titles */
.system-title-hover:hover {
    color: #10b981 !important;
}

/* ========================================================================== */
/* LAYERED SIMULATION CARDS STYLING - PROFESSIONAL EMS DESIGN */
/* ========================================================================== */

/* Layer container - smooth stacking and expansion */
.simulation-layer {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* Layer hover effect - ONLY on the card, NOT the header */
.simulation-layer:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 1000 !important;
}

/* Card styling within layers */
.simulation-layer .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* Header - cursor pointer only */
.simulation-layer .card-header {
    cursor: pointer !important;
    user-select: none !important;
}

/* Chevron rotation animation */
.simulation-layer i[id$="-chevron"] {
    transition: transform 0.3s ease !important;
}

/* Tab styling inside layers - professional look */
.simulation-layer .nav-tabs {
    border-bottom: 2px solid #e5e7eb !important;
    margin-bottom: 20px !important;
    background: transparent !important;
}

.simulation-layer .nav-link {
    padding: 12px 24px !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    color: #1f2937 !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    background: #f9fafb !important;
    border-radius: 6px 6px 0 0 !important;
}

.simulation-layer .nav-link:hover {
    color: #111827 !important;
    background-color: #e5e7eb !important;
    border-radius: 6px 6px 0 0 !important;
}

.simulation-layer .nav-link.active {
    color: #1f2937 !important;
    border-bottom-color: #2563eb !important;
    background-color: #dbeafe !important;
    font-weight: 600 !important;
}

/* Code/formula blocks styling */
.simulation-layer pre {
    background-color: #f8f9fa !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    padding: 16px !important;
    color: #1f2937 !important;
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
    overflow-x: auto !important;
}

/* Responsive stacking for mobile */
@media (max-width: 768px) {
    .simulation-layer {
        position: relative !important;
        margin-bottom: 15px !important;
    }
    
    #layered-cards-stack {
        padding-top: 0 !important;
    }
}

/* Dashboard Preview Image Hover Effect */
.dashboard-preview-img {
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.dashboard-preview-img:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25) !important;
}

/* Metric Title Hover Effect - Professional rounded rectangle with opacity */
.metric-title-hover {
    transition: all 0.2s ease !important;
    padding: 4px 8px !important;
    margin: -4px -8px !important;
    border-radius: 6px !important;
}

.metric-title-hover:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Sankey Tabs - Remove white background and integrate into gray box */
#sankey-meter-tabs.nav.nav-tabs {
    background: transparent !important;
    border: none !important;
}

#sankey-meter-tabs .nav-link {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
}

#sankey-meter-tabs .nav-link:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-bottom: 2px solid #2563eb !important;
}

#sankey-meter-tabs .nav-link.active {
    background: rgba(255, 255, 255, 0.5) !important;
    border-bottom: 2px solid #2563eb !important;
    font-weight: 600 !important;
}

#sankey-meter-tabs::after,
#sankey-meter-tabs::before {
    display: none !important;
}

/* Sample Download Button Hover Effect */
.sample-download-btn:hover {
    background-color: #059669 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5) !important;
}

.sample-download-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

/* Grid Connection Link Hover Effect */
.grid-connection-link:hover {
    font-weight: 700 !important;
}

/* Batch Group Tab - prevent flash on re-render */
.batch-group-tab {
    transition: background-color 0.15s ease, color 0.15s ease !important;
}
.batch-group-tab.inactive:hover {
    background-color: #cbd5e1 !important;
}
.batch-group-tab .batch-close-x:hover {
    opacity: 1 !important;
}

/* Batch Group Add (+) Button Effects */
#add-batch-group-btn:hover {
    background-color: #cbd5e1 !important;
    color: #334155 !important;
}
#add-batch-group-btn:active {
    background-color: #94a3b8 !important;
    color: #ffffff !important;
    transform: scale(0.93);
}

/* Batch summary table row click hover */
table tr[id*="batch-summary-row"]:hover td {
    background-color: #e0f2fe !important;
    cursor: pointer;
}

/* Tool Card Hover Effects */
.tool-card-hover:hover {
    border-color: #1e3a5f !important;
    box-shadow: 0 8px 25px rgba(30, 58, 95, 0.15) !important;
    transform: translateY(-2px);
}

/* Tool Start Button Click Effect */
.tool-start-btn:active {
    transform: scale(0.95) !important;
    background: #152a45 !important;
}

.tool-start-btn:hover {
    background: #2a4a6f !important;
}

/* Project Row Hover */
.project-row-hover:hover {
    background: #f8fafc !important;
}

/* Folder Row Hover */
.folder-row-hover:hover {
    background: #f1f5f9 !important;
}

/* =========================================
   ACTION BUTTON SYSTEM - Base + Hover
   ========================================= */

/* Launch button - dark blue */
.action-btn-launch {
    background: #1e3a5f !important;
    color: white !important;
    border: none !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
}
.action-btn-launch:hover {
    background: #2d5a8e !important;
    transform: scale(1.1) !important;
    box-shadow: 0 3px 12px rgba(30, 58, 95, 0.4) !important;
}

/* Edit / general button - transparent with gray border */
.action-btn-hover {
    background: transparent !important;
    border: 1px solid #e5e7eb !important;
    color: #6b7280 !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
}
.action-btn-hover:hover {
    background: #e8eef6 !important;
    border-color: #1e3a5f !important;
    color: #1e3a5f !important;
    transform: scale(1.1) !important;
    box-shadow: 0 3px 10px rgba(30, 58, 95, 0.25) !important;
}

/* Copy button - purple tint */
.action-btn-copy {
    background: transparent !important;
    border: 1px solid #c7d2fe !important;
    color: #4f46e5 !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
}
.action-btn-copy:hover {
    background: #ede9fe !important;
    border-color: #4f46e5 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25) !important;
}

/* Delete button - red tint */
.action-btn-delete-hover {
    background: transparent !important;
    border: 1px solid #fecaca !important;
    color: #ef4444 !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
}
.action-btn-delete-hover:hover {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.25) !important;
}

/* Wide New Project Button Hover */
.new-project-wide-hover {
    background: transparent !important;
    color: #64748b !important;
    border: 2px dashed #94a3b8 !important;
    transition: all 0.18s ease !important;
    cursor: pointer !important;
}
.new-project-wide-hover:hover {
    border-color: #1e3a5f !important;
    color: #1e3a5f !important;
    background: transparent !important;
    border-style: dashed !important;
    box-shadow: none !important;
    outline: none !important;
}

/* =========================================
   NEW WORKSPACE BUTTON - Light gray outline
   ========================================= */
.new-workspace-btn {
    background: transparent !important;
    color: #6b7280 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 20px !important;
    transition: all 0.15s ease !important;
    box-shadow: none !important;
    outline: none !important;
}
.new-workspace-btn:hover {
    background: #f3f4f6 !important;
    color: #1f2937 !important;
    border-color: #9ca3af !important;
    box-shadow: none !important;
}
.new-workspace-btn:active,
.new-workspace-btn:focus {
    background: #e5e7eb !important;
    color: #1f2937 !important;
    border-color: #6b7280 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* =========================================
   EDIT PROJECT MODAL - Modern Override
   ========================================= */
#edit-project-modal .modal-content {
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}
#edit-project-modal .modal-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 1rem 1.5rem !important;
}
#edit-project-modal .modal-header .btn-close {
    display: none !important;
}
#edit-project-modal .modal-body {
    padding: 1.5rem !important;
    background: white !important;
}
#edit-project-modal .modal-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 1rem 1.5rem !important;
}
#edit-project-cancel {
    transition: all 0.15s ease !important;
}
#edit-project-cancel:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #374151 !important;
}
#edit-project-save {
    transition: all 0.15s ease !important;
}
#edit-project-save:hover {
    background: #2d5a8e !important;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.3) !important;
}

/* =========================================
   DELETE PROJECT MODAL - Modern Override
   ========================================= */
#delete-project-modal .modal-content {
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}
#delete-project-modal .modal-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 1rem 1.5rem !important;
}
#delete-project-modal .modal-header .btn-close {
    display: none !important;
}
#delete-project-modal .modal-body {
    padding: 1.5rem !important;
    background: white !important;
}
#delete-project-modal .modal-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 1rem 1.5rem !important;
}
#delete-project-cancel {
    transition: all 0.15s ease !important;
}
#delete-project-cancel:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #374151 !important;
    box-shadow: none !important;
}
#delete-project-cancel:active {
    background: #e5e7eb !important;
    border-color: #6b7280 !important;
    transform: scale(0.97);
    box-shadow: none !important;
}
#delete-folder-cancel {
    transition: all 0.15s ease !important;
}
#delete-folder-cancel:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #374151 !important;
    box-shadow: none !important;
}
#delete-folder-cancel:active {
    background: #e5e7eb !important;
    border-color: #6b7280 !important;
    transform: scale(0.97);
    box-shadow: none !important;
}
#delete-project-confirm {
    transition: all 0.15s ease !important;
}
#delete-project-confirm:hover {
    background: #b91c1c !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3) !important;
}

/* =========================================
   UNIFIED MODAL BUTTONS - No shadow, press feel
   ========================================= */
.modal-btn-cancel {
    transition: all 0.15s ease !important;
    box-shadow: none !important;
    outline: none !important;
}
.modal-btn-cancel:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #374151 !important;
    box-shadow: none !important;
}
.modal-btn-cancel:active {
    background: #e5e7eb !important;
    border-color: #6b7280 !important;
    transform: scale(0.97);
    box-shadow: none !important;
}

.modal-btn-primary {
    transition: all 0.15s ease !important;
    box-shadow: none !important;
    outline: none !important;
}
.modal-btn-primary:hover {
    background: #2d5a8e !important;
    box-shadow: none !important;
}
.modal-btn-primary:active {
    background: #163152 !important;
    transform: scale(0.97);
    box-shadow: none !important;
}

.modal-btn-danger {
    transition: all 0.15s ease !important;
    box-shadow: none !important;
    outline: none !important;
}
.modal-btn-danger:hover {
    background: #b91c1c !important;
    box-shadow: none !important;
}
.modal-btn-danger:active {
    background: #991b1b !important;
    transform: scale(0.97);
    box-shadow: none !important;
}

/* =========================================
   EDIT/DELETE FOLDER MODAL - Match project modals
   ========================================= */
#modal-edit-folder .modal-content {
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}
#modal-edit-folder .modal-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 1rem 1.5rem !important;
}
#modal-edit-folder .modal-header .btn-close {
    display: none !important;
}
#modal-edit-folder .modal-body {
    padding: 1.5rem !important;
    background: white !important;
}
#modal-edit-folder .modal-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 1rem 1.5rem !important;
}

#delete-folder-modal .modal-content {
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}
#delete-folder-modal .modal-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 1rem 1.5rem !important;
}
#delete-folder-modal .modal-header .btn-close {
    display: none !important;
}
#delete-folder-modal .modal-body {
    padding: 1.5rem !important;
    background: white !important;
}
#delete-folder-modal .modal-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 1rem 1.5rem !important;
}

/* Make all project/folder modal buttons no-shadow on hover */
#edit-project-save:hover,
#save-folder-edit:hover {
    box-shadow: none !important;
}
#delete-project-confirm:hover,
#delete-folder-confirm:hover {
    box-shadow: none !important;
}

/* =========================================
   ALL PROJECTS RIBBON BUTTONS
   ========================================= */
.ribbon-btn {
    transition: all 0.15s ease !important;
    box-shadow: none !important;
    outline: none !important;
}
.ribbon-btn:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #374151 !important;
    box-shadow: none !important;
}
.ribbon-btn:active {
    background: #e5e7eb !important;
    border-color: #6b7280 !important;
    transform: scale(0.97);
    box-shadow: none !important;
}
.ribbon-btn:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Delete Selected ribbon button - red variant */
#all-projects-delete-selected {
    transition: all 0.15s ease !important;
    box-shadow: none !important;
    outline: none !important;
}
#all-projects-delete-selected:hover {
    background: #fef2f2 !important;
    border-color: #dc2626 !important;
    color: #b91c1c !important;
    box-shadow: none !important;
}
#all-projects-delete-selected:active {
    background: #fee2e2 !important;
    border-color: #b91c1c !important;
    transform: scale(0.97);
    box-shadow: none !important;
}
#all-projects-delete-selected:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* ============================================================
   Plotly Hover Label - Professional Rounded Tooltip
   ============================================================ */

/* Unified hover tooltip container (x unified mode) */
.plotly .hoverlayer .legend rect,
.plotly .hoverlayer .legend path {
    rx: 12px !important;
    ry: 12px !important;
}

/* Individual hover labels */
g.hoverlabel rect,
g.hoverlabel path,
.hoverlayer g rect,
.hoverlayer g path {
    rx: 10 !important;
    ry: 10 !important;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.10)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.06)) !important;
}

/* Spike lines (crosshair) - subtle styling */
.plotly .hoverlayer line.spikeline {
    stroke-dasharray: 4, 3 !important;
    stroke-width: 1px !important;
}

/* ============================================================
   Grid Violations Heatmap - Rounded Cell Corners
   ============================================================ */
/* SVG rect elements inside heatmap layer — use SVG attribute syntax */
.heatmaplayer rect,
.heatmap rect,
g.heatmaplayer rect,
g.heatmaplayer > g > rect,
.plot-container .heatmaplayer rect,
.plot g rect.heatmap {
    rx: 5 !important;
    ry: 5 !important;
}

/* Professional Plotly hover tooltip styling */
.plotly .hoverlayer .hovertext path {
    rx: 10px !important;
    ry: 10px !important;
    stroke-width: 1px !important;
    stroke: #cbd5e1 !important;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.10)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.06)) !important;
}

.plotly .hoverlayer .hovertext text {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* Unified hover box (x unified mode) */
.plotly .hoverlayer g.hovertext rect {
    rx: 10 !important;
    ry: 10 !important;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.10)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.06)) !important;
}

/* ============================================================
   Hover Tooltip Offset - Push tooltip to the RIGHT of spike line
   CSS 'translate' is an individual transform property applied ON
   TOP of the SVG transform attribute (per CSS Transforms Level 2).
   ============================================================ */
.hoverlayer .hovertext,
.hoverlayer > g {
    translate: 50px 0 !important;
}

/* ============================================================
   Mode Toggle - hover effect on inactive pill
   ============================================================ */
#mode-toggle-single:hover,
#mode-toggle-batch:hover {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
}

/* ============================================================
   Grid Violations scenario dropdown - match filter button style
   ============================================================ */
#grid-violations-scenario-dropdown .Select-control {
    height: 30px !important;
    min-height: 30px !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
    background-color: #f3f4f6 !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

#grid-violations-scenario-dropdown .Select-value,
#grid-violations-scenario-dropdown .Select-placeholder {
    line-height: 28px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    padding-left: 10px !important;
}

#grid-violations-scenario-dropdown .Select-value-label {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
}

#grid-violations-scenario-dropdown .Select-input {
    height: 28px !important;
    padding: 0 !important;
}

#grid-violations-scenario-dropdown .Select-arrow-zone {
    padding-right: 8px !important;
    vertical-align: middle !important;
}

#grid-violations-scenario-dropdown .Select-control:hover {
    background-color: #e5e7eb !important;
    border-color: #d1d5db !important;
}

/* ---- Batch Live Scenario Table ---- */
#batch-scenario-list table {
    border-spacing: 0;
}
#batch-scenario-list table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 1;
}
#batch-scenario-list table tbody tr:hover {
    background-color: #f1f5f9 !important;
}

/* ---- Batch Live Log Viewer ---- */
#batch-log-content {
    scroll-behavior: smooth;
}
#batch-log-toggle.btn-outline-dark {
    border-color: #94a3b8;
    color: #64748b;
}
#batch-log-toggle.btn-outline-dark:hover {
    background-color: #334155;
    border-color: #334155;
    color: #fff;
}
