:root {
    --bg-dark: #0a0a0c;
    --bg-surface: #141417;
    --primary-orange: #FF6B00;
    --primary-hover: #e56000;
    --text-white: #ffffff;
    --text-muted: #8b8d96;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --red: #ff4b4b;
    --green: #00d26a;
}

.red-text { color: var(--red); }
.section-title { margin-bottom: 1rem; color: var(--primary-orange); margin-top: 2rem; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; }
.section-title:first-of-type { margin-top: 0; }
.trend.up { color: var(--green); font-size: 0.8rem; background: rgba(0, 210, 106, 0.1); padding: 2px 6px; border-radius: 4px; margin-left: 5px; display: inline-block;}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tipografia e Cores Base */
h1, h2, h3 { font-weight: 600; }
.orange-text { color: var(--primary-orange); }

/* Header Topo */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    flex-shrink: 0;
}

.logo h1 {
    font-size: 1.4rem;
    letter-spacing: 2px;
    color: var(--text-white);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    font-size: 1.2rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name { font-weight: 600; font-size: 0.95rem; }
.user-role { font-size: 0.8rem; color: var(--primary-orange); }

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    overflow-x: auto;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.05);
    border-color: rgba(255, 107, 0, 0.2);
}

/* Layout Main (Desktop Sidebar) */
.app-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.app-nav {
    width: 250px;
    background: var(--bg-surface);
    border-right: 1px solid var(--glass-border);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item i { font-size: 1.4rem; }

.nav-item:hover, .nav-item.active {
    background: rgba(255, 107, 0, 0.1);
    color: var(--primary-orange);
}

.nav-quick-actions { color: var(--primary-orange); }
.nav-quick-actions i { color: var(--primary-orange); }
.nav-quick-actions-iconly { justify-content: center; }
.nav-quick-actions-iconly i { font-size: 1.6rem; margin: 0; }
.nav-quick-actions-iconly span { display: none; }
.quick-action-badge { display: inline-block; background: var(--primary-orange); color: #1c1c20; font-weight: 700; font-size: 0.7rem; padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    width: 100%;
    text-align: left;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.quick-action-card:hover {
    border-color: rgba(255, 107, 0, 0.45);
    background: rgba(255, 107, 0, 0.08);
}

.quick-action-card i {
    color: var(--primary-orange);
    font-size: 1.5rem;
}

.quick-action-card strong { display: block; margin-bottom: 0.25rem; }
.quick-action-card span { color: var(--text-muted); font-size: 0.86rem; line-height: 1.35; }

.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    min-width: 0;
    position: relative;
}

/* Pages Logic */
.page {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.page.active {
    display: block;
}

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

/* Dashboard Elements */
.page-header {
    margin-bottom: 2rem;
}

.page-header p {
    color: var(--text-muted);
    margin-top: 5px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: rgba(255, 107, 0, 0.5);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-icon.orange { background: rgba(255, 107, 0, 0.15); color: var(--primary-orange); }
.kpi-icon.red { background: rgba(255, 75, 75, 0.15); color: var(--red); }
.kpi-icon.green { background: rgba(0, 210, 106, 0.15); color: var(--green); }

.kpi-data p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 5px; }
.kpi-data h3 { font-size: 1.5rem; }

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.widget h3 { margin-bottom: 1.5rem; font-size: 1.2rem; display: flex; align-items: center; gap: 8px;}

.alert-list { list-style: none; display: flex; flex-direction: column; gap: 1rem;}
.alert-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.alert-info strong { display: block; font-weight: 500;}
.alert-info span { font-size: 0.85rem; color: var(--text-muted); }

/* Forms & Inputs */
.form-container { max-width: 600px; margin: 0 auto;}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.9rem;}

.glass-input {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.glass-input:focus { border-color: var(--primary-orange); }
select.glass-input { appearance: none; cursor: pointer; }

/* Buttons */
.btn-primary {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover { background: var(--primary-hover); transform: scale(1.02); }
.btn-primary:active { transform: scale(0.98); }

.btn-small {
    background: var(--glass-bg);
    border: 1px solid var(--primary-orange);
    color: var(--primary-orange);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-small:hover { background: var(--primary-orange); color: white; }
.btn-small.danger { border-color: var(--red); color: var(--red); }
.btn-small.danger:hover { background: var(--red); color: white; }

.badge.warning { background: rgba(255, 107, 0, 0.2); color: var(--primary-orange); padding: 4px 8px; border-radius: 4px; font-size: 0.8rem;}

/* Badge de Tipo (Estoque) */
.badge-tipo {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-tipo.material {
    background: rgba(255, 107, 0, 0.12);
    color: var(--primary-orange);
    border: 1px solid rgba(255, 107, 0, 0.25);
}

/* Badge de Movimentação (Estoque) */
.badge-mov {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-mov.entrada {
    background: rgba(0, 210, 106, 0.12);
    color: var(--green);
    border: 1px solid rgba(0, 210, 106, 0.25);
}

.badge-mov.saida {
    background: rgba(255, 75, 75, 0.12);
    color: var(--red);
    border: 1px solid rgba(255, 75, 75, 0.25);
}

.file-upload {
    background: rgba(0,0,0,0.2);
    border: 2px dashed var(--glass-border);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}
.file-upload i { font-size: 2rem; color: var(--primary-orange); display: block; margin-bottom: 10px;}
.file-upload:hover { border-color: var(--primary-orange); background: rgba(255, 107, 0, 0.05); }


/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.kanban-board::-webkit-scrollbar { height: 8px; }
.kanban-board::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.kanban-col {
    flex: 0 0 320px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kanban-header {
    font-weight: 600;
    color: var(--text-white);
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.kanban-header span {
    background: var(--glass-bg);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.kanban-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem;
    cursor: grab;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.dragging {
    opacity: 0.5;
    border: 2px dashed var(--primary-orange);
    transform: scale(1.02);
}

.kanban-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 107, 0, 0.4);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Special Column: Orçamentos Fechados */
.kanban-col.col-success {
    border: 2px solid rgba(0, 210, 106, 0.4);
    background: linear-gradient(180deg, rgba(0, 210, 106, 0.05) 0%, rgba(20, 20, 23, 0) 100%);
    box-shadow: 0 0 20px rgba(0, 210, 106, 0.1);
    min-width: 330px;
}

.kanban-col.col-success .kanban-header {
    border-bottom-color: rgba(0, 210, 106, 0.4);
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
}

.kanban-col.col-success .kanban-header span {
    background: rgba(0, 210, 106, 0.2);
    color: var(--text-white);
}

.kanban-col.col-success .kanban-card:hover {
    border-color: rgba(0, 210, 106, 0.5);
    box-shadow: 0 8px 20px rgba(0, 210, 106, 0.15);
}

.ri-trophy-fill {
    color: #FFD700;
    animation: pulseTrophy 2s infinite;
}

@keyframes pulseTrophy {
    0% { filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.4)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.9)); transform: scale(1.2); }
    100% { filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.4)); transform: scale(1); }
}

.k-card-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.k-card-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.k-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

.data-table th, .data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.data-table th {
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(0,0,0,0.3);
    font-size: 0.9rem;
}

.data-table tr {
    transition: background 0.2s;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* TOASTS */
.toast-container {
    position: fixed;
    bottom: 80px; /* Acima da navbar mobile */
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: rgba(20, 20, 23, 0.95);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--primary-orange);
    color: var(--text-white);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast i { font-size: 1.5rem; color: var(--primary-orange); }

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}


.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.modal-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 1.5rem; cursor: pointer; transition: color 0.2s;
}
.modal-close:hover { color: var(--red); }
.modal-close#modal-maximize:hover { color: #00CED1; }

/* Maximized Modal Styles */
.modal-content {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), width 0.3s ease, max-width 0.3s ease, height 0.3s ease, max-height 0.3s ease;
}


.modal-content.maximized {
    max-width: 95% !important;
    width: 95% !important;
    height: 90vh !important;
    display: flex;
    flex-direction: column;
}

.modal-content.maximized .modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.modal-content.maximized .conferencia-tabela-wrapper {
    max-height: none !important;
    flex: 1;
}



/* PWA / MOBILE STYLES */
@media (max-width: 768px) {
    .desktop-only { display: none; }
    
    .app-layout { flex-direction: column; }
    
    .app-header { padding: 1rem; }
    
    .content-area { padding: 1rem; padding-bottom: 80px; } /* Espaço pra Bottom Nav */
    
    .app-nav {
        flex-direction: row;
        width: 100%;
        height: 75px;
        position: fixed;
        bottom: 0;
        left: 0;
        background: rgba(20, 20, 23, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--glass-border);
        border-right: none;
        padding: 0 10px;
        justify-content: flex-start;
        align-items: center;
        z-index: 1000;
        gap: 5px;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Hide scrollbar for mobile nav */
    .app-nav::-webkit-scrollbar { display: none; }
    .app-nav { -ms-overflow-style: none; scrollbar-width: none; }
    
    .nav-item {
        flex-direction: column;
        padding: 8px 12px;
        gap: 4px;
        font-size: 0.75rem;
        border-radius: 8px;
        min-width: 75px;
        text-align: center;
    }
    
    .nav-item i { font-size: 1.3rem; }
    
    .nav-item.active, .nav-item:hover {
        background: transparent;
    }
    
    /* PWA Floating Action Button Effect */
    .mobile-fab .fab-inner {
        width: 50px;
        height: 50px;
        background: var(--primary-orange);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
        transform: translateY(-20px);
        border: 4px solid var(--bg-dark);
        transition: transform 0.2s;
    }
    
    .mobile-fab:active .fab-inner {
        transform: translateY(-15px) scale(0.95);
    }
    
    .mobile-header { text-align: center; margin-bottom: 1.5rem; }
}

/* LOGIN SCREEN STYLE */
.login-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #0a0a0c 0%, #141417 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s;
    opacity: 1;
    visibility: visible;
}

.login-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    width: 90%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: 20px;
    background: rgba(20, 20, 23, 0.95);
    border: 1px solid rgba(255, 107, 0, 0.2);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    text-align: left;
    animation: slideInDown 0.5s ease;
}

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

