/* Reset e variáveis CSS */
:root {
    --primary-color: #1e3a8a;
    --primary-dark: #1e40af;
    --secondary-color: #3b82f6;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --black: #000000;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    overflow-x: hidden;
}

/* Cabeçalho */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    height: 70px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 60px;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-secondary {
    background: var(--gray-600);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--gray-700);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #047857;
}

.btn-partner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.btn-partner:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
}

/* Sidebar principal */
.sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--white);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 1002;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.sidebar-toggle.hidden {
    display: none !important;
}

.sidebar-toggle:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar {
    position: fixed;
    top: 70px;
    left: -280px;
    width: 280px;
    height: calc(100vh - 70px);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-700);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.sidebar-item:hover {
    background: var(--gray-50);
    color: var(--primary-color);
}

.sidebar-item i {
    width: 20px;
    text-align: center;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content {
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    color: #fbbf24;
}

.hero p {
    font-size: 18px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: 16px;
    margin-bottom: 40px;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-wave-small {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--gray-50);
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 80%);
}

/* Stats Section */
.stats-section {
    padding: 60px 0;
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.stats-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-box {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--white);
    font-size: 24px;
}

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-content p {
    color: var(--gray-600);
    font-weight: 500;
}

/* Seções gerais */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.text-primary {
    color: var(--primary-color);
}

.text-dark {
    color: var(--gray-900);
}

.section-header p {
    font-size: 18px;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-item {
    margin-bottom: 40px;
}

.about-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.about-item p {
    color: var(--gray-600);
    line-height: 1.7;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
}

.value-item i {
    color: var(--success-color);
}

.about-features {
    display: grid;
    gap: 30px;
}

.feature-card {
    background: var(--gray-50);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--white);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--white);
    font-size: 20px;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-600);
    font-size: 14px;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: var(--gray-50);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.02);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--white);
    font-size: 24px;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.service-card > p {
    color: var(--gray-600);
    margin-bottom: 24px;
    line-height: 1.6;
}

.service-benefits {
    margin-bottom: 30px;
}

.service-benefits h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--gray-800);
}

.service-benefits ul {
    list-style: none;
}

.service-benefits li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--gray-600);
    font-size: 14px;
}

.service-benefits i {
    color: var(--success-color);
    font-size: 12px;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Location Section */
.location {
    padding: 80px 0;
    background: var(--white);
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.location-info {
    display: grid;
    gap: 30px;
}

.info-item {
    display: flex;
    gap: 16px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
    flex-shrink: 0;
}

.info-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.info-content p {
    color: var(--gray-600);
    line-height: 1.6;
}

.location-map {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.footer-logo h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-section p {
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--gray-800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a, .footer-section button {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    text-align: left;
    padding: 0;
}

.footer-section a:hover, .footer-section button:hover {
    color: var(--white);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--gray-400);
}

.footer-contact i {
    width: 16px;
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 20px;
    text-align: center;
    color: var(--gray-400);
}

/* DASHBOARD */
.dashboard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--gray-50);
    z-index: 10000;
    overflow: hidden;
    display: none;
}

.dashboard.active {
    display: flex;
}

.dashboard-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

/* Botão de menu do dashboard (mobile) */
.dashboard-menu-toggle {
    position: fixed;
    top: 13px;
    left: 15px;
    width: 48px;
    height: 48px;
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    z-index: 10006;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.dashboard-menu-toggle:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.08);
    box-shadow: var(--shadow-xl);
}

.dashboard-menu-toggle:active {
    transform: scale(0.95);
}

.dashboard-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    z-index: 10001;
}

.dashboard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-logo span {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-user span {
    font-weight: 500;
    color: var(--gray-700);
}

.dashboard-close {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: var(--transition);
}

.dashboard-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.dashboard-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.dashboard-sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    position: relative;
    z-index: 10002;
}

.dashboard-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    border-radius: 0;
    border-right: 4px solid transparent;
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.menu-item:hover {
    background: var(--gray-50);
    color: var(--primary-color);
    transform: translateX(4px);
    padding-left: 28px;
}

.menu-item:hover::before {
    transform: scaleY(1);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-right: 4px solid var(--primary-dark);
    transform: translateX(0);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.menu-item.active::before {
    display: none;
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.menu-item:hover i {
    transform: scale(1.15);
}

.menu-item.active i {
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 16px;
    background: var(--danger-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.dashboard-sidebar-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.dashboard-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dashboard-main {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: var(--gray-50);
}

.dashboard-section {
    display: none;
    opacity: 0;
    animation: fadeOut 0.3s ease;
}

.dashboard-section.active {
    display: block;
    animation: fadeInSection 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--gray-600);
    font-size: 16px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
}

.recent-proposals {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
}

.recent-proposals h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.proposals-list {
    display: grid;
    gap: 12px;
}

.no-data {
    text-align: center;
    color: var(--gray-500);
    padding: 40px 20px;
    font-style: italic;
}

.proposal-form {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 30px;
}

.form-section {
    margin-bottom: 40px;
}

.form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-100);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.form-text {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.fipe-link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.fipe-link-button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
    text-decoration: none;
}

.file-upload-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    width: 100%; /* Para ocupar a largura total do form-group */
    justify-content: center;
    margin-top: 4px; /* Espaçamento após o label do campo */
}

.file-upload-button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
    text-decoration: none;
}

