/*
Theme Name: Dentisti CFO-Compliant Theme
Description: Tema de odontologia focado em conformidade CFO e LGPD, otimizado para n8n via REST API.
Author: Antigravity Assistant
Version: 1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: dentisti
*/

/* =========================================================================
   RESET & VARIABLES
========================================================================= */
:root {
    --primary-blue: #3273f6; /* Navbar active, buttons, topbar */
    --dark-blue: #0b2241; /* Hero background, text headers */
    --text-color: #555555;
    --white: #ffffff;
    --light-bg: #f5f7fa;
    --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.5; /* Reduzido de 1.6 */
    background-color: var(--white);
    overflow-x: hidden;
    font-size: 0.92rem; /* Fonte base ligeiramente menor */
}

a { text-decoration: none; color: inherit; transition: color 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================================================
   TOP BAR
========================================================================= */
.top-bar {
    background-color: var(--primary-blue);
    color: var(--white);
    font-size: 0.85rem;
    padding: 10px 0;
}
.top-bar .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
.contact-info { display: flex; gap: 20px; grid-column: 1; }
.contact-info a { color: var(--white); display: flex; align-items: center; gap: 5px; }

.social-icons { display: flex; gap: 15px; grid-column: 2; justify-content: center; }
.social-icons a { color: var(--white); }
.social-icons a:hover { opacity: 0.8; }

.top-bar-actions { grid-column: 3; display: flex; justify-content: flex-end; }
.btn-login-top {
    background: #ffffff;
    color: var(--primary-blue);
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-login-top:hover {
    background: var(--dark-blue);
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Estrutura do NOVO Modal de Login (2 Colunas) */
.modal-container {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 34, 65, 0.85); /* Tom azul escuro transparente */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    width: 95%;
    max-width: 750px;
    display: flex; /* Duas Colunas */
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    animation: modalSlideUp 0.4s ease-out;
}

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

/* Coluna Esquerda: Ilustração */
.modal-left {
    flex: 1.2;
    background: var(--primary-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: white;
    position: relative;
    overflow: hidden;
}
.modal-left::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    top: -50%;
    left: -50%;
}
.modal-left img {
    width: 100%;
    max-width: 320px;
    height: auto;
    z-index: 1;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

/* Coluna Direita: Formulário */
.modal-right {
    flex: 1;
    padding: 40px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    cursor: pointer;
    font-size: 32px;
    color: #ccc;
    line-height: 1;
    transition: color 0.3s;
}
.close-btn:hover { color: var(--primary-blue); }

.modal-right h3 { 
    color: var(--dark-blue); 
    margin-bottom: 20px; 
    font-size: 1.8rem; 
    font-weight: 800;
    text-align: center;
}

.modal-right .form-group { margin-bottom: 20px; }
.modal-right .form-group label { 
    font-size: 0.95rem; 
    font-weight: 600; 
    color: var(--dark-blue); 
    display: block; 
    margin-bottom: 8px; 
}
.modal-right .form-group input { 
    width: 100%; 
    padding: 15px; 
    font-size: 1rem; 
    border: 2px solid #f0f2f5; 
    border-radius: 12px; 
    background: #fcfdfe;
    transition: all 0.3s;
}
.modal-right .form-group input:focus {
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(50, 115, 246, 0.1);
    outline: none;
}

.modal-right .btn-submit { 
    width: 100%; 
    padding: 16px; 
    background: var(--primary-blue); 
    color: white; 
    border: none; 
    border-radius: 12px; 
    font-size: 1.2rem; 
    font-weight: 700; 
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
}
.modal-right .btn-submit:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(50,115,246,0.2);
}

/* Removido Social Login de acordo com pedido do usuário */

.modal-right .signup-link { 
    font-size: 1rem; 
    text-align: center; 
    display: block; 
    color: var(--primary-blue); 
    font-weight: 700;
    margin-top: 25px;
}
.modal-right .signup-link span { color: #666; font-weight: 400; }

.modal-container.active { display: flex; }

/* Responsivo */
@media (max-width: 850px) {
    .modal-left { display: none; }
    .modal-content { max-width: 450px; }
}

/* =========================================================================
   HEADER / NAVBAR
========================================================================= */
.site-header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-size: 24px; font-weight: 700; color: var(--dark-blue); display: flex; align-items: center; gap: 10px; }
.logo span { color: var(--primary-blue); } /* Dent icon color if SVG */

nav ul { display: flex; gap: 25px; }
nav ul li a { color: var(--dark-blue); font-weight: 500; font-size: 0.95rem; }
nav ul li a:hover, nav ul li.current-menu-item a { color: var(--primary-blue); }

/* =========================================================================
   HERO SECTION
========================================================================= */
.hero {
    background: linear-gradient(135deg, #0d2850 0%, #154580 100%);
    color: var(--white);
    padding: 100px 0 150px;
    position: relative;
    overflow: hidden;
    border-bottom-left-radius: 50% 10%;
    border-bottom-right-radius: 50% 10%;
}
.hero::after {
    content: "SMILE";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 25vw;
    font-weight: 900;
    color: rgba(255,255,255,0.03);
    z-index: 0;
    pointer-events: none;
}
.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.hero-content { flex: 1; max-width: 500px; }
.hero-subtitle { font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; display: block; }
.hero-title { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.hero-text { font-size: 1.1rem; opacity: 0.9; margin-bottom: 30px; }

.btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--white);
    color: var(--dark-blue);
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
}
.btn:hover { background-color: var(--primary-blue); color: var(--white); box-shadow: 0 10px 20px rgba(50,115,246,0.3); }

.hero-image-wrapper { 
    flex: 1; 
    display: flex; 
    justify-content: flex-end; 
    position: relative; 
}
.hero-image {
    width: 80%;
    border-radius: 0 200px 0 200px;
    border: 5px solid var(--white);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    object-fit: cover;
}

/* =========================================================================
   WELCOME SECTION
========================================================================= */
.welcome-section { padding: 80px 0; display: flex; align-items: center; }
.welcome-section .container { display: flex; align-items: center; gap: 50px; }
.welcome-image { flex: 1; text-align: center; }
.welcome-content { flex: 1; }
.welcome-subtitle { color: var(--text-color); font-weight: 600; margin-bottom: 10px; }
.welcome-title { color: var(--dark-blue); font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }

/* =========================================================================
   FOOTER (LGPD / CFO)
========================================================================= */
.site-footer {
    background-color: var(--dark-blue);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 20px;
    margin-top: 50px;
    font-size: 0.9rem;
}
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; margin-bottom: 40px; }
.footer-col { flex: 1; min-width: 250px; }
.footer-col h4 { color: var(--white); font-size: 1.2rem; margin-bottom: 20px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a:hover { color: var(--white); }

.cfo-notice {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-left: 3px solid var(--primary-blue);
    margin-top: 20px;
    font-size: 0.8rem;
}

.footer-bottom { 
    text-align: center; 
    padding-top: 20px; 
    border-top: 1px solid rgba(255,255,255,0.1); 
}

/* =========================================================================
   RESPONSIVE
========================================================================= */
@media (max-width: 768px) {
    .hero .container { flex-direction: column; text-align: center; }
    .hero-title { font-size: 2.5rem; }
    .hero-image-wrapper { justify-content: center; margin-top: 40px; }
    .hero-image { width: 100%; border-radius: 0 100px 0 100px; }
    nav ul { display: none; /* Em produção seria um menu mobile (hamburger) */ }
    .welcome-section .container { flex-direction: column; }
}

/* =========================================================================
   LOGIN & REGISTRATION
========================================================================= */
.header-actions {
    margin-left: 20px;
}
.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.btn-login:hover {
    background-color: var(--dark-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(50,115,246,0.3);
}
.login-page-section {
    padding: 80px 0;
    background-color: var(--light-bg);
    min-height: calc(100vh - 350px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 450px;
    text-align: center;
}
.login-box h1 {
    color: var(--dark-blue);
    margin-bottom: 10px;
}
.login-box p.desc {
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 0.95rem;
}
.form-group {
    margin-bottom: 20px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-blue);
    font-size: 0.9rem;
}
.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color 0.3s;
}
.form-group input:focus {
    border-color: var(--primary-blue);
    outline: none;
}
.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 20px;
}
.btn-submit:hover {
    background-color: var(--dark-blue);
}
.login-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
    font-size: 0.95rem;
}
.login-footer a {
    color: var(--primary-blue);
    font-weight: 600;
}
.login-footer a:hover {
    text-decoration: underline;
}

