/* ==========================================================================
   CSS COMPLETO - OLIVEIRA INSTITUTO
   Identidade Visual: Cultivando Beleza. Enraizando Conhecimento.
   ========================================================================== */

/* ==========================================================================
   VARIÃVEIS DE DESIGN SYSTEM
   ========================================================================== */
:root {
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    /* Cores PrimÃ¡rias - Identidade Oliveira Instituto */
    --primary-olive: #556B2F;         /* Verde Oliveira Principal */
    --secondary-olive: #8A9A5B;       /* Verde Musgo SecundÃ¡rio */
    --light-beige: #F5F5DC;           /* Bege Natural de Fundo */
    --warm-terracotta: #A0522D;       /* Terra Queimada para Destaques */
    --pure-white: #FFFFFF;            /* Branco Puro */
    
    /* Cores de Suporte */
    --soft-gray: #E8E8E8;             /* Cinza Suave para Bordas */
    --dark-text: #333333;             /* Texto Escuro */
    --medium-text: #666666;           /* Texto MÃ©dio */
    --light-text: #999999;            /* Texto Claro */
    
    /* Cores de Feedback */
    --success-green: #4CAF50;         /* Verde de Sucesso */
    --warning-orange: #FF9800;        /* Laranja de Alerta */
    --error-red: #F44336;             /* Vermelho de Erro */
    --info-blue: #2196F3;             /* Azul de InformaÃ§Ã£o */
    
    /* Gradientes da Marca */
    --gradient-olive: linear-gradient(135deg, var(--primary-olive) 0%, var(--secondary-olive) 100%);
    --gradient-warm: linear-gradient(135deg, var(--warm-terracotta) 0%, #c47c5a 100%);
    --gradient-light: linear-gradient(to bottom, var(--pure-white) 0%, var(--light-beige) 100%);
    
    /* Sombras */
    --shadow-soft: 0 4px 12px rgba(85, 107, 47, 0.15);
    --shadow-medium: 0 8px 20px rgba(85, 107, 47, 0.2);
    --shadow-hard: 0 12px 30px rgba(85, 107, 47, 0.25);
    
    /* Bordas */
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 20px;
    --radius-circle: 50%;
    
    /* TransiÃ§Ãµes */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* EspaÃ§amentos */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    
    /* Tipografia */
    --font-heading: var(--font-family-primary);
    --font-body: var(--font-family-primary);
    --font-ui: var(--font-family-primary);
}

/* Tipografia oficial do sistema: a mesma utilizada pela Agenda. */
html,
body,
body *,
button,
input,
textarea,
select,
option {
    font-family: var(--font-family-primary) !important;
}

/* Font Awesome precisa manter sua fonte própria para que os ícones sejam renderizados. */
.fa,
.fas,
.far,
.fal,
.fad,
.fab,
[class^="fa-"],
[class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

/* ==========================================================================
   RESET E CONFIGURAÃ‡Ã•ES GERAIS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--dark-text);
    background-color: #f9f9f9;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   TIPOGRAFIA
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

p {
    margin-bottom: var(--space-sm);
    color: var(--medium-text);
}

a {
    color: var(--warm-terracotta);
    text-decoration: none;
    transition: var(--transition-normal);
}

a:hover {
    color: var(--primary-olive);
    text-decoration: underline;
}

.text-center { text-align: center; }
.text-olive { color: var(--primary-olive); }
.text-terracotta { color: var(--warm-terracotta); }

/* Layout mobile compartilhado por todas as telas do sistema. */
@media (max-width: 767.98px) {
    .container,
    .container-fluid { padding-left: 1rem; padding-right: 1rem; }
    main, .main-content { width: 100%; overflow-x: hidden; }
    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
    .card-body { padding: 1rem; }
    .table-responsive { margin-left: -1rem; margin-right: -1rem; padding: 0 1rem; }
    .table { min-width: 640px; }
    .btn-group { flex-wrap: wrap; }
    .modal-dialog { margin: .75rem; }
    .modal-body { max-height: calc(100vh - 170px); overflow-y: auto; }
    input, select, textarea, .form-control, .form-select { font-size: 16px !important; }
}

/* ==========================================================================
   HEADER - IDENTIDADE VISUAL
   ========================================================================== */
.header {
    background: var(--gradient-olive);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(245, 245, 220, 0.1) 0%, transparent 70%);
    top: -50px;
    right: -50px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    z-index: 2;
}

.mb-1 h4{ color: var(--text)!important; }

.logo-icon {
    width: 60px;
    height: 60px;
    background-color: var(--light-beige);
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-olive);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition-normal);
}