/* TABELA DE PROPOSTAS */
.proposals-table {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.proposals-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.proposals-table th,
.proposals-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.proposals-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.proposals-table td {
    color: var(--gray-600);
    font-size: 14px;
}

.proposals-table tr:hover {
    background: var(--gray-50);
}

.no-proposals td {
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
    padding: 40px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-analyzing {
    background: #dbeafe;
    color: #1e40af;
}

.status-formalizada {
    background: #f3e8ff;
    color: #6b21a8;
}

/* CHAT */
.chat-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    height: 600px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-list {
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}

.chat-list h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
}

.chats-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.chat-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chat-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.chat-item:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.chat-item:hover::after {
    transform: scaleY(1);
}

.chat-item.active {
    border-color: var(--primary-color);
    background: var(--gray-50);
    box-shadow: var(--shadow);
}

.chat-item.active::after {
    transform: scaleY(1);
}

.chat-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.chat-info p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 2px;
}

.chat-info small {
    font-size: 12px;
    color: var(--gray-500);
}

.chat-unread-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-window {
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.chat-header .chat-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.chat-header .chat-info span {
    font-size: 14px;
    color: var(--gray-600);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--gray-50);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    margin-bottom: 16px;
}

.message-user {
    justify-content: flex-end;
}

.message-admin {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: var(--border-radius-lg);
    position: relative;
}

.message-user .message-content {
    background: var(--primary-color);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.message-admin .message-content {
    background: var(--white);
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
    border-bottom-left-radius: 4px;
}

.message-text {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.message-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    opacity: 0.8;
}

.message-user .message-info {
    color: rgba(255, 255, 255, 0.8);
}

.message-admin .message-info {
    color: var(--gray-500);
}

.chat-input-container {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
    display: block !important;
}

.chat-input {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.chat-input input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.chat-input button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* MODAIS */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10010;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(30, 58, 138, 0.1);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px 20px 0 0;
    color: var(--white);
}

.modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 32px;
    text-align: center;
}

.confirmation-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 20px;
}

.modal-body p {
    margin-bottom: 12px;
    color: var(--gray-600);
}

.modal form {
    padding: 32px;
}

.modal-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-size: 14px;
}

.modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.modal-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Notificações */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    color: var(--white);
    font-weight: 500;
    z-index: 10020;
    transform: translateX(400px);
    transition: var(--transition);
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--danger-color);
}

.notification.warning {
    background: var(--warning-color);
}

.notification.info {
    background: var(--primary-color);
}

/* ========================================
   RESPONSIVIDADE MOBILE E TABLET
   ======================================== */

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .proposals-table {
        overflow-x: auto;
        border-radius: var(--border-radius-lg);
    }

    .proposals-table table {
        min-width: 1000px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .location-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .chat-layout {
        grid-template-columns: 300px 1fr;
    }
}

