/* ========================================
   Field of Practice Bar Graph Styles (UPDATED v2.0)
   Modern Horizontal Bar Chart Design
   ======================================== */

/* Field of Practice Summary Cards */
.summary-stat-card.card-purple {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(109, 40, 217, 0.1));
    border-color: rgba(147, 51, 234, 0.3);
}

.summary-stat-card.card-purple:hover {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.3), rgba(109, 40, 217, 0.2));
    border-color: rgba(147, 51, 234, 0.6);
}

.summary-stat-card.card-purple .summary-stat-icon {
    background: rgba(147, 51, 234, 0.15);
}

.summary-stat-card.card-purple .summary-stat-icon i {
    color: #9333ea;
}

/* ========================================
   MODERN HORIZONTAL BAR CHART DESIGN
   ALL BATCHES COMBINED
   ======================================== */

.horizontal-field-chart-wrapper {
    width: 100%;
    padding: 2rem 0;
}

.horizontal-field-chart-header {
    text-align: center;
    margin-bottom: 3rem;
}

.horizontal-field-chart-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.horizontal-field-chart-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.horizontal-field-chart-total {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.horizontal-field-chart-total i {
    color: #fbbf24;
    font-size: 1.1rem;
}

.horizontal-field-chart-total-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    margin-right: 0.25rem;
}

.horizontal-field-chart-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
}

/* Bar Container */
.horizontal-field-bars-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Individual Bar Item */
.horizontal-field-bar-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.horizontal-field-bar-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Bar Header - Label and Stats */
.horizontal-field-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.horizontal-field-bar-label-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.horizontal-field-bar-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}

.horizontal-field-bar-label {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.3;
    word-wrap: break-word;
}

.horizontal-field-bar-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.horizontal-field-bar-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    min-width: 60px;
    text-align: right;
}

.horizontal-field-bar-percentage {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 70px;
    text-align: right;
    padding: 0.35rem 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Progress Bar */
.horizontal-field-bar-progress {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.horizontal-field-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.horizontal-field-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Animation on load */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.horizontal-field-bar-item {
    animation: slideInRight 0.6s ease-out backwards;
}

.horizontal-field-bar-item:nth-child(1) { animation-delay: 0.1s; }
.horizontal-field-bar-item:nth-child(2) { animation-delay: 0.2s; }
.horizontal-field-bar-item:nth-child(3) { animation-delay: 0.3s; }
.horizontal-field-bar-item:nth-child(4) { animation-delay: 0.4s; }
.horizontal-field-bar-item:nth-child(5) { animation-delay: 0.5s; }
.horizontal-field-bar-item:nth-child(6) { animation-delay: 0.6s; }
.horizontal-field-bar-item:nth-child(7) { animation-delay: 0.7s; }
.horizontal-field-bar-item:nth-child(8) { animation-delay: 0.8s; }
.horizontal-field-bar-item:nth-child(9) { animation-delay: 0.9s; }
.horizontal-field-bar-item:nth-child(10) { animation-delay: 1s; }

/* ========================================
   BATCH MODAL FIELD OF PRACTICE GRAPH
   Same horizontal design for consistency
   ======================================== */

.batch-field-graph {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.batch-field-graph-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Reuse horizontal bar design for batch modal */
.batch-field-bars-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.batch-field-bar-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.batch-field-bar-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.batch-field-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.75rem;
}

.batch-field-bar-label-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.batch-field-bar-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.batch-field-bar-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
}

.batch-field-bar-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.batch-field-bar-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    min-width: 40px;
    text-align: right;
}

.batch-field-bar-percentage {
    font-size: 0.95rem;
    font-weight: 700;
    min-width: 55px;
    text-align: right;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.batch-field-bar-progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.batch-field-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BATCH MODAL: VERTICAL BAR CHART DESIGN
   Matching Reference Image Layout
   ======================================== */

.batch-field-graph-vertical {
    margin: 2rem 0 1.5rem 0;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.batch-field-graph-vertical .batch-field-graph-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 0.3px;
}

/* Legend at top */
.batch-field-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.batch-field-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.batch-field-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.batch-field-legend-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
}

/* Vertical Chart Container - WITH HORIZONTAL SCROLL ON MOBILE */
.batch-field-vertical-chart {
    width: 100%;
    padding: 1rem 0.5rem;
    overflow-x: auto; /* Enable horizontal scrolling */
    overflow-y: visible;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05); /* Firefox */
}

