* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f172a 100%);
    min-height: 100vh;
    color: #e0e0e0; /* Default text color for dark theme */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 255, 26, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Style .logo supprimé car plus utilisé */

.page-header-logo {
    height: 40px; /* ou 50px pour correspondre à l'ancien .logo */
    width: auto;
    vertical-align: middle; /* Utile si display:flex n'est pas utilisé sur le parent, mais h1 l'utilise */
    margin-right: 10px; /* Ou utiliser le 'gap' du parent h1 */
    /* Pas besoin de display:flex/align-items/justify-content ici car c'est une image */
}

/* Navigation */
.nav {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none; /* For <a> tags used as buttons */
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    transform: translateY(-2px);
    background: rgba(0, 255, 26, 0.1);
    border-color: rgba(0, 255, 26, 0.3);
    box-shadow: 0 6px 20px rgba(0, 255, 26, 0.2);
    color: white; /* Ensure text color remains white on hover */
    text-decoration: none;
}

.nav-btn.active {
    background: linear-gradient(135deg, #00FF1A, #00d4aa);
    color: #1a1a2e;
    border-color: #00FF1A;
    box-shadow: 0 4px 15px rgba(0, 255, 26, 0.4);
}

/* Main Content */
.main-content { /* This class might be added to a wrapper around cards */
    display: grid;
    /* grid-template-columns: 1fr 1fr; */ /* Commented out to allow flexibility */
    gap: 30px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.05); /* Darker card background for better contrast on dark body */
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 255, 26, 0.15); /* Slightly more visible border */
    transition: all 0.3s ease;
    color: #e0e0e0; /* Text color inside cards */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border-color: rgba(0, 255, 26, 0.25);
}

.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: #ffffff; /* Brighter headings inside cards */
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00FF1A, #00d4aa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a2e;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 255, 26, 0.3);
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #bbbbbb; /* Lighter label color for dark theme */
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2); /* Lighter border for dark theme */
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05); /* Semi-transparent background */
    color: #e0e0e0; /* Text color for input */
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #00FF1A;
    box-shadow: 0 0 0 3px rgba(0, 255, 26, 0.25);
    background: rgba(255, 255, 255, 0.1); /* Slightly lighter on focus */
}

.form-control::placeholder { /* Standard */
  color: #888888;
  opacity: 1; /* Firefox */
}

/* Styling for select elements to match other form controls */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23bbbbbb' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px; /* Make space for the arrow */
}

/* Textarea to match */
textarea.form-control {
    min-height: 100px; /* Example height */
}


.btn-primary {
    background: linear-gradient(135deg, #00FF1A, #00d4aa);
    color: #1a1a2e;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 255, 26, 0.3);
    text-decoration: none;
    display: inline-flex; /* For icon alignment */
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 26, 0.4);
    background: linear-gradient(135deg, #00d4aa, #00FF1A);
    color: #1a1a2e; /* Ensure text color remains on hover */
    text-decoration: none;
}

.btn-primary .loading { /* For loading spinner */
    margin-left: 8px;
}

/* Secondary button style (example) */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}


/* Search Results */
.search-results {
    background: rgba(255, 255, 255, 0.05); /* Consistent with card background */
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 255, 26, 0.15);
    color: #e0e0e0;
}

.search-results h2 { /* Assuming h2 is used for "Résultats de recherche" */
    color: #ffffff;
    margin-bottom: 20px;
}

.result-item {
    background: rgba(255, 255, 255, 0.08); /* Slightly different from card for distinction */
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #00FF1A;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Softer shadow */
}

.result-item:hover {
    background: rgba(0, 255, 26, 0.05); /* Hover matches theme */
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 255, 26, 0.1);
}

.result-item h3 { /* For result titles */
    color: #00FF1A;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.2rem; /* Adjusted size */
}
.result-item p { /* For result descriptions */
    color: #cccccc; /* Lighter paragraph text */
    margin-bottom: 10px;
    font-size: 0.95rem;
}


/* Statistics & Event Chart Grid */
.stats-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Original for generic stats */
    grid-template-columns: repeat(auto-fit, minmax(calc(50% - 15px), 1fr)); /* For 2 per row, accounting for gap */
    gap: 30px; /* Increased gap slightly for larger charts */
    margin-bottom: 30px;
}