/* =========================================================================
   DASHBOARD / ÁREA DO USUÁRIO
========================================================================= */
/* Layout de Aplicativo - Escopado para o Dashboard */
/* Layout de Aplicativo Integrado - Sidebar Sticky */
body.page-template-template-dashboard {
    background-color: #f8fafd;
    overflow: visible !important;
    height: auto !important;
}

body.page-template-template-dashboard .site-footer {
    display: block !important;
    margin-top: 50px;
}

.dashboard-wrapper {
    background-color: transparent;
    display: flex;
    align-items: flex-start;
    max-width: none;
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    border: none;
    min-height: 85vh;
}

/* Reset de ajustes globais do header (Garante largura total) */
body .top-bar, 
body .site-header {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Sidebar Estilo Aplicativo - Sticky */
.dashboard-sidebar {
    width: 280px;
    height: calc(100vh - 110px); /* Altura da janela menos header aproximado */
    background: #0b2241;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    position: sticky;
    top: 110px; /* Trava no topo logo abaixo do header */
    border-right: 1px solid rgba(255,255,255,0.05);
}

.dashboard-main {
    flex: 1;
    padding: 40px;
    background-color: transparent;
    overflow: visible;
    height: auto;
}
.sidebar-logo {
    padding: 30px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.1);
}

