/* Reset e variáveis CSS */
:root {
    --primary-color: #022652;
    --primary-dark: #011b3d;
    --secondary-color: #087568;
    --success-color: #087568;
    --warning-color: #8a5400;
    --danger-color: #a83131;
    --info-color: #1c5d87;
    --light-bg: #f7fafc;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'DM Sans', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-bg);
    color: var(--gray-700);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Auth Screen aprimorado */
.auth-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: var(--transition);
}

.auth-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: translateY(0);
    transition: var(--transition);
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--white);
    animation: pulse 2s infinite;
}

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

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--gray-500);
    margin-bottom: 2rem;
    font-weight: 500;
}

.auth-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.auth-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--gray-50);
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.auth-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    z-index: 1;
    transition: var(--transition);
}

.auth-input:focus + .auth-input-icon {
    color: var(--primary-color);
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

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

.auth-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--primary-color);
    margin-top: 1rem;
}

.auth-error {
    color: var(--danger-color);
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fed7d7;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--danger-color);
}

/* Container principal aprimorado */
.container {
    display: block;
    min-height: 100vh;
    background: var(--light-bg);
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 1;
}

/* Header moderno */
.header {
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: between;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--gray-200);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

.nav {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.user-info i {
    font-size: 2rem;
    color: var(--gray-400);
}

#welcomeMessage {
    font-weight: 600;
    color: var(--gray-700);
}

/* Seções aprimoradas */
.section {
    display: none;
    padding: 2.25rem 2rem 3.5rem;
    animation: fadeInUp 0.4s ease;
}

.section.active {
    display: block;
}

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

/* Executive Header compartilhado */
.funil-executive-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
}

.funil-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.funil-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.funil-title-group h2,
.section .funil-title-group h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.funil-title-group h2::after,
.section .funil-title-group h2::after {
    display: none;
}

.funil-description {
    margin: 0;
    font-size: 0.92rem;
    color: var(--gray-500);
    font-weight: 400;
    line-height: 1.4;
}

.funil-header-content .header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.funil-header-content .header-actions .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Espaçamento Vertical Refinado da Seção Gerentes (#gerentes) */
#gerentes.section {
    padding: 2.25rem 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

#gerentes .funil-executive-header {
    margin-bottom: 2rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid var(--gray-200);
}

#gerentes .table-container {
    margin-top: 0;
    margin-bottom: 2.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    background: var(--white);
    overflow-x: auto;
}

#gerentes-table {
    width: 100%;
    border-collapse: collapse;
}

#gerentes-table thead th {
    padding: 1rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

#gerentes-table tbody td {
    padding: 1.1rem 1.25rem;
    vertical-align: middle;
}

.section h2 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1.25rem;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -0.4rem;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Stats Cards modernos */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--gray-500);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Dashboard grid aprimorado */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Section header aprimorado */
/* Section header aprimorado */
.section-header {
    display: none;
}



/* Botões aprimorados */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

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

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

/* Tabelas modernas */
.table-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, var(--gray-800), var(--gray-900));
}

th {
    padding: 1.25rem 1.5rem;
    text-align: center;
    font-weight: 600;
    color: var(--white);
    border-bottom: none;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    text-transform: none;
    position: relative;
    background: transparent;
}

th:first-child {
    text-align: left;
}

th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

th:first-child {
    border-top-left-radius: var(--border-radius-lg);
}

th:last-child {
    border-top-right-radius: var(--border-radius-lg);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-weight: 500;
    background: var(--white);
    text-align: center;
}

td:first-child {
    text-align: left;
}

tbody tr {
    transition: var(--transition);
    border-left: 3px solid transparent;
}

tbody tr:hover {
    background: var(--gray-50);
    border-left-color: var(--primary-color);
    transform: translateX(2px);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--border-radius-lg);
}

tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--border-radius-lg);
}

/* Filtros aprimorados */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: var(--white);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(17, 143, 128, 0.14);
}

