/**
 * MTMP 360 Projects - Visual Polish 2026 v2.1
 * UX Expert Deep Audit Improvements - January 2026
 *
 * This file contains targeted CSS improvements based on actual component structure.
 * Focuses on CreateProject and ProjectDetail views.
 *
 * Key improvements:
 * 1. CollapsibleSection styling (chevron icons, badges)
 * 2. PhaseCard styling (expand icons, status indicators)
 * 3. Form section cards (visual hierarchy)
 * 4. Progress indicators (more prominent)
 * 5. Sidebar polish
 * 6. Horizontal scroll prevention (v2.1)
 */

/* ==========================================================================
   0. GLOBAL - PREVENT HORIZONTAL SCROLL
   ========================================================================== */

html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* CRITICAL: .page is the Blazor root container - must prevent overflow */
.page {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

.create-project-container,
.container-fluid,
main,
article {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Main content area - ensure it doesn't overflow */
.main-content {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Allow only phase navigator to scroll horizontally */
.phase-navigator-sticky {
    overflow-x: auto !important;
}

/* ==========================================================================
   1. COLLAPSIBLE SECTION - DEEP POLISH
   ========================================================================== */

/* Main container - add subtle shadow and better border */
.collapsible-section {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    overflow: hidden;
}

.collapsible-section:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.collapsible-section.expanded {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--medtronic-blue-interactive, #1010EB) !important;
}

/* Section header - improved styling */
.collapsible-section .section-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    padding: 18px 24px !important;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.collapsible-section .section-header:hover {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
}

.collapsible-section.expanded .section-header {
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border-bottom: 1px solid #e2e8f0;
}

/* CRITICAL: Chevron icon styling - make text icon look like a proper icon */
.collapsible-section .collapse-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    color: #64748b !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-right: 12px !important;
}

.collapsible-section .section-header:hover .collapse-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    color: var(--medtronic-blue-interactive, #1010EB) !important;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(16, 16, 235, 0.15);
}

.collapsible-section.expanded .collapse-icon {
    background: linear-gradient(135deg, var(--medtronic-blue-interactive, #1010EB) 0%, #0808cc 100%) !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(16, 16, 235, 0.3);
}

/* Section icon (emoji) - give it a background */
.collapsible-section .section-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%) !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    margin-right: 8px !important;
}

/* Section title - larger and bolder */
.collapsible-section .section-title {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    letter-spacing: -0.01em;
}

/* Badges - improved styling */
.collapsible-section .badge {
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.collapsible-section .badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    color: #92400e !important;
    border: 1px solid #fcd34d;
}

.collapsible-section .badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
    color: #065f46 !important;
    border: 1px solid #6ee7b7;
}

.collapsible-section .badge-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%) !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc;
}

/* Section content - smooth reveal */
.collapsible-section .section-content {
    padding: 24px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.collapsible-section .section-content.expanded {
    animation: sectionReveal 0.3s ease-out;
}

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

/* ==========================================================================
   2. PHASE CARD - PROJECT DETAIL VIEW POLISH
   ========================================================================== */

/* Phase card container */
.phase-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    margin-bottom: 16px !important;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.phase-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.phase-card.in-progress {
    border-color: var(--medtronic-blue-interactive, #1010EB) !important;
    border-width: 2px !important;
    box-shadow: 0 4px 16px rgba(16, 16, 235, 0.12);
}

.phase-card.completed {
    border-color: #10b981 !important;
}

/* Phase card header */
.phase-card .phase-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 18px 24px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.phase-card .phase-card-header:hover {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
}

.phase-card.in-progress .phase-card-header {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
}

.phase-card.completed .phase-card-header {
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%) !important;
}

/* Phase status icon - give it a circle background */
.phase-card .phase-status-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    font-size: 18px !important;
    margin-right: 12px !important;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.phase-card.completed .phase-status-icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
}

.phase-card.in-progress .phase-status-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
}

