/* ===== VARIÁVEIS E RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== HEADER ===== */
header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-title h1 {
    color: #1e3c72;
    font-size: 2em;
}

.subtitle {
    color: #666;
    margin-top: 5px;
}

/* ===== DASHBOARD ===== */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.card:hover { transform: translateY(-5px); }

.card h3 {
    color: #555;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card .number {
    font-size: 2.5em;
    font-weight: bold;
    color: #1e3c72;
    margin: 10px 0;
}

.card.warning .number { color: #fbbf24; }
.card.danger .number { color: #ef4444; }

/* ===== AMBULÂNCIA ===== */
.ambulance-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ambulance-btn {
    padding: 10px 20px;
    border: 2px solid #1e3c72;
    background: white;
    color: #1e3c72;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    flex: 1;
    min-width: 120px;
}

.ambulance-btn.active {
    background: #1e3c72;
    color: white;
    box-shadow: 0 4px 6px rgba(30, 60, 114, 0.3);
}

.ambulance-btn:hover {
    background: #1e3c72;
    color: white;
    transform: translateY(-2px);
}

.ambulance-info {
    background: #e8f4fd;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-weight: 500;
    color: #1e3c72;
    border-left: 4px solid #1e3c72;
}

/* ===== SEÇÕES ===== */
.section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.section h2 {
    color: #1e3c72;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* ===== TÓPICOS EXPANSÍVEIS ===== */
.topicos-container {
    margin-top: 20px;
}

.topico {
    margin-bottom: 15px;
    border: 2px solid #1e3c72;
    border-radius: 8px;
    overflow: hidden;
}

.topico-header {
    background: #1e3c72;
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.topico-header:hover { background: #2a5298; }

.topico-header .badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.topico-header .icone {
    font-size: 1.2em;
    transition: transform 0.3s;
}

.topico.aberto .topico-header .icone {
    transform: rotate(180deg);
}

.topico-conteudo {
    display: none;
    padding: 20px;
    background: #f8f9fa;
}

.topico.aberto .topico-conteudo {
    display: block;
}

/* ===== ITENS DO CHECKLIST ===== */
.itens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.item-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.item-card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-color: #1e3c72;
}

.item-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.item-cota {
    background: #1e3c72;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

.item-nome {
    font-weight: 600;
    color: #333;
    margin-left: 10px;
    font-size: 14px;
    line-height: 1.3;
    flex: 1;
}

.item-detalhes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.campo {
    display: flex;
    flex-direction: column;
}

.campo label {
    font-size: 11px;
    color: #666;
    margin-bottom: 3px;
    font-weight: 500;
}

.campo input {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
}

.campo input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 2px rgba(30, 60, 114, 0.1);
}

/* ===== BOTÕES ===== */
.btn {
    background: #1e3c72;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn:hover {
    background: #2a5298;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-success { background: #10b981; }
.btn-success:hover { background: #059669; }
.btn-danger { background: #ef4444; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: #f59e0b; }
.btn-warning:hover { background: #d97706; }
.btn-supervisor { background: #6c5ce7; }
.btn-supervisor:hover { background: #5649c0; }
.btn-manutencao { background: #8b5cf6; }
.btn-manutencao:hover { background: #7c3aed; }
.btn-voltar { background: #6c5ce7; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ===== MODAIS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active { display: flex; }

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close:hover { color: #333; }

/* ===== FORMULÁRIOS ===== */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #10b981;
    color: white;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: toastIn 0.3s;
    z-index: 1001;
}

.toast.error { background: #ef4444; }
.toast.warning { background: #f59e0b; }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== FILE INFO ===== */
.file-info {
    background: #f0f9ff;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 14px;
    color: #0369a1;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .header-top { flex-direction: column; align-items: flex-start; }
    .itens-grid { grid-template-columns: 1fr; }
    .item-detalhes { grid-template-columns: 1fr; }
    .item-row { flex-direction: column; align-items: flex-start; }
    .item-info { width: 100%; flex-direction: column; }
    .item-cota, .item-nome { width: 100%; }
    .novo-item-form { flex-direction: column; }
}