/**
 * Main CSS - Escola + Segura
 * @package Escola_Mais_Segura
 * @version 2.0.0
 */

/* ==========================================================================
   VARIÁVEIS GLOBAIS
   ========================================================================== */

:root {
    --primary-color: #960505;
    --primary-dark: #ad1e05;
    --primary-light: #e8f5e9;
    --secondary-color: #2196F3;
    --secondary-dark: #1976D2;
    --secondary-light: #BBDEFB;
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --border-color: #dddddd;
    --border-light: #eeeeee;
    --background-light: #f9f9f9;
    --background-dark: #222222;
    --error-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    
    --border-radius-sm: 3px;
    --border-radius: 5px;
    --border-radius-lg: 10px;
    --border-radius-xl: 20px;
    
    --box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --box-shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
    --box-shadow-lg: 0 10px 20px rgba(0,0,0,0.1);
    
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-family-serif: Georgia, 'Times New Roman', Times, serif;
}

/* ==========================================================================
   RESET E BASE
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background: white;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ==========================================================================
   TIPOGRAFIA
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover,
a:focus {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.ems-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

.ems-container-fluid {
    width: 100%;
    padding: 0 var(--spacing-md);
}

/* Grid */
.ems-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.ems-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ems-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ems-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Flex */
.ems-flex {
    display: flex;
    gap: var(--spacing-md);
}

.ems-flex-wrap { flex-wrap: wrap; }
.ems-flex-center { align-items: center; justify-content: center; }
.ems-flex-between { justify-content: space-between; }
.ems-flex-start { justify-content: flex-start; }
.ems-flex-end { justify-content: flex-end; }

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
    background: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-color);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.site-logo img {
    max-height: 60px;
    width: auto;
    transition: var(--transition);
}

.site-title {
    font-size: 1.5rem;
    margin-bottom: 0;
    line-height: 1.2;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--primary-color);
}

.site-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Navegação */
.main-navigation {
    flex: 1;
    margin: 0 var(--spacing-lg);
}

.main-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    justify-content: center;
}