/* Phase name */
.phase-card .phase-name {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 0 !important;
}

/* Phase status badge */
.phase-card .phase-status-badge {
    padding: 4px 12px !important;
    border-radius: 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-left: 12px;
}

.phase-card .phase-status-badge.phase-status-completed {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
    color: #065f46 !important;
}

.phase-card .phase-status-badge.phase-status-in-progress {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    color: #1e40af !important;
}

.phase-card .phase-status-badge.phase-status-pending {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
    color: #6b7280 !important;
}

/* Progress text */
.phase-card .phase-progress-text {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    margin-right: 16px;
}

/* CRITICAL: Expand icon - style it like collapsible section */
.phase-card .expand-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    color: #64748b !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.phase-card .phase-card-header:hover .expand-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    color: var(--medtronic-blue-interactive, #1010EB) !important;
    transform: scale(1.1);
}

.phase-card .expand-icon.expanded {
    background: linear-gradient(135deg, var(--medtronic-blue-interactive, #1010EB) 0%, #0808cc 100%) !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(16, 16, 235, 0.3);
}

/* Phase card body */
.phase-card .phase-card-body {
    padding: 24px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-top: 1px solid #e2e8f0;
    animation: sectionReveal 0.3s ease-out;
}

/* ==========================================================================
   3. FORM SECTION CARDS - CREATE PROJECT VIEW
   ========================================================================== */

/* Form section card - improved depth */
.form-section-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    margin-bottom: 20px !important;
}

.form-section-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.form-section-card:focus-within {
    border-color: var(--medtronic-blue-interactive, #1010EB) !important;
    box-shadow: 0 0 0 3px rgba(16, 16, 235, 0.08);
}

/* Form section header */
.form-section-card .form-section-header {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    padding: 16px 24px !important;
    border-bottom: 1px solid #e2e8f0;
}

.form-section-card .form-section-header h5 {
    display: flex !important;
    align-items: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 0 !important;
    gap: 12px;
}

/* Section complete badge */
.form-section-card .section-complete-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

/* Form section body */
.form-section-card .form-section-body {
    padding: 24px !important;
    background: white;
}

/* ==========================================================================
   4. PROGRESS INDICATOR - MORE PROMINENT
   ========================================================================== */

.progress-indicator-enhanced {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border-left: 5px solid var(--medtronic-blue-interactive, #1010EB) !important;
    border-radius: 12px !important;
    padding: 20px 24px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 2px 8px rgba(16, 16, 235, 0.1);
}

.progress-indicator-enhanced .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-indicator-enhanced .progress-label {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

.progress-indicator-enhanced .progress-count {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--medtronic-blue-interactive, #1010EB) !important;
}

.progress-indicator-enhanced .progress-bar-container {
    height: 10px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: 5px !important;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-indicator-enhanced .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--medtronic-blue-interactive, #1010EB) 0%, #3b82f6 100%) !important;
    border-radius: 5px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(16, 16, 235, 0.3);
}

/* ==========================================================================
   5. PHASE NAVIGATOR (STICKY TABS) - PROJECT DETAIL
   ========================================================================== */

.phase-navigator-sticky {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: visible;  /* Changed to visible for dropdown */
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* Custom scrollbar for phase navigator */
.phase-navigator-sticky::-webkit-scrollbar {
    height: 6px;
}

.phase-navigator-sticky::-webkit-scrollbar-track {
    background: transparent;
}

.phase-navigator-sticky::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.phase-navigator-sticky::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.phase-tabs-container {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.phase-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
    max-width: 100px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid transparent;
    flex-shrink: 0;
}

.phase-tab:hover {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    transform: translateY(-2px);
}

.phase-tab.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.phase-tab.completed .phase-icon,
.phase-tab.completed .phase-name,
.phase-tab.completed .phase-progress {
    color: white !important;
}

.phase-tab.in-progress,
.phase-tab.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: scale(1.02);
}

.phase-tab.in-progress .phase-icon,
.phase-tab.in-progress .phase-name,
.phase-tab.in-progress .phase-progress,
.phase-tab.active .phase-icon,
.phase-tab.active .phase-name,
.phase-tab.active .phase-progress {
    color: white !important;
}

.phase-tab.pending {
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px dashed #d1d5db;
    color: #9ca3af;
}

.phase-tab .phase-icon {
    font-size: 16px;
    margin-bottom: 4px;
}

.phase-tab .phase-name {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.phase-tab .phase-progress {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.8;
}

.phase-arrow {
    color: #cbd5e1;
    font-size: 14px;
    margin: 0 2px;
    flex-shrink: 0;
}

/* Advance phase button */
.advance-phase-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.advance-phase-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   6. SIDEBAR - PROJECT OVERVIEW
   ========================================================================== */

.sidebar-content,
.project-overview-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 24px;
}

/* Header gets dark blue gradient - but ONLY the explicit .sidebar-header */
.project-overview-sidebar .sidebar-header {
    background: linear-gradient(135deg, var(--medtronic-blue-primary, #001E46) 0%, #002855 100%) !important;
    padding: 16px 20px !important;
    color: white;
    border-radius: 10px 10px 0 0 !important;
}

.project-overview-sidebar .sidebar-header h3,
.project-overview-sidebar .sidebar-header .sidebar-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #ffffff !important; /* FIX: Title was invisible (same color as background) */
}

.project-overview-sidebar .sidebar-header .sidebar-subtitle {
    color: rgba(255, 255, 255, 0.85) !important; /* FIX: Subtitle needs better contrast */
    font-size: 13px;
    margin-top: 4px;
}

.project-overview-sidebar .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.project-overview-sidebar .info-row:hover {
    background: #f8fafc;
}

.project-overview-sidebar .info-row:last-child {
    border-bottom: none;
}

.project-overview-sidebar .info-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 500;
}

.project-overview-sidebar .info-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.project-overview-sidebar .info-value code {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 12px;
}

/* -------------------------------------------------------------------------
   SIDEBAR LIGHT THEME - Full visibility fixes for labels, values, dividers
   FIX: Changed from dark theme (white text) to light theme (dark text)
   COMPACT: Reduced vertical spacing for more info visibility
   ------------------------------------------------------------------------- */

/* Header has dark background - white text for visibility */
.project-overview-sidebar .sidebar-header .sidebar-title {
    font-size: 15px !important;
    color: #ffffff !important; /* White on dark blue header */
}

.project-overview-sidebar .sidebar-header .sidebar-subtitle {
    font-size: 11px !important;
    margin-top: 2px !important;
    color: rgba(255, 255, 255, 0.85) !important; /* Semi-transparent white */
}

/* Sidebar sections - COMPACT vertical spacing */
.project-overview-sidebar .sidebar-section {
    padding: 10px 20px !important;
    border-bottom: 1px solid #e5e7eb !important; /* Light gray border */
}

.project-overview-sidebar .sidebar-section:last-child {
    border-bottom: none !important;
}

/* Labels - Dark uppercase text for light background, COMPACT */
.project-overview-sidebar .sidebar-label,
.project-overview-sidebar .section-label {
    color: #4b5563 !important; /* Gray-600 - visible on light bg */
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    margin-bottom: 4px !important;
    display: block !important;
}

/* Values - Dark text for light background, COMPACT */
.project-overview-sidebar .sidebar-value,
.project-overview-sidebar .section-value {
    color: #111827 !important; /* Gray-900 - dark for readability */
    font-size: 14px !important;
    font-weight: 600 !important;
    display: block !important;
}

/* Empty/placeholder values - muted gray */
.project-overview-sidebar .sidebar-value.empty,
.project-overview-sidebar .section-value.empty,
.project-overview-sidebar .sidebar-value .empty,
.project-overview-sidebar .section-value .empty {
    color: #9ca3af !important; /* Gray-400 - visible placeholder */
    font-style: italic !important;
    font-weight: 400 !important;
}

/* Code elements (Project ID, Asset Number) - COMPACT */
.project-overview-sidebar code {
    background-color: #f1f5f9 !important; /* Light slate bg */
    color: #059669 !important; /* Emerald-600 for accent */
    padding: 3px 8px !important;
    border-radius: 4px !important;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

/* Dividers - COMPACT, minimal margin */
.project-overview-sidebar .sidebar-divider,
.project-overview-sidebar hr {
    border: none !important;
    height: 1px !important;
    background: #e5e7eb !important; /* Light gray divider */
    margin: 0 !important;
}

.project-overview-sidebar .sidebar-divider.thick,
.project-overview-sidebar hr.thick {
    height: 2px !important;
    background: #d1d5db !important; /* Slightly darker for thick */
}

/* Status badges - COMPACT */
.project-overview-sidebar .status-badge {
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.project-overview-sidebar .status-badge.status-active {
    background-color: #10B981 !important;
    color: #ffffff !important;
    border: none !important;
}

.project-overview-sidebar .status-badge.status-draft {
    background-color: rgba(148, 163, 184, 0.9) !important;
    color: #1e293b !important;
}

.project-overview-sidebar .status-badge.status-completed {
    background-color: #0EA5E9 !important;
    color: #ffffff !important;
}

.project-overview-sidebar .status-badge.status-on-hold {
    background-color: #F59E0B !important;
    color: #1e293b !important;
}

/* Priority badges - COMPACT */
.project-overview-sidebar .priority-badge {
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.project-overview-sidebar .priority-badge.priority-critical {
    background-color: #EF4444 !important;
    color: #ffffff !important;
}

.project-overview-sidebar .priority-badge.priority-high {
    background-color: #F59E0B !important;
    color: #1e293b !important;
}

.project-overview-sidebar .priority-badge.priority-medium {
    background-color: #3B82F6 !important;
    color: #ffffff !important;
}

.project-overview-sidebar .priority-badge.priority-low {
    background-color: rgba(148, 163, 184, 0.9) !important;
    color: #1e293b !important;
}

/* Score/Rank display section - COMPACT */
.project-overview-sidebar .score-display {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    text-align: center !important;
    margin: 10px 20px !important;
}

.project-overview-sidebar .score-label {
    color: #4b5563 !important; /* Gray-600 for light background */
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    margin-bottom: 4px !important;
}

.project-overview-sidebar .score-value {
    color: #059669 !important; /* Emerald-600 - accent color */
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.project-overview-sidebar .score-subtitle {
    color: #374151 !important; /* Gray-700 for light background */
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-top: 4px !important;
}

/* Metadata rows - COMPACT */
.project-overview-sidebar .sidebar-metadata {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.project-overview-sidebar .metadata-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 4px 0 !important;
}

.project-overview-sidebar .metadata-row .label {
    color: #6b7280 !important; /* Gray-500 for light background */
    font-size: 12px !important;
    font-weight: 400 !important;
}

.project-overview-sidebar .metadata-row .value {
    color: #1f2937 !important; /* Gray-800 for light background */
    font-size: 12px !important;
    font-weight: 600 !important;
}

/* Inline icons/spans inside values - dark color for light bg */
.project-overview-sidebar .sidebar-value span,
.project-overview-sidebar .section-value span {
    color: #111827 !important; /* Gray-900 for readability */
}

/* Phase indicator in sidebar */
.project-overview-sidebar .sidebar-value span[aria-hidden="true"] {
    font-size: 16px !important;
}

/* ==========================================================================
   7. FORM FIELD POLISH
   ========================================================================== */

/* Field wrapper in dynamic fields */
.field-wrapper,
.field-group {
    margin-bottom: 16px;
}

.fields-grid {
    display: grid;
    gap: 16px;
}

.fields-grid.two-columns {
    grid-template-columns: repeat(2, 1fr);
}

.fields-grid.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .fields-grid.two-columns,
    .fields-grid.three-columns {
        grid-template-columns: 1fr;
    }
}

/* Form controls */
.form-select,
.form-control {
    border: 1.5px solid #d1d5db !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    background-color: #fafbfc !important;
}

.form-select:hover,
.form-control:hover {
    border-color: #9ca3af !important;
    background-color: white !important;
}

.form-select:focus,
.form-control:focus {
    border-color: var(--medtronic-blue-interactive, #1010EB) !important;
    box-shadow: 0 0 0 3px rgba(16, 16, 235, 0.1) !important;
    background-color: white !important;
    outline: none !important;
}

/* Form labels */
.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

/* ==========================================================================
   8. BUTTONS POLISH
   ========================================================================== */

.btn-primary {
    background: linear-gradient(135deg, var(--medtronic-blue-interactive, #1010EB) 0%, #0808cc 100%) !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(16, 16, 235, 0.25);
    transition: all 0.2s ease;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0808cc 0%, var(--medtronic-blue-primary, #001E46) 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 16, 235, 0.35);
}

.btn-outline-secondary {
    border: 2px solid #d1d5db !important;
    color: #4b5563 !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-outline-secondary:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #1f2937 !important;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* ==========================================================================
   9. INFO BANNERS IN SECTIONS
   ========================================================================== */

.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.info-banner.info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.info-banner.warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    color: #92400e;
}

.info-banner .icon {
    font-size: 18px;
    flex-shrink: 0;
}

.info-banner .message {
    line-height: 1.5;
}

/* ==========================================================================
   10. LOADING AND EMPTY STATES
   ========================================================================== */

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #64748b;
    font-size: 14px;
}

.no-fields-message {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-style: italic;
}

/* ==========================================================================
   11. RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 1024px) {
    .phase-tab {
        min-width: 75px;
        padding: 8px 12px;
    }

    .phase-tab .phase-name {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .collapsible-section .section-header {
        padding: 14px 16px !important;
    }

    .collapsible-section .section-content {
        padding: 16px !important;
    }

    .form-section-card .form-section-body {
        padding: 16px !important;
    }

    .phase-card .phase-card-header {
        padding: 14px 16px !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .phase-card .phase-card-body {
        padding: 16px !important;
    }
}

/* ==========================================================================
   10. ADMIN PAGES - COUNT BADGES & INTERACTIVE ELEMENTS
   ========================================================================== */

/* Count badge hover effects - applies to all admin tables */
.count-badge {
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 6px !important;
}

.count-badge:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.count-badge:active {
    transform: scale(1.05) !important;
}

/* Project Types - make badge columns clickable */
.badge[class*="bg-info"],
.badge[class*="bg-secondary"],
.badge[class*="bg-primary"] {
    transition: all 0.2s ease;
}

/* Enhanced table row hover for admin tables */
.table tbody tr:hover .badge {
    transform: scale(1.05);
}

/* Clickable badge in tables */
td .badge:not(.bg-success):not(.bg-danger):not(.bg-warning) {
    cursor: default;
}

/* Admin table enhanced hover */
.admin-table tbody tr,
.table-hover tbody tr {
    transition: all 0.15s ease;
}

.admin-table tbody tr:hover,
.table-hover tbody tr:hover {
    background-color: rgba(16, 16, 235, 0.03) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Expand/collapse chevron in admin tables */
.expand-chevron,
[class*="chevron"] {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.expand-chevron.expanded,
.expanded [class*="chevron"],
.bi-chevron-down {
    transform: rotate(0deg);
}

.expand-chevron:not(.expanded),
.bi-chevron-right {
    transform: rotate(-90deg);
}

/* Action buttons hover enhancement */
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-info:hover,
.btn-outline-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Tooltip enhancement for badges */
[title]:not([title=""]) {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
