/* =========================================
   VARIÁVEIS CSS GLOBAIS
   ========================================= */
:root {
    --color-primary: #0b409c; /* Azul escuro ZDLeads */
    --color-secondary: #ff7b00; /* Laranja ZDLeads */
    --color-bg-dark: #00163a;
    
    --color-text-main: #333333;
    --color-text-light: #666666;
    --color-text-white: #ffffff;
    
    --color-input-border: #e0e0e0;
    --color-input-bg: #f9f9f9;
    --color-input-focus: rgba(11, 64, 156, 0.15);
    
    --card-bg: #ffffff;
    --card-radius: 16px;
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    --transition: all 0.3s ease;
    
    /* Variáveis do Header e Dropdown para Tema Escuro (Padrão) */
    --header-bg: rgba(0, 22, 58, 0.85);
    --header-border: rgba(255, 255, 255, 0.1);
    --header-text: #ffffff;
    --header-text-muted: rgba(255, 255, 255, 0.7);
    --header-hover-bg: rgba(255, 255, 255, 0.1);
    
    --dropdown-bg: #ffffff;
    --dropdown-border: rgba(0, 0, 0, 0.1);
    --dropdown-text: #333333;
    --dropdown-text-muted: #666666;
    --dropdown-hover-bg: rgba(11, 64, 156, 0.05);
    --dropdown-divider: rgba(0, 0, 0, 0.05);
}

/* =========================================
   TEMA CLARO (LIGHT MODE)
   ========================================= */
body.light-theme {
    background-image: url('/logos/backgroundbranco.png');
    
    /* Sobrescrevendo variáveis para o Header no Tema Claro */
    --header-bg: rgba(255, 255, 255, 0.85);
    --header-border: rgba(0, 0, 0, 0.1);
    --header-text: #0b409c; /* Azul ZDLeads */
    --header-text-muted: #666666;
    --header-hover-bg: rgba(11, 64, 156, 0.08);
}

/* Ajustes específicos do Tema Claro */
body.light-theme .hero-grid-system,
body.light-theme .dashboard-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

