/* Reset e Variáveis - Tema Azul e Branco Moderno */
:root {
    --primary: #2563eb; /* Azul 600 */
    --primary-dark: #1e40af; /* Azul 700 */
    --primary-light: #3b82f6; /* Azul 500 */
    --primary-lighter: #60a5fa; /* Azul 400 */
    --secondary: #0891b2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --gray-lighter: #f1f5f9;
    --white: #ffffff;
    --accent: #eff6ff; /* Azul 50 */
    --shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
    --shadow-md: 0 4px 12px rgba(37, 99, 235, 0.12);
    --shadow-lg: 0 10px 30px rgba(37, 99, 235, 0.15);
    --shadow-xl: 0 20px 40px rgba(37, 99, 235, 0.2);
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --radius-lg: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 25%, #ffffff 50%, #dbeafe 75%, #ffffff 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-container {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.5s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-large {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.login-header h1 {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--gray);
    font-size: 0.95rem;
}

.login-form {
    margin-top: 2rem;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
    background: var(--white);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

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

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

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

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

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Sidebar - Menu Lateral */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--primary-dark);
    border-right: 4px solid var(--primary);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Desktop: sidebar sempre visível */
@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0);
    }
    
    body:not(.login-page) {
        padding-left: 280px;
    }
    
    body:not(.login-page) .container {
        margin-left: auto;
        margin-right: auto;
        max-width: 1200px;
        padding: 0 2rem 2rem;
        box-sizing: border-box;
    }
    
    .header-top {
        left: 280px;
    }
}

/* Mobile: sidebar oculto por padrão */
@media (max-width: 768px) {
    .sidebar.active {
        transform: translateX(0);
    }
    
    .container {
        margin-left: 0;
    }
    
    .header-top {
        left: 0;
    }
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-header .logo h2 {
    color: var(--white);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar customizado para sidebar */
.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    border-left: 4px solid transparent;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.sidebar-nav .nav-link span {
    flex: 1;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: var(--white);
    color: var(--white);
}

.sidebar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: var(--white);
    color: var(--white);
    font-weight: 700;
}

.sidebar-nav .nav-link.admin-link {
    background: rgba(245, 158, 11, 0.2);
    border-left-color: var(--warning);
}

.sidebar-nav .nav-link.admin-link:hover {
    background: rgba(245, 158, 11, 0.3);
}

.sidebar-nav .nav-link .icon {
    font-size: 1.25rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}


/* Sidebar Overlay para mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Header Top (barra superior) */
.header-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary-dark) 100%);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
    border-bottom: 2px solid var(--primary-dark);
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--white);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-title {
    height: 100%;
    display: flex;
    align-items: center;
}

.header-title h2 {
    color: var(--white);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.header-user {
    margin-left: auto;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.user-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-dropdown-toggle .icon {
    font-size: 1.25rem;
}

.user-dropdown-toggle .dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    margin-left: 0.25rem;
}

.user-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid var(--gray-light);
    overflow: hidden;
    pointer-events: none;
}

.user-dropdown.active .user-dropdown-menu {
    pointer-events: auto;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-light);
    font-weight: 500;
}

/* Notificações Dropdown */
.notifications-dropdown {
    position: relative;
    z-index: 1000;
}

.notifications-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer !important;
    color: var(--white);
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    transition: var(--transition);
    z-index: 10;
    pointer-events: auto !important;
}

.notifications-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.notifications-toggle:active {
    transform: scale(0.95);
}

.notifications-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid var(--primary);
    animation: pulse-badge 2s infinite;
    z-index: 11;
}

.notifications-badge:not(:empty) {
    display: flex;
}

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

.notifications-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 320px;
    max-width: 400px;
    max-height: 500px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid var(--gray-light);
    overflow: hidden;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.notifications-dropdown.active .notifications-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.notifications-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.notifications-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}

.notifications-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.mark-all-read:hover {
    background: rgba(37, 99, 235, 0.1);
}

.clear-notifications {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.clear-notifications:hover {
    background: rgba(239, 68, 68, 0.1);
}

.notifications-list {
    overflow-y: auto;
    max-height: 400px;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    gap: 0.75rem;
    position: relative;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item.unread {
    background: #eff6ff;
    border-left: 3px solid var(--primary);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

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

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

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

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
}

.notification-message {
    color: var(--gray);
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    color: var(--gray);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: var(--gray);
}

.notification-empty .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.notification-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* Scrollbar customizado para notificações */
.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-dark);
}

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

.dropdown-item:hover {
    background: var(--gray-lighter);
    color: var(--primary);
}

.dropdown-item.logout-item {
    color: var(--danger);
}

.dropdown-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

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

/* Ajustar container principal */
/* Ajustar body e container quando sidebar existe */
body:not(.login-page) {
    padding-top: 80px;
    padding-left: 280px;
}