.logo-icon:hover {
    transform: rotate(10deg) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.logo-text h1 {
    font-size: 2.2rem;
    color: var(--pure-white);
    margin-bottom: 0.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.logo-text .tagline {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--light-beige);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.logo-text .subtitle {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--pure-white);
    background: rgba(245, 245, 220, 0.1);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-circle);
    transition: var(--transition-normal);
    z-index: 2;
}

.language-selector:hover {
    background: rgba(245, 245, 220, 0.2);
    transform: translateY(-2px);
}

.language-selector i {
    font-size: 0.9rem;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--gradient-light);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(138, 154, 91, 0.05) 0%, transparent 70%);
    border-radius: var(--radius-circle);
    top: -200px;
    right: -200px;
}

.hero::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(160, 82, 45, 0.05) 0%, transparent 70%);
    border-radius: var(--radius-circle);
    bottom: -150px;
    left: -150px;
}

.welcome-message {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-xl);
    z-index: 1;
    padding: 0 var(--space-md);
}

.welcome-message h2 {
    font-size: 2.8rem;
    margin-bottom: var(--space-md);
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

.welcome-message h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--warm-terracotta);
    border-radius: var(--radius-circle);
}

.welcome-message p {
    font-size: 1.2rem;
    color: var(--medium-text);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   CONTAINER DE ACESSO
   ========================================================================== */
.access-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
    max-width: 1200px;
    width: 100%;
    z-index: 1;
    padding: 0 var(--space-md);
}

/* ==========================================================================
   CARDS DE ACESSO
   ========================================================================== */
.access-card {
    background-color: var(--pure-white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
    padding: var(--space-xl);
    width: 100%;
    max-width: 500px;
    transition: var(--transition-normal);
    border: 1px solid rgba(85, 107, 47, 0.1);
    position: relative;
    overflow: hidden;
}

.access-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-olive);
}

.access-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(85, 107, 47, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--pure-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition-normal);
}

.access-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.checkin-icon {
    background: var(--gradient-olive);
}

.professional-icon {
    background: var(--gradient-warm);
}

.card-header h3 {
    font-family: var(--font-ui);
    font-size: 1.8rem;
    color: var(--primary-olive);
    font-weight: 600;
}

.card-content p {
    color: var(--medium-text);
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
}