/* Performance list */
.performance-list {
    max-height: 400px;
    overflow-y: auto;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
    font-style: italic;
}

/* Metas container */
.metas-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.monthly-goals-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.9rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: var(--gray-50);
}

.monthly-goal-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.monthly-goal-field label {
    color: var(--gray-600);
    font-size: 0.78rem;
    font-weight: 600;
}

.monthly-goal-field input {
    width: 100%;
    min-height: 38px;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    color: var(--gray-800);
    font: inherit;
}

.monthly-goal-field input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(8, 117, 104, 0.14);
}

.monthly-goals-form > button {
    grid-column: 1 / -1;
    justify-self: end;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.meta-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    background: var(--gray-200);
    border-radius: 7px;
    height: 30px;
    overflow: hidden;
}

.meta-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--success-color), #38a169);
    border-radius: 7px;
    transition: width 1s ease;
}

.meta-text {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    padding: 0 0.35rem;
    border-radius: 4px;
    background: rgba(249, 250, 251, 0.9);
}



/* Ações Rápidas */
.quick-actions {
    margin-top: 2rem;
}

.quick-actions h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--gray-700);
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.quick-action-card i {
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.quick-action-card:hover i {
    transform: scale(1.1);
}

.quick-action-card span {
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
}

/* Sistema de Notificações */
.notifications-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

.notification {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s ease;
    position: relative;
    overflow: hidden;
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.warning {
    border-left-color: var(--warning-color);
}

.notification.error {
    border-left-color: var(--danger-color);
}

.notification.info {
    border-left-color: var(--info-color);
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.notification-title {
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: var(--transition);
}

.notification-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.notification-body {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.4;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    animation: notificationProgress 3s linear;
}

.notification.success .notification-progress {
    background: var(--success-color);
}

.notification.warning .notification-progress {
    background: var(--warning-color);
}

.notification.error .notification-progress {
    background: var(--danger-color);
}

.notification.info .notification-progress {
    background: var(--info-color);
}

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

@keyframes notificationProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Menu Mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.mobile-nav-link {
    background: var(--white);
    margin: 0.5rem 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(10px);
}

/* Loader Global */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    backdrop-filter: blur(2px);
}

.global-loader.active {
    display: flex;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: var(--gray-600);
    font-weight: 500;
}

/* =========================================================
   SISTEMA DE MODAIS / POPUPS REFINADOS (UI/UX PREMIUM)
   ========================================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 38, 82, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.25rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.modal-content {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 25px 60px -15px rgba(2, 38, 82, 0.3), 0 0 0 1px rgba(2, 38, 82, 0.08);
    max-width: 540px;
    width: 100%;
    max-height: min(90vh, 760px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.modal-large {
    max-width: 820px;
}

.modal-small {
    max-width: 440px;
}

/* Header dos modais */
.modal-header {
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #083b6f 100%);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.modal-header-danger {
    background: linear-gradient(135deg, #a83131 0%, #b91c1c 100%);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    letter-spacing: -0.01em;
}

.modal-header .close {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-header .close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}

/* Corpo dos modais */
.modal-body {
    padding: 1.75rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Rodapé dos modais */
.modal-footer {
    padding: 1.15rem 1.75rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Formulários refinados */
.form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 1rem;
    color: var(--gray-400);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 2;
    transition: var(--transition);
}

.input-with-icon input,
.input-with-icon select {
    padding-left: 2.6rem !important;
}

.input-with-icon:focus-within .input-icon {
    color: var(--secondary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(8, 117, 104, 0.15);
}

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

.input-readonly {
    background-color: var(--gray-100) !important;
    color: var(--gray-500) !important;
    cursor: not-allowed;
    border-color: var(--gray-200) !important;
}

.form-help {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.35rem;
}

/* Detalhes do Gerente e Lead (Cards & Grid) */
.gerente-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.detail-section {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.detail-section.full-width {
    grid-column: span 2;
    background: var(--white);
}

.detail-section-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1.5px solid var(--gray-200);
}

.detail-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.86rem;
    padding: 0.25rem 0;
    border-bottom: 1px dashed var(--gray-200);
}

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

.detail-label {
    font-weight: 600;
    color: var(--gray-500);
}

.detail-value {
    font-weight: 600;
    color: var(--gray-800);
    text-align: right;
    word-break: break-word;
}

/* Mini Cards de Estatísticas no Modal */
.stats-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-mini-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

.stat-mini-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.stat-icon-blue { background: #e0f2fe; color: #0284c7; }
.stat-icon-green { background: #dcfce7; color: #16a34a; }
.stat-icon-teal { background: #ccfbf1; color: #0f766e; }
.stat-icon-amber { background: #fef3c7; color: #d97706; }

.stat-mini-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1.2;
}

.stat-mini-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Lista de Preview de Leads no Modal */
.leads-preview {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.25rem;
}

.lead-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.lead-preview-item:hover {
    background: var(--white);
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-sm);
    transform: translateX(3px);
}

.lead-preview-info {
    flex: 1;
}

.lead-preview-company {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--gray-800);
}

.lead-preview-contact {
    font-size: 0.76rem;
    color: var(--gray-500);
    margin-top: 0.2rem;
}

.leads-preview-more {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0.4rem;
}

.loading-mini,
.no-data-mini {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray-500);
    font-size: 0.88rem;
}

/* Modal de Exclusão */
.delete-warning-box {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    padding: 1.25rem;
    border-radius: 12px;
}

.delete-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fee2e2;
    color: var(--danger-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.delete-warning-text h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 0.25rem;
}

.delete-warning-text p {
    font-size: 0.88rem;
    color: #7f1d1d;
    line-height: 1.4;
}

.delete-consequences {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.consequences-header {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.delete-consequences ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.82rem;
    color: var(--gray-600);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* Modal de Detalhes do Lead */
.lead-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.lead-empresa-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.lead-cnpj-pill {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--gray-500);
    background: var(--gray-200);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.lead-badges-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lead-obs-box {
    background: var(--gray-50);
    border: 1px dashed var(--gray-300);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-size: 0.86rem;
    color: var(--gray-700);
    line-height: 1.5;
    white-space: pre-wrap;
    min-height: 60px;
}

/* Badges e Pílulas */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.01em;
}

.status-new { background: #e0f2fe; color: #0369a1; }
.status-progress { background: #fef3c7; color: #b45309; }
.status-success { background: #dcfce7; color: #15803d; }
.status-info { background: #e0e7ff; color: #4338ca; }
.status-warning { background: #ffedd5; color: #c2410c; }
.status-danger { background: #fee2e2; color: #b91c1c; }

.potencial-high { background: #dcfce7; color: #15803d; }
.potencial-medium { background: #fef3c7; color: #b45309; }
.potencial-low { background: #fee2e2; color: #b91c1c; }

.count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}

.pill-blue { background: #e0f2fe; color: #0369a1; }
.pill-green { background: #dcfce7; color: #15803d; }
.pill-teal { background: #ccfbf1; color: #0f766e; }
.pill-amber { background: #fef3c7; color: #b45309; }

.gerente-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    background: var(--gray-100);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* User avatar in table */
.user-avatar-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 700;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-cell-name {
    font-weight: 700;
    color: var(--gray-900);
}

/* Botões de Ação na Tabela */
.action-buttons {
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    align-items: center;
}

.btn-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-action.btn-view {
    background: #e0f2fe;
    color: #0284c7;
}
.btn-action.btn-view:hover {
    background: #0284c7;
    color: white;
}

.btn-action.btn-import {
    background: #dcfce7;
    color: #15803d;
}
.btn-action.btn-import:hover {
    background: #15803d;
    color: white;
}

.btn-action.btn-edit {
    background: #fef3c7;
    color: #d97706;
}
.btn-action.btn-edit:hover {
    background: #d97706;
    color: white;
}

.btn-action.btn-delete {
    background: #fee2e2;
    color: #dc2626;
}
.btn-action.btn-delete:hover {
    background: #dc2626;
    color: white;
}

#importExcelModal .large-modal {
    width: min(1280px, calc(100vw - 24px));
    max-width: 1280px;
    max-height: 92vh;
    overflow-y: auto;
}

#importExcelModal .data-preview {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #dbe5e8;
    border-radius: 8px;
    background: #fff;
}

#importExcelModal .preview-table {
    width: 100%;
    min-width: 1080px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 11px;
    line-height: 1.35;
}

#importExcelModal .preview-table th,
#importExcelModal .preview-table td {
    max-width: 160px;
    padding: 8px 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#importExcelModal .preview-table th {
    border-bottom: 2px solid #cbdde0;
    background: #eaf2f3;
    color: #24464d;
    font-size: 10px;
    font-weight: 700;
    text-align: left;
    vertical-align: bottom;
}

#importExcelModal .preview-table th small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #526970;
    font-size: 10px;
    font-weight: 500;
    text-overflow: ellipsis;
}

#importExcelModal .preview-table td {
    border-bottom: 1px solid #e8eef0;
    color: #344b50;
}

#importExcelModal .preview-table tbody tr:nth-child(even) {
    background: #f6f9f9;
}

#importExcelModal .preview-table tbody tr:hover {
    background: #eaf5f1;
}

#importExcelModal .column-mapping-section {
    margin: 0;
    padding: 20px;
    border: 1px solid #dbe5e8;
    border-radius: 10px;
    background: #fff;
}

#importExcelModal .column-mapping-section > h4 {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5ecee;
    color: #193d44;
    font-size: 17px;
}

#importExcelModal .mapping-description {
    margin: 0 0 14px;
    padding: 12px 15px;
    border-left: 3px solid #16816f;
    border-radius: 0 6px 6px 0;
    background: #f1f8f6;
}

#importExcelModal .mapping-description p {
    margin: 0;
    color: #455b60;
    font-size: 12px;
    line-height: 1.5;
}

#importExcelModal .mapping-description p:first-child {
    margin-bottom: 3px;
    color: #1d3f44;
    font-size: 13px;
    font-weight: 700;
}

#importExcelModal .mapping-description p:last-child {
    margin-top: 7px;
    color: #14745f;
    font-weight: 700;
}

#importExcelModal .import-target-notice {
    padding: 12px 14px;
    border-left: 3px solid #15803d;
    background: #f0fdf4;
    color: #166534;
    font-weight: 600;
}

#importExcelModal .import-section h4,
#importExcelModal .file-info h4,
#importExcelModal .column-mapping-section h4,
#importExcelModal .import-progress h4,
#importExcelModal .import-results h4 {
    margin: 0 0 12px;
    font-size: 1rem;
}

#importExcelModal .file-upload-area {
    padding: 32px 16px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
}