.main-menu a {
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-menu a:hover::after,
.main-menu .current-menu-item a::after {
    width: 80%;
}

.main-menu a:hover,
.main-menu a:focus,
.main-menu .current-menu-item a {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: var(--spacing-sm);
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: relative;
}

.menu-icon {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    position: relative;
    transition: var(--transition);
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
    left: 0;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

.menu-toggle[aria-expanded="true"] .menu-icon {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Header actions */
.header-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.user-greeting {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-right: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--primary-light);
    border-radius: var(--border-radius);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: #ecf0f1;
    padding: 0 0 var(--spacing-md);
    margin-top: var(--spacing-xxl);
    position: relative;
    overflow: hidden;
    width: 100%;
    clear: both;
}

.footer-wave {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
    transform: rotate(180deg);
    z-index: 1;
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 60px;
    fill: currentColor;
}

/* Newsletter */
.footer-newsletter {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-content {
    text-align: center;
    margin-bottom: 30px;
}

.newsletter-title {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.newsletter-text {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.newsletter-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-submit {
    padding: 15px 30px;
    border-radius: 50px;
    white-space: nowrap;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.newsletter-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    cursor: pointer;
}

.newsletter-consent a {
    color: var(--primary-color);
    text-decoration: none;
}

.newsletter-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

/* Footer Widgets */
.footer-widgets {
    padding: 40px 0;
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-widget-area {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget-area .widget-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.footer-widget-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget-area li {
    margin-bottom: 10px;
}

.footer-widget-area a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-widget-area a:hover {
    color: white;
    padding-left: 5px;
}

/* Footer Main */
.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    padding: 40px 0;
    position: relative;
    z-index: 2;
}

.footer-brand {
    text-align: left;
}

.footer-logo img {
    max-height: 60px;
    width: auto;
    margin-bottom: 20px;
}

.footer-logo-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-logo-text .logo-icon {
    font-size: 2rem;
}

.footer-logo-text .logo-name {
    color: white;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    line-height: 1.6;
}

.footer-social {
    margin-top: 20px;
}

.social-title {
    color: white;
    margin-bottom: 15px;
    font-size: 1rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    color: white;
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Footer Links */
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-menu-column {
    min-width: 0;
}

.footer-title {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-menu a:hover {
    color: white;
    transform: translateX(5px);
}

/* Contact Info */
.contact-info {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.contact-icon {
    font-size: 1.2rem;
    min-width: 24px;
}

.contact-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: white;
}

.btn-support-network {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 15px;
}

.btn-support-network:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Partners Section */
.footer-partners {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.partners-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.partner-logo {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 1rem;
    opacity: 0.8;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 20px;
    border-radius: 50px;
}

.partner-logo:hover {
    opacity: 1;
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.1);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 30px 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 2;
}

.copyright {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.separator {
    color: rgba(255, 255, 255, 0.2);
}

.version {
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.footer-legal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legal-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-link:hover {
    color: white;
}

/* Footer Message */
.footer-message {
    text-align: center;
    padding: 20px 0;
    position: relative;
    z-index: 2;
}

.message-bubble {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 30px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.message-icon {
    font-size: 1.2rem;
    animation: heartBeat 1.5s infinite;
}

.message-text {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ==========================================================================
   BOTÕES
   ========================================================================== */

.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    line-height: 1.5;
}

.btn:hover,
.btn:focus {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-small {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.9rem;
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ==========================================================================
   BOTÃO DE EMERGÊNCIA
   ========================================================================== */

.ems-emergency-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.emergency-toggle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.emergency-toggle:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.6);
}

.emergency-icon {
    font-size: 28px;
    margin-bottom: 2px;
}

.emergency-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.emergency-panel {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 340px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    overflow: hidden;
    display: none;
    z-index: 10000;
}

.emergency-header {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.emergency-header h4 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.emergency-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.emergency-body {
    padding: 25px;
}

.emergency-subtitle {
    margin: 0 0 20px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    text-align: center;
}

.emergency-contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.emergency-contact {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.emergency-contact:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateX(8px);
}

.contact-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
}

.contact-info strong {
    display: block;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 4px;
}

.contact-info small {
    display: block;
    color: #666;
    font-size: 0.85rem;
}

.emergency-footer {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

/* ==========================================================================
   MODAL
   ========================================================================== */

.ems-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
}

.ems-modal[aria-hidden="false"] {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    background: white;
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}

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

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1a2639, #2c3e50);
    color: white;
    border-radius: 24px 24px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.modal-close {
    background: rgba(255,255,255,0.15);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

.modal-content {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 24px 24px;
}

/* ==========================================================================
   AUTH MODAL TABS
   ========================================================================== */

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.auth-tab.active {
    color: var(--primary-color);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form .form-group {
    margin-bottom: 15px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.auth-form .password-wrapper {
    position: relative;
}

.auth-form .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #999;
}

.auth-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-message {
    margin: 15px 0;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.auth-message.error {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
    display: block;
}

.auth-message.success {
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    color: #166534;
    display: block;
}

.auth-loader {
    text-align: center;
    padding: 20px;
    display: none;
}

.auth-loader .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   NOTIFICAÇÕES
   ========================================================================== */

#ems-notification-area {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000000;
    max-width: 350px;
}

.ems-notification {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid;
}

.ems-notification.success {
    border-left-color: #4caf50;
}

.ems-notification.error {
    border-left-color: #f44336;
}

.ems-notification.warning {
    border-left-color: #ff9800;
}

.ems-notification.info {
    border-left-color: #2196f3;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content {
    flex: 1;
    color: #333;
    font-size: 0.95rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    margin-left: 15px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */

@media (max-width: 992px) {
    .footer-widgets-grid,
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .site-header-inner {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .site-branding {
        width: 100%;
        justify-content: center;
    }
    
    .main-navigation {
        width: 100%;
        margin: 0;
    }
    
    .main-menu {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-xs);
        display: none;
    }
    
    .main-menu.toggled-on {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
        margin: 0 auto;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .ems-emergency-button {
        bottom: 20px;
        right: 20px;
    }
    
    .emergency-toggle {
        width: 60px;
        height: 60px;
    }
    
    .emergency-panel {
        width: calc(100vw - 40px);
        bottom: 75px;
    }
    
    .footer-newsletter {
        padding: 30px 20px;
    }
    
    .newsletter-input-group {
        flex-direction: column;
    }
    
    .newsletter-submit {
        width: 100%;
    }
    
    .footer-widgets-grid,
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-newsletter {
        padding: 20px 15px;
    }
    
    .newsletter-title {
        font-size: 1.4rem;
    }
    
    .footer-wave svg {
        height: 40px;
    }
    
    .partners-logos {
        flex-direction: column;
    }
    
    .partner-logo {
        width: 100%;
        text-align: center;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-legal .separator {
        display: none;
    }
    
    #ems-notification-area {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ==========================================================================
   AUTH MODAL MELHORADO
   ========================================================================== */

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #e5e7eb;
    gap: 5px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-tab .tab-icon {
    font-size: 1.2rem;
}

.auth-tab:hover {
    color: var(--primary-color);
    background: #f9fafb;
}

.auth-tab.active {
    color: var(--primary-color);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-form label .label-icon {
    font-size: 1.1rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #f9fafb;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}

.auth-form .password-wrapper {
    position: relative;
}

.auth-form .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #9ca3af;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
}

.auth-form .toggle-password:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.password-requirements {
    background: #f9fafb;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.password-requirements p {
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
}

.password-requirements li {
    font-size: 0.85rem;
    color: #9ca3af;
    transition: color 0.3s;
}

.reset-info {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid var(--primary-color);
}

.reset-info .info-icon {
    font-size: 1.5rem;
}

.reset-info p {
    margin: 0;
    color: #2e7d32;
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.auth-footer p {
    margin: 5px 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-message {
    margin: 15px 0;
    padding: 15px;
    border-radius: 10px;
    display: none;
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-message.error {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
    display: block;
}

.auth-message.success {
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    color: #166534;
    display: block;
}

.auth-loader {
    text-align: center;
    padding: 40px 20px;
    display: block;
}

.auth-loader .spinner {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.auth-loader p {
    color: #6b7280;
    font-size: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsividade para o popup */
@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-tab {
        font-size: 0.9rem;
        padding: 10px 5px;
    }
    
    .auth-tab .tab-icon {
        font-size: 1rem;
    }
}

/* ==========================================================================
   AUTH MODAL - LAYOUT MINIMALISTA
   ========================================================================== */

#ems-auth-modal .modal-container {
    max-width: 400px;
    background: white;
    border-radius: 8px;
    padding: 0;
}

#ems-auth-modal .modal-header {
    display: none; /* Esconder cabeçalho padrão */
}

#ems-auth-modal .modal-content {
    padding: 30px;
}

.auth-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: #333;
    font-weight: 500;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.remember-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-text {
    color: #555;
    font-size: 0.9rem;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 20px;
}

.btn-login:hover {
    background: #45a049;
}

.btn-login:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.auth-footer a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.auth-footer a:hover {
    color: #45a049;
    text-decoration: underline;
}

.auth-footer .forgot-link {
    display: block;
    margin-bottom: 15px;
}

.auth-footer p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.auth-footer p a {
    font-weight: 600;
}

.auth-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsividade */
@media (max-width: 480px) {
    #ems-auth-modal .modal-content {
        padding: 20px;
    }
    
    .auth-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .btn-login {
        padding: 12px;
    }
}

/* ==========================================================================
   USER MENU DROPDOWN
   ========================================================================== */

.user-menu {
    position: relative;
    margin-left: 20px;
}

.user-menu-dropdown {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: var(--primary-color, #4CAF50);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.3s;
}

.user-menu-toggle:hover {
    background: var(--primary-dark, #45a049);
}

.user-avatar {
    font-size: 1.2rem;
}

.user-name {
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 0.8rem;
    margin-left: 5px;
}

.user-menu-items {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    padding: 8px 0;
    display: none;
    z-index: 1000;
    border: 1px solid #eaeaea;
}

.user-menu-dropdown:hover .user-menu-items {
    display: block;
}

.user-menu-items .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
    font-size: 0.95rem;
}

.user-menu-items .menu-item:hover {
    background: #f5f5f5;
}

.user-menu-items .menu-item.logout {
    border-top: 1px solid #eaeaea;
    margin-top: 5px;
    padding-top: 12px;
    color: #d32f2f;
}

.user-menu-items .menu-item.logout:hover {
    background: #ffebee;
}

.item-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Responsividade */
@media (max-width: 768px) {
    .user-menu {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .user-menu-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .user-menu-items {
        width: 100%;
        position: relative;
        display: none;
        margin-top: 5px;
    }
    
    .user-menu-dropdown:hover .user-menu-items {
        display: block;
    }
}