.sidebar-logo i {
    color: var(--primary-blue);
    font-size: 1.8rem;
}

.sidebar-menu {
    background: transparent;
    border-radius: 0;
    overflow-y: auto;
    flex: 1;
    box-shadow: none;
    border: none;
    padding-top: 20px;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar-item:last-child { border-bottom: none; }

.sidebar-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: white;
}

.sidebar-item.active {
    background-color: var(--primary-blue);
    color: white;
    border-left: 4px solid white;
}

.sidebar-icon {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    position: relative;
    transition: all 0.3s;
}

.sidebar-item.active .sidebar-icon {
    background: rgba(255,255,255,0.2);
    color: white;
}

.small-pen, .small-clock {
    position: absolute;
    font-size: 0.75rem;
    bottom: 10px;
    right: 10px;
}

/* Cards do Dashboard */
.dashboard-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    border: none;
}
.welcome-card h1 { margin-bottom: 10px; font-size: 1.8rem; font-weight: 800; }
.welcome-card p { opacity: 0.9; font-size: 1rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.stat-item {
    padding: 25px;
    background: #fcfdfe;
    border-radius: 16px;
    border: 1px solid #eef2f7;
    transition: transform 0.3s;
}
.stat-item:hover { transform: translateY(-5px); }

.stat-label { display: block; font-size: 0.9rem; color: #888; margin-bottom: 8px; font-weight: 500; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 800; color: var(--dark-blue); }

.sidebar-footer {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ff7675;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s;
    width: 100%;
    justify-content: center;
}

.btn-logout:hover {
    background: rgba(255, 118, 117, 0.1);
    transform: none;
}

@media (max-width: 1024px) {
    .dashboard-container { flex-direction: column-reverse; }
    .dashboard-sidebar { width: 100%; position: static; }
}