/* --- OUTRAS CLASSES GESTÃO DE FROTA --- */

.btn-frota-tab {
    background: none;
    border: none;
    color: var(--text-muted) !important;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.btn-frota-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white) !important;
}
.btn-frota-tab.active {
    background: var(--primary-orange) !important;
    color: var(--bg-dark) !important;
}

/* Categorias de Vistoria */
.vistoria-tabs-container {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-top: 1.5rem;
    overflow: hidden;
}
.vistoria-tabs-header {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.3);
}
.vistoria-tabs-header::-webkit-scrollbar { height: 4px; }
.vistoria-tabs-header::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 4px; }

.vistoria-tab-btn {
    background: transparent;
    color: var(--text-muted) !important;
    border: none;
    border-radius: 0;
    padding: 1rem 1.5rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.vistoria-tab-btn:hover {
    color: var(--text-white) !important;
    background: rgba(255,255,255,0.05);
}
.vistoria-tab-btn.active {
    color: var(--primary-orange) !important;
    border-bottom-color: var(--primary-orange);
    background: rgba(255, 107, 0, 0.05);
}

.vistoria-tab-content {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}
.vistoria-tab-content.active {
    display: block;
}

/* Grid de Inspeção */
.inspection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}
.inspection-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.inspection-item.has-error {
    border-color: var(--red);
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.2);
}
.item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.item-desc { flex-grow: 1; min-width: 250px; }
.item-desc h4 { margin-bottom: 0.35rem; font-size: 1.05rem; color: var(--text-white); }
.item-tip { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; display: flex; gap: 0.4rem; align-items: flex-start; }
.item-tip i { margin-top: 0.15rem; color: var(--primary-orange); }

