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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --header-bg: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    /* Opções de header (descomente a que preferir):
    --header-bg: linear-gradient(135deg, #059669 0%, #047857 100%); /* Verde médico */
    --header-bg: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); /* Roxo */
    --header-bg: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); /* Vermelho */
    --header-bg: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); /* Ciano */
    */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

html {
    margin: 0;
    padding: 0;
}

/* Header */
header.header {
    background: #0F3C4C;
    color: #FFFFFF;
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 0;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    width: 100%;
    display: block;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 1.5rem;
    height: 1.5rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    height: 44px;
    box-sizing: border-box;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn i {
    font-size: 1.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

/* Botão Entrar - Destacado (Primary) */
.nav-btn-primary {
    background: #FFFFFF;
    color: #0F3C4C;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    height: 44px;
}

.nav-btn-primary i.fa-chevron-down {
    font-size: 0.875rem;
    width: 0.875rem;
    height: 0.875rem;
    margin-left: 0.5rem;
}

.nav-btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #0F3C4C;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Botão Voltar - Ghost/Ícone */
.nav-btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
    height: 44px;
}

.nav-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

/* Botão Início - Link Simples */
.nav-btn-link {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.7;
    padding: 0.5rem 0.75rem;
    height: 44px;
}

.nav-btn-link:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
    transform: translateY(-2px);
}

