/* ============================================
   SISTEMA DE PEDIDOS LABORATORIAIS
   Estilo base — limpo e funcional
   ============================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 15px;
}

/* LOGIN */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1a3a5c;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.login-box h1 { font-size: 22px; color: #1a3a5c; margin-bottom: 4px; }
.login-box .subtitulo { color: #888; font-size: 13px; margin-bottom: 24px; }

/* FORMULÁRIOS */
label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 4px; margin-top: 14px; }
input[type=text], input[type=email], input[type=password],
input[type=date], input[type=tel], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.2s;
}
input:focus, select:focus, textarea:focus {
    border-color: #1a3a5c;
    outline: none;
}

button, .btn {
    display: inline-block;
    padding: 10px 22px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

button[type=submit], .btn-primario {
    background: #1a3a5c;
    color: #fff;
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    font-size: 15px;
}
button[type=submit]:hover, .btn-primario:hover { background: #122a45; }

.btn-sucesso { background: #28a745; color: #fff; }
.btn-sucesso:hover { background: #1e7e34; }

.btn-perigo { background: #dc3545; color: #fff; }
.btn-perigo:hover { background: #b02a37; }

.btn-secundario { background: #6c757d; color: #fff; }
.btn-secundario:hover { background: #545b62; }

.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1da851; }

/* ALERTAS */
.alerta { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 14px; }
.alerta.erro { background: #fde8e8; color: #c0392b; border: 1px solid #f5c6c6; }
.alerta.sucesso { background: #e8f5e9; color: #1e7e34; border: 1px solid #c3e6cb; }
.alerta.aviso { background: #fff8e1; color: #856404; border: 1px solid #ffc107; }

/* LAYOUT PRINCIPAL */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 230px;
    background: #1a3a5c;
    color: #fff;
    padding: 24px 0;
    flex-shrink: 0;
}
.sidebar h2 { font-size: 14px; padding: 0 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); color: #aac4e0; text-transform: uppercase; letter-spacing: 1px; }
.sidebar a { display: block; padding: 11px 20px; color: #cde; text-decoration: none; font-size: 14px; transition: background 0.15s; }
.sidebar a:hover, .sidebar a.ativo { background: rgba(255,255,255,0.1); color: #fff; }

.conteudo { flex: 1; padding: 30px; }

.cabecalho-pagina { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.cabecalho-pagina h1 { font-size: 22px; color: #1a3a5c; }

/* CARDS */
.card { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); margin-bottom: 20px; }
.card h2 { font-size: 16px; margin-bottom: 16px; color: #1a3a5c; padding-bottom: 10px; border-bottom: 1px solid #eee; }

/* TABELAS */
table { width: 100%; border-collapse: collapse; }
th { background: #f8f9fa; text-align: left; padding: 10px 12px; font-size: 13px; color: #555; border-bottom: 2px solid #dee2e6; }
td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; font-size: 14px; vertical-align: middle; }
tr:hover td { background: #fafbfc; }

/* FILA EM TEMPO REAL */
.fila-item {
    background: #fff;
    border-left: 5px solid #1a3a5c;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}
.fila-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.fila-item .nome-paciente { font-weight: 700; font-size: 15px; color: #1a3a5c; }
.fila-item .info { font-size: 13px; color: #777; margin-top: 3px; }
.fila-item .tempo { font-size: 13px; color: #e67e22; font-weight: 600; }

/* GRADE DE EXAMES (tela do médico) */
.grade-exames {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px 20px;
}
.exame-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.exame-item input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: #1a3a5c; }
.exame-item label { font-size: 13px; cursor: pointer; user-select: none; }

/* PROTOCOLOS */
.protocolos { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.btn-protocolo {
    padding: 8px 16px;
    background: #e8f0f7;
    border: 2px solid #1a3a5c;
    color: #1a3a5c;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-protocolo:hover { background: #1a3a5c; color: #fff; }

/* BADGES */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-verde { background: #d4edda; color: #155724; }
.badge-vermelho { background: #f8d7da; color: #721c24; }
.badge-cinza { background: #e2e3e5; color: #383d41; }
.badge-azul { background: #cce5ff; color: #004085; }

/* INDICADORES */
.indicadores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.indicador-card { background: #fff; border-radius: 10px; padding: 20px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.indicador-card .numero { font-size: 32px; font-weight: 700; color: #1a3a5c; }
.indicador-card .rotulo { font-size: 13px; color: #888; margin-top: 4px; }

@media (max-width: 900px) {
    .grade-exames { grid-template-columns: 1fr 1fr; }
    .indicadores { grid-template-columns: repeat(2, 1fr); }
}