#importExcelModal .file-upload-area:hover,
#importExcelModal .file-upload-area.drag-over {
    border-color: #15803d;
    background: #f0fdf4;
}

#importExcelModal .file-upload-area i {
    display: block;
    margin-bottom: 8px;
    color: #15803d;
    font-size: 2rem;
}

#importExcelModal .file-info,
#importExcelModal .column-mapping-section,
#importExcelModal .error-details,
#importExcelModal .skipped-details {
    margin: 16px 0;
    padding: 14px;
    border-radius: 6px;
    background: #f8fafc;
}

#importExcelModal .file-details,
#importExcelModal .results-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

#importExcelModal .result-item {
    flex: 1 1 120px;
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    background: #f1f5f9;
}

#importExcelModal .result-item i,
#importExcelModal .result-label,
#importExcelModal .result-value {
    display: block;
}

#importExcelModal .mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 12px;
}

#importExcelModal .mapping-row {
    display: grid;
    gap: 6px;
}

#importExcelModal .mapping-select {
    width: 100%;
    min-height: 40px;
    padding: 8px;
}

#importExcelModal .progress-bar {
    position: relative;
    height: 20px;
    overflow: hidden;
    border-radius: 10px;
    background: #e2e8f0;
}

#importExcelModal .progress-fill {
    height: 100%;
    width: 0;
    background: #15803d;
    transition: width .2s ease;
}