body.light-theme .profile-modal-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .profile-modal-header {
    background: rgba(11, 64, 156, 0.02);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .profile-modal-footer {
    background: rgba(0, 0, 0, 0.02);
    border-top-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .profile-photo-group {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .profile-photo-img {
    background: #f9f9f9;
    border-color: #fff;
}

body.light-theme .profile-photo-edit-btn {
    border-color: #fff;
}

body.light-theme .profile-input {
    background: #f9f9f9;
    border-color: #e0e0e0;
    color: var(--color-text-main);
}

body.light-theme .profile-modal-title,
body.light-theme .profile-photo-title,
body.light-theme .profile-form-group label {
    color: var(--color-primary);
}

body.light-theme .profile-modal-subtitle,
body.light-theme .profile-photo-desc,
body.light-theme .profile-toggle-password {
    color: var(--color-text-light);
}

body.light-theme .profile-modal-close {
    color: var(--color-text-light);
}

body.light-theme .profile-input:focus {
    background: #fff;
}

body.light-theme .profile-btn-cancel {
    border-color: #e0e0e0;
    color: var(--color-text-main);
}

.hero-grid-system, .dashboard-card, .feature-item, .btn-logout, .feature-text strong, .feature-text span, .dashboard-card h1, .dashboard-card p {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .hero-grid-system h3 {
    color: var(--color-primary);
    text-shadow: none;
}

body.light-theme .feature-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .feature-text strong {
    color: var(--color-primary);
}

body.light-theme .feature-text span {
    color: #666666;
}

body.light-theme .dashboard-card h1 {
    color: var(--color-primary);
}

body.light-theme .dashboard-card p {
    color: #666666;
}

body.light-theme .btn-logout {
    background: rgba(11, 64, 156, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(11, 64, 156, 0.2);
}

body.light-theme .btn-logout:hover {
    background: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
}

body.light-theme .mobile-menu-toggle {
    color: var(--color-primary);
}

/* =========================================
   RESET E BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--color-bg-dark);
    background-image: url('/logos/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text-main);
    overflow-x: hidden;
    margin: 0; /* Garante que não haja margem gerando scroll */
    padding: 0;
    transition: background-image 0.6s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* O body global foi desenhado para a tela de login.
   No dashboard, neutralizamos o flex para evitar scroll fantasma no refresh. */
body.dashboard-page {
    display: block;
    min-height: 100vh;
    overflow-y: auto;
}

/* Pseudo-elemento para transição de fundo suave */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('/logos/backgroundbranco.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -2;
    pointer-events: none;
}

body.light-theme::after {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   LAYOUT PRINCIPAL (MOBILE FIRST)
   ========================================= */
.login-container {
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 30px;
    box-sizing: border-box; /* Previne scroll horizontal */
    overflow-x: hidden;
}

/* Esquerda - Hero */
.login-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding-top: 20px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-bot {
    width: 180px;
    max-width: 100%;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.4));
    margin: 0 auto;
    display: block;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Efeito de Entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid do Sistema (Premium) */
.hero-grid-system {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: var(--card-radius);
    color: var(--color-text-white);
    width: 100%;
    max-width: 100%;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.hero-grid-system h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-text-white);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.grid-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 5px;
    border-radius: 12px;
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-secondary);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.feature-item i {
    font-size: 20px;
    color: var(--color-secondary);
    background: rgba(255, 123, 0, 0.15);
    padding: 8px;
    border-radius: 50%;
    margin-bottom: 3px;
    box-shadow: 0 0 15px rgba(255, 123, 0, 0.2);
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.feature-text strong {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.feature-text span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    display: none; /* Oculta no mobile para caber 3 lado a lado */
}


/* Direita - Formulário */
.login-form-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 420px;
    border-radius: var(--card-radius);
    padding: 40px 30px;
    box-shadow: var(--shadow-premium);
    position: relative; /* Necessário para conter o loading absoluto dentro dele */
    overflow: hidden; /* Mantém o desfoque contido dentro do card */
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    max-width: 280px;
    height: auto;
}

/* =========================================
   FORMULÁRIO E INPUTS
   ========================================= */
.form-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-main);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: var(--color-text-light);
    font-size: 1.2rem;
}

.input-wrapper .toggle-password {
    left: auto;
    right: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.input-wrapper .toggle-password:hover {
    color: var(--color-primary);
}

.input-wrapper input {
    width: 100%;
    padding: 14px 45px;
    border: 1px solid var(--color-input-border);
    border-radius: 8px;
    background-color: var(--color-input-bg);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--color-text-main);
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-input-focus);
    background-color: #fff;
}

.input-wrapper input:focus + i {
    color: var(--color-primary);
}

/* Opções (Checkbox e Link) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--color-text-light);
}

.remember-me input {
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
    color: var(--color-secondary);
}

/* =========================================
   BOTÕES
   ========================================= */
.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    color: var(--color-text-white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(11, 64, 156, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary i {
    font-size: 1.2rem;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(11, 64, 156, 0.5);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-input-border);
}

.divider span {
    padding: 0 10px;
}

.btn-google {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-input-border);
    border-radius: 8px;
    background-color: #fff;
    color: var(--color-text-main);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    font-family: inherit;
}

.btn-google svg, .google-icon {
    width: 20px;
    height: 20px;
}

.btn-google:hover {
    background-color: var(--color-input-bg);
    border-color: #ccc;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.75rem;
    color: var(--color-text-light);
}

/* =========================================
   LOADING OVERLAY
   ========================================= */
#loading-overlay {
    position: absolute; /* Mudou de fixed para absolute para ficar dentro do card */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9); /* Fundo claro para combinar com o card branco */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: var(--card-radius); /* Respeita o arredondamento do card */
}

#loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-logo {
    width: 90px; /* Reduzi um pouco o logo para caber melhor no card */
    animation: pulse 1.5s infinite;
    filter: drop-shadow(0 0 15px rgba(255, 123, 0, 0.3));
}

.loading-text {
    margin-top: 20px;
    color: var(--color-text-main); /* Mudou para texto escuro já que o fundo é claro */
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 1px;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 25px var(--color-secondary)); }
    100% { transform: scale(1); opacity: 0.8; }
}

/* =========================================
   PAGE TRANSITION LOADER
   ========================================= */
