/**
 * raporty.css
 * Style dla strony automatycznych raportów emailowych
 * ProstyPrzetarg.pl
 */

/* ========== PAGE HEADER ========== */
.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    color: #1f2937;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h2 i {
    color: #2563eb;
    font-size: 24px;
}

.page-description {
    color: #6b7280;
    font-size: 15px;
    margin: 0;
}

/* ========== SECTION HEADERS ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h3 {
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h3 i {
    color: #2563eb;
}

.section-description {
    color: #6b7280;
    font-size: 14px;
    margin-top: 8px;
}

.section-divider {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 40px 0;
}

/* ========== CONFIG SECTION ========== */
.report-config-section {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.config-status {
    display: flex;
    align-items: center;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge i {
    font-size: 12px;
}

.status-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.status-active {
    background: #dcfce7;
    color: #16a34a;
}

.status-paused {
    background: #fef3c7;
    color: #d97706;
}

/* ========== FILTERS ========== */
.report-filters {
    margin: 24px 0;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group > label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group > label i {
    color: #2563eb;
    font-size: 14px;
}

.frequency-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.frequency-select:hover {
    border-color: #2563eb;
    background-color: #f9fafb;
}

.frequency-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.field-hint {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
}

/* Radius search panel adjustments for raporty */
.radius-search-panel {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

.radius-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

/* ========== ACTIONS ========== */
.report-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 2px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #2563eb;
    color: #2563eb;
}

.btn-danger {
    background: #ffffff;
    color: #dc2626;
    border: 2px solid #fecaca;
}

.btn-danger:hover {
    background: #fee2e2;
    border-color: #dc2626;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* ========== REPORT INFO ========== */
.report-info {
    background: #f0f9ff;
    border: 2px solid #bfdbfe;
    border-radius: 8px;
    padding: 20px;
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-item i {
    color: #2563eb;
    font-size: 18px;
    margin-top: 2px;
}

.info-item strong {
    display: block;
    color: #1e40af;
    font-size: 13px;
    margin-bottom: 4px;
}

.info-item span {
    color: #1f2937;
    font-size: 15px;
}

/* ========== CALENDAR ========== */
.report-history-section {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.calendar-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-month-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.calendar-nav-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #d1d5db;
    background: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    color: #374151;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: #f9fafb;
    border-color: #2563eb;
    color: #2563eb;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
    padding: 12px 0;
    background: #f9fafb;
    border-radius: 6px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day.empty {
    background: #f9fafb;
    border-color: #f3f4f6;
}

.calendar-day.has-report {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #2563eb;
    cursor: pointer;
}

.calendar-day.has-report:hover {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.day-number {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.calendar-day.has-report .day-number {
    color: #1e40af;
}

.report-count {
    font-size: 11px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.calendar-day.has-report .report-count {
    background: #2563eb;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid #d1d5db;
}

.legend-dot.has-report {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #2563eb;
}

.legend-dot.no-report {
    background: #ffffff;
    border-color: #e5e7eb;
}

/* ========== REPORT DETAILS ========== */
.report-details-section {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    animation: slideIn 0.3s ease-out;
}

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

.report-details-info {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.detail-badge {
    padding: 10px 16px;
    background: #f0f9ff;
    border: 2px solid #bfdbfe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1e40af;
}

.detail-badge i {
    color: #2563eb;
}

/* Loading indicator */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.loading i {
    font-size: 32px;
    color: #2563eb;
    margin-bottom: 16px;
}

.loading p {
    margin: 0;
    font-size: 15px;
}

/* ========== TENDERS TABLE (DESKTOP) ========== */
.tenders-table {
    width: 100%;
    border-collapse: collapse;
}

.tenders-table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}

.tender-table-row {
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
}

.tender-table-row:hover {
    background: rgba(102, 126, 234, 0.1);
}

.tenders-table .td-deadline {
    padding: 12px;
    white-space: nowrap;
    width: 100px;
}

.tenders-table .td-bzp {
    padding: 12px;
    white-space: nowrap;
    width: 170px;
}

.tenders-table .td-title {
    padding: 12px;
}

/* Dark mode tabela */
body.dark-theme .tender-table-row {
    border-bottom-color: #2d3748;
}

body.dark-theme .tender-table-row:hover {
    background: rgba(102, 126, 234, 0.2);
}

body.dark-theme .tenders-table thead th {
    border-bottom-color: #2d3748;
    color: #e4e4e7;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    /* ============ LAYOUT GŁÓWNY ============ */
    .sidebar {
        display: none !important;
    }
    
    .content {
        margin-left: 0 !important;
        padding: 0.5rem !important;
        padding-bottom: 75px !important;
    }
    
    .top-nav {
        height: 50px !important;
    }
    
    .nav-container {
        padding: 0 0.5rem !important;
    }
    
    .logo-img {
        width: 32px !important;
        height: 32px !important;
    }
    
    .logo-text {
        display: none !important;
    }
    
    .btn-user span {
        display: none !important;
    }
    
    .btn-user {
        padding: 0.3rem !important;
    }
    
    #theme-toggle {
        width: 32px !important;
        height: 32px !important;
    }
    
    .main-layout {
        margin-top: 50px !important;
    }
    
    .mobile-nav {
        display: flex !important;
    }
    
    /* ============ HEADER STRONY ============ */
    .page-header {
        margin-bottom: 0.75rem !important;
        padding: 0 !important;
    }
    
    .page-header h2 {
        font-size: 1.1rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .page-header h2 i {
        font-size: 1rem !important;
    }
    
    .page-description {
        font-size: 0.75rem !important;
        display: none !important;
    }
    
    /* ============ SEKCJE KONFIGURACJI ============ */
    .report-config-section,
    .report-history-section,
    .report-details-section {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        border-radius: 8px !important;
    }
    
    /* Header raportu - kompaktowy */
    .report-details-section .section-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        flex-wrap: nowrap !important;
    }
    
    .report-details-section .section-header h3 {
        font-size: 0.85rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    /* Przycisk Zamknij - tylko ikona */
    .report-details-section .section-header .btn-secondary {
        flex-shrink: 0 !important;
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Detail badges - kompaktowe */
    .report-details-info {
        gap: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .detail-badge {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
        gap: 0.4rem !important;
    }
    
    .detail-badge i {
        font-size: 0.7rem !important;
    }
    
    .section-header {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .section-header h3 {
        font-size: 0.9rem !important;
    }
    
    .section-header h3 i {
        font-size: 0.85rem !important;
    }
    
    .section-description {
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* ============ STATUS BADGE ============ */
    .status-badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.5rem !important;
    }
    
    /* ============ ACCORDIONY/PANELE ============ */
    .filter-accordion,
    .config-panel,
    .filter-panel {
        margin-bottom: 0.5rem !important;
    }
    
    .accordion-header,
    .filter-header {
        padding: 0.6rem 0.75rem !important;
        font-size: 0.85rem !important;
    }
    
    .accordion-content,
    .filter-content {
        padding: 0.5rem 0.75rem !important;
    }
    
    /* ============ FREQUENCY SELECT ============ */
    .frequency-select {
        padding: 0.5rem !important;
        font-size: 0.8rem !important;
    }
    
    /* ============ AKCJE ============ */
    .report-actions {
        flex-direction: column !important;
        gap: 0.4rem !important;
    }
    
    .report-actions button {
        width: 100% !important;
        padding: 0.5rem !important;
        font-size: 0.8rem !important;
    }
    
    /* ============ KALENDARZ ============ */
    .calendar-grid {
        gap: 2px !important;
    }
    
    .calendar-day-header {
        font-size: 0.6rem !important;
        padding: 0.25rem 0 !important;
    }
    
    .calendar-day {
        padding: 0.2rem !important;
        min-height: 32px !important;
    }
    
    .day-number {
        font-size: 0.75rem !important;
    }
    
    .report-count {
        font-size: 0.55rem !important;
        padding: 0.1rem 0.25rem !important;
    }
    
    /* ============ REPORT INFO ============ */
    .report-info {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    
    .report-info-item {
        padding: 0.5rem !important;
    }
    
    .report-info-item .label {
        font-size: 0.7rem !important;
    }
    
    .report-info-item .value {
        font-size: 0.8rem !important;
    }
    
    /* ============ RADIUS SEARCH ============ */
    .radius-search-panel {
        padding: 0.75rem !important;
        margin: 0.5rem 0 !important;
    }
    
    .radius-search-content h3 {
        font-size: 0.9rem !important;
    }
    
    .radius-search-description {
        font-size: 0.75rem !important;
        display: none !important;
    }
    
    .radius-input-group input[type="text"],
    .radius-slider-group input {
        padding: 0.5rem !important;
        font-size: 0.85rem !important;
    }
    
    /* ============ TABELA PRZETARGÓW - KARTY NA MOBILE ============ */
    
    /* KONTENER - wyłącz grid! */
    .tenders-grid,
    #reportTendersGrid,
    #tendersGrid {
        display: block !important;
        width: 100% !important;
        grid-template-columns: none !important;
    }
    
    .tenders-table {
        display: block !important;
        width: 100% !important;
        table-layout: fixed !important;
    }
    
    .tenders-table thead {
        display: none !important;
    }
    
    .tenders-table tbody {
        display: block !important;
        width: 100% !important;
    }
    
    .tenders-table tr,
    .tender-table-row {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: rgba(255,255,255,0.05) !important;
        border-radius: 8px !important;
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        cursor: pointer !important;
    }
    
    /* Ukryj Termin i Numer BZP */
    .tenders-table .td-deadline,
    .tenders-table .td-bzp,
    .tenders-table td:first-child,
    .tenders-table td:nth-child(2) {
        display: none !important;
    }
    
    /* Tytuł - widoczny, pełna szerokość */
    .tenders-table .td-title,
    .tenders-table td:nth-child(3),
    .tenders-table td:last-child {
        display: block !important;
        width: 100% !important;
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        color: #e4e4e7 !important;
        line-height: 1.4 !important;
        padding: 0 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    /* Light mode */
    body:not(.dark-theme) .tenders-table tr,
    body:not(.dark-theme) .tender-table-row {
        background: #f8f9fa !important;
        border-color: #e0e0e0 !important;
    }
    
    body:not(.dark-theme) .tenders-table .td-title,
    body:not(.dark-theme) .tenders-table td:last-child {
        color: #2c3e50 !important;
    }
}

/* ============ IPHONE SE ============ */
@media (max-width: 375px) {
    .content {
        padding: 0.4rem !important;
        padding-bottom: 70px !important;
    }
    
    .page-header h2 {
        font-size: 1rem !important;
    }
    
    .report-config-section,
    .report-history-section {
        padding: 0.5rem !important;
    }
    
    .section-header h3 {
        font-size: 0.85rem !important;
    }
    
    .accordion-header {
        padding: 0.5rem !important;
        font-size: 0.8rem !important;
    }
    
    .calendar-day {
        min-height: 28px !important;
    }
    
    .day-number {
        font-size: 0.7rem !important;
    }
}

/* ========== DARK MODE ========== */
body.dark-theme .report-config-section,
body.dark-theme .report-history-section,
body.dark-theme .report-details-section {
    background: #1a1f2e !important;
    border-color: #2d3748 !important;
}

body.dark-theme .page-header h2,
body.dark-theme .section-header h3,
body.dark-theme .calendar-month-title,
body.dark-theme .day-number {
    color: #e4e4e7 !important;
}

body.dark-theme .page-description,
body.dark-theme .section-description,
body.dark-theme .field-hint {
    color: #a1a1aa !important;
}

body.dark-theme .frequency-select {
    background: #0f1419 !important;
    color: #e4e4e7 !important;
    border-color: #2d3748 !important;
}

body.dark-theme .frequency-select:hover {
    background: #1a1f2e !important;
    border-color: #667eea !important;
}

body.dark-theme .calendar-day {
    background: #0f1419 !important;
    border-color: #2d3748 !important;
    color: #e4e4e7 !important;
}

body.dark-theme .calendar-day.empty {
    background: #1a1f2e !important;
    border-color: #2d3748 !important;
}

body.dark-theme .calendar-day.has-report {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    border-color: #667eea !important;
}

body.dark-theme .calendar-day.has-report:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
}

body.dark-theme .calendar-day-header {
    background: #1a1f2e !important;
    color: #a1a1aa !important;
}

body.dark-theme .calendar-nav-btn {
    background: #1a1f2e !important;
    border-color: #2d3748 !important;
    color: #e4e4e7 !important;
}

body.dark-theme .calendar-nav-btn:hover {
    background: #252b3b !important;
    border-color: #667eea !important;
    color: #667eea !important;
}

body.dark-theme .status-badge {
    background: #1a1f2e !important;
    color: #a1a1aa !important;
}

body.dark-theme .status-active {
    background: #064e3b !important;
    color: #34d399 !important;
}

body.dark-theme .status-paused {
    background: #78350f !important;
    color: #fbbf24 !important;
}

body.dark-theme .btn-secondary {
    background: #2d3748 !important;
    color: #e4e4e7 !important;
    border-color: #374151 !important;
}

body.dark-theme .btn-secondary:hover {
    background: #374151 !important;
}

body.dark-theme .btn-danger {
    background: #1a1f2e !important;
    color: #f87171 !important;
    border-color: #991b1b !important;
}

body.dark-theme .btn-danger:hover {
    background: #7f1d1d !important;
}

body.dark-theme .report-info {
    background: #1a1f2e !important;
    border-color: #2d3748 !important;
}

body.dark-theme .info-item strong {
    color: #60a5fa !important;
}

body.dark-theme .info-item span {
    color: #e4e4e7 !important;
}

body.dark-theme .loading {
    color: #a1a1aa !important;
}

body.dark-theme .detail-badge {
    background: #1a1f2e !important;
    border-color: #2d3748 !important;
    color: #60a5fa !important;
}

/* ========== COLLAPSE MECHANISM - FILTER SECTIONS ========== */
/* Style dla dropdownów - KRYTYCZNE! */

.filter-section {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.filter-header {
    background: #f9fafb;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
    user-select: none;
}

.filter-header:hover {
    background: #f3f4f6;
}

.filter-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-header h3 i {
    color: #2563eb;
    font-size: 18px;
}

.btn-collapse {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-collapse:hover {
    transform: scale(1.1);
}

/* KRYTYCZNE - Mechanizm collapse! */
.filter-body {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.3s ease-out;
}

.filter-body.collapsed {
    max-height: 0;
    padding: 0;
    overflow: hidden;
}

/* Dark Mode - Filter Sections */
body.dark-theme .filter-section {
    background: #1a1f2e;
    border-color: #2d3748;
}

body.dark-theme .filter-header {
    background: #252b3b;
}

body.dark-theme .filter-header:hover {
    background: #2d3748;
}

body.dark-theme .filter-header h3 {
    color: #e4e4e7;
}

body.dark-theme .btn-collapse {
    color: #667eea;
}

/* Adjust radius-search-panel inside filter-body */
.filter-body .radius-search-panel {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

body.dark-theme .filter-body .radius-search-panel {
    background: transparent !important;
}

/* Notice type checkboxes */
.notice-type-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.checkbox-label:hover {
    background: #f9fafb;
}

body.dark-theme .checkbox-label:hover {
    background: #252b3b;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 15px;
    color: #1f2937;
}

body.dark-theme .checkbox-label span {
    color: #e4e4e7;
}

/* ========== CRITICAL OVERRIDES - BIAŁE TŁA I CIEMNE LITERKI (LIGHT MODE) ========== */
/* MUSI BYĆ NA KOŃCU - nadpisuje wszystko! */

/* SearchCPVFilter - BIAŁE TŁO */
.search-cpv-filter,
.search-cpv-dropdown-container,
.search-cpv-subcategories-panel,
#cpvFilterContainer {
    background: #ffffff !important;
}

/* SearchCPVFilter - CIEMNE LITERKI */
.search-cpv-header label,
.search-cpv-dropdown,
.search-cpv-panel-title,
.search-cpv-checkbox-label {
    color: #1f2937 !important;
}

/* Radius Search Panel - BIAŁE TŁO */
.radius-search-panel,
.radius-search-content,
.radius-search-controls,
.radius-input-group,
.radius-slider-group {
    background: #ffffff !important;
}

/* Radius Search - CIEMNE LITERKI */
.radius-input-group label,
.radius-slider-group label,
.radius-search-content h3 {
    color: #1f2937 !important;
}

/* Input fields - BIAŁE TŁO, CIEMNE LITERKI */
.radius-input-group input[type="text"],
#radiusCityInput {
    background: #ffffff !important;
    color: #1f2937 !important;
}

/* Frequency select - BIAŁE TŁO */
.frequency-select {
    background: #ffffff !important;
    color: #374151 !important;
}

/* Filter group labels - CIEMNE LITERKI - BARDZIEJ SPECIFIC! */
.filter-group > label,
.filter-group label,
.report-filters .filter-group > label,
.report-filters label {
    color: #1f2937 !important;
    background: transparent !important;
}

/* WSZYSTKIE SEKCJE - BIAŁE TŁO */
.report-config-section,
.report-filters,
.filter-group {
    background: #ffffff !important;
}

/* CRITICAL: Tytuły sekcji - CIEMNE LITERKI */
.section-header h3,
.report-config-section .section-header h3,
.report-history-section .section-header h3 {
    color: #1f2937 !important;
    background: transparent !important;
}

/* Ikony w tytułach - niebieskie */
.section-header h3 i {
    color: #2563eb !important;
}

/* Ikony przy labelach - niebieskie */
.filter-group > label i,
.filter-group label i {
    color: #2563eb !important;
}

/* ========== DARK MODE OVERRIDES - Nadpisują CRITICAL dla dark mode ========== */
/* Te muszą być NA KOŃCU żeby nadpisać CRITICAL OVERRIDES */

/* SearchCPVFilter - CIEMNE TŁO W DARK MODE */
body.dark-theme .search-cpv-filter,
body.dark-theme .search-cpv-dropdown-container,
body.dark-theme .search-cpv-subcategories-panel,
body.dark-theme #cpvFilterContainer {
    background: #1a1f2e !important;
    border-color: #2d3748 !important;
}

/* SearchCPVFilter - JASNE LITERKI W DARK MODE */
body.dark-theme .search-cpv-header label,
body.dark-theme .search-cpv-dropdown,
body.dark-theme .search-cpv-panel-title,
body.dark-theme .search-cpv-checkbox-label {
    color: #e4e4e7 !important;
}

/* Radius Search Panel - CIEMNE TŁO W DARK MODE */
body.dark-theme .radius-search-panel,
body.dark-theme .radius-search-content,
body.dark-theme .radius-search-controls,
body.dark-theme .radius-input-group,
body.dark-theme .radius-slider-group {
    background: #1a1f2e !important;
    border-color: #2d3748 !important;
}

/* Radius Search - JASNE LITERKI W DARK MODE */
body.dark-theme .radius-input-group label,
body.dark-theme .radius-slider-group label,
body.dark-theme .radius-search-content h3,
body.dark-theme .radius-search-description {
    color: #e4e4e7 !important;
}

/* Input fields - CIEMNE TŁO W DARK MODE */
body.dark-theme .radius-input-group input[type="text"],
body.dark-theme #radiusCityInput {
    background: #0f1419 !important;
    color: #e4e4e7 !important;
    border-color: #2d3748 !important;
}

body.dark-theme .radius-input-group input[type="text"]:focus,
body.dark-theme #radiusCityInput:focus {
    background: #1a1f2e !important;
    border-color: #667eea !important;
}

/* Filter group labels - JASNE LITERKI W DARK MODE */
body.dark-theme .filter-group > label,
body.dark-theme .filter-group label,
body.dark-theme .report-filters .filter-group > label,
body.dark-theme .report-filters label {
    color: #e4e4e7 !important;
    background: transparent !important;
}

/* WSZYSTKIE SEKCJE - CIEMNE TŁO W DARK MODE */
body.dark-theme .report-config-section,
body.dark-theme .report-filters,
body.dark-theme .filter-group {
    background: #1a1f2e !important;
    border-color: #2d3748 !important;
}

/* Tytuły sekcji - JASNE LITERKI W DARK MODE */
body.dark-theme .section-header h3,
body.dark-theme .report-config-section .section-header h3,
body.dark-theme .report-history-section .section-header h3 {
    color: #e4e4e7 !important;
    background: transparent !important;
}

/* Ikony pozostają niebieskie w dark mode */
body.dark-theme .section-header h3 i,
body.dark-theme .filter-group > label i,
body.dark-theme .filter-group label i {
    color: #60a5fa !important;
}