#importExcelModal .progress-text {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

/* Células de estado na tabela */
.table-loading-cell,
.table-empty-cell,
.table-error-cell {
    text-align: center;
    padding: 2.5rem 1.5rem !important;
    color: var(--gray-500);
    font-size: 0.95rem;
}

.table-empty-cell i,
.table-error-cell i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray-400);
}

.table-empty-cell button {
    margin-top: 1rem;
}

.table-error-cell {
    color: var(--danger-color);
}

/* Paginação Premium */
.pagination-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.pagination-info {
    color: var(--gray-600);
    font-size: 0.85rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--gray-200);
    background-color: var(--white);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background-color: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 4px rgba(2, 38, 82, 0.2);
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: var(--gray-50);
}

.pagination-ellipsis {
    margin: 0 0.25rem;
    color: var(--gray-400);
}

.pagination-info-single {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Notificações Toasts Elegantes */
.notifications-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 380px;
    width: calc(100% - 2.5rem);
    pointer-events: none;
}

.notification {
    pointer-events: auto;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: var(--transition);
}

.notification.hide {
    opacity: 0;
    transform: translateX(100%);
}

.notification-icon-wrap {
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.notification-success { border-left-color: var(--success-color); }
.notification-success .notification-icon-wrap { color: var(--success-color); }

.notification-warning { border-left-color: var(--warning-color); }
.notification-warning .notification-icon-wrap { color: var(--warning-color); }

.notification-error { border-left-color: var(--danger-color); }
.notification-error .notification-icon-wrap { color: var(--danger-color); }

.notification-info { border-left-color: var(--info-color); }
.notification-info .notification-icon-wrap { color: var(--info-color); }

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gray-900);
    margin-bottom: 0.2rem;
}