#page-transition-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 22, 58, 0.7); /* Fundo semi-transparente escuro */
    backdrop-filter: blur(15px); /* Efeito Blur Premium */
    -webkit-backdrop-filter: blur(15px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme #page-transition-loader {
    background: rgba(255, 255, 255, 0.7); /* Fundo semi-transparente claro */
}

#page-transition-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-transition-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.page-transition-logo {
    width: 120px; /* Aumentado (antes 60px) */
    height: 120px; /* Aumentado (antes 60px) */
    animation: pulse-logo 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    filter: drop-shadow(0 8px 25px rgba(11, 64, 156, 0.4));
}

body.light-theme .page-transition-logo {
    filter: drop-shadow(0 8px 25px rgba(11, 64, 156, 0.2));
}

.page-transition-spinner {
    width: 60px; /* Aumentado para manter proporção (antes 40px) */
    height: 60px; /* Aumentado para manter proporção (antes 40px) */
    border: 4px solid rgba(255, 123, 0, 0.1);
    border-top-color: var(--color-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes pulse-logo {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.main-header {
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--header-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 80px; /* Travado exatamente no tamanho original */
    z-index: 1000;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 100%; /* Pega os 80px do pai */
    width: 100%;
    box-sizing: border-box;
}

/* =========================================
   SYSTEM TICKER (NEWSLETTER ANIMADA)
   ========================================= */
.system-ticker {
    background: linear-gradient(90deg, #ff7b00, #ff9100);
    height: 32px;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: fixed; /* Tira de dentro do fluxo do header */
    top: 80px; /* Gruda exatamente embaixo do header de 80px */
    left: 0;
    z-index: 999; /* Um nível abaixo do header para não sobrepor menus */
    border-bottom: 1px solid rgba(0,0,0,0.1);
    box-shadow: none;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
}

.ticker-content:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 30px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.ticker-item i {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
}

.ticker-item strong {
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo img {
    height: 72px;
    max-height: 75px;
    width: auto;
    object-fit: contain;
    filter: none;
    transition: var(--transition);
}

.header-logo:hover img {
    transform: scale(1.03);
    filter: none;
}

/* Menu Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-white);
    font-size: 28px;
    cursor: pointer;
}

/* Navigation */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.nav-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--header-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400; /* Removido o negrito (antes era 500) */
    padding: 10px 15px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-list li a i {
    font-size: 1.2rem;
}

.nav-list li a:hover,
.nav-list li a.active,
.has-dropdown:hover > a {
    color: var(--header-text);
    background: var(--header-hover-bg);
}

.nav-list li a.active {
    color: var(--color-secondary);
    background: rgba(255, 123, 0, 0.1);
}

/* User Info */
.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--header-text);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle i {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: inline-block;
}

/* Redes Sociais no Header */
.social-link:hover {
    color: var(--color-secondary) !important;
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-name {
    color: var(--header-text);
    font-size: 0.9rem;
    font-weight: 600;
}

.user-email {
    color: var(--header-text-muted);
    font-size: 0.75rem;
}

.user-avatar {
    color: var(--header-text);
    font-size: 40px;
    line-height: 1;
}

.logout-btn {
    color: var(--header-text-muted);
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    padding-left: 10px;
    border-left: 1px solid var(--header-border);
}

.logout-btn:hover {
    color: #ff4d4d;
    transform: translateX(2px);
}

/* =========================================
   DROPDOWN MENUS (MODERNOS E PREMIUM)
   ========================================= */
.has-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.8rem !important;
    margin-left: 2px;
    transition: transform 0.3s ease;
}

.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 12px;
    min-width: 280px; /* Ainda mais largo */
    padding: 8px; /* Menos espaçamento */
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1001;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(10px);
    pointer-events: auto;
}

/* Dropdowns em Grid 2 Colunas - Padrão Moderno, Compacto e Sem Neon */
.dropdown-menu.dropdown-grid-2,
.dropdown-menu.dropdown-leads-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

.dropdown-menu.dropdown-grid-2.dropdown-grid-compact {
    min-width: 410px;
    max-width: 440px;
}

.dropdown-menu.dropdown-grid-2.dropdown-leads-grid,
.dropdown-menu.dropdown-leads-grid {
    min-width: 470px;
    max-width: 490px;
}

.dropdown-menu.dropdown-grid-2.dropdown-grid-config {
    min-width: 500px;
    max-width: 530px;
    left: auto;
    right: -20px;
    transform: translateX(0) translateY(20px);
}

.has-dropdown:hover .dropdown-menu.dropdown-grid-2.dropdown-grid-config,
.has-dropdown:focus-within .dropdown-menu.dropdown-grid-2.dropdown-grid-config {
    transform: translateX(0) translateY(10px);
}

.dropdown-menu.dropdown-grid-2.dropdown-grid-config::before {
    left: auto;
    right: 50px;
    transform: rotate(45deg);
}

.dropdown-grid-2 .dropdown-divider-title,
.dropdown-leads-grid .dropdown-divider-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--dropdown-text-muted, #718096);
    padding: 6px 4px 2px 4px;
    margin-top: 4px;
    border-top: 1px solid var(--dropdown-divider, rgba(0, 0, 0, 0.06));
}

.dropdown-grid-2 .dropdown-divider-title:first-child,
.dropdown-leads-grid .dropdown-divider-title:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 2px;
}

.dropdown-grid-2 .dropdown-item,
.dropdown-leads-grid .dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 9px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 0 !important;
    text-decoration: none;
    box-shadow: none !important;
}

