/* ===== APP CUSTOM CSS ===== */
/* Stylowanie interfejsu zgodne z PROMPT_STYLOWANIE_INTERFEJSU.md */

/* ===== 1. TYPOGRAFIA ===== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

body {
    font-size: 14px;
    color: #333;
    font-family: 'IBM Plex Sans', sans-serif;
}

/* Czarny tekst w polach formularza */
input, select, textarea {
    color: #000 !important;
}

/* ===== 2. GŁÓWNY KONTENER ===== */
.container-frnt {
    max-width: 95%;
    margin: 0 auto;
    background-color: #f8f9fa;
    border-radius: 6px;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.12);
    padding: 0 !important;
}
@media (max-width: 575.98px) {
    .container-frnt { max-width: 100%; border-radius: 0; box-shadow: none; }
}

.page-content { padding: 0 25px 20px 25px; }
@media (max-width: 991.98px) { .page-content { padding: 0 15px 15px 15px; } }
@media (max-width: 575.98px) { .page-content { padding: 0 12px 12px 12px; } }

/* ===== 4. PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    background-color: #e9ecef;
    padding: 12px 25px !important;
    margin: 0 0 0.25rem 0 !important;
    border: none;
    border-radius: 0;
}
.page-header:first-child { border-radius: 6px 6px 0 0; }
.page-header .icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f39200 0%, #e2001a 100%);
    color: #fff;
    font-size: 1.1rem;
    margin-right: 12px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 3px rgba(226,0,26,0.25);
}
.page-header h4 {
    font-weight: 700; font-size: 1.15rem; color: #212529; margin: 0;
}
.page-header small {
    color: #6c757d; font-size: 0.78rem;
}

/* ===== 5. SECTION HEADER ===== */
.section-header {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: #6c757d;
    padding-bottom: 0.4rem; margin-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    display: flex; align-items: center; gap: 0.5rem;
}
.section-header i { color: #f39200; }
.section-header a { text-decoration: none !important; }
.card-header a.badge { text-decoration: none !important; }

/* ===== 6. FORMULARZE ===== */
form label {
    font-size: 0.7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em;
    color: #6c757d;
    margin-bottom: 0.15rem;
}
form .form-check-label {
    font-size: 0.8rem; text-transform: none; font-weight: normal; color: #333;
}

.form-control, .form-select {
    font-size: 0.875rem;
    color: #000 !important;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.375rem 0.65rem;
}
.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.15rem rgba(13,110,253,0.15);
}

form .mb-3 { margin-bottom: 0.4rem !important; }
form .form-check { margin-bottom: 0.25rem; }

/* ===== 7. TABELE ===== */
.dt-micro-font { font-size: 0.83rem; }
.dt-micro-font th { font-size: 0.75rem; font-weight: 600; }
.table td, .table th { border-width: 1px !important; }
.table { border-width: 1px !important; }

/* ===== 8. BADGE ===== */
.badge {
    font-weight: 500; font-size: 0.72rem;
    padding: 0.3em 0.6em; border-radius: 0.25rem;
}
.badge.bg-info {
    background-color: #1a3a5c !important;
}