/* If .stats-grid is also used for the 4-column actual statistics cards,
   we might need a more specific class for the 2-column event chart layout.
   For now, assuming .stats-grid can be adapted or is primarily for this 2-column chart view.
   If the original 4-stat cards view breaks, we'll need a new class for this chart grid.
   Let's check base.html or other pages to see if .stats-grid is used elsewhere with different column expectations.
   The example HTML used it for 4 stat cards.
   The current report_web.html uses it for the event-specific charts.
   The example HTML from user also had a .stats-grid for 4 items.
   It is safer to make a new class or make this one more specific if it's reused.
   Given the plan, this is specifically for the "Graphiques de Progrès par Épreuve".
   Let's rename it to `.event-charts-grid` for clarity and safety.
*/

.event-charts-grid { /* New class for the event charts section */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(calc(50% - 15px), 1fr)); /* For 2 per row */
    /* A simpler version for exactly two columns, if auto-fit is not essential: */
    /* grid-template-columns: 1fr 1fr; */
    gap: 30px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px); /* Re-add if desired, was in example */
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 255, 26, 0.1);
    transition: all 0.3s ease;
    color: #e0e0e0;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 255, 26, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00FF1A;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 26, 0.5);
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Table Styling */
.table-custom-wrapper { /* Optional: wrapper for overflow-x */
    overflow-x: auto;
    margin-bottom: 1rem; /* Space below table */
}
table.table-custom {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.03); /* Darker table background */
    border-radius: 10px; /* Rounded corners for table */
    overflow: hidden; /* Clip content to rounded corners */
    margin-bottom: 0; /* Remove default margin if wrapper handles it */
}

table.table-custom th,
table.table-custom td {
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Lighter borders for dark theme */
    text-align: left;
    color: #cccccc; /* Default text color for cells */
    font-size: 0.9rem;
}

table.table-custom thead th {
    background-color: rgba(0, 255, 26, 0.1); /* Theme-colored header */
    color: #00FF1A; /* Bright green text for header */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

table.table-custom tbody tr {
    transition: background-color 0.3s ease;
}

table.table-custom tbody tr:hover {
    background-color: rgba(0, 255, 26, 0.08); /* Hover effect */
}

table.table-custom tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02); /* Subtle striping */
}
table.table-custom tbody tr:nth-child(even):hover {
    background-color: rgba(0, 255, 26, 0.1); /* Hover on even rows */
}

table.table-custom td a {
    color: #00FF1A;
    text-decoration: none;
}
table.table-custom td a:hover {
    text-decoration: underline;
    color: #00d4aa;
}

/* Icon buttons for table actions */
.btn-icon {
    background: transparent;
    border: none;
    color: #bbbbbb;
    padding: 5px;
    margin: 0 2px;
    border-radius: 5px;
    transition: all 0.2s ease;
}
.btn-icon:hover {
    color: #00FF1A;
    background: rgba(0, 255, 26, 0.1);
}
.btn-icon.delete:hover {
    color: #ff4d4d; /* Red for delete action */
    background: rgba(255, 77, 77, 0.1);
}
.btn-icon i { /* FontAwesome icons */
    font-size: 1rem;
}


/* Alerts */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.alert-dismissible .btn-close { /* Style for Bootstrap's close button if used */
    filter: invert(1) grayscale(100%) brightness(200%); /* Make it white */
    opacity: 0.7;
}
.alert-dismissible .btn-close:hover {
    opacity: 1;
}

.alert-success {
    background-color: rgba(0, 255, 26, 0.15);
    border-color: rgba(0, 255, 26, 0.3);
    color: #d4edda; /* Light green text */
}
.alert-danger {
    background-color: rgba(255, 77, 77, 0.15); /* Reddish */
    border-color: rgba(255, 77, 77, 0.3);
    color: #f8d7da; /* Light red text */
}
.alert-warning {
    background-color: rgba(255, 193, 7, 0.15); /* Yellowish */
    border-color: rgba(255, 193, 7, 0.3);
    color: #fff3cd; /* Light yellow text */
}
.alert-info {
    background-color: rgba(23, 162, 184, 0.15); /* Bluish */
    border-color: rgba(23, 162, 184, 0.3);
    color: #d1ecf1; /* Light blue text */
}

/* Footer Styling */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


/* Responsive */

/* Desktop first approach: styles above are for desktop by default.
   We will add media queries for smaller screens.
*/

/* Large tablets and small desktops (e.g., landscape tablets) */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    .header h1 {
        font-size: 2.2rem;
    }
}