.dropdown-grid-2 .dropdown-item:hover,
.dropdown-leads-grid .dropdown-item:hover {
    background: var(--dropdown-hover-bg, rgba(11, 64, 156, 0.07));
    border-color: rgba(11, 64, 156, 0.22);
    transform: translateY(-1px);
    box-shadow: none;
}

.dropdown-grid-2 .dropdown-icon,
.dropdown-leads-grid .dropdown-icon {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    border-radius: 8px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    box-shadow: none !important;
}

.dropdown-grid-2 .dropdown-item:hover .dropdown-icon,
.dropdown-leads-grid .dropdown-item:hover .dropdown-icon {
    transform: scale(1.08);
    box-shadow: none !important;
}

.dropdown-grid-2 .dropdown-text,
.dropdown-leads-grid .dropdown-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dropdown-grid-2 .dropdown-text strong,
.dropdown-leads-grid .dropdown-text strong {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--dropdown-text, #1a202c);
}

.dropdown-grid-2 .dropdown-text span,
.dropdown-leads-grid .dropdown-text span {
    font-size: 0.69rem;
    line-height: 1.2;
    color: var(--dropdown-text-muted, #718096);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 520px) {
    .dropdown-menu.dropdown-grid-2,
    .dropdown-menu.dropdown-leads-grid {
        min-width: 100% !important;
        grid-template-columns: 1fr !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
    }
}

/* Sub-dropdown (Dropdown lateral) */
.has-sub-dropdown {
    position: relative;
}

.sub-dropdown-menu {
    position: absolute;
    top: -8px; /* Alinhar com o item pai considerando o padding */
    left: 100%;
    margin-left: 0; /* Removido margin para que o pseudo-elemento feche a lacuna perfeitamente */
    background: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 12px;
    min-width: 250px;
    padding: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1002;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transform: translateX(-10px);
}

/* Área invisível de conexão (A "ponte") */
.sub-dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px; /* Cria uma área clicável de 20px à esquerda do submenu */
    width: 20px;
    height: 100%;
    background: transparent;
}

.has-sub-dropdown:hover > .sub-dropdown-menu,
.has-sub-dropdown:focus-within > .sub-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.dropdown-arrow-right {
    font-size: 0.8rem !important;
    margin-left: auto;
    color: var(--dropdown-text-muted);
    transition: transform 0.3s ease;
}

.has-sub-dropdown:hover > .dropdown-item > .dropdown-arrow-right {
    transform: translateX(3px);
}

/* Dropdown alinhado à direita (para o perfil) */
.dropdown-menu-right {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(20px);
}

.has-dropdown:hover .dropdown-menu-right,
.has-dropdown:focus-within .dropdown-menu-right {
    transform: translateX(0) translateY(10px);
}

.dropdown-menu-right::before {
    left: auto;
    right: 20px;
    transform: translateX(0) rotate(45deg);
}

/* Para garantir que o menu não suma enquanto navega para baixo, aumentamos a área de interação invisível */
.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