.notification-body {
    font-size: 0.82rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.notification-close {
    background: transparent;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem;
    border-radius: 4px;
    transition: var(--transition);
}

.notification-close:hover {
    color: var(--gray-700);
    background: var(--gray-100);
}

/* Performance Ranking Items */
.performance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    transition: var(--transition);
}

.performance-item:hover {
    background: var(--white);
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.performance-item.rank-gold {
    border-left: 4px solid #f59e0b;
}

.performance-item.rank-silver {
    border-left: 4px solid #94a3b8;
}

.performance-item.rank-bronze {
    border-left: 4px solid #d97706;
}

.performance-item.rank-other {
    border-left: 4px solid var(--primary-color);
}

.performance-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.performance-rank {
    font-size: 1.25rem;
    min-width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.performance-name {
    font-weight: 700;
    color: var(--gray-800);
    font-size: 0.92rem;
    display: block;
}

.performance-meta {
    font-size: 0.78rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.15rem;
}

.performance-right {
    text-align: right;
}

.performance-rate {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--secondary-color);
}

.performance-rate-label {
    font-size: 0.72rem;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 600;
}

/* Micro-interactions */
button:active {
    transform: scale(0.98);
}

.card:active {
    transform: scale(0.99);
}

/* Focus states aprimorados */
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Utilitários */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Identidade compartilhada dos paineis ProsNegocios */
.auth-logo-brand {
    width: min(260px, 100%);
    height: auto;
    margin: 0 auto 1.5rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    animation: none;
}

.auth-logo-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.header {
    min-height: 76px;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 22px;
    border: 0;
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(2, 38, 82, .14);
}

.logo {
    min-width: 0;
    flex: 0 1 205px;
    color: var(--white);
}

.logo img {
    display: block;
    width: 100%;
    max-width: 205px;
    height: auto;
}

.logo h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.nav-link {
    color: #e0e9ef;
}

.nav-link:hover {
    background: rgba(255, 255, 255, .1);
    color: var(--white);
}

.nav-link.active {
    background: var(--secondary-color);
    color: var(--white);
    box-shadow: none;
}

.nav-link.active::after {
    display: none;
}

.user-info {
    flex: 0 1 auto;
    gap: 10px;
    color: var(--white);
}

.user-info .header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
    position: static;
    z-index: auto;
    overflow: visible;
}