/* Webkit scrollbar styling */
.batch-field-vertical-chart::-webkit-scrollbar {
    height: 8px;
}

.batch-field-vertical-chart::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.batch-field-vertical-chart::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.batch-field-vertical-chart::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.batch-field-vertical-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    min-height: 300px;
    gap: 0.5rem;
    padding: 0 0.5rem 1rem 0.5rem;
    min-width: min-content; /* Ensure bars don't compress too much */
}

/* Individual Vertical Bar Item - FIXED WIDTH to prevent squishing */
.batch-field-vertical-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto; /* Don't grow or shrink */
    min-width: 90px; /* Increased from 80px for better spacing */
    max-width: 150px;
    width: 100px; /* Default width */
}

/* Bar Wrapper (fixed height container) */
.batch-field-vertical-bar-wrapper {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 0 0.5rem;
}

/* The actual bar */
.batch-field-vertical-bar {
    width: 100%;
    max-width: 60px;
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0.5rem;
    min-height: 40px; /* Minimum height for empty bars */
}

.batch-field-vertical-bar:hover {
    filter: brightness(1.15);
    transform: scaleY(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Empty bar styling (when value is 0) */
.batch-field-vertical-bar.empty-bar {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    box-shadow: none;
    min-height: 40px;
    height: 40px !important; /* Fixed height for empty bars */
}

.batch-field-vertical-bar.empty-bar:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    transform: none;
}

.batch-field-vertical-bar.empty-bar .batch-field-vertical-bar-value {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Value displayed at top of bar */
.batch-field-vertical-bar-value {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Label below bar */
.batch-field-vertical-bar-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.75rem;
    text-align: center;
    line-height: 1.3;
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word; /* Allow text to wrap */
    overflow-wrap: break-word; /* Better text wrapping */
    hyphens: auto; /* Optional: hyphenation for long words */
    padding: 0 0.25rem; /* Prevent text touching edges */
}

/* Percentage below label */
.batch-field-vertical-bar-percentage {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fbbf24;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(251, 191, 36, 0.15);
    border-radius: 6px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* ========================================
   RESPONSIVE DESIGN FOR VERTICAL BARS
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .batch-field-graph-vertical {
        padding: 1.5rem 1rem;
    }
    
    .batch-field-vertical-bars {
        min-height: 250px;
        gap: 0.4rem;
    }
    
    .batch-field-vertical-bar-wrapper {
        height: 220px;
    }
    
    .batch-field-vertical-bar-item {
        min-width: 70px;
    }
    
    .batch-field-vertical-bar {
        max-width: 50px;
    }
    
    .batch-field-vertical-bar-value {
        font-size: 0.95rem;
    }
    
    .batch-field-vertical-bar-label {
        font-size: 0.75rem;
        min-height: 2.4rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .batch-field-graph-vertical {
        padding: 1.25rem 0.75rem;
        margin: 1.5rem 0 1rem 0;
    }
    
    .batch-field-graph-vertical .batch-field-graph-title {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .batch-field-legend {
        gap: 0.75rem 1rem;
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .batch-field-legend-color {
        width: 12px;
        height: 12px;
    }
    
    .batch-field-legend-label {
        font-size: 0.75rem;
    }
    
    .batch-field-vertical-chart {
        padding: 0.75rem 0.25rem;
        /* Horizontal scroll enabled automatically */
    }
    
    .batch-field-vertical-bars {
        min-height: 200px;
        gap: 1rem; /* INCREASED: More space between bars to prevent overlap */
        padding: 0 0.75rem 0.75rem 0.75rem; /* INCREASED: More horizontal padding */
        justify-content: flex-start; /* Align to start for scrolling */
        min-width: calc(110px * 8 + 7rem); /* 110px per bar + gaps (8 categories) */
    }
    
    .batch-field-vertical-bar-wrapper {
        height: 180px;
    }
    
    .batch-field-vertical-bar-item {
        min-width: 105px; /* INCREASED: More space for text wrapping */
        width: 110px; /* INCREASED: Prevent label overlap */
        flex: 0 0 110px; /* Fixed width, no grow/shrink */
    }
    
    .batch-field-vertical-bar {
        max-width: 50px; /* Slightly wider bar */
    }
    
    .batch-field-vertical-bar.empty-bar {
        min-height: 35px;
        height: 35px !important;
    }
    
    .batch-field-vertical-bar-value {
        font-size: 0.85rem;
        padding-top: 0.4rem;
    }
    
    .batch-field-vertical-bar-label {
        font-size: 0.7rem;
        margin-top: 0.5rem;
        min-height: 2.6rem; /* INCREASED: More height for wrapped text */
        line-height: 1.2; /* TIGHTER: Better text wrapping */
        padding: 0 0.25rem; /* ADDED: Padding to prevent edge overlap */
        word-wrap: break-word; /* ADDED: Allow long words to break */
        overflow-wrap: break-word; /* ADDED: Better text wrapping */
    }
    
    .batch-field-vertical-bar-percentage {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .batch-field-graph-vertical {
        padding: 1rem 0.5rem;
    }
    
    .batch-field-graph-vertical .batch-field-graph-title {
        font-size: 0.95rem;
    }
    
    .batch-field-legend {
        gap: 0.5rem 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .batch-field-vertical-bars {
        min-height: 170px;
        gap: 0.75rem; /* INCREASED: More space between bars */
        justify-content: flex-start;
        min-width: calc(100px * 8 + 5.6rem); /* 100px per bar + gaps (8 categories) */
    }
    
    .batch-field-vertical-bar-wrapper {
        height: 160px;
    }
    
    .batch-field-vertical-bar-item {
        min-width: 95px; /* INCREASED: More space for labels */
        width: 100px; /* INCREASED: Prevent overlap */
        flex: 0 0 100px; /* Fixed width */
    }
    
    .batch-field-vertical-bar {
        max-width: 45px; /* Slightly wider */
    }
    
    .batch-field-vertical-bar.empty-bar {
        min-height: 32px;
        height: 32px !important;
    }
    
    .batch-field-vertical-bar-value {
        font-size: 0.75rem;
    }
    
    .batch-field-vertical-bar-label {
        font-size: 0.65rem;
        min-height: 2.4rem; /* INCREASED: More room for wrapped text */
        line-height: 1.15; /* TIGHTER: Better wrapping */
        padding: 0 0.2rem; /* ADDED: Prevent edge overlap */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .batch-field-vertical-bar-percentage {
        font-size: 0.7rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .batch-field-vertical-bars {
        min-height: 150px;
        gap: 0.6rem; /* INCREASED: More spacing */
        min-width: calc(90px * 8 + 4.8rem); /* 90px per bar + gaps (8 categories) */
    }
    
    .batch-field-vertical-bar-wrapper {
        height: 140px;
    }
    
    .batch-field-vertical-bar-item {
        min-width: 85px; /* INCREASED: More space */
        width: 90px; /* INCREASED: Prevent overlap */
        flex: 0 0 90px;
    }
    
    .batch-field-vertical-bar {
        max-width: 40px; /* Slightly wider */
    }
    
    .batch-field-vertical-bar.empty-bar {
        min-height: 28px;
        height: 28px !important;
    }
    
    .batch-field-vertical-bar-label {
        font-size: 0.6rem; /* SMALLER: Fit in space */
        min-height: 2.2rem; /* More room for wrapping */
        line-height: 1.1; /* Tighter */
        padding: 0 0.15rem; /* Prevent edge overlap */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Animation */
@keyframes growUp {
    from {
        height: 0%;
    }
    to {
        height: var(--target-height);
    }
}

/* Scroll hint for mobile - shows when content is scrollable */
@media (max-width: 768px) {
    .batch-field-vertical-chart::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 100px;
        background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.3));
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .batch-field-vertical-chart.scrollable::after {
        opacity: 1;
    }
    
    /* Hide scroll hint when scrolled to end */
    .batch-field-vertical-chart.scrolled-end::after {
        opacity: 0;
    }
}

/* ========================================
   END OF VERTICAL BAR CHART STYLES
   ======================================== */

/* ========================================
   LEGACY VERTICAL BAR SUPPORT (if needed)
   ======================================== */

/* Year Group for Field of Practice - UPDATED for Standardized Categories */
.year-group-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    width: 160px;
}

.bar-wrapper-field {
    width: 28px;
    height: var(--chart-area-percent);
    position: relative;
    display: flex;
    align-items: flex-end;
}

.bar-field {
    width: 100%;
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    animation: growUp 0.8s ease-out forwards;
    transform-origin: bottom;
}

.bar-field:hover {
    filter: brightness(1.2);
    transform: scaleY(1.05);
}

.bar-field .value-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.bar-field:hover .value-tooltip {
    opacity: 1;
}

.year-label-field {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    text-align: center;
}

@keyframes growUp {
    from {
        height: 0;
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet - 768px to 1024px */
@media (max-width: 1024px) {
    .horizontal-field-chart-title {
        font-size: 1.3rem;
    }
    
    .horizontal-field-bars-container {
        gap: 1rem;
        padding: 0 0.75rem;
    }
    
    .horizontal-field-bar-item {
        padding: 1rem;
    }
    
    .horizontal-field-bar-label {
        font-size: 0.95rem;
    }
    
    .horizontal-field-bar-count {
        font-size: 1.5rem;
        min-width: 50px;
    }
    
    .horizontal-field-bar-percentage {
        font-size: 1.1rem;
        min-width: 60px;
    }
}

/* Mobile Large - 481px to 768px */
@media (max-width: 768px) {
    .horizontal-field-chart-wrapper {
        padding: 1.5rem 0;
    }
    
    .horizontal-field-chart-header {
        margin-bottom: 2rem;
    }
    
    .horizontal-field-chart-title {
        font-size: 1.2rem;
    }
    
    .horizontal-field-chart-subtitle {
        font-size: 0.85rem;
    }
    
    .horizontal-field-chart-total {
        padding: 0.6rem 1.25rem;
    }
    
    .horizontal-field-chart-total-value {
        font-size: 1.3rem;
    }
    
    .horizontal-field-bars-container {
        gap: 0.85rem;
        padding: 0 0.5rem;
    }
    
    .horizontal-field-bar-item {
        padding: 0.85rem;
    }
    
    .horizontal-field-bar-header {
        flex-wrap: wrap;
    }
    
    .horizontal-field-bar-label {
        font-size: 0.9rem;
    }
    
    .horizontal-field-bar-count {
        font-size: 1.4rem;
        min-width: 45px;
    }
    
    .horizontal-field-bar-percentage {
        font-size: 1rem;
        min-width: 55px;
        font-weight: 700;
        background: rgba(0, 0, 0, 0.5);
        color: #ffffff !important;
    }
    
    .horizontal-field-bar-progress {
        height: 10px;
    }
    
    /* Batch modal adjustments */
    .batch-field-graph {
        padding: 1rem;
    }
    
    .batch-field-bar-item {
        padding: 0.75rem;
    }
}

/* Mobile - 320px to 480px */
@media (max-width: 480px) {
    .horizontal-field-chart-wrapper {
        padding: 1rem 0;
    }
    
    .horizontal-field-chart-header {
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .horizontal-field-chart-title {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .horizontal-field-chart-subtitle {
        font-size: 0.8rem;
    }
    
    .horizontal-field-chart-total {
        padding: 0.5rem 1rem;
        margin-top: 0.75rem;
    }
    
    .horizontal-field-chart-total i {
        font-size: 1rem;
    }
    
    .horizontal-field-chart-total-label {
        font-size: 0.75rem;
    }
    
    .horizontal-field-chart-total-value {
        font-size: 1.2rem;
    }
    
    .horizontal-field-bars-container {
        gap: 0.75rem;
        padding: 0 0.25rem;
    }
    
    .horizontal-field-bar-item {
        padding: 0.75rem;
        border-radius: 12px;
    }
    
    .horizontal-field-bar-item:hover {
        transform: translateX(4px);
    }
    
    .horizontal-field-bar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.6rem;
    }
    
    .horizontal-field-bar-label-wrapper {
        width: 100%;
        gap: 0.5rem;
    }
    
    .horizontal-field-bar-color-dot {
        width: 10px;
        height: 10px;
    }
    
    .horizontal-field-bar-label {
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    .horizontal-field-bar-stats {
        width: 100%;
        justify-content: space-between;
        gap: 0.75rem;
    }
    
    .horizontal-field-bar-count {
        font-size: 1.5rem;
        min-width: auto;
        order: 2;
    }
    
    .horizontal-field-bar-percentage {
        font-size: 0.95rem;
        min-width: auto;
        padding: 0.25rem 0.6rem;
        order: 1;
        background: rgba(0, 0, 0, 0.5);
        color: #ffffff !important;
        font-weight: 700;
    }
    
    .horizontal-field-bar-progress {
        height: 8px;
    }
    
    /* Batch modal mobile */
    .batch-field-graph {
        padding: 0.75rem 0.5rem;
    }
    
    .batch-field-graph-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .batch-field-bars-container {
        gap: 0.75rem;
    }
    
    .batch-field-bar-item {
        padding: 0.65rem;
    }
    
    .batch-field-bar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    
    .batch-field-bar-label {
        font-size: 0.8rem;
    }
    
    .batch-field-bar-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .batch-field-bar-count {
        font-size: 1.15rem;
        min-width: auto;
    }
    
    .batch-field-bar-percentage {
        font-size: 0.85rem;
        min-width: auto;
        background: rgba(0, 0, 0, 0.5);
        color: #ffffff !important;
        font-weight: 700;
    }
    
    .batch-field-bar-progress {
        height: 6px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .horizontal-field-chart-title {
        font-size: 1rem;
    }
    
    .horizontal-field-bar-label {
        font-size: 0.8rem;
    }
    
    .horizontal-field-bar-count {
        font-size: 1.3rem;
    }
    
    .horizontal-field-bar-percentage {
        font-size: 0.85rem;
        background: rgba(0, 0, 0, 0.5);
        color: #ffffff !important;
        font-weight: 700;
    }
}

/* ========================================
   SUMMARY STATISTICS CONTAINER
   ======================================== */

.board-stats-section {
    padding: 80px 20px;
    position: relative;
}

.section-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-top: -2rem;
    margin-bottom: 3rem;
}

.board-stats-summary-container {
    margin-bottom: 4rem;
}

.summary-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.summary-stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.summary-stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.summary-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.summary-stat-icon i {
    font-size: 1.5rem;
}

.summary-stat-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.summary-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.summary-stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Color variations for cards */
.summary-stat-card.card-green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.1));
    border-color: rgba(34, 197, 94, 0.3);
}

.summary-stat-card.card-green:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(22, 163, 74, 0.2));
    border-color: rgba(34, 197, 94, 0.6);
}

.summary-stat-card.card-green .summary-stat-icon {
    background: rgba(34, 197, 94, 0.15);
}

.summary-stat-card.card-green .summary-stat-icon i {
    color: #22c55e;
}

.summary-stat-card.card-orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.1));
    border-color: rgba(249, 115, 22, 0.3);
}

.summary-stat-card.card-orange:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.3), rgba(234, 88, 12, 0.2));
    border-color: rgba(249, 115, 22, 0.6);
}

.summary-stat-card.card-orange .summary-stat-icon {
    background: rgba(249, 115, 22, 0.15);
}

.summary-stat-card.card-orange .summary-stat-icon i {
    color: #f97316;
}

.summary-stat-card.card-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
    border-color: rgba(59, 130, 246, 0.3);
}