/* Seta apontando pra cima no balão do dropdown */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--dropdown-bg);
    border-top: 1px solid var(--dropdown-border);
    border-left: 1px solid var(--dropdown-border);
    z-index: -1;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px; /* Reduzido de 12px para 10px */
    padding: 8px 10px; /* Reduzido de 10px 12px para 8px 10px */
    border-radius: 8px;
    text-decoration: none;
    color: var(--dropdown-text);
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.dropdown-item:hover {
    background: var(--dropdown-hover-bg);
    transform: translateX(3px); /* Movimento mais sutil */
}

.dropdown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; /* Reduzido de 34px para 28px */
    height: 28px; /* Reduzido de 34px para 28px */
    background: rgba(255, 123, 0, 0.1);
    color: var(--color-secondary);
    border-radius: 8px;
    font-size: 1.1rem; /* Reduzido de 1.2rem para 1.1rem */
    transition: var(--transition);
    flex-shrink: 0; /* Impede que o icone esmague */
}

.dropdown-item:hover .dropdown-icon {
    background: var(--color-secondary);
    color: #ffffff;
    box-shadow: none;
}

.dropdown-text {
    display: flex;
    flex-direction: column;
    gap: 0px; /* Reduzido de 2px para 0px para colar mais */
    flex: 1; /* Ocupa todo o espaço restante */
    min-width: 0; /* Permite que o texto encolha sem quebrar o layout flex */
}

.dropdown-text strong {
    font-size: 0.85rem; /* Mais compacto */
    font-weight: 600;
    color: var(--dropdown-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-text span {
    font-size: 0.75rem; /* Levemente maior */
    color: var(--dropdown-text-muted);
    font-weight: 500; /* Mais encorpado para facilitar leitura */
    line-height: 1.3;
    white-space: normal; /* Permite quebrar linha se for necessário, usando toda a largura */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limita a 2 linhas e bota reticências no final, caso fique gigante */
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: 0.2px; /* Ajuda na clareza em fontes pequenas */
}

/* Divisores de Categoria no Dropdown */
.dropdown-divider-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dropdown-text-muted);
    padding: 10px 15px 5px 15px;
    letter-spacing: 0.5px;
    margin-top: 5px;
    border-top: 1px solid var(--dropdown-divider);
}

.dropdown-menu .dropdown-divider-title:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 5px;
}

/* =========================================
   DASHBOARD GRID & WIDGETS (MINIMALIST & HUMAN)
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

.dashboard-wrapper {
    padding: 160px 40px 40px; /* Aumentado para descolar da barra laranja */
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 100%; /* Ocupa 100% da tela */
    margin: 0;
}

/* Stat Cards (Topo) */
.dashboard-header-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    width: 100%;
}

.stat-card {
    background: rgba(0, 15, 45, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Efeito sutil no fundo do card em vez de blur pesado */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    z-index: 0;
    pointer-events: none;
}

body.light-theme .stat-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.light-theme .stat-card::before {
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.6) 100%);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(11, 64, 156, 0.3);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%; /* Circular para mais naturalidade */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    color: var(--header-text-muted);
    z-index: 1;
}

body.light-theme .stat-icon {
    background: rgba(0,0,0,0.03);
}

.stat-details {
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.stat-details h3 {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7); /* Branco suave ao invés de cinza escuro */
    font-weight: 500;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

body.light-theme .stat-details h3 {
    color: var(--dropdown-text-muted); /* Volta pro cinza no modo claro */
}

.stat-details h2 {
    font-size: 2.2rem;
    color: #ffffff; /* Branco puro */
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1;
    letter-spacing: -0.5px;
}

body.light-theme .stat-details h2 {
    color: var(--header-text);
}

.stat-trend {
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6); /* Branco mais suave */
}

body.light-theme .stat-trend {
    color: var(--dropdown-text-muted);
}