/* Mobile e Tablets pequenos (max-width: 768px) */
@media (max-width: 768px) {
    /* Mostrar botão menu dashboard em mobile */
    .dashboard-menu-toggle {
        display: flex !important;
    }

    /* Header - Ocultar botões de login/cadastro em mobile */
    .header-nav .btn {
        display: none;
    }

    .header-container {
        padding: 0 15px;
    }

    /* CORREÇÃO: Adicionar espaço entre botão hambúrguer e logo no mobile */
    .header-logo {
        margin-left: 70px;
        flex: 1;
    }

    .logo-text {
        font-size: 16px;
    }

    .logo-img {
        width: 32px;
        height: 32px;
    }

    .header-nav {
        gap: 8px;
    }

    .btn {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 38px;
    }

    /* Dashboard sidebar em mobile */
    .dashboard-sidebar {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: calc(100vh - 70px);
        z-index: 10003;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-xl);
    }

    .dashboard-sidebar.active {
        left: 0;
    }

    .dashboard-nav {
        padding: 0 70px 0 15px;
    }

    .nav-logo span {
        font-size: 18px;
    }

    .dashboard-user span {
        display: none;
    }

    .dashboard-main {
        padding: 20px 15px;
        width: 100%;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 14px;
    }

    .stats-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-info h3 {
        font-size: 1.75rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-group[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }

    .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* PROPOSTAS ENVIADAS - MOBILE */
    .proposals-table {
        border-radius: var(--border-radius);
        margin: 0 -15px;
        width: calc(100% + 30px);
    }

    .proposals-table table {
        min-width: 900px;
    }

    .proposals-table th,
    .proposals-table td {
        padding: 12px 10px;
        font-size: 13px;
    }

    .proposals-table th:first-child,
    .proposals-table td:first-child {
        padding-left: 15px;
        position: sticky;
        left: 0;
        background: var(--white);
        z-index: 5;
    }

    .proposals-table th:first-child {
        background: var(--gray-50);
        z-index: 15;
    }

    .proposals-table th:last-child,
    .proposals-table td:last-child {
        padding-right: 15px;
    }

    /* ========================================
       CHAT EM MOBILE - MELHORIAS COMPLETAS
       ======================================== */
    
    /* Layout geral do chat em mobile */
    .chat-layout {
        grid-template-columns: 1fr;
        height: calc(100vh - 210px);
        min-height: 500px;
        max-height: 650px;
    }

    /* Lista de conversas - oculta por padrão em mobile */
    .chat-list {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 10;
        border-right: none;
    }

    /* Quando a lista de conversas está ativa */
    .chat-list.mobile-active {
        display: flex !important;
    }

    /* Cabeçalho do chat em mobile */
    .chat-header {
        padding: 16px;
        flex-shrink: 0;
    }

    .chat-header .chat-info h4 {
        font-size: 1rem;
    }

    .chat-header .chat-info span {
        font-size: 13px;
    }

    /* Área de mensagens do chat - altura otimizada */
    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        min-height: 250px;
        max-height: calc(100vh - 350px);
    }

    /* Bolhas de mensagens */
    .message {
        margin-bottom: 12px;
    }

    .message-content {
        max-width: 90%;
        padding: 10px 14px;
    }

    .message-text {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 6px;
    }

    .message-info {
        font-size: 10px;
    }

    /* Container de input - sempre visível e fixo */
    .chat-input-container {
        display: flex !important;
        visibility: visible !important;
        padding: 16px;
        background: var(--white);
        border-top: 2px solid var(--gray-200);
        flex-shrink: 0;
        position: relative;
        z-index: 5;
    }

    /* Campo de input do chat */
    .chat-input {
        display: flex !important;
        gap: 10px;
        width: 100%;
    }

    .chat-input input {
        flex: 1;
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 25px;
        border: 1px solid var(--gray-300);
        min-width: 0;
    }

    .chat-input input::placeholder {
        font-size: 13px;
    }

    /* Botão de enviar mensagem */
    .chat-input button {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        border-radius: 50%;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .chat-input button i {
        font-size: 16px;
    }

    /* Item de chat na lista */
    .chat-item {
        padding: 14px;
        margin-bottom: 10px;
    }

    .chat-info h4 {
        font-size: 0.95rem;
    }

    .chat-info p {
        font-size: 13px;
    }

    .chat-info small {
        font-size: 11px;
    }

    /* Container de chats */
    .chats-container {
        padding: 12px;
    }

    /* Quando não há mensagens */
    .chat-messages .no-data {
        padding: 20px;
        font-size: 14px;
    }

    /* MODAIS */
    .modal-content {
        width: 95%;
        margin: 20px;
        border-radius: 16px;
    }

    .modal-header {
        padding: 20px 24px;
        border-radius: 16px 16px 0 0;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .modal form,
    .modal-body {
        padding: 24px;
    }

    /* NOTIFICAÇÕES */
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }

    .notification.show {
        transform: translateY(0);
    }

    .notification-bell {
        margin-right: 0.5rem;
    }

    .notification-bell i {
        font-size: 1.25rem;
    }

    /* SEÇÕES DO SITE */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .stats-boxes {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .fipe-link-button {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1rem;
    }
}

/* Mobile pequeno (max-width: 480px) */
@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
    }

    /* CORREÇÃO: Manter espaçamento adequado no mobile pequeno */
    .header-logo {
        gap: 8px;
        margin-left: 65px;
    }

    .logo-text {
        font-size: 14px;
    }

    .logo-img {
        width: 28px;
        height: 28px;
    }

    .btn {
        padding: 6px 10px;
        font-size: 12px;
        min-height: 34px;
        gap: 4px;
    }

    .btn i {
        font-size: 12px;
    }

    .dashboard-menu-toggle {
        width: 44px;
        height: 44px;
        font-size: 20px;
        top: 13px;
        left: 10px;
    }

    .dashboard-sidebar {
        width: 90%;
        max-width: 100%;
    }

    .dashboard-nav {
        padding: 0 60px 0 10px;
    }

    .dashboard-main {
        padding: 15px 10px;
    }

    .stat-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .stat-card .stat-icon {
        margin: 0 auto;
    }

    .stat-info h3 {
        font-size: 1.5rem;
    }

    .form-group input,
    .form-group select {
        padding: 10px;
        font-size: 16px;
    }

    .proposals-table {
        margin: 0 -10px;
        width: calc(100% + 20px);
    }

    .proposals-table th,
    .proposals-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .proposals-table th:first-child,
    .proposals-table td:first-child {
        padding-left: 10px;
    }

    .proposals-table th:last-child,
    .proposals-table td:last-child {
        padding-right: 10px;
    }

    .status-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    /* ========================================
       CHAT EM MOBILE PEQUENO - AJUSTES FINOS
       ======================================== */
    
    .chat-layout {
        height: calc(100vh - 200px);
        min-height: 450px;
    }

    .chat-header {
        padding: 12px;
    }

    .chat-messages {
        padding: 12px;
        min-height: 220px;
    }

    .message-content {
        max-width: 95%;
        padding: 8px 12px;
    }

    .message-text {
        font-size: 13px;
    }

    .chat-input-container {
        padding: 12px;
    }

    .chat-input input {
        padding: 10px 14px;
        font-size: 14px;
    }

    .chat-input button {
        width: 40px;
        height: 40px;
    }

    .chat-input button i {
        font-size: 14px;
    }

    .chat-item {
        padding: 12px;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 16px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gray-300);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 🔔 ESTILOS DO SISTEMA DE NOTIFICAÇÕES - Ccapi Financiamentos */
/* Adicione estes estilos ao seu arquivo styles.css existente */