#welcomeMessage {
    max-width: 150px;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info > i {
    color: #b9d8d2;
    font-size: 25px;
}

.refresh-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 9px;
    background: rgba(255, 255, 255, .08);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.refresh-btn i {
    color: #b9d8d2;
    font-size: 15px;
    transition: transform .45s ease;
}

.refresh-btn:hover {
    transform: translateY(-1px);
    border-color: var(--secondary-color);
    background: var(--secondary-color);
}

.refresh-btn:hover i {
    color: #fff;
    transform: rotate(180deg);
}

.install-btn:hover i {
    transform: none;
    animation: install-bounce .6s ease infinite;
}

@keyframes install-bounce {
    0%, 100% { transform: translateY(-2px); }
    50% { transform: translateY(3px); }
}

.logout-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 4px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.logout-btn:hover {
    background: var(--secondary-color);
    color: #fff;
}

.logout-btn i {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: rgba(185, 216, 210, .16);
    color: #b9d8d2;
    font-size: 12px;
}

.logout-btn:hover i {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.mobile-menu-toggle {
    color: #fff;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--secondary-color);
    color: #fff;
    transform: none;
}

.filter-group select:focus,
.filter-group input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(17, 143, 128, .14);
}

@media (max-width: 1024px) {
    .header {
        min-height: 70px;
        padding: 9px 18px;
    }

    .nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        order: 3;
        flex: 0 0 auto;
        border: 1px solid rgba(255, 255, 255, .3);
        color: #fff;
    }

    .mobile-menu {
        position: absolute;
        top: 100%;
        left: auto;
        right: 10px;
        width: min(320px, calc(100vw - 20px));
        height: auto;
        max-height: calc(100dvh - 84px);
        overflow-y: auto;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, .15);
        border-radius: 5px;
        background: var(--primary-color);
        backdrop-filter: none;
    }

    .mobile-menu.active {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .mobile-nav-link {
        margin: 0;
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, .1);
        border-radius: 4px;
        background: rgba(255, 255, 255, .06);
        box-shadow: none;
        color: #e0e9ef;
    }

    .user-info {
        order: 2;
        margin-left: auto;
    }

    #last-update-info {
        display: none !important;
    }
}

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

    .section,
    #gerentes.section {
        padding: 1.5rem 1rem 2.5rem;
    }

    .funil-executive-header,
    #gerentes .funil-executive-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .funil-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-top: 8px;
    }

    .funil-header-content .header-actions {
        width: 100%;
    }

    .funil-header-content .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .gerente-details-grid {
        grid-template-columns: 1fr;
    }

    .detail-section.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .monthly-goals-form {
        grid-template-columns: 1fr;
    }

    .metas-container {
        grid-template-columns: 1fr;
    }

    .monthly-goals-form > button {
        width: 100%;
        justify-self: stretch;
    }

    .header {
        gap: 8px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .logo {
        flex-basis: 130px;
    }

    .logo img {
        max-width: 130px;
    }

    #welcomeMessage,
    .user-info > i {
        display: none;
    }

    .user-info {
        gap: 6px;
    }

    .logout-btn {
        min-height: 36px;
        padding: 0 9px;
    }
}

@media (max-width: 360px) {
    .logo {
        flex: 0 0 120px;
    }

    .logo img {
        width: 120px;
        max-width: 120px;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .refresh-btn {
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        padding: 0;
    }

    .logout-btn {
        width: 36px;
        height: 36px;
        min-height: 36px;
        justify-content: center;
        padding: 0;
        font-size: 0;
    }

    .logout-btn i {
        font-size: 14px;
    }

    .logout-btn span {
        display: none;
    }
}