.summary-stat-card.card-blue:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.2));
    border-color: rgba(59, 130, 246, 0.6);
}

.summary-stat-card.card-blue .summary-stat-icon {
    background: rgba(59, 130, 246, 0.15);
}

.summary-stat-card.card-blue .summary-stat-icon i {
    color: #3b82f6;
}

.summary-stat-card.card-yellow {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(202, 138, 4, 0.1));
    border-color: rgba(234, 179, 8, 0.3);
}

.summary-stat-card.card-yellow:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.3), rgba(202, 138, 4, 0.2));
    border-color: rgba(234, 179, 8, 0.6);
}

.summary-stat-card.card-yellow .summary-stat-icon {
    background: rgba(234, 179, 8, 0.15);
}

.summary-stat-card.card-yellow .summary-stat-icon i {
    color: #eab308;
}

/* Bar Graph Container */
.summary-bar-graph {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Legacy graph components (hidden when using new horizontal design) */
.graph-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.legend-item-graph {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.legend-color-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.bar-graph-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.bar-graph-wrapper::-webkit-scrollbar {
    height: 8px;
}

.bar-graph-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.bar-graph-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.bar-graph-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bar-graph-container {
    --chart-area-percent: 250px;
    display: flex;
    gap: 30px;
    padding: 1rem 2rem;
    position: relative;
    min-height: 400px;
    align-items: flex-end;
}

.y-axis-graph {
    position: absolute;
    left: 0;
    bottom: 80px;
    height: var(--chart-area-percent);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding-right: 12px;
    z-index: 1;
}

.y-label-graph {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.grid-line-graph {
    position: absolute;
    left: 50px;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   ACCESSIBILITY & PRINT STYLES
   ======================================== */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .horizontal-field-bar-item,
    .horizontal-field-bar-fill,
    .batch-field-bar-fill {
        animation: none !important;
        transition: none !important;
    }
    
    .horizontal-field-bar-fill::after {
        animation: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .horizontal-field-bar-item,
    .batch-field-bar-item {
        border: 2px solid rgba(255, 255, 255, 0.4);
    }
    
    .horizontal-field-bar-progress,
    .batch-field-bar-progress {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

/* Print styles */
@media print {
    .horizontal-field-chart-wrapper,
    .batch-field-graph {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .horizontal-field-bar-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ========================================
   Responsive adjustments for summary cards
   ======================================== */

@media (max-width: 768px) {
    .summary-stats-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .summary-stat-value {
        font-size: 2rem;
    }
    
    .summary-bar-graph {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .summary-stats-cards {
        grid-template-columns: 1fr;
    }
    
    .summary-bar-graph {
        padding: 1.25rem 0.75rem;
    }
}
/* ================================================================
   FIELD-OF-PRACTICE BAR INTERACTIVE STATES
   Click-to-explore feature — active, dimmed, hint, field modal header
   ================================================================ */

/* ── Active bar: highlighted when clicked ─────────────────────── */
.horizontal-field-bar-item.active {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(10px) scale(1.01);
    z-index: 1;
}

/* ── Dimmed bars: all other bars when one is active ─────────────── */
.horizontal-field-bar-item.dimmed {
    opacity: 0.45;
    transform: translateX(0) scale(1);
    filter: grayscale(0.3);
}

.horizontal-field-bar-item.dimmed:hover {
    opacity: 0.65;
    transform: translateX(4px);
    filter: grayscale(0);
}

/* ── "Click to explore" hint row (hidden until hover / active) ─── */
.horizontal-field-bar-explore-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
    pointer-events: none;
    user-select: none;
}

.horizontal-field-bar-item:hover .horizontal-field-bar-explore-hint,
.horizontal-field-bar-item.active .horizontal-field-bar-explore-hint {
    opacity: 1;
    transform: translateY(0);
    color: rgba(255, 255, 255, 0.8);
}

.horizontal-field-bar-item.active .horizontal-field-bar-explore-hint {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.horizontal-field-bar-hint-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.horizontal-field-bar-item:hover .horizontal-field-bar-hint-arrow,
.horizontal-field-bar-item.active .horizontal-field-bar-hint-arrow {
    transform: translateX(4px);
}

/* Keyboard focus ring — accessibility */
.horizontal-field-bar-item:focus-visible {
    outline: 2px solid rgba(255, 215, 0, 0.8);
    outline-offset: 2px;
}

/* ── Field Modal Header — shown inside #batchTitle ────────────── */
.field-modal-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    margin-bottom: 0.5rem;
}

.field-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    border: 1px solid;
    width: fit-content;
    opacity: 0.9;
}

.field-modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    margin: 0;
}

.field-modal-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.field-modal-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
}

.field-modal-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ── Responsive adjustments ─────────────────────────────────────── */
@media (max-width: 768px) {
    .horizontal-field-bar-item.active {
        transform: translateX(6px) scale(1.005);
    }

    .horizontal-field-bar-explore-hint {
        font-size: 0.75rem;
        margin-top: 0.6rem;
        padding-top: 0.5rem;
    }

    .field-modal-title {
        font-size: 1.3rem;
    }

    .field-modal-badge {
        font-size: 0.68rem;
    }
}

@media (max-width: 480px) {
    .horizontal-field-bar-item.active {
        transform: translateX(4px) scale(1);
    }

    .horizontal-field-bar-explore-hint {
        font-size: 0.72rem;
        gap: 0.35rem;
    }

    .field-modal-title {
        font-size: 1.15rem;
    }

    .field-modal-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Reduced motion: skip transforms on active/dimmed */
@media (prefers-reduced-motion: reduce) {
    .horizontal-field-bar-item.active,
    .horizontal-field-bar-item.dimmed {
        transform: none !important;
        filter: none !important;
    }

    .horizontal-field-bar-explore-hint {
        transition: opacity 0.1s ease !important;
        transform: none !important;
    }
}