.toggle-group {
    display: flex;
    gap: 0.5rem;
    background: rgba(0,0,0,0.3);
    padding: 4px;
    border-radius: 8px;
    flex-shrink: 0;
}
.toggle-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.toggle-btn:hover { background: rgba(255,255,255,0.05); }
.toggle-btn.active-ok {
    background: rgba(0, 210, 106, 0.2);
    color: var(--green);
    border-color: rgba(0, 210, 106, 0.3);
}
.toggle-btn.active-nok {
    background: rgba(255, 75, 75, 0.2);
    color: var(--red);
    border-color: rgba(255, 75, 75, 0.3);
}

.item-comment { width: 100%; }
.comment-input {
    width: 100%;
    background: rgba(0,0,0,0.15);
    border: 1px dashed var(--glass-border);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-radius: 8px;
    color: var(--text-white);
    outline: none;
}
.comment-input:focus {
    border-style: solid;
    border-color: var(--primary-orange);
}

/* Pneus */
.pneus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}
.pneu-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}
.pneu-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: color 0.3s;
}
.pneu-slider-container { margin-top: 1.5rem; }
.pneu-slider {
    width: 100%;
    accent-color: var(--primary-orange);
    margin: 1rem 0;
    cursor: pointer;
}
.pneu-status { font-weight: bold; font-size: 1.1rem; margin-top: 0.5rem; }
.status-ruim { color: var(--red); }
.status-regular { color: var(--primary-orange); }
.status-bom { color: var(--green); }

