/* =========================================
   PDEP - Gestão de Materiais
   CSS Principal
   ========================================= */

:root {
    --sidebar-bg: #212529;
    --primary: #0d6efd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    overflow-x: hidden;
}

.wrapper {
    min-height: calc(100vh - 56px);
}

.app-main {
    min-height: calc(100vh - 56px);
    background: #f4f6f9;
    padding: 1.5rem;
}

/* Sidebar */
.sidebar {
    --bs-offcanvas-width: 260px;
    transition: width 0.2s;
}

.sidebar .offcanvas-body {
    overflow-y: auto;
}

.sidebar .nav-link {
    border-radius: 6px;
    margin-bottom: 2px;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
}

/* Cards dashboard */
.card-stat {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .15s;
}
.card-stat:hover {
    transform: translateY(-3px);
}
.card-stat .icon-bg {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0.65rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}
.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.45rem;
    top: 0.35rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Tabela */
.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6c757d;
    border-top: none;
}

/* QR Code */
.qrcode-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
}
.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Cards detalhes */
.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
    letter-spacing: .05em;
}
.detail-value {
    font-size: 0.95rem;
}

/* Responsividade */
@media (min-width: 992px) {
    .sidebar {
        min-width: 240px;
        min-height: calc(100vh - 56px);
    }

    .sidebar .offcanvas-header {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .app-main {
        padding: 0.9rem;
    }

    .page-header {
        margin-bottom: 1rem;
    }

    .page-header h1 {
        font-size: 1.15rem;
    }

    .table th,
    .table td {
        white-space: nowrap;
    }
}