/* Tablets (e.g., portrait tablets) */
@media (max-width: 992px) {
    .container {
        max-width: 960px;
        padding: 20px 15px; /* Adjusted padding */
    }

    .header h1 {
        font-size: 2rem;
    }
    .page-header-logo {
        height: 35px;
    }

    .nav-buttons {
        gap: 8px; /* Reduce gap between nav buttons */
    }
    .nav-btn {
        padding: 10px 20px; /* Slightly smaller nav buttons */
        font-size: 0.9rem;
    }

    .main-content.grid-cols-2,
    .event-charts-grid { /* Assuming 2 columns by default for event charts */
        grid-template-columns: 1fr; /* Stack to single column */
    }
    /* If stats-grid is meant to be more than 2 cols on desktop, adjust here */
    .stats-grid { /* Example: if stats-grid was 4 columns */
         grid-template-columns: repeat(auto-fit, minmax(calc(50% - 10px), 1fr)); /* Go to 2 columns */
    }


    .card {
        padding: 25px;
    }
    .card h2 {
        font-size: 1.4rem;
    }

    .form-control {
        padding: 10px 14px;
        font-size: 13px;
    }
    .btn-primary, .btn-secondary {
        padding: 12px 24px;
        font-size: 15px;
    }

    table.table-custom th,
    table.table-custom td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

/* Mobile devices (e.g., landscape phones and small tablets) */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 15px 20px;
        margin-bottom: 20px;
    }
    .header h1 {
        font-size: 1.8rem; /* Further reduce font size */
        flex-direction: column; /* Stack logo and title */
        text-align: center;
        gap: 10px;
    }
    .page-header-logo {
        height: 30px;
        margin-right: 0; /* Remove margin as it's centered */
        margin-bottom: 5px; /* Space between logo and title */
    }
    /* .logo selector might be old, ensure page-header-logo is used */
    /* .logo { margin-bottom: 10px; } */


    .nav {
        padding: 10px;
        margin-bottom: 20px;
    }
    .nav-buttons {
        flex-direction: column; /* Stack nav buttons */
        gap: 8px;
    }
    .nav-btn {
        width: 100%; /* Full width nav buttons */
        text-align: center;
        padding: 12px 15px; /* Adjust padding for full width */
        font-size: 0.95rem;
    }

    .main-content {
        grid-template-columns: 1fr; /* Ensure single column for all grids */
        gap: 20px;
        margin-bottom: 20px;
    }
    .stats-grid, .event-charts-grid {
        grid-template-columns: 1fr; /* Ensure single column */
        gap: 20px;
    }


    .card {
        padding: 20px;
        border-radius: 15px;
    }
    .card h1, .card h2, .card h3 {
        font-size: 1.25rem; /* Adjust card heading sizes */
        margin-bottom: 15px;
    }
    .card-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .form-group {
        margin-bottom: 15px;
    }
    .form-control {
        padding: 12px 16px; /* Re-adjust for better touch target */
        font-size: 14px; /* Ensure readability */
    }
    select.form-control {
        background-position: right 12px center;
        padding-right: 35px;
    }

    .btn-primary, .btn-secondary {
        padding: 12px 20px;
        font-size: 15px;
        /* width: 100%; */ /* Removed global full-width for all buttons */
        /* margin-bottom: 10px; */ /* Removed global margin */
    }
    /* Apply full width and margin only to buttons specifically marked */
    .btn-mobile-full-width {
        width: 100%;
        margin-bottom: 10px;
    }
    .btn-mobile-full-width:last-child {
        margin-bottom: 0;
    }
    /* If buttons are inline, you might not want full width always */
    /* Consider a specific class for full-width buttons on mobile e.g. .btn-full-mobile */


    .stat-card {
        padding: 20px;
    }
    .stat-number {
        font-size: 2rem;
    }
    .stat-label {
        font-size: 0.8rem;
    }

    /* Table adjustments for mobile */
    .table-custom-wrapper { /* Ensure this wrapper is used in HTML */
        overflow-x: auto; /* This is the primary way to handle wide tables */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    table.table-custom {
        /* Optional: Force table to not exceed viewport, relies on wrapper for scroll */
        /* max-width: 100%; */
        /* white-space: nowrap; /* Prevents text wrapping in cells, forcing scroll */
    }
    table.table-custom th,
    table.table-custom td {
        padding: 8px 10px;
        font-size: 0.8rem; /* Smaller font for table data on mobile */
        /* Consider white-space: nowrap; if content shouldn't wrap and scroll is preferred */
    }
    table.table-custom thead th {
        font-size: 0.75rem;
    }

    .search-results {
        padding: 20px;
        margin-top: 20px;
    }
    .result-item {
        padding: 15px;
    }
    .result-item h3 {
        font-size: 1.1rem;
    }
    .result-item p {
        font-size: 0.9rem;
    }

    .alert {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .footer {
        padding: 15px;
        font-size: 0.85rem;
    }

    canvas.chart-zoomed {
        width: 95vw !important;
        height: 85vh !important; /* Slightly less height on mobile for controls */
    }
}

/* Very small mobile screens (optional, if further refinement is needed) */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    .header h1 {
        font-size: 1.6rem;
    }
    .page-header-logo {
        height: 28px;
    }

    .card {
        padding: 15px;
    }
    .card h1, .card h2, .card h3 {
        font-size: 1.15rem;
    }

    .form-control, select.form-control {
        font-size: 13px; /* Ensure readability */
        padding: 10px 12px;
    }
    select.form-control { /* Adjust padding for arrow */
        padding-right: 30px;
    }


    .btn-primary, .btn-secondary {
        font-size: 14px;
        padding: 10px 15px;
    }

    /* Reduce padding further in table cells if necessary */
    table.table-custom th,
    table.table-custom td {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    table.table-custom thead th {
        font-size: 0.7rem;
    }
}


/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animation to cards and stat-cards if desired */
/* .card, .stat-card {
    animation: fadeInUp 0.6s ease forwards;
}
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; } */


.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle; /* Align with button text */
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Adjustments for Chart.js on dark theme */
/* These might need to be set via Chart.js options for full control */
.chart-container { /* Ensure this is used around canvas */
    position: relative;
    /* height: 400px; */ /* Let specific instances define height */
    width: 100%;
    background: rgba(255, 255, 255, 0.03); /* Slight background for chart area */
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px; /* Space below chart */
}

/* If Chart.js tooltips are not styled via options, try basic CSS (might be limited) */
.chartjs-tooltip {
    background: rgba(0,0,0,0.8) !important;
    color: white !important;
    border-radius: 5px !important;
    padding: 10px !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}

/* General link styling for dark theme if not covered by buttons/nav */
a {
    color: #00FF1A; /* Theme's primary green */
    text-decoration: none;
}
a:hover {
    color: #00d4aa; /* Lighter green or alternative */
    text-decoration: underline;
}

/* Ensure Bootstrap base styles don't interfere too much if still linked */
/* For example, Bootstrap's default body background and text color */
body.bootstrap-styles-active {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f172a 100%) !important;
    color: #e0e0e0 !important;
}