.stat-trend.positive i { color: #10b981; }
.stat-trend.neutral i { color: #8b5cf6; }

/* Grid Principal */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    width: 100%;
}

.dashboard-col-left, .dashboard-col-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Painéis Minimalistas */
.dashboard-panel {
    background: rgba(0, 15, 45, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body.light-theme .dashboard-panel {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.panel-header h3 {
    font-size: 1.25rem;
    color: #ffffff; /* Branco puro no escuro */
    font-weight: 600;
    margin: 0 0 4px 0;
    letter-spacing: -0.3px;
}

body.light-theme .panel-header h3 {
    color: var(--header-text);
}

.panel-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6); /* Branco suave no escuro */
    margin: 0;
    font-weight: 400;
}

body.light-theme .panel-subtitle {
    color: var(--dropdown-text-muted);
}

.panel-body {
    flex: 1;
    position: relative;
}

.canvas-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

/* Ações Rápidas (Elegantes) */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.8); /* Branco mais forte no modo escuro */
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
}

body.light-theme .action-btn {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.05);
    color: var(--header-text-muted); /* Volta pro cinza no claro */
}

.action-btn i {
    font-size: 1.6rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--header-text);
}

.action-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(11, 64, 156, 0.03);
}

.action-btn:hover i {
    transform: scale(1.15) translateY(-2px);
    color: var(--color-primary);
}

/* Botão Primário nas Ações Rápidas */
.action-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff !important;
}

body.light-theme .action-primary {
    background: var(--color-primary);
}

.action-primary i {
    color: #ffffff !important;
}

.action-primary:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}

/* =========================================
   CHAMADOS ABERTOS (TICKETS)
   ========================================= */
.action-btn-text {
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: var(--transition);
}

.action-btn-text:hover {
    background: rgba(11, 64, 156, 0.1);
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ticket-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
}

body.light-theme .ticket-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.ticket-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

body.light-theme .ticket-item:hover {
    border-color: rgba(11, 64, 156, 0.2);
    background: #ffffff;
}

.ticket-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.ticket-icon.warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.ticket-icon.info { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.ticket-icon.success { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.ticket-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ticket-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-id {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

body.light-theme .ticket-id { color: #9ca3af; }

.ticket-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }

.ticket-content h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
}

body.light-theme .ticket-content h4 { color: var(--header-text); }

.ticket-content p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

body.light-theme .ticket-content p { color: var(--dropdown-text-muted); }

.ticket-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

body.light-theme .ticket-meta { color: #9ca3af; }

/* =========================================
   MEDIA QUERIES (DASHBOARD)
   ========================================= */
@media (max-width: 1200px) {
    .dashboard-header-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-wrapper {
        padding: 100px 20px 20px;
    }
    .dashboard-header-widgets {
        grid-template-columns: 1fr;
    }
    .header-logo img {
        height: 54px;
        max-height: 58px;
    }
}

/* =========================================
   MEDIA QUERIES (MOBILE E TABLET HEADER)
   ========================================= */
@media (max-width: 1023px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100vw; /* Força 100vw em vez de 100% */
        background: rgba(0, 22, 58, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 20px;
        flex-direction: column;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        box-sizing: border-box;
    }

    .main-nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-list {
        flex-direction: column;
        gap: 10px;
    }

    .user-info {
        display: none; /* Oculta email/nome no mobile para caber no header */
    }
}

/* =========================================
   MEDIA QUERIES (DESKTOP)
   ========================================= */
@media (min-width: 768px) {
    .login-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 40px;
        min-height: auto; /* Remove 100vh constraint inside grid if needed */
    }

    body {
        align-items: center;
    }

    .login-hero {
        width: 50%;
        padding-top: 0;
        align-items: flex-start;
        text-align: left;
    }

    .hero-content {
        align-items: flex-start;
    }
    
    .hero-bot {
        width: 250px;
    }
    
    .hero-grid-system {
        max-width: 480px;
    }

    .grid-features {
        gap: 12px;
    }

    .feature-item {
        padding: 12px 10px;
    }

    .feature-item i {
        font-size: 22px;
    }

    .feature-text span {
        display: block;
        font-size: 0.7rem;
    }

    .feature-text strong {
        font-size: 0.85rem;
    }

    .login-form-wrapper {
        width: 50%;
        justify-content: flex-end;
    }

    .login-card {
        padding: 50px 40px;
    }
}

@media (min-width: 1024px) {
    .hero-bot {
        width: 280px;
    }
    .hero-grid-system {
        max-width: 520px;
        transform: translateX(20px);
    }
}

/* =========================================
   PROFILE MODAL
   ========================================= */
.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    box-sizing: border-box;
}

.profile-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Tema Escuro (Padrão) */
.profile-modal-container {
    background: var(--color-bg-dark);
    width: 100%;
    max-width: 750px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-premium);
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-modal-header {
    padding: 18px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(0, 0, 0, 0.2);
}

.profile-modal-overlay.active .profile-modal-container {
    transform: scale(1) translateY(0);
}

.profile-modal-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-modal-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.profile-modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 2px 0;
    font-family: 'Outfit', sans-serif;
}

