/* ===================================================
   AND Monitor — CSS custom (mobile-first)
   =================================================== */

/* ── Mobile touch targets ── */
@media (max-width: 768px) {
    .btn { min-height: 48px; font-size: 1rem; }
    /* Previne zoom iOS pe focus input */
    .form-control,
    .form-select,
    textarea.form-control { font-size: 16px !important; min-height: 48px; }
    .nav-link { min-height: 44px; padding: 0.75rem 1rem; }
    .card { margin-bottom: 0.75rem; }
    .card-body { padding: 1rem; }
    .map-container-mobile { height: 300px !important; }
    .table td, .table th { white-space: nowrap; }
}

/* ── Buton raportare rapidă inspector (FAB) ── */
.btn-report-quick {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 1.5rem;
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Countdown timer ── */
.countdown-timer { font-size: 1.25rem; font-weight: 700; }

/* ── Timer progress bar ── */
.timer-bar { height: 8px; border-radius: 4px; transition: width 1s linear; }
.timer-bar.danger  { background: #dc3545; }
.timer-bar.warning { background: #ffc107; }
.timer-bar.safe    { background: #198754; }

/* ── Status badges ── */
.badge-new                           { background: #6c757d; }
.badge-assigned                      { background: #0d6efd; }
.badge-in_progress                   { background: #fd7e14; }
.badge-submitted,
.badge-submitted_by_company          { background: #6610f2; }
.badge-pending_inspector_verification { background: #d63384; }
.badge-verified,
.badge-accepted,
.badge-closed                        { background: #198754; }
.badge-rejected                      { background: #dc3545; }
.badge-overdue                       { background: #dc3545; animation: pulse 1.5s infinite; }
.badge-reopened                      { background: #fd7e14; }
.badge-cancelled                     { background: #6c757d; }
.badge-new                           { background: #6c757d; }

/* ── Severity left-border ── */
.severity-critical { border-left: 4px solid #dc3545 !important; }
.severity-high     { border-left: 4px solid #fd7e14 !important; }
.severity-medium   { border-left: 4px solid #ffc107 !important; }
.severity-low      { border-left: 4px solid #0dcaf0 !important; }

nav svg{
    width: 40px;
}

/* ── Puls animație overdue ── */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}

/* ── Sidebar compactă pe desktop ── */
.sidebar .nav-link i { min-width: 18px; }

/* ── Foto preview grid ── */
.photo-thumb {
    width: 80px; height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #dee2e6;
}

/* ── Îmbunătățiri mobile suplimentare ── */
@media (max-width: 576px) {
    /* Sidebar offcanvas link-uri mai mari pe touch */
    .offcanvas-sidebar .nav-link { min-height: 44px; display: flex; align-items: center; }
    /* Butoane acțiune mai vizibile */
    .btn-sm { min-height: 36px; padding: .35rem .65rem; }
    /* Header pagina mai compact */
    h4, h5 { font-size: .95rem; }
    /* dl row mai compact */
    .row.mb-0 dt, .row.mb-0 dd { font-size: .88rem; }
    /* Lightbox - prev/next mai accesibile pe touch */
    .media-lb-prev { left: -38px; padding: .6rem .5rem; }
    .media-lb-next { right: -38px; padding: .6rem .5rem; }
}

/* ── Hartă pe mobile - înălțime minimă ── */
@media (max-width: 768px) {
    #reportMap, .leaflet-container { min-height: 280px; }
    /* Previne butonul FAB să acopere content */
    .main-content { padding-bottom: 90px; }
}

/* ── Tabel cu scroll orizontal - toate instanțele ── */
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ── Card acțiune companie mai clar pe mobil ── */
@media (max-width: 768px) {
    .card-header .d-flex.gap-2 { flex-wrap: wrap; }
    .card-header .d-flex.gap-2 .btn { flex: 1 1 auto; }
}