.filter-badge {
    opacity: 0.55; transition: all 0.15s ease; cursor: pointer;
    text-decoration: none;
}
.filter-badge:hover { opacity: 0.85; transform: translateY(-1px); }
.filter-badge.active {
    opacity: 1; font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.badge-outline-info    { border: 1px solid #0dcaf0; background: #fff; color: #0dcaf0; }
.badge-outline-success { border: 1px solid #198754; background: #fff; color: #198754; }
.badge-outline-danger  { border: 1px solid #dc3545; background: #fff; color: #dc3545; }
.badge-outline-warning { border: 1px solid #ffc107; background: #fff; color: #856404; }

/* ===== 8b. BADGE AKCJI W TABELACH ===== */
.action-badge {
    padding: 0.15em 0.35em !important;
    font-size: 0.88rem !important;
    text-decoration: none;
    margin: 0 1px !important;
}

/* Kolumna akcji — ikony zawsze w jednej linii */
td.akcje, th.akcje {
    white-space: nowrap !important;
    text-align: center !important;
}
td.akcje .action-badge {
    font-size: 0.88rem !important;
    padding: 0.15em 0.35em !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}
.action-badge-show { background-color: rgba(13,110,253,0.12) !important; color: #0d6efd !important; }
.action-badge-show:hover { background-color: rgba(13,110,253,0.22) !important; }
.action-badge-edit { background-color: #fff8e1 !important; color: #e65100 !important; }
.action-badge-edit:hover { background-color: #ffecb3 !important; }
.action-badge-config { background-color: #f0f0f0 !important; color: #555 !important; }
.action-badge-config:hover { background-color: #e0e0e0 !important; }
.action-badge-delete { background-color: #fde8e8 !important; color: #c62828 !important; }
.action-badge-delete:hover { background-color: #f5c6c6 !important; }
.action-badge-print { background-color: rgba(25,135,84,0.12) !important; color: #198754 !important; }
.action-badge-print:hover { background-color: rgba(25,135,84,0.22) !important; }

/* ===== 9. PRZYCISKI ===== */
.btn { border-radius: 0.25rem; font-size: 0.8rem; font-weight: 600; }
.btn-sm { padding: 0.25rem 0.65rem; font-size: 0.75rem; }

/* ===== 11. ZAKŁADKI ===== */
.nav-tabs .nav-link.active {
    font-weight: 700;
    border-bottom: 2px solid #0d6efd;
    background-color: #fff;
}
.nav-tabs .nav-link {
    color: #495057; font-size: 0.85rem;
}
.tab-content {
    background: #fff; padding: 15px;
    border: 1px solid #dee2e6; border-top: none;
    border-radius: 0 0 6px 6px;
}
@media (max-width: 991.98px) {
    .nav-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}

/* ===== 16. KLASY POMOCNICZE ===== */
.help-block { font-size: 0.72rem; font-style: italic; color: #6c757d; }
.mikro-label { font-size: 0.68rem; font-style: italic; color: #6c757d; margin-top: -4px; }
.bb-1 { border-bottom: 1px solid #e9ecef; }

/* ===== 19. PANEL HOME ===== */
.user-panel-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    margin-bottom: 10px;
}
.user-panel-card.compact-header {
    border: none;
    background: #e9ecef;
    padding: 12px 25px;
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 0;
}
.stats-box {
    background: #fff;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.stats-box h6 {
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 4px;
}
.stats-box h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}
.new-course-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #198754;
    border-radius: 6px;
    min-height: 80px;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
}
.new-course-btn:hover {
    background: #157347;
    transform: translateY(-2px);
    color: #fff;
}
.quick-actions .btn {
    min-height: 40px;
    font-size: 0.82rem;
    padding: 6px 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 400;
    transition: all 0.2s ease;
    margin-bottom: 6px;
}
.quick-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.quick-actions .btn i {
    font-size: 1.2rem;
    vertical-align: -2px;
    margin-right: 8px;
}
.table-container {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 10px;
}
.logo-compact {
    max-width: 100px;
}

/* ===== DATATABLES OVERRIDES ===== */

/* Eksport jako badge zamiast dużych guzików */
.dt-buttons .btn,
.buttons-html5,
.buttons-print {
    background-color: #ffc107 !important;
    border: none !important;
    color: #212529 !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    padding: 0.3em 0.6em !important;
    border-radius: 0.25rem !important;
    margin-right: 4px !important;
}
.dt-buttons .btn:hover,
.buttons-html5:hover {
    background-color: #e0a800 !important;
}

/* Kompaktowa paginacja */
.dataTables_paginate .paginate_button {
    font-size: 0.75rem !important;
    padding: 2px 8px !important;
}
.dataTables_paginate .paginate_button a {
    padding: 2px 6px !important;
    font-size: 0.75rem !important;
}

/* Małe pole wyszukiwania */
.dataTables_filter input {
    font-size: 0.8rem !important;
    padding: 0.2rem 0.5rem !important;
    width: 150px !important;
}
.dataTables_filter label {
    font-size: 0.8rem !important;
}

/* Ilość rekordów — zawsze kompaktowo */
.dataTables_length select {
    font-size: 0.8rem !important;
    padding: 0.2rem 0.4rem !important;
}
.dataTables_length label {
    font-size: 0.8rem !important;
}

/* Info */
.dataTables_info {
    font-size: 0.75rem !important;
    color: #6c757d !important;
}