.profile-modal-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.profile-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #ff4d4d;
    transform: rotate(90deg);
}

.profile-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.profile-photo-group {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.profile-photo-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.profile-photo-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.profile-photo-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--color-secondary);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid var(--color-bg-dark);
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(255, 123, 0, 0.3);
}

.profile-photo-edit-btn:hover {
    transform: scale(1.1);
    background: #e66e00;
}

.profile-hidden-input {
    display: none;
}

.profile-photo-info {
    display: flex;
    flex-direction: column;
}

.profile-photo-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.profile-photo-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px; /* Reduzido de 25px */
}

.profile-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px; /* Reduzido de 8px */
}

.profile-form-group label {
    font-size: 0.8rem; /* Reduzido de 0.85rem */
    font-weight: 600;
    color: #ffffff;
    margin-left: 2px;
}

.profile-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-input-icon {
    position: absolute;
    left: 12px; /* Ajustado de 18px */
    color: var(--color-primary);
    font-size: 1.1rem; /* Reduzido de 1.3rem */
    opacity: 0.7;
    transition: var(--transition);
}

.profile-input {
    width: 100%;
    padding: 10px 12px 10px 38px; /* Reduzido o padding vertical de 14px e padding esquerdo */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px; /* Reduzido de 10px */
    background: rgba(0, 0, 0, 0.2);
    color: #ffffff;
    font-size: 0.9rem; /* Reduzido de 1rem */
    font-family: inherit;
    transition: var(--transition);
    box-sizing: border-box;
}

/* Ensure password field has enough right padding for the eye icon */
#profilePassword.profile-input,
#smtpPassword.profile-input {
    padding-right: 40px; /* Reduzido de 50px */
}

.profile-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px var(--color-input-focus); /* Reduzido de 4px */
}

.profile-input:focus + .profile-input-icon {
    opacity: 1;
}

.profile-toggle-password {
    position: absolute;
    right: 12px; /* Ajustado de 18px */
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.1rem; /* Reduzido de 1.3rem */
    padding: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-toggle-password:hover {
    color: var(--color-primary);
}

.profile-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
}

.profile-btn-cancel {
    padding: 10px 20px; /* Reduzido de 12px 24px */
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem; /* Adicionado para diminuir o texto do botão */
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.profile-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.05);
}

.profile-btn-save {
    padding: 10px 20px; /* Reduzido de 12px 24px */
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem; /* Adicionado para diminuir o texto do botão */
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(11, 64, 156, 0.2);
}

.profile-btn-save:hover {
    background: #093075;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 64, 156, 0.3);
}

/* Responsividade do Modal */
@media (max-width: 768px) {
    .profile-form-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-modal-container {
        max-height: 95vh;
    }
    
    .profile-modal-header {
        padding: 20px;
    }
    
    .profile-modal-body {
        padding: 20px;
    }
    
    .profile-modal-footer {
        padding: 20px;
        flex-direction: column-reverse;
    }
    
    .profile-btn-cancel, .profile-btn-save {
        width: 100%;
        justify-content: center;
    }
}

/* ---------------------------------------------------
   WHATSAPP CONNECTED GRID (Evolution API)
--------------------------------------------------- */
.whatsapp-status-card {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.whatsapp-status-icon {
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    text-align: left;
}

.wpp-info-box {
    background: var(--color-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.wpp-info-box span {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 5px;
}

.wpp-info-box strong {
    color: var(--color-text);
    font-size: 0.95rem;
}

/* Light Theme overrides for WhatsApp Card */
body.light-theme .whatsapp-status-card {
    background: rgba(16, 185, 129, 0.03);
    border-color: rgba(16, 185, 129, 0.3);
}
body.light-theme .wpp-info-box {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