body:not(.login-page) .container {
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
    padding: 0 2rem 2rem;
    transition: padding-left 0.3s ease;
    box-sizing: border-box;
}

/* Mobile: remover padding-left do body */
@media (max-width: 768px) {
    body:not(.login-page) {
        padding-left: 0;
        padding-top: 60px;
    }
}

.user-name {
    color: var(--white);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.user-name:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-logout {
    padding: 0.5rem 1rem;
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

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

/* Cards */
.card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    opacity: 0;
    transition: var(--transition);
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: rgba(20, 184, 166, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-light);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 1600px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-card .big-number {
        font-size: 1.6rem;
    }
    
    .container {
        padding: 0 0.5rem 1rem;
    }
    
    .welcome-message {
        padding: 0.75rem;
    }
    
    .welcome-message h2 {
        font-size: 0.875rem;
    }
    
    .page-header h1 {
        font-size: 1.1rem;
    }
    
    .header-title h2 {
        font-size: 0.9rem;
    }
    
    .header-top {
        height: 48px;
        padding: 0 0.5rem;
    }
    
    .menu-toggle {
        font-size: 1.1rem;
        padding: 0.3rem;
    }
    
    .notifications-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .user-dropdown-toggle {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    min-width: 0;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

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

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.stat-card.success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.stat-card.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.stat-card.info {
    background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
}

.stat-card h3 {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 0.3rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Melhorar quebra de linha em mobile para títulos longos */
@media (max-width: 768px) {
    .stat-card h3 {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.3;
        word-wrap: break-word;
    }
}

.welcome-message {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.welcome-message h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
}

.stat-card .big-number {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    letter-spacing: -1px;
    line-height: 1.2;
}

.stat-card .stat-change {
    font-size: 0.75rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Melhorar quebra de linha em mobile para stat-change */
@media (max-width: 768px) {
    .stat-card .stat-change {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.3;
        word-wrap: break-word;
    }
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--white);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table thead {
    background: linear-gradient(135deg, var(--light) 0%, var(--gray-lighter) 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

table th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 3px solid var(--primary-light);
}

table td {
    padding: 1rem;
    border-top: 1px solid var(--gray-light);
}

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

table tbody tr:hover {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.05) 0%, transparent 100%);
    border-left-color: var(--primary-light);
    transform: translateX(4px);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--gray-light);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1rem;
    color: var(--gray);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    font-weight: 500;
}

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

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

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

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

/* Search */
.search-box {
    margin-bottom: 1.5rem;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
}

/* Responsividade para telas menores */
@media (max-height: 600px) {
    .modal {
        max-height: 95vh;
    }
}

@media (max-width: 768px) {
    .modal {
        max-width: 95%;
        max-height: 95vh;
        margin: 1rem;
    }
    
    .modal-overlay {
        padding: 1rem;
    }
}

.modal-header {
    padding: 2rem;
    border-bottom: 2px solid var(--gray-light);
    background: linear-gradient(135deg, var(--light) 0%, var(--white) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gray-lighter);
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-header h2 {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Permite que o flex funcione corretamente */
}

/* Scrollbar customizada para modal-body */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--gray-lighter);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Para Firefox */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--gray-lighter);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-shrink: 0; /* Garante que o footer não encolha */
    background: var(--white);
}

/* Estilos específicos para modal de sugestões */
.sugestao-modal {
    animation: slideUpScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpScale {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sugestao-header {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 2px solid #fbbf24;
}

.sugestao-icon-header {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.sugestao-icon-header svg {
    width: 28px;
    height: 28px;
}

.sugestao-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 2px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.sugestao-user-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

.sugestao-user-details {
    flex: 1;
    min-width: 0;
}

.sugestao-user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.sugestao-user-email {
    font-size: 0.9rem;
    color: var(--gray);
    word-break: break-all;
}

/* Estilos para labels no modal de sugestões */
.sugestao-modal .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.sugestao-modal .form-group label span {
    font-size: 1.1rem;
}

/* Responsividade do footer em telas menores */
@media (max-width: 768px) {
    .modal-footer {
        flex-direction: column-reverse;
        padding: 1rem;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

/* Actions */
.actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 1.1rem;
}

.action-btn:hover {
    background: var(--light);
}

.action-btn.edit {
    color: var(--info);
}

.action-btn.delete {
    color: var(--danger);
}

.action-btn.check {
    color: var(--success);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 260px;
    }
    
    .container {
        margin-left: 0;
        padding: 0 0.75rem 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
        min-height: auto;
    }
    
    .stat-card h3 {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
        line-height: 1.2;
    }
    
    .stat-card .big-number {
        font-size: 1.4rem;
        margin-bottom: 0.25rem;
        line-height: 1.1;
    }
    
    .stat-card .stat-change {
        font-size: 0.65rem;
        line-height: 1.2;
    }
    
    .welcome-message {
        padding: 0.875rem 1rem;
        margin-bottom: 1rem;
        border-radius: var(--radius-sm);
    }
    
    .welcome-message h2 {
        font-size: 0.95rem;
        line-height: 1.3;
        margin: 0;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0;
    }
    
    .header-title h2 {
        font-size: 1rem;
    }
    
    .header-top {
        height: 50px;
        padding: 0 0.75rem;
    }
    
    .user-dropdown-toggle span.user-name-mobile {
        display: none;
    }
    
    .user-dropdown-toggle {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .sidebar-toggle {
        display: flex;
        padding: 0.4rem;
        font-size: 1.2rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: var(--radius);
    }
    
    .card-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    table th,
    table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    table th {
        font-size: 0.7rem;
        padding: 0.75rem 0.5rem;
    }
    
    .notifications-menu {
        min-width: 280px;
        max-width: 90vw;
        right: 0.5rem;
    }
    
    .user-dropdown-menu {
        min-width: 180px;
        right: 0.5rem;
    }
}

@media (min-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar-overlay {
        display: none;
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Botões Flutuantes */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Botão Flutuante WhatsApp */
.whatsapp-float {
    animation: pulse-whatsapp 2s infinite;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

/* Quando dentro de floating-buttons, remover posicionamento fixo */
.floating-buttons .whatsapp-float {
    position: relative;
    bottom: auto;
    right: auto;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-button {
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    border: 3px solid var(--white);
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-button svg {
    width: 32px;
    height: 32px;
    fill: var(--white);
}

.whatsapp-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--dark);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--dark);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
}

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

/* Botão Flutuante Sugestões */
.sugestao-float {
    position: relative;
    z-index: 1001;
}

/* Quando sugestao-float está sozinho (fora de floating-buttons), aplicar posicionamento fixo */
body:not(.login-page) .sugestao-float:not(.floating-buttons .sugestao-float) {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 998;
}

.sugestao-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transition: var(--transition);
    cursor: pointer;
    border: 3px solid var(--white);
    color: var(--white);
    font-size: 1.5rem;
}

.sugestao-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.sugestao-button svg {
    width: 28px;
    height: 28px;
}

.sugestao-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--dark);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 1002;
}

.sugestao-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--dark);
}

.sugestao-float:hover .sugestao-tooltip {
    opacity: 1;
}

@media (max-width: 768px) {
    .floating-buttons {
        bottom: 15px;
        right: 15px;
        gap: 12px;
    }
    
    /* Esconder botão WhatsApp quando estiver sozinho (fora de floating-buttons) em telas pequenas */
    .whatsapp-float:not(.floating-buttons .whatsapp-float) {
        display: none;
    }
    
    .floating-buttons .whatsapp-float {
        position: relative;
        bottom: auto;
        right: auto;
        display: block;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-button svg {
        width: 26px;
        height: 26px;
    }
    
    .whatsapp-tooltip {
        display: none;
    }
    
    .sugestao-button {
        width: 50px;
        height: 50px;
    }
    
    .sugestao-button svg {
        width: 24px;
        height: 24px;
    }
    
    .sugestao-tooltip {
        display: none;
    }
    
    /* Melhorar legibilidade em telas pequenas */
    body {
        font-size: 14px;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .search-box input {
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
    
    /* Garantir que não haja overflow horizontal */
    * {
        max-width: 100%;
    }
    
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
    
    /* Melhorar espaçamento de elementos inline no header */
    .header-user {
        gap: 0.5rem !important;
    }
}

/* Cards de Planos */
.plano-card {
    position: relative;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: var(--transition);
    overflow: hidden;
}

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

.plano-card.plano-selecionado {
    border-color: var(--primary);
    border-width: 3px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: linear-gradient(135deg, var(--white) 0%, var(--accent) 100%);
}

.plano-content {
    padding: 1.5rem;
}

.plano-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.plano-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.plano-badge {
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.plano-badge.badge-popular {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.plano-badge.badge-melhor {
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
}

.plano-preco {
    margin-bottom: 1rem;
}

.plano-valor {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.plano-valor-original {
    display: block;
    font-size: 0.875rem;
    color: var(--gray);
    text-decoration: line-through;
    margin-bottom: 0.25rem;
}

.plano-periodo {
    display: block;
    font-size: 0.875rem;
    color: var(--gray);
}

.plano-economia {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
}

.plano-economia-mes {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
}

.plano-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plano-features li {
    padding: 0.5rem 0;
    color: var(--dark);
    font-size: 0.9rem;
}

.plano-destaque {
    border-color: var(--primary-light);
}

.plano-melhor {
    border-color: var(--warning);
}

.plano-melhor.plano-selecionado {
    border-color: var(--warning);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

@media (max-width: 768px) {
    .plano-card {
        margin-bottom: 1rem;
    }
}