/* Vistorias / Relatórios */
.reports-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.report-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    flex-wrap: wrap;
    gap: 1rem;
}
.report-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.report-info h4 { color: var(--primary-orange); margin-bottom: 0.25rem; }
.report-info p { font-size: 0.9rem; color: var(--text-muted); }
.report-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}
.status-ok { background: rgba(0, 210, 106, 0.1); color: var(--green); }
.status-issue { background: rgba(255, 75, 75, 0.1); color: var(--red); }
.status-warning { background: rgba(255, 107, 0, 0.1); color: var(--primary-orange); }

/* Manutenções */
.maintenance-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}
.maintenance-item.urgent { border-left: 4px solid var(--red); }
.maintenance-item.upcoming { border-left: 4px solid var(--primary-orange); }
.maintenance-item.ok { border-left: 4px solid var(--green); }

.maintenance-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.maintenance-header h4 { color: var(--text-white); margin-bottom: 0; }
.maintenance-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.maintenance-dates { display: flex; gap: 1rem; font-size: 0.8rem; align-items: center; flex-wrap: wrap; }
.maintenance-dates div { background: rgba(0,0,0,0.2); padding: 0.4rem 0.6rem; border-radius: 4px; }

/* Cadastros */
.manage-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}
.manage-list::-webkit-scrollbar { width: 4px; }
.manage-list::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 4px; }
.manage-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.15);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}
.manage-list .btn-delete {
    background: transparent;
    color: var(--red);
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 4px;
}
.manage-list .btn-delete:hover {
    background: rgba(255, 75, 75, 0.2);
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

@media print {
    body * { visibility: hidden; }
    #app-modal, #app-modal * { visibility: visible; }
    #app-modal { position: absolute; left: 0; top: 0; width: 100%; height: auto; overflow: visible; background: white; color: black; z-index: 99999; }
    .modal-content { border: none; box-shadow: none; background: white !important; color: black !important; width: 100% !important; max-width: 100% !important; height: auto !important; position: static !important; transform: none !important; }
    .modal-close, #modal-maximize, .modal-header button, button, .btn-primary, .btn-secondary, #approval-actions, .actions { display: none !important; }
    .modal-body { overflow: visible !important; height: auto !important; }
}

/* ============ Painéis Departamentais (pd-*) ============ */
.pd-tabs { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; }
.pd-tabs .btn-small.btn-active { background: var(--primary-orange); color:#fff; }

.pd-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1rem; margin-bottom:1.25rem; }
.pd-kpi {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--primary-orange);
    border-radius: 12px;
    padding: 14px 16px;
}
.pd-kpi.red { border-left-color: var(--red); }
.pd-kpi.green { border-left-color: var(--green); }
.pd-kpi.warn { border-left-color: #ffb347; }
.pd-kpi .label { color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.pd-kpi .value { font-size: 1.6rem; font-weight: 700; color: var(--text-white); }
.pd-kpi.red .value { color: var(--red); }
.pd-kpi.green .value { color: var(--green); }

.pd-section-title { color: var(--primary-orange); text-transform: uppercase; letter-spacing: 1px; font-size: .95rem; margin: 1.5rem 0 .75rem; }

.pd-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 10px 0;
    color: var(--text-white);
}
.pd-card.urgente { border-color: rgba(255,75,75,.45); border-left: 4px solid var(--red); }
.pd-card.aprovada { border-left: 4px solid var(--green); }
.pd-card.muted { opacity: .65; border-style: dashed; }

.pd-card-head { display:flex; justify-content:space-between; align-items:center; gap: 12px; }
.pd-card-head.clickable { cursor: pointer; }
.pd-meta { color: var(--text-muted); font-size: .8rem; }
.pd-body { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--glass-border); }
.pd-body.hidden { display: none; }