/* ==========================================================================
   FORMULÃRIOS
   ========================================================================== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--primary-olive);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-olive);
    font-size: 1.1rem;
}

.input-with-icon input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--soft-gray);
    border-radius: var(--radius-small);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-normal);
    background-color: var(--pure-white);
    color: var(--dark-text);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--secondary-olive);
    box-shadow: 0 0 0 3px rgba(138, 154, 91, 0.2);
    background-color: rgba(138, 154, 91, 0.02);
}

.input-with-icon input::placeholder {
    color: var(--light-text);
    opacity: 0.7;
}

/* ==========================================================================
   BOTÃ•ES - ESTILOS COMPLETOS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-small);
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    text-align: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: var(--radius-circle);
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* BotÃ£o PrimÃ¡rio - Verde Oliveira */
.btn-primary {
    background: var(--gradient-olive);
    color: var(--pure-white);
    box-shadow: 0 4px 12px rgba(85, 107, 47, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-olive) 0%, var(--primary-olive) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(85, 107, 47, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(85, 107, 47, 0.3);
}

/* BotÃ£o SecundÃ¡rio - Bege com Bordas Verdes */
.btn-secondary {
    background-color: var(--light-beige);
    color: var(--primary-olive);
    border: 2px solid var(--primary-olive);
    box-shadow: 0 2px 8px rgba(85, 107, 47, 0.1);
}

.btn-secondary:hover {
    background-color: rgba(85, 107, 47, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(85, 107, 47, 0.2);
}

/* BotÃ£o TerciÃ¡rio - Terra Queimada */
.btn-tertiary {
    background-color: var(--warm-terracotta);
    color: var(--pure-white);
    box-shadow: 0 4px 12px rgba(160, 82, 45, 0.3);
}

.btn-tertiary:hover {
    background-color: #b85c2e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(160, 82, 45, 0.4);
}

/* BotÃµes Pequenos */
.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* BotÃµes com Ãcones */
.btn i {
    font-size: 1.1rem;
}

/* ==========================================================================
   CAIXAS DE INFORMAÃ‡ÃƒO
   ========================================================================== */
.info-box {
    background-color: rgba(138, 154, 91, 0.08);
    border-left: 4px solid var(--secondary-olive);
    padding: var(--space-md);
    margin-top: var(--space-md);
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
    border-right: 1px solid rgba(138, 154, 91, 0.1);
    border-top: 1px solid rgba(138, 154, 91, 0.1);
    border-bottom: 1px solid rgba(138, 154, 91, 0.1);
}

.info-box p {
    font-size: 0.95rem;
    color: var(--medium-text);
    margin-bottom: 0;
    line-height: 1.5;
}

.info-box strong {
    
}

/* ==========================================================================
   UTILITÃRIOS
   ========================================================================== */
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

/* ==========================================================================
   ANIMAÃ‡Ã•ES
   ========================================================================== */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; opacity: 0; }
.delay-2 { animation-delay: 0.4s; opacity: 0; }
.delay-3 { animation-delay: 0.6s; opacity: 0; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 1024px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .welcome-message h2 { font-size: 2.2rem; }
    
    .access-container {
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    .header {
        padding: var(--space-md);
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .logo-container {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .logo-text h1 {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: var(--space-lg) var(--space-md);
    }
    
    .welcome-message h2 {
        font-size: 1.8rem;
    }
    
    .welcome-message p {
        font-size: 1rem;
    }
    
    .access-card {
        padding: var(--space-lg);
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    /* Footer antigo removido */
}

@media (max-width: 480px) {
    :root {
        --space-xl: 2rem;
        --space-lg: 1.5rem;
        --space-md: 1rem;
        --space-sm: 0.75rem;
        --space-xs: 0.5rem;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    
    .welcome-message h2 {
        font-size: 1.5rem;
    }
    
    .access-card {
        padding: var(--space-md);
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    /* Footer antigo removido */
}

/* ==========================================================================
   ESTADOS ESPECIAIS
   ========================================================================== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(245, 245, 220, 0.3);
    border-top-color: var(--light-beige);
    border-radius: var(--radius-circle);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.success-message {
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--success-green);
    color: var(--success-green);
}

.error-message {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 4px solid var(--error-red);
    color: var(--error-red);
}

/* ==========================================================================
   ESTILOS PARA DISPOSITIVOS DE ALTA DENSIDADE
   ========================================================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon,
    .card-icon,
    .social-link {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* ==========================================================================
   ESTILOS PARA IMPRESSÃƒO
   ========================================================================== */
@media print {
    .header,
    .footer,
    .btn,
    .language-selector,
    .social-links {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .access-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   FIM DO CSS - OLIVEIRA INSTITUTO
   ========================================================================== */

.header .nav-logout {
    margin-left: auto;
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #1b1300 !important;
    font-weight: 700;
}
.header .nav-logout:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #1b1300 !important;
}