/* Dropdown Menu do Usuário */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    min-width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 10px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0.5rem 0;
    border: 1px solid rgba(0,0,0,0.1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

body.dark-mode .dropdown-menu {
    background: #1f2937;
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .dropdown-item {
    color: #e5e7eb;
}

body.dark-mode .dropdown-item:hover {
    background: #374151;
    color: #ffffff;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    width: 44px;
    height: 44px;
    position: relative;
    box-sizing: border-box;
}

.dark-mode-toggle i {
    font-size: 1.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 1.125rem;
    height: 1.125rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    flex-shrink: 0;
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    color: white;
    padding: 4rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 20%, rgba(255, 255, 255, 0.3) 80%, transparent 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-dark);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.card-icon i {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-style: normal !important;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    height: 100%;
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.card p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Color Variants */
.card-blue .card-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.card-red .card-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.card-green .card-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.card-purple .card-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.card-orange .card-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.card-teal .card-icon {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    color: white;
}

.card-indigo .card-icon {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}

/* Stats Section */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    padding-left: 0.5rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* Responsive - Mobile First Approach */
@media (max-width: 992px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .nav-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .container {
        padding: 1.5rem 1rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    /* Header Mobile */
    header.header {
        padding: 0.5rem 0;
    }
    
    .header-container {
        padding: 0 1rem;
        flex-wrap: wrap;
    }
    
    .logo {
        font-size: 1.1rem;
        gap: 0.4rem;
    }
    
    .logo i {
        font-size: 1.25rem;
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .logo span {
        font-size: 1rem;
    }
    
    .nav-actions {
        display: flex;
        flex-direction: row;
        gap: 0.4rem;
        flex-wrap: wrap;
    }
    
    .hide-mobile {
        display: none !important;
    }
    
    .nav-btn {
        padding: 0.5rem;
        min-width: 44px; /* Touch target mínimo */
        height: 44px;
        justify-content: center;
        font-size: 0.875rem;
    }
    
    .nav-btn-primary {
        height: 44px;
    }
    
    .nav-btn-ghost {
        height: 44px;
    }
    
    .nav-btn-link {
        height: 44px;
    }
    
    .nav-btn i {
        font-size: 1rem;
        width: 1rem;
        height: 1rem;
    }
    
    .dark-mode-toggle {
        width: 44px;
        height: 44px;
    }
    
    .dark-mode-toggle i {
        font-size: 1rem;
        width: 1rem;
        height: 1rem;
    }
    
    .nav-btn-primary i.fa-chevron-down {
        font-size: 0.75rem;
        width: 0.75rem;
        height: 0.75rem;
    }
    
    /* Hero Mobile */
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-content {
        padding: 1rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Cards Mobile */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card {
        padding: 1.25rem;
        min-height: auto;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .card p {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    /* Section Title Mobile */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    /* Container Mobile */
    .container {
        padding: 1.5rem 1rem;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-section a {
        font-size: 0.875rem;
        padding: 0.25rem 0;
    }
    
    /* Stats Mobile */
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Forms Mobile */
    .form-control,
    .form-select,
    .form-input {
        font-size: 16px !important; /* Evita zoom no iOS */
        padding: 0.75rem 1rem;
        min-height: 44px; /* Touch target mínimo */
    }
    
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 0.75rem 1.5rem;
        min-height: 44px; /* Touch target mínimo */
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: 1.1rem;
    }
    
    /* Cards Bootstrap Mobile */
    .card.shadow-lg {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    /* Dropdown Mobile */
    .dropdown-menu {
        min-width: 100%;
        max-width: 100vw;
        left: 0 !important;
        right: 0 !important;
        margin-top: 0.5rem;
    }
    
    /* Modal Mobile */
    .modal-container {
        width: 95% !important;
        max-width: 95% !important;
        margin: 1rem auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header,
    .modal-form,
    .modal-footer {
        padding: 1rem !important;
    }
    
    .modal-avatar img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    /* Extra Small Mobile */
    header.header {
        padding: 0.4rem 0;
    }
    
    .header-container {
        padding: 0 0.75rem;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .logo i {
        font-size: 1.1rem;
        width: 1.1rem;
        height: 1.1rem;
    }
    
    .logo span {
        font-size: 0.9rem;
    }
    
    .nav-btn {
        padding: 0.4rem;
        min-width: 40px;
        height: 40px;
    }
    
    .nav-btn-primary {
        height: 40px;
    }
    
    .nav-btn-ghost {
        height: 40px;
    }
    
    .nav-btn-link {
        height: 40px;
    }
    
    .nav-btn i {
        font-size: 0.95rem;
        width: 0.95rem;
        height: 0.95rem;
    }
    
    .dark-mode-toggle {
        width: 40px;
        height: 40px;
    }
    
    .dark-mode-toggle i {
        font-size: 0.95rem;
        width: 0.95rem;
        height: 0.95rem;
    }
    
    .nav-btn-primary i.fa-chevron-down {
        font-size: 0.7rem;
        width: 0.7rem;
        height: 0.7rem;
    }
    
    .hero {
        padding: 1.5rem 0.75rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .container {
        padding: 1rem 0.75rem;
    }
    
    .section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .card h3 {
        font-size: 1rem;
    }
    
    .card p {
        font-size: 0.8rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .footer {
        padding: 1.5rem 0.75rem 1rem;
    }
    
    .footer-section h4 {
        font-size: 0.95rem;
    }
    
    .footer-section a {
        font-size: 0.8rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    .d-md-flex {
        flex-direction: column;
    }
    
    .justify-content-md-end {
        justify-content: stretch !important;
    }
    
    /* Tables Mobile */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    /* Badges Mobile */
    .badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
    }
    
    /* Alerts Mobile */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Dark Mode Styles */
body.dark-mode {
    background: #0f172a;
    color: #f1f5f9;
}

body.dark-mode .header {
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
}

body.dark-mode .card {
    background: #1e293b;
    color: #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

body.dark-mode .card h3 {
    color: #f1f5f9;
}

body.dark-mode .card p {
    color: #cbd5e1;
}

body.dark-mode .card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

body.dark-mode .stat-card {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode .section-title {
    color: #f1f5f9;
}

body.dark-mode .footer {
    background: #0f172a;
}

body.dark-mode .nav-btn-primary {
    background: #3b82f6;
    color: #ffffff;
    border: 1px solid #3b82f6;
}

body.dark-mode .nav-btn-primary:hover {
    background: #2563eb;
    color: #ffffff;
}

body.dark-mode .dark-mode-toggle i.fa-moon {
    display: none;
}

body.dark-mode .dark-mode-toggle i.fa-sun {
    display: inline-block;
}

.dark-mode-toggle i.fa-sun {
    display: none;
}

/* Modal de Login Moderno */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    visibility: hidden;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: auto;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

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

.modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #e5e7eb;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--danger-color);
}

.modal-avatar {
    margin-bottom: 1rem;
}

.modal-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.modal-form {
    padding: 1.5rem 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    user-select: none;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.btn-block {
    width: 100%;
}

.modal-footer {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e5e7eb;
    margin-top: 0;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.forgot-link:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* Dark Mode para Modal */
body.dark-mode .modal-container {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode .modal-close {
    color: #cbd5e1;
}

body.dark-mode .modal-close:hover {
    background: #334155;
    color: #ffffff;
}

body.dark-mode .form-input {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

body.dark-mode .form-group label {
    color: #f1f5f9;
}

body.dark-mode .btn-secondary {
    background: #334155;
    color: #f1f5f9;
    border-color: #475569;
}

body.dark-mode .btn-secondary:hover {
    background: #475569;
    border-color: #64748b;
}

body.dark-mode .modal-header {
    border-bottom-color: #475569;
}

body.dark-mode .modal-footer {
    border-top-color: #475569;
}

body.dark-mode .modal-avatar img {
    border-color: var(--primary-color);
}

body.dark-mode .forgot-link {
    color: #60a5fa;
}

body.dark-mode .forgot-link:hover {
    color: #93c5fd;
}

/* Lista de Calculadoras */
.calc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.calc-item {
    margin-bottom: 1rem;
}

.calc-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-white);
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
}

.calc-link:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    transform: translateX(4px);
}

.calc-link i {
    color: var(--primary-color);
}

/* Formulários de Cálculo */
.calc-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group-calc {
    margin-bottom: 1rem;
}

.form-group-calc label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group-calc input,
.form-group-calc select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group-calc input:focus,
.form-group-calc select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.calc-button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.calc-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.content-text {
    line-height: 1.8;
    text-align: justify;
}

.content-text p {
    margin-bottom: 1rem;
}

/* Dark Mode para formulários */
body.dark-mode .calc-link {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .calc-link:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
}

body.dark-mode .form-group-calc input,
body.dark-mode .form-group-calc select {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .form-group-calc input:focus,
body.dark-mode .form-group-calc select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Classe show para substituir w3-show */
.show {
    display: block !important;
}

.d-none {
    display: none !important;
}

/* Accordion para injetáveis */
.via {
    transition: var(--transition);
    overflow: hidden;
}

.via.show {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 2000px;
    }
}

/* Textarea */
.form-input[type="textarea"],
textarea.form-input {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header,
    .modal-form,
    .modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .modal-avatar img {
        width: 60px;
        height: 60px;
    }
}

/* Garantir que os ícones Font Awesome sejam exibidos nos cards */
.card-icon i,
.card-icon .fas,
.card-icon .far,
.card-icon .fab {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }
.card:nth-child(7) { animation-delay: 0.7s; }
.card:nth-child(8) { animation-delay: 0.8s; }

/* Classes Utilitárias */
.page-wrapper {
    background: var(--bg-light);
    min-height: 100vh;
    padding-top: 60px;
}

.page-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-container {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.page-container-large {
    max-width: 75%;
    margin: 0 auto;
}

.page-container-half {
    max-width: 50%;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.page-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.page-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.page-section {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.page-section-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.page-section-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

/* Cores de texto */
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-danger { color: var(--danger-color); }
.text-success { color: var(--secondary-color); }
.text-warning { color: var(--accent-color); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Backgrounds */
.bg-light { background-color: var(--bg-light); }
.bg-white { background-color: var(--bg-white); }
.bg-primary { background-color: var(--primary-color); color: white; }
.bg-danger { background-color: var(--danger-color); color: white; }
.bg-success { background-color: var(--secondary-color); color: white; }
.bg-warning { background-color: var(--accent-color); color: white; }

/* Padding e Margin */
.p-8 { padding: 0.5rem; }
.p-16 { padding: 1rem; }
.p-24 { padding: 1.5rem; }
.m-8 { margin: 0.5rem; }
.m-16 { margin: 1rem; }
.m-24 { margin: 1.5rem; }
.mb-16 { margin-bottom: 1rem; }
.mb-24 { margin-bottom: 1.5rem; }
.mt-16 { margin-top: 1rem; }
.mt-24 { margin-top: 1.5rem; }

/* Bordas arredondadas */
.rounded { border-radius: 8px; }
.rounded-lg { border-radius: var(--border-radius); }
.rounded-xl { border-radius: 16px; }
.rounded-full { border-radius: 50%; }

/* Display */
.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.d-inline-block { display: inline-block; }

/* Flexbox */
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive */
@media (max-width: 992px) {
    .page-container-large,
    .page-container-half {
        max-width: 100%;
    }
    
    .hide-medium {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hide-small {
        display: none !important;
    }
    
    .page-header h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-main {
        padding: 1rem;
    }
    
    .page-container,
    .page-section {
        padding: 1rem;
    }
}

/* Dark Mode para classes utilitárias */
body.dark-mode .page-wrapper {
    background: #0f172a;
}

body.dark-mode .page-container,
body.dark-mode .page-section {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode .page-header h3 {
    color: #f1f5f9;
}

body.dark-mode .bg-light {
    background-color: #1e293b;
}

body.dark-mode .bg-white {
    background-color: #1e293b;
}

/* Bootstrap Select - Z-index para dropdown aparecer acima de outros elementos */
.bootstrap-select {
    z-index: 1050 !important;
}

.bootstrap-select .dropdown-menu {
    z-index: 1051 !important;
}

.bootstrap-select.show .dropdown-menu {
    z-index: 1051 !important;
}

/* Remover seta padrão do Bootstrap 5 quando Bootstrap Select está ativo */
select.selectpicker.form-select,
select.selectpicker {
    background-image: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Garantir que apenas o Bootstrap Select mostre a seta */
.bootstrap-select .dropdown-toggle::after {
    display: inline-block !important;
    margin-left: 0.5rem;
}

/* Remover qualquer seta adicional que possa aparecer */
.bootstrap-select .filter-option-inner-inner::after {
    display: none !important;
}

/* Sobre Section - Formatação de texto */
.sobre-content p {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.9;
    font-size: 1.05rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.sobre-content p:last-child {
    margin-bottom: 0;
}

/* Mobile: Sobre Section */
@media (max-width: 768px) {
    .sobre-content p {
        text-align: left;
        font-size: 1rem;
        line-height: 1.8;
    }
}

/* Mobile: Bootstrap Select melhorado */
@media (max-width: 768px) {
    .bootstrap-select {
        width: 100% !important;
    }
    
    .bootstrap-select .dropdown-toggle {
        font-size: 16px !important; /* Evita zoom no iOS */
        padding: 0.75rem 1rem;
        min-height: 44px;
    }
    
    .bootstrap-select .dropdown-menu {
        max-height: 50vh;
        overflow-y: auto;
    }
}

/* Melhorias gerais para touch targets */
@media (max-width: 768px) {
    /* Links clicáveis */
    a, button, input[type="submit"], input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Inputs e selects */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important; /* Evita zoom automático no iOS */
        padding: 0.75rem 1rem;
        min-height: 44px;
    }
    
    /* Labels */
    label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    /* Checkboxes e radios */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
        margin-right: 0.5rem;
    }
    
    /* Tabelas responsivas */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        border: 1px solid #dee2e6;
        border-radius: 8px;
    }
    
    .table {
        font-size: 0.875rem;
        margin-bottom: 0;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Cards Bootstrap */
    .card {
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-footer {
        padding: 0.75rem 1rem;
    }
    
    /* List groups */
    .list-group-item {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
    }
    
    /* Nav tabs */
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    /* Accordion */
    .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    /* Spacing mobile */
    .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .mt-3 {
        margin-top: 1rem !important;
    }
    
    .mt-4 {
        margin-top: 1.5rem !important;
    }
    
    /* Grid mobile */
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Text mobile */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    h4 { font-size: 1.1rem !important; }
    h5 { font-size: 1rem !important; }
    h6 { font-size: 0.95rem !important; }
    
    p, li, span {
        font-size: 0.875rem;
        line-height: 1.6;
    }
    
    /* Hero section mobile */
    .hero-content h1 {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 1rem !important;
    }
}