/* Botão de sino de notificações */
.notification-bell {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.notification-bell i {
    font-size: 1.5rem;
    color: var(--text-dark, #333);
}

.notification-bell:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Estados do botão de sino */
.notification-bell.active {
    animation: ringBell 2s ease-in-out infinite;
}

.notification-bell.active i {
    color: var(--primary-color, #007bff);
}

.notification-bell.inactive i {
    color: var(--gray-500, #999);
}

.notification-bell.disabled i {
    color: var(--gray-400, #ccc);
    cursor: not-allowed;
}

/* Indicador de status de notificação */
.notification-status {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    font-size: 10px;
    line-height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-status.active {
    color: #28a745;
    animation: pulse 2s ease-in-out infinite;
}

.notification-status.inactive {
    color: var(--gray-400, #ccc);
}

.notification-status.disabled {
    color: #dc3545;
}

/* Animações */
@keyframes ringBell {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-10deg);
    }
    20%, 40% {
        transform: rotate(10deg);
    }
    50% {
        transform: rotate(0deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Toast de notificação na interface */
.notification {
    position: fixed;
    top: -100px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border-left: 4px solid var(--primary-color, #007bff);
}

.notification.show {
    top: 20px;
}

.notification.success {
    border-left-color: #28a745;
    background: #d4edda;
    color: #155724;
}

.notification.error {
    border-left-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}

.notification.warning {
    border-left-color: #ffc107;
    background: #fff3cd;
    color: #856404;
}

.notification.info {
    border-left-color: #17a2b8;
    background: #d1ecf1;
    color: #0c5460;
}

/* Badge de notificação para contadores */
.notification-badge {
    background: #dc3545;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.5rem;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}

/* Badge para chats não lidos */
.chat-unread-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .notification.show {
        top: 10px;
    }
    
    .notification-bell {
        margin-right: 0.5rem;
    }
    
    .notification-bell i {
        font-size: 1.25rem;
    }
}

/* Ajustes para integração com o dashboard */
.dashboard-header .notification-bell {
    margin-right: 1rem;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Estilo para quando o navegador não suporta notificações */
.notification-bell.not-supported {
    opacity: 0.5;
    cursor: not-allowed;
}

.notification-bell.not-supported:hover {
    background: transparent;
}

/* Tooltip para o botão de sino */
.notification-bell[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
}

/* Estados visuais melhorados */
.notification-bell:active {
    transform: scale(0.95);
}

.notification-bell:focus {
    outline: 2px solid var(--primary-color, #007bff);
    outline-offset: 2px;
}



/* ✅ ESTILOS PARA RECUPERAÇÃO DE SENHA */

/* Estilos gerais dos modais (caso não existam no styles.css principal) */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

.modal-footer-text {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
    font-size: 0.95rem;
}

.modal-footer-text a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.modal-footer-text a:hover {
    text-decoration: underline;
}

/* ✅ Estilos específicos para modal de email enviado */
#emailSentModal .modal-content {
    max-width: 450px;
}

#emailSentModal .modal-body {
    padding: 40px 30px;
}

#emailSentModal i {
    animation: scaleIn 0.5s ease;
}

/* ✅ Notificações */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
    border-left: 4px solid #3b82f6;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #10b981;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification.warning {
    border-left-color: #f59e0b;
}

.notification.info {
    border-left-color: #3b82f6;
}

/* ✅ Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* ✅ Responsividade */
@media (max-width: 640px) {
    .modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ✅ Estados de loading */
.btn-primary:disabled::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* ========================================
   TEMA ESCURO (DARK THEME) - DASHBOARD
   ======================================== */

/* Variáveis CSS para tema escuro */
:root {
    --dashboard-bg: var(--gray-50);
    --dashboard-card-bg: var(--white);
    --dashboard-text: var(--gray-900);
    --dashboard-text-light: var(--gray-600);
    --dashboard-border: var(--gray-200);
    --dashboard-input-bg: var(--white);
}

/* Aplicar tema escuro quando a classe dark-theme estiver ativa */
.dashboard.dark-theme {
    --dashboard-bg: #0f172a;
    --dashboard-card-bg: #1e293b;
    --dashboard-text: #f1f5f9;
    --dashboard-text-light: #94a3b8;
    --dashboard-border: #334155;
    --dashboard-input-bg: #334155;
}

/* ========== BACKGROUNDS PRINCIPAIS ========== */
.dashboard {
    background: var(--dashboard-bg) !important;
}

.dashboard .dashboard-header {
    background: var(--dashboard-card-bg);
    border-bottom-color: var(--dashboard-border);
}

.dashboard .dashboard-sidebar {
    background: var(--dashboard-card-bg);
    border-right-color: var(--dashboard-border);
}

.dashboard .dashboard-main {
    background: var(--dashboard-bg);
}

/* ========== TEXTOS ========== */
.dashboard .section-header h2,
.dashboard .section-header p {
    color: var(--dashboard-text);
}

.dashboard .stat-info p,
.dashboard .about-item p {
    color: var(--dashboard-text-light);
}

.dashboard .no-data {
    color: var(--dashboard-text-light);
}

/* ========== CARDS E CONTAINERS ========== */
.dashboard .stat-card,
.dashboard .recent-proposals,
.dashboard .proposal-form,
.dashboard .proposals-table,
.dashboard .chat-window,
.dashboard .chat-list {
    background: var(--dashboard-card-bg);
    color: var(--dashboard-text);
}

/* ========== PROPOSTAS RECENTES - MELHORADO ========== */
.dashboard.dark-theme .proposal-item {
    background: #334155 !important;
    color: var(--dashboard-text) !important;
}

.dashboard.dark-theme .proposal-item strong {
    color: var(--dashboard-text) !important;
}

.dashboard.dark-theme .proposal-item p {
    color: var(--dashboard-text-light) !important;
}

/* Área de mensagem de status dentro da proposta */
.dashboard.dark-theme .proposal-item > div:last-child {
    background: #475569 !important;
    color: var(--dashboard-text-light) !important;
}

/* ========== FORMULÁRIOS ========== */
.dashboard .form-group label {
    color: var(--dashboard-text);
}

.dashboard .form-group input,
.dashboard .form-group select,
.dashboard .form-group textarea {
    background: var(--dashboard-input-bg);
    color: var(--dashboard-text);
    border-color: var(--dashboard-border);
}

.dashboard .form-group input::placeholder,
.dashboard .form-group select::placeholder,
.dashboard .form-group textarea::placeholder {
    color: var(--dashboard-text-light);
    opacity: 0.7;
}

.dashboard .form-group input:focus,
.dashboard .form-group select:focus,
.dashboard .form-group textarea:focus {
    background: var(--dashboard-input-bg);
    color: var(--dashboard-text);
}

.dashboard .form-section h3 {
    color: var(--dashboard-text);
    border-bottom-color: var(--dashboard-border);
}

/* ========== TABELA DE PROPOSTAS - MELHORADO ========== */
.dashboard .proposals-table {
    background: var(--dashboard-card-bg);
}

.dashboard .proposals-table th {
    background: var(--dashboard-bg);
    color: var(--dashboard-text);
}

.dashboard .proposals-table td {
    color: var(--dashboard-text-light);
    border-bottom-color: var(--dashboard-border);
}

.dashboard .proposals-table tr:hover {
    background: var(--dashboard-bg);
}

.dashboard.dark-theme .proposals-table tbody tr {
    background: var(--dashboard-card-bg);
}

.dashboard.dark-theme .proposals-table tbody tr:hover {
    background: #334155;
}

/* ========== BADGES DE STATUS - AJUSTADOS PARA TEMA ESCURO ========== */
.dashboard.dark-theme .status-badge {
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard.dark-theme .status-pending {
    background: #78350f;
    color: #fef3c7;
}

.dashboard.dark-theme .status-approved {
    background: #065f46;
    color: #d1fae5;
}

.dashboard.dark-theme .status-rejected {
    background: #991b1b;
    color: #fee2e2;
}

.dashboard.dark-theme .status-analyzing {
    background: #1e40af;
    color: #dbeafe;
}

.dashboard.dark-theme .status-formalizada {
    background: #6b21a8;
    color: #f3e8ff;
}

/* ========== CHAT - MELHORADO ========== */
.dashboard .chat-header {
    background: var(--dashboard-bg);
    border-bottom-color: var(--dashboard-border);
}

.dashboard .chat-messages {
    background: var(--dashboard-bg);
}

.dashboard .chat-list {
    background: var(--dashboard-bg);
}

.dashboard .chat-list h3 {
    background: var(--dashboard-card-bg);
    color: var(--dashboard-text);
    border-bottom-color: var(--dashboard-border);
}

.dashboard .chat-item {
    background: var(--dashboard-card-bg);
    border-color: var(--dashboard-border);
}

.dashboard .chat-item:hover {
    background: var(--dashboard-bg);
    border-color: var(--primary-color);
}

.dashboard.dark-theme .chat-info h4,
.dashboard.dark-theme .chat-info p,
.dashboard.dark-theme .chat-info small {
    color: var(--dashboard-text) !important;
}

/* ========== MENSAGENS DO CHAT - MELHORADO ========== */
.dashboard .chat-input input {
    background: var(--dashboard-input-bg);
    color: var(--dashboard-text);
    border-color: var(--dashboard-border);
}

.dashboard .chat-input input::placeholder {
    color: var(--dashboard-text-light);
    opacity: 0.7;
}

.dashboard .chat-input input:focus {
    border-color: var(--primary-color);
    background: var(--dashboard-input-bg);
}

/* Mensagens do administrador no tema escuro */
.dashboard.dark-theme .message-admin .message-content {
    background: #334155 !important;
    color: var(--dashboard-text) !important;
    border-color: var(--dashboard-border);
}

.dashboard.dark-theme .message-admin .message-text {
    color: var(--dashboard-text) !important;
}

.dashboard.dark-theme .message-admin .message-info {
    color: var(--dashboard-text-light) !important;
}

/* Mensagens do usuário permanecem com o gradiente azul */
.dashboard.dark-theme .message-user .message-content {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: var(--white);
}

/* Container de input de mensagem */
.dashboard.dark-theme .chat-input-container {
    background: var(--dashboard-card-bg);
    border-top-color: var(--dashboard-border);
}

/* ========== MENU LATERAL DO DASHBOARD ========== */
.dashboard .menu-item {
    color: var(--dashboard-text-light);
}

.dashboard .menu-item:hover {
    background: var(--dashboard-bg);
    color: var(--dashboard-text);
}

.dashboard .menu-item.active {
    color: var(--white);
}

.dashboard.dark-theme .menu-item:hover {
    background: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dashboard.dark-theme .menu-item.active {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* ========== LOGO E NAVEGAÇÃO ========== */
.dashboard .nav-logo span {
    color: var(--primary-color);
}

.dashboard.dark-theme .nav-logo span {
    color: #60a5fa;
}

.dashboard .dashboard-user span {
    color: var(--dashboard-text);
}

.dashboard.dark-theme .dashboard-user span {
    color: var(--dashboard-text);
}

/* ========== BOTÃO DE ALTERNÂNCIA DE TEMA ========== */
.theme-toggle {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    transition: all 0.3s ease;
    font-size: 18px;
}

.theme-toggle:hover {
    background: var(--gray-200);
    transform: scale(1.1);
}

.dashboard.dark-theme .theme-toggle {
    background: #334155;
    color: #fbbf24;
}

.dashboard.dark-theme .theme-toggle:hover {
    background: #475569;
}

/* ========== BOTÃO DE FECHAR DASHBOARD ========== */
.dashboard.dark-theme .dashboard-close {
    background: #334155;
    color: var(--dashboard-text-light);
}

.dashboard.dark-theme .dashboard-close:hover {
    background: #475569;
    color: var(--dashboard-text);
}

/* ========== ESTATÍSTICAS ========== */
.dashboard.dark-theme .stat-info h3 {
    color: #60a5fa;
}

/* ========== BADGES DE NOTIFICAÇÃO ========== */
.dashboard.dark-theme .notification-badge,
.dashboard.dark-theme .chat-unread-badge {
    background: #dc2626;
    color: var(--white);
}

/* ========== SCROLLBAR PERSONALIZADA PARA TEMA ESCURO ========== */
.dashboard.dark-theme ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dashboard.dark-theme ::-webkit-scrollbar-track {
    background: #1e293b;
}

.dashboard.dark-theme ::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 5px;
}

.dashboard.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ========== TEMA ESCURO - RESPONSIVIDADE ========== */
@media (max-width: 768px) {
    .dashboard.dark-theme .dashboard-sidebar {
        background: var(--dashboard-card-bg);
        border-right-color: var(--dashboard-border);
    }

    .dashboard.dark-theme .dashboard-nav {
        background: var(--dashboard-card-bg);
        border-bottom-color: var(--dashboard-border);
    }
}

/* ========== TRANSIÇÃO SUAVE ========== */
.dashboard,
.dashboard *:not(.message-content):not(.stat-icon):not(.menu-item.active) {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ========== MELHORIAS ADICIONAIS ========== */

/* Links e botões secundários no tema escuro */
.dashboard.dark-theme a {
    color: #60a5fa;
}

.dashboard.dark-theme a:hover {
    color: #93c5fd;
}

/* Small text no tema escuro */
.dashboard.dark-theme small,
.dashboard.dark-theme .form-text {
    color: var(--dashboard-text-light) !important;
}

/* Título das seções do formulário */
.dashboard.dark-theme .form-section {
    border-bottom-color: var(--dashboard-border);
}

/* Botão FIPE no tema escuro */
.dashboard.dark-theme .fipe-link-button {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: var(--white);
}

.dashboard.dark-theme .fipe-link-button:hover {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
}

/* Ações do formulário */
.dashboard.dark-theme .form-actions {
    border-top-color: var(--dashboard-border);
}

/* ========== RESPONSIVIDADE DO BOTÃO DE TEMA ========== */
@media (max-width: 768px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* ========== AJUSTES FINAIS PARA ELEMENTOS ESPECÍFICOS ========== */

/* Garantir que todos os parágrafos dentro do dashboard respeitem a cor do tema */
.dashboard.dark-theme p:not(.message-text) {
    color: var(--dashboard-text-light);
}

/* Garantir que todos os títulos respeitem a cor do tema */
.dashboard.dark-theme h1,
.dashboard.dark-theme h2,
.dashboard.dark-theme h3,
.dashboard.dark-theme h4,
.dashboard.dark-theme h5,
.dashboard.dark-theme h6 {
    color: var(--dashboard-text);
}

/* Divisores e bordas */
.dashboard.dark-theme hr,
.dashboard.dark-theme .divider {
    border-color: var(--dashboard-border);
}

/* Select e option no tema escuro */
.dashboard.dark-theme select option {
    background: #1e293b;
    color: var(--dashboard-text);
}

/* Overlay da sidebar mobile no tema escuro */
.dashboard.dark-theme .dashboard-sidebar-overlay {
    background: rgba(0, 0, 0, 0.8);
}

/* ======================================================
   🔧 MELHORIAS DO CHAT PARA VERSÃO PC - CORREÇÕES APLICADAS
   ====================================================== */

/* Estilos específicos para DESKTOP (PC) - min-width: 769px */
@media (min-width: 769px) {
    /* Layout do chat otimizado para PC */
    .chat-layout {
        display: grid;
        grid-template-columns: 350px 1fr;
        gap: 24px;
        height: calc(100vh - 250px) !important; /* Altura otimizada para usar mais tela */
        min-height: 650px !important;
        max-height: 850px !important;
        background: var(--white);
        border-radius: var(--border-radius-lg);
        box-shadow: var(--shadow);
        overflow: hidden;
    }

    /* Janela do chat - estrutura principal */
    .chat-window {
        display: flex !important;
        flex-direction: column !important;
        background: var(--white);
        height: 100%;
        overflow: hidden;
    }

    /* Cabeçalho do chat - fixo no topo */
    .chat-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px;
        border-bottom: 1px solid var(--gray-200);
        background: var(--gray-50);
        flex-shrink: 0 !important; /* Nunca encolhe */
    }

    .chat-header .chat-info h4 {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--gray-900);
        margin-bottom: 4px;
    }

    .chat-header .chat-info span {
        font-size: 14px;
        color: var(--gray-600);
    }

    /* Área de mensagens - com scroll funcional */
    .chat-messages {
        flex: 1 1 auto !important; /* Cresce e encolhe conforme necessário */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 20px;
        background: var(--gray-50);
        display: flex !important;
        flex-direction: column;
        gap: 16px;
        min-height: 400px !important;
        max-height: calc(100vh - 450px) !important;
    }

    /* Customização do scrollbar para melhor UX */
    .chat-messages::-webkit-scrollbar {
        width: 8px;
    }

    .chat-messages::-webkit-scrollbar-track {
        background: var(--gray-100);
        border-radius: 4px;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: var(--gray-400);
        border-radius: 4px;
        transition: background 0.3s ease;
    }

    .chat-messages::-webkit-scrollbar-thumb:hover {
        background: var(--gray-500);
    }

    /* Container de input - SEMPRE VISÍVEL E FIXO NA PARTE INFERIOR */
    .chat-input-container {
        padding: 20px !important;
        border-top: 2px solid var(--gray-200) !important;
        background: var(--white) !important;
        flex-shrink: 0 !important; /* CRÍTICO: Não permite que encolha */
        display: flex !important; /* FORÇAR EXIBIÇÃO */
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10 !important;
        min-height: 84px !important; /* Altura mínima garantida */
    }

    /* Campo de input e botão */
    .chat-input {
        display: flex !important;
        gap: 12px;
        align-items: center;
        width: 100%;
    }

    .chat-input input {
        flex: 1;
        padding: 14px 18px !important;
        border: 2px solid var(--gray-300) !important;
        border-radius: 25px;
        font-size: 15px;
        outline: none;
        transition: var(--transition);
        background: var(--white);
    }

    .chat-input input:focus {
        border-color: var(--primary-color) !important;
        box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1) !important;
    }

    .chat-input input::placeholder {
        color: var(--gray-500);
        font-size: 14px;
    }

    /* Botão de enviar - sempre visível */
    .chat-input button {
        width: 48px !important;
        height: 48px !important;
        border-radius: 50%;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0;
        flex-shrink: 0 !important;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
        color: var(--white);
        border: none;
        cursor: pointer;
        transition: var(--transition);
    }

    .chat-input button:hover {
        transform: scale(1.05);
        box-shadow: var(--shadow-lg);
    }

    .chat-input button:active {
        transform: scale(0.98);
    }

    .chat-input button i {
        font-size: 18px;
    }

    /* Lista de conversas */
    .chat-list {
        background: var(--gray-50);
        border-right: 1px solid var(--gray-200);
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
    }

    .chat-list h3 {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--gray-900);
        padding: 20px;
        border-bottom: 1px solid var(--gray-200);
        background: var(--white);
        flex-shrink: 0;
    }

    .chats-container {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 16px;
    }

    .chats-container::-webkit-scrollbar {
        width: 6px;
    }

    .chats-container::-webkit-scrollbar-track {
        background: var(--gray-100);
    }

    .chats-container::-webkit-scrollbar-thumb {
        background: var(--gray-400);
        border-radius: 3px;
    }

    .chats-container::-webkit-scrollbar-thumb:hover {
        background: var(--gray-500);
    }
}

/* Animação suave para as mensagens */
.message {
    animation: fadeInMessage 0.3s ease-in-out;
}

@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Melhorias adicionais nas mensagens */
.message-content {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.message-text {
    line-height: 1.5;
}

/* Mensagem quando não há dados - centralizada */
.chat-messages .no-data {
    text-align: center;
    color: var(--gray-500);
    padding: 60px 20px;
    font-size: 15px;
    font-style: italic;
    margin: auto;
}


/* ======================================================
   🌙 CORREÇÕES DO MODO DARK PARA O CHAT - DESIGN COMPLETO
   ====================================================== */

/* Correções específicas para o chat no tema escuro */
@media (min-width: 769px) {
    /* Chat layout no modo dark */
    .dashboard.dark-theme .chat-layout {
        background: var(--dashboard-card-bg) !important;
    }

    /* Lista de conversas no modo dark */
    .dashboard.dark-theme .chat-list {
        background: var(--dashboard-bg) !important;
        border-right-color: var(--dashboard-border) !important;
    }

    .dashboard.dark-theme .chat-list h3 {
        background: var(--dashboard-card-bg) !important;
        color: var(--dashboard-text) !important;
        border-bottom-color: var(--dashboard-border) !important;
    }

    /* Container de conversas */
    .dashboard.dark-theme .chats-container {
        background: var(--dashboard-bg) !important;
    }

    /* Items de chat individuais */
    .dashboard.dark-theme .chat-item {
        background: var(--dashboard-card-bg) !important;
        border-color: var(--dashboard-border) !important;
    }

    .dashboard.dark-theme .chat-item:hover {
        background: #334155 !important;
        border-color: var(--primary-color) !important;
    }

    .dashboard.dark-theme .chat-item.active {
        background: #334155 !important;
        border-color: var(--primary-color) !important;
    }

    /* Textos dos items de chat */
    .dashboard.dark-theme .chat-info h4 {
        color: var(--dashboard-text) !important;
    }

    .dashboard.dark-theme .chat-info p {
        color: var(--dashboard-text-light) !important;
    }

    .dashboard.dark-theme .chat-info small {
        color: var(--dashboard-text-light) !important;
    }

    /* Janela do chat */
    .dashboard.dark-theme .chat-window {
        background: var(--dashboard-card-bg) !important;
    }

    /* Cabeçalho do chat */
    .dashboard.dark-theme .chat-header {
        background: var(--dashboard-bg) !important;
        border-bottom-color: var(--dashboard-border) !important;
    }

    .dashboard.dark-theme .chat-header .chat-info h4 {
        color: var(--dashboard-text) !important;
    }

    .dashboard.dark-theme .chat-header .chat-info span {
        color: var(--dashboard-text-light) !important;
    }

    /* Área de mensagens */
    .dashboard.dark-theme .chat-messages {
        background: var(--dashboard-bg) !important;
    }

    /* Scrollbar no modo dark */
    .dashboard.dark-theme .chat-messages::-webkit-scrollbar-track {
        background: #1e293b !important;
    }

    .dashboard.dark-theme .chat-messages::-webkit-scrollbar-thumb {
        background: #475569 !important;
    }

    .dashboard.dark-theme .chat-messages::-webkit-scrollbar-thumb:hover {
        background: #64748b !important;
    }

    .dashboard.dark-theme .chats-container::-webkit-scrollbar-track {
        background: #1e293b !important;
    }

    .dashboard.dark-theme .chats-container::-webkit-scrollbar-thumb {
        background: #475569 !important;
    }

    .dashboard.dark-theme .chats-container::-webkit-scrollbar-thumb:hover {
        background: #64748b !important;
    }

    /* Mensagens do administrador no modo dark */
    .dashboard.dark-theme .message-admin .message-content {
        background: #334155 !important;
        color: var(--dashboard-text) !important;
        border-color: var(--dashboard-border) !important;
    }

    .dashboard.dark-theme .message-admin .message-text {
        color: var(--dashboard-text) !important;
    }

    .dashboard.dark-theme .message-admin .message-info {
        color: var(--dashboard-text-light) !important;
    }

    /* Mensagens do usuário mantêm o gradiente azul */
    .dashboard.dark-theme .message-user .message-content {
        background: linear-gradient(135deg, #1e40af, #3b82f6) !important;
        color: var(--white) !important;
    }

    .dashboard.dark-theme .message-user .message-text {
        color: var(--white) !important;
    }

    .dashboard.dark-theme .message-user .message-info {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    /* Container de input no modo dark */
    .dashboard.dark-theme .chat-input-container {
        background: var(--dashboard-card-bg) !important;
        border-top-color: var(--dashboard-border) !important;
    }

    /* Campo de input no modo dark */
    .dashboard.dark-theme .chat-input input {
        background: var(--dashboard-input-bg) !important;
        color: var(--dashboard-text) !important;
        border-color: var(--dashboard-border) !important;
    }

    .dashboard.dark-theme .chat-input input::placeholder {
        color: var(--dashboard-text-light) !important;
        opacity: 0.7;
    }

    .dashboard.dark-theme .chat-input input:focus {
        border-color: var(--primary-color) !important;
        background: var(--dashboard-input-bg) !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
    }

    /* Botão de enviar no modo dark - mantém o gradiente azul */
    .dashboard.dark-theme .chat-input button {
        background: linear-gradient(135deg, #1e40af, #3b82f6) !important;
        color: var(--white) !important;
    }

    .dashboard.dark-theme .chat-input button:hover {
        background: linear-gradient(135deg, #1e3a8a, #1e40af) !important;
        box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4) !important;
    }

    /* Mensagem quando não há dados */
    .dashboard.dark-theme .chat-messages .no-data {
        color: var(--dashboard-text-light) !important;
    }

    /* Badge de mensagens não lidas no modo dark */
    .dashboard.dark-theme .chat-unread-badge {
        background: #dc2626 !important;
        color: var(--white) !important;
    }
}

/* Correções para mobile no modo dark */
@media (max-width: 768px) {
    .dashboard.dark-theme .chat-layout {
        background: var(--dashboard-card-bg) !important;
    }

    .dashboard.dark-theme .chat-window {
        background: var(--dashboard-card-bg) !important;
    }

    .dashboard.dark-theme .chat-header {
        background: var(--dashboard-bg) !important;
    }

    .dashboard.dark-theme .chat-messages {
        background: var(--dashboard-bg) !important;
    }

    .dashboard.dark-theme .chat-input-container {
        background: var(--dashboard-card-bg) !important;
        border-top-color: var(--dashboard-border) !important;
    }

    .dashboard.dark-theme .chat-input input {
        background: var(--dashboard-input-bg) !important;
        color: var(--dashboard-text) !important;
        border-color: var(--dashboard-border) !important;
    }

    .dashboard.dark-theme .chat-list {
        background: var(--dashboard-bg) !important;
    }
}