.pd-chip { display:inline-block; background: rgba(255,255,255,.06); color: var(--text-white); padding: 2px 8px; border-radius: 999px; font-size: .72rem; border: 1px solid var(--glass-border); }
.pd-chip.red { background: rgba(255,75,75,.15); color: var(--red); border-color: rgba(255,75,75,.3); }
.pd-chip.green { background: rgba(0,210,106,.15); color: var(--green); border-color: rgba(0,210,106,.3); }
.pd-chip.orange { background: rgba(255,107,0,.15); color: var(--primary-orange); border-color: rgba(255,107,0,.3); }

.pd-actions { margin-top: 12px; display:flex; gap:8px; flex-wrap:wrap; }
.pd-actions .btn-small.primary { background: var(--primary-orange); color:#fff; border-color: var(--primary-orange); }
.pd-actions .btn-small.success { background: var(--green); color:#0a0a0c; border-color: var(--green); }
.pd-actions .btn-small.success:hover { background: #00b85d; color:#0a0a0c; }
.pd-actions .btn-small.warn { background: transparent; color:#ffb347; border-color:#ffb347; }
.pd-actions .btn-small.warn:hover { background:#ffb347; color:#0a0a0c; }

.pd-note { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--glass-border); font-size: .85rem; }
.pd-note.info { border-color: rgba(255,107,0,.3); background: rgba(255,107,0,.08); }
.pd-note.danger { border-color: rgba(255,75,75,.3); background: rgba(255,75,75,.08); }
.pd-note.success { border-color: rgba(0,210,106,.3); background: rgba(0,210,106,.08); }

.pd-list-empty { text-align:center; padding: 24px; color: var(--text-muted); }

.pd-table { width:100%; border-collapse: collapse; margin-top: 8px; font-size: .88rem; }
.pd-table th, .pd-table td { padding: 8px 10px; text-align: left; }
.pd-table thead th { background: rgba(255,255,255,.04); color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: .72rem; letter-spacing: .5px; border-bottom: 1px solid var(--glass-border); }
.pd-table tbody tr { border-top: 1px solid var(--glass-border); }
.pd-table td.num, .pd-table th.num { text-align: center; }
.pd-table input[type="number"] {
    width: 70px; background: rgba(0,0,0,.25); border: 1px solid var(--glass-border);
    color: var(--text-white); border-radius: 6px; padding: 4px 6px; font: inherit;
}
.pd-table input[type="number"]:disabled { opacity:.5; }

.pd-alert {
    background: rgba(255,107,0,.08);
    border-left: 4px solid var(--primary-orange);
    padding: 12px 14px; border-radius: 8px; margin: 8px 0;
}
.pd-alert.danger { background: rgba(255,75,75,.08); border-left-color: var(--red); }
.pd-alert.success { background: rgba(0,210,106,.08); border-left-color: var(--green); }
