/* ============================================================
   STYLE.CSS - LG LAB (Visual Moderno 2.0)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
    /* Cores da Marca */
    --primary-blue: #21409a;       /* Azul Institucional */
    --primary-dark: #1a237e;       /* Azul Profundo */
    --primary-green: #9cca3b;      /* Verde Institucional */
    --accent-green: #82b02a;       /* Verde Hover */
    
    /* Base e Superfícies */
    --bg-body: #f3f6f9;            /* Fundo cinza-azulado moderno */
    --surface: #ffffff;            /* Branco puro */
    --border-light: #e9ecef;
    
    /* Texto */
    --text-main: #2c3e50;
    --text-muted: #6c757d;
    
    /* Efeitos */
    --shadow-sm: 0 2px 8px rgba(33, 64, 154, 0.05);
    --shadow-md: 0 8px 24px rgba(33, 64, 154, 0.08);
    --shadow-lg: 0 15px 35px rgba(33, 64, 154, 0.12);
    --radius: 12px;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==================== COMPONENTES GERAIS ==================== */

/* Navbar Estilo "Glass" */
.navbar-vital {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.navbar-brand span {
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-main) !important;
    font-size: 0.95rem;
    margin: 0 5px;
    transition: 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-blue) !important;
    background-color: rgba(33, 64, 154, 0.05);
    border-radius: 8px;
}

/* Cartões Modernos */
.card, .admin-card, .login-container {
    background: var(--surface);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

/* Botões e Inputs */
.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    box-shadow: 0 4px 15px rgba(33, 64, 154, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 64, 154, 0.3);
}

.btn-success, .btn-resultado {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: white !important;
    box-shadow: 0 4px 15px rgba(156, 202, 59, 0.2);
}

.btn-resultado {
    border-radius: 50px; /* Redondo para destaque */
}

.form-control, .form-select {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(33, 64, 154, 0.1);
}

/* ==================== HOME (INDEX) ==================== */

.hero-section {
    min-height: 90vh;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(230,236,255,0.8) 100%),
                url('https://images.unsplash.com/photo-1579152276503-3151b238324d?auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
}

.card-exame {
    text-align: center;
    padding: 2rem;
    border-top: 4px solid transparent;
}

.card-exame:hover {
    border-top-color: var(--primary-green);
    transform: translateY(-10px);
}

.icon-box {
    width: 80px;
    height: 80px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

/* ==================== LOGIN ==================== */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f3f6f9 0%, #e1e8f0 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 3rem 2rem;
    text-align: center;
}

.login-header h2 { font-weight: 700; color: var(--primary-blue); }
.login-header p { font-size: 0.9rem; margin-bottom: 2rem; }

/* ==================== ADMIN ==================== */

.admin-header-strip {
    height: 6px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.result-box {
    background: #f0fff4;
    border: 1px dashed var(--primary-green);
    border-radius: var(--radius);
    padding: 15px;
    margin-top: 15px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* ==================== DASHBOARD & TABELAS ==================== */

.table {
    border-collapse: separate;
    border-spacing: 0 10px;
}

.table thead th {
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 0 1rem;
}

.table tbody tr {
    background: white;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.table tbody tr:hover {
    transform: scale(1.01);
}

.table td {
    border: none;
    padding: 1.2rem 1rem;
    vertical-align: middle;
}

.table td:first-child { border-radius: 12px 0 0 12px; }
.table td:last-child { border-radius: 0 12px 12px 0; }

/* Badge Customizada (Suporte ao JS) */
.badge {
    padding: 0.5em 1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 6px;
}

/* ==================== RESPONSIVIDADE ==================== */

@media (max-width: 768px) {
    .hero-section { text-align: center; padding: 4rem 0; }
    
    /* Tabela Responsiva (Card View) */
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    
    .table tr {
        margin-bottom: 1rem;
        border-radius: var(--radius);
    }
    
    .table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .table td:last-child { border-bottom: none; }
    .table td:first-child, .table td:last-child { border-radius: var(--radius); }
    
    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        font-weight: 700;
        color: var(--primary-blue);
        text-transform: uppercase;
        font-size: 0.75rem;
    }
}