/* Remove Bootstrap's default link color if it overrides 'a' tags */
a, a:hover, a:focus {
    /* color: inherit; /* Or specific colors as defined above */
    /* text-decoration: none; /* Or as defined */
}

/* Utility class for visually hidden elements (if not using Bootstrap's .visually-hidden) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Progress bar styling */
.progress {
    height: 25px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}
.progress-bar {
    background: linear-gradient(135deg, #00FF1A, #00d4aa);
    color: #1a1a2e;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

/* Specific for flashed messages if using Bootstrap structure */
.alert .btn-close { /* If Bootstrap close button is used in alerts */
    background: none; /* Remove default Bootstrap styling */
    border: none;
    color: inherit; /* Inherit color from alert text */
    opacity: 0.7;
    font-size: 1.2rem; /* Adjust size if needed */
    padding: 0.5rem; /* Easier to click */
}
.alert .btn-close:hover {
    opacity: 1;
}

/* Ensure list styles are visible on dark background */
ul, ol {
    color: #cccccc; /* Adjust if lists are not styled specifically elsewhere */
}
ul li::marker, ol li::marker { /* For list bullets/numbers */
    color: #00FF1A; /* Theme color for markers */
}

/* Custom scrollbar for a more modern look (Webkit browsers) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #00FF1A;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00d4aa;
}

/* Styles for Enlarged Chart (Modal-like) */
canvas.chart-zoomed {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90vw !important;
    height: 90vh !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    z-index: 1055 !important; /* Ensure it's above overlay */
    background-color: #16213e !important; /* Dark background, a bit lighter than deepest body */
    padding: 20px !important;
    border-radius: 15px !important; /* Match card radius */
    box-shadow: 0 15px 40px rgba(0,0,0,0.5) !important; /* Stronger shadow for modal */
    border: 1px solid rgba(0, 255, 26, 0.2) !important; /* Theme border */
}

body.chart-enlarged-overlay::before { /* Modal background overlay */
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Slightly darker overlay */
    z-index: 1050; /* Below chart, above other content */
}

#cancelBtn {
    background-color: #e74c3c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin: 15px auto 0; /* Centered with margin top */
    display: none; /* Hidden by default */
}

#cancelBtn:hover {
    background-color: #c0392b;
}
