/* ===== ESTILOS DA TELA DE LOGIN PREMIUM ===== */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.login-container {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.login-header h1 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: 500;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form .form-group {
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-base);
    background: var(--bg-card);
    color: var(--text-primary);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: var(--bg-card-hover);
}

.btn-login {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-top: 1rem;
    width: 100%;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn-login:hover::before {
    left: 100%;
}

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

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

.login-error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #fcc;
    margin-top: 15px;
    font-size: 0.9rem;
}

/* Estilos para o conteúdo principal */
.main-content {
    min-height: 100vh;
}

/* ===== VARIÁVEIS CSS PARA DARK MODE ===== */
:root {
    /* Cores Premium - Gradientes Modernos */
    --primary-color: #6366f1;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-gradient-hover: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --danger-color: #ef4444;
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --warning-color: #f59e0b;
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --info-color: #3b82f6;
    --info-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    
    /* Backgrounds Premium */
    --bg-primary: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #fafbfc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Sombras Suaves Premium */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-colored: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
    
    /* Header Premium */
    --header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --header-text: #ffffff;
    --nav-bg: #ffffff;
    --nav-active: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --nav-text: #64748b;
    --nav-hover: #f1f5f9;
    
    /* Border Radius Premium */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transições Suaves */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Mode Premium */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --border-light: #475569;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    --header-bg: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --nav-bg: #1e293b;
    --nav-hover: #334155;
}

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* ===== HEADER PREMIUM ===== */
header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 1.25rem 2.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-dark-mode {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--header-text);
    padding: 0.625rem;
    border-radius: var(--radius-md);
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-dark-mode:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--header-text);
    padding: 0.625rem;
    border-radius: var(--radius-md);
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-change-password {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--header-text);
    padding: 0.625rem;
    border-radius: var(--radius-md);
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-change-password:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.whatsapp-status {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-base);
}

.whatsapp-status:hover {
    background: rgba(255, 255, 255, 0.2);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--danger-color);
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
}

.status-indicator.connected {
    background: var(--success-color);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

@keyframes pulse {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.status-indicator.connected {
    animation: pulseConnected 2s infinite;
}

@keyframes pulseConnected {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

/* ===== NAVEGAÇÃO PREMIUM ===== */
nav {
    background: var(--nav-bg);
    padding: 1rem 2.5rem;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 73px;
    z-index: 99;
    backdrop-filter: blur(10px);
}

.nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--nav-text);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    background: var(--nav-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--border-light);
}

.nav-btn.active {
    background: var(--nav-active);
    color: white;
    box-shadow: var(--shadow-colored);
    border-color: transparent;
    font-weight: 600;
}

/* ===== MAIN CONTENT ===== */
main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.section.active {
    display: block;
}

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

.section h2 {
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 1rem;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
}

/* ===== DASHBOARD PREMIUM ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.dashboard-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

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

.dashboard-card h3 {
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== KPIs PREMIUM ===== */
.kpis-section {
    margin-top: 3rem;
}

.kpis-section h3 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.kpis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-value {
    font-size: 2.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.kpi-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* ===== SEARCH AND FILTERS ===== */
.search-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-warning {
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn-primary:hover::before {
    left: 100%;
}

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: var(--warning-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.4);
}

/* ===== CLIENTS GRID ===== */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.client-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

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

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

.client-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.debutante-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.client-info {
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.client-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.client-actions button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 20px;
}

/* ===== TAGS ===== */
.client-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--primary-gradient);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

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

/* ===== CONTRACT STATUS ===== */
.contract-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.contract-status.with {
    background: var(--success-color);
    color: white;
}

.contract-status.without {
    background: var(--warning-color);
    color: var(--dark-color);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 500;
    font-size: 0.9375rem;
}

.pagination button:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pagination button.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== CALENDAR ===== */
.calendar-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.calendar-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.calendar-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

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

#fullCalendar {
    min-height: 600px;
}

/* ===== REPORTS ===== */
.report-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.monthly-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

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

.stat-card h3 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.stats-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-method-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

/* ===== WHATSAPP ===== */
.whatsapp-status-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.message-sending, .bulk-messaging {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

/* QR Code Styles */
.whatsapp-qr-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    text-align: center;
}

.qr-instructions {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.qr-instructions p {
    margin: 8px 0;
    color: var(--text-color);
    font-size: 14px;
}

.qr-instructions strong {
    color: #007bff;
    font-weight: 600;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

#whatsappQRCode {
    display: flex;
    justify-content: center;
    align-items: center;
}

#whatsappQRCode canvas {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-status {
    margin-top: 15px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 8px;
    color: #1976d2;
    font-weight: 500;
}

.qr-status.scanning {
    background: #fff3e0;
    color: #f57c00;
}

/* Import Contacts Styles */
.import-contacts-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: white;
}

.import-contacts-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.import-source-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}
.import-source-selector .radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}
.import-source-selector .radio-option input {
    margin: 0;
}

.import-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.import-saved-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}
.import-saved-panel .form-select {
    min-width: 220px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 0.95rem;
}
.import-saved-panel .form-select option {
    color: #333;
}

#importContactsBtn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#importContactsBtn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.import-status {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px;
    backdrop-filter: blur(10px);
}

.imported-contacts-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.imported-contacts-section h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.contacts-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.contacts-count {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.imported-contacts-list {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.contact-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #f5576c;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-name {
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.contact-phone {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
}

.imported-contacts-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#importedContactsSection .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#importedContactsSection .btn-primary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

#importedContactsSection .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#importedContactsSection .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#importedContactsSection .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Estilos para modal de contatos importados */
.selected-contacts-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    max-height: 120px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.contact-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsividade para contatos importados */
@media (max-width: 768px) {
    .import-contacts-section {
        padding: 20px;
    }
    
    .contacts-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .contact-item {
        padding: 10px;
    }
    
    .contact-name {
        font-size: 0.9rem;
    }
    
    .contact-phone {
        font-size: 0.8rem;
    }
    
    .selected-contacts-preview {
        max-height: 100px;
    }
    
    .contact-tag {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

.qr-status.connected {
    background: #e8f5e8;
    color: #2e7d32;
}

.message-sending h3, .bulk-messaging h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.message-form, .bulk-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bulk-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== FORMS ===== */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-input, .form-textarea, .form-select {
    padding: 0.875rem 1.25rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all var(--transition-base);
    width: 100%;
    font-family: inherit;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: var(--bg-card-hover);
}

.form-input:hover, .form-textarea:hover, .form-select:hover {
    border-color: var(--border-light);
}

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

.form-actions, .modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* ===== MODALS PREMIUM ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    animation: fadeIn var(--transition-base);
}

.modal-content {
    background-color: var(--bg-card);
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: slideUp var(--transition-base);
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    position: relative;
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 1.75rem;
    font-weight: 600;
    cursor: pointer;
    position: absolute;
    right: 1.5rem;
    top: 1.25rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    line-height: 1;
}

.close:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    transform: rotate(90deg);
}

/* ===== LISTS ===== */
.ensaios-list, .payments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ensaio-item, .payment-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.ensaio-item:hover, .payment-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-light);
}
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ensaio-info, .payment-info {
    flex: 1;
}

.ensaio-actions, .payment-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    nav {
        padding: 1rem;
        justify-content: center;
    }
    
    main {
        padding: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .kpis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .clients-grid {
        grid-template-columns: 1fr;
    }
    
    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    .form-actions, .modal-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary, .btn-danger {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .kpis-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .report-filters {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== ESTILOS PARA TAGS ===== */

.tags-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tag-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.tag-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.tag-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tag-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.tag-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.tag-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.tag-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.tag-client-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tag-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.tag-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-btn-edit {
    background: var(--info-color);
    color: white;
}

.tag-btn-edit:hover {
    background: #138496;
}

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

.tag-btn-delete:hover {
    background: #c82333;
}

/* Pesquisa Avançada por Tags */
.advanced-search-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.advanced-search-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.tag-search-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tag-selector label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tag-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tag-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.tag-checkbox-item:hover {
    background: var(--primary-color);
    color: white;
}

.tag-checkbox-item input[type="checkbox"] {
    margin: 0;
}

.tag-checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-size: 0.9rem;
    flex: 1;
}

.search-results {
    margin-top: 2rem;
}

.search-results h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.client-search-result {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-search-info h5 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.client-search-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.client-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Estatísticas de Tags */
.tag-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tag-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.tag-stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tag-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tag-chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* Responsividade para Tags */
@media (max-width: 768px) {
    .tags-grid {
        grid-template-columns: 1fr;
    }
    
    .tag-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .tag-search-controls {
        flex-direction: column;
    }
    
    .client-search-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tag-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== BOTÃO DE SUCESSO ===== */
.btn-success {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-success:hover {
    background-color: #218838;
}

/* ===== SISTEMA DE NOTIFICAÇÕES ===== */
.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.notification {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    animation: slideInRight 0.3s ease-out;
    position: relative;
}

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

.notification-title {
    font-weight: bold;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: var(--text-primary);
}

.notification-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.notification-icon {
    font-size: 1.2rem;
}

.notification-text {
    flex: 1;
}

.notification-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Tipos de notificação */
.notification-event {
    border-left: 4px solid #007bff;
}

.notification-ensaio {
    border-left: 4px solid #28a745;
}

.notification-warning {
    border-left: 4px solid #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

/* Animações */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.notification.removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Dashboard alerts */
.dashboard-alerts {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

.dashboard-alerts h3 {
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-alerts p {
    margin: 0;
    opacity: 0.9;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 107, 0.5);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
}

/* Botões de ação para ensaios */
.ensaio-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Envio em Massa Avançado */
/* ===== MASS MESSAGING SYSTEM ===== */
.bulk-messaging-advanced {
    margin-top: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mass-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    background: var(--bg-color);
    border-radius: 10px;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mass-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mass-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.mass-tab:hover::before {
    left: 100%;
}

.mass-tab.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    transform: translateY(-1px);
}

.mass-tab:hover:not(.active) {
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.mass-tab-content {
    display: none;
    margin-bottom: 25px;
    animation: fadeIn 0.3s ease-in-out;
}

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

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

.selection-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, var(--bg-color), rgba(0, 123, 255, 0.05));
    border-radius: 10px;
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

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

.clients-checkbox-list,
.tags-checkbox-list {
    max-height: 350px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    background: var(--card-bg);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.clients-checkbox-list::-webkit-scrollbar,
.tags-checkbox-list::-webkit-scrollbar {
    width: 6px;
}

.clients-checkbox-list::-webkit-scrollbar-track,
.tags-checkbox-list::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 3px;
}

.clients-checkbox-list::-webkit-scrollbar-thumb,
.tags-checkbox-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.client-checkbox-item,
.tag-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.client-checkbox-item::before,
.tag-checkbox-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.1), transparent);
    transition: left 0.5s;
}

.client-checkbox-item:hover::before,
.tag-checkbox-item:hover::before {
    left: 100%;
}

.client-checkbox-item:hover,
.tag-checkbox-item:hover {
    background: rgba(0, 123, 255, 0.05);
    border-color: rgba(0, 123, 255, 0.2);
    transform: translateX(5px);
}

.client-checkbox-item input[type="checkbox"]:checked + .client-info,
.tag-checkbox-item input[type="checkbox"]:checked + .tag-info {
    color: var(--primary-color);
}

.client-checkbox-item input[type="checkbox"],
.tag-checkbox-item input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.client-info,
.tag-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.client-name,
.tag-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 14px;
}

.client-details,
.tag-details {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.filter-controls .form-group {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.mass-message-config {
    background: linear-gradient(135deg, var(--card-bg), rgba(0, 123, 255, 0.02));
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    border: 1px solid rgba(0, 123, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--card-bg);
    flex: 1;
    justify-content: center;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.radio-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.1), transparent);
    transition: left 0.5s;
}

.radio-option:hover::before {
    left: 100%;
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: rgba(0, 123, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.radio-option input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked {
    background: var(--primary-color);
}

.radio-option input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.message-config {
    margin-bottom: 25px;
}

.media-preview {
    margin-top: 15px;
    max-width: 250px;
    max-height: 250px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.media-preview img,
.media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.advanced-options {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.advanced-options h5 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.advanced-options h5::before {
    content: '⚙️';
    font-size: 16px;
}

.send-stats {
    background: linear-gradient(135deg, var(--bg-color), rgba(0, 123, 255, 0.05));
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.1), transparent);
    transition: left 0.5s;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
    border-color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.mass-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.mass-actions .btn {
    padding: 12px 25px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.mass-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.mass-actions .btn:hover::before {
    left: 100%;
}

.mass-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.mass-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
    color: white;
}

.mass-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border: none;
    color: white;
}

.mass-actions .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
    color: white;
}

.mass-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.mass-actions .btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive adjustments for mass messaging */
@media (max-width: 768px) {
    .bulk-messaging-advanced {
        padding: 15px;
        margin-top: 15px;
    }
    
    .mass-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .mass-tab {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .content-type-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .radio-option {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .mass-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .mass-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .clients-checkbox-list,
    .tags-checkbox-list {
        max-height: 250px;
    }
}

.mass-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.mass-actions button {
    min-width: 120px;
}

/* ===== RESPONSIVIDADE MÓVEL ===== */
@media (max-width: 768px) {
    /* Layout geral */
    .container {
        padding: 10px;
        margin: 0;
    }
    
    .header {
        padding: 15px 10px;
        flex-direction: column;
        gap: 15px;
    }
    
    .header h1 {
        font-size: 1.5rem;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: center;
    }
    
    .header-controls .btn {
        width: 100%;
        max-width: 200px;
        padding: 12px;
        font-size: 14px;
    }
    
    /* Header específico para mobile */
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: white;
        border-bottom: 1px solid #e9ecef;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .header h1 {
        font-size: 1.3rem;
        margin: 0;
    }
    
    .header-controls {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .header-controls .btn {
        flex: 1;
        min-width: 80px;
        max-width: 120px;
        padding: 10px 8px;
        font-size: 12px;
    }
    
    /* Navegação */
    nav {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 8px;
        margin: 10px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-btn {
        padding: 15px 12px;
        font-size: 14px;
        text-align: center;
        white-space: nowrap;
        min-height: 50px;
        border-radius: 8px;
        background: white;
        border: 1px solid #e9ecef;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .nav-btn:hover {
        background: #e9ecef;
    }
    
    .nav-btn.active {
        background: #007bff;
        color: white;
        border-color: #007bff;
    }
    
    /* Cards de clientes */
    .client-card {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .client-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .client-name {
        font-size: 1.1rem;
    }
    
    .client-phone {
        font-size: 0.9rem;
    }
    
    .client-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .client-actions .btn {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
    
    /* Filtros */
    .filter-controls {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
        text-align: center;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    /* Modais */
    .modal {
        padding: 20px;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 15px 0;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 15px 0;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* Evita zoom no iOS */
        border-radius: 8px;
    }
    
    .form-group textarea {
        min-height: 100px;
        resize: vertical;
    }
    
    /* Botões */
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 8px;
        min-height: 44px; /* Tamanho mínimo para touch */
    }
    
    .btn-group {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* WhatsApp */
    .whatsapp-status {
        padding: 15px;
        margin: 15px 0;
    }
    
    .whatsapp-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .whatsapp-actions .btn {
        width: 100%;
    }
    
    /* Importar contatos */
    .import-contacts-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .imported-contacts-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .imported-contacts-list {
        max-height: 300px;
    }
    
    .contact-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .contact-name {
        font-size: 1rem;
    }
    
    .contact-phone {
        font-size: 0.9rem;
    }
    
    /* Envio em massa */
    .mass-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .mass-tab {
        padding: 12px;
        text-align: center;
        font-size: 14px;
    }
    
    .content-type-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .content-type-option {
        padding: 15px;
        text-align: center;
    }
    
    .mass-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .mass-actions .btn {
        width: 100%;
        padding: 15px;
    }
    
    /* Lista de checkboxes */
    .clients-checkbox-list,
    .tags-checkbox-list {
        max-height: 200px;
        padding: 10px;
    }
    
    .checkbox-item {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .checkbox-item label {
        font-size: 14px;
        padding: 10px;
    }
    
    /* Login */
    .login-container {
        margin: 20px;
        padding: 30px 20px;
        max-width: none;
        width: calc(100% - 40px);
    }
    
    .login-header h1 {
        font-size: 1.8rem;
    }
    
    .login-form {
        gap: 15px;
    }
    
    .login-form input {
        padding: 15px;
        font-size: 16px;
    }
    
    .btn-login {
        padding: 15px;
        font-size: 16px;
    }
    
    /* Change password modal */
    .change-password-modal {
        padding: 20px;
        margin: 10px;
        max-width: none;
        width: calc(100% - 20px);
    }
    
    .change-password-form {
        gap: 15px;
    }
    
    .change-password-form input {
        padding: 15px;
        font-size: 16px;
    }
    
    /* Botões móveis */
    .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .mobile-action-row {
        display: flex;
        gap: 8px;
        width: 100%;
    }
    
    .mobile-btn {
        flex: 1;
        padding: 10px 8px;
        font-size: 12px;
        min-height: 40px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mobile-card {
        margin-bottom: 20px;
    }
    
    .mobile-card .client-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .mobile-card .contract-status {
        align-self: flex-end;
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .mobile-card .client-info {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .mobile-card .client-info .info-item {
        margin-bottom: 4px;
    }
    
    .mobile-card .client-tags {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .mobile-card .tag {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    /* Paginação móvel */
    .mobile-pagination {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        margin: 15px 0;
    }
    
    .mobile-pagination-btn {
        padding: 10px 15px;
        font-size: 14px;
        min-width: 80px;
    }
    
    .mobile-pagination-info {
        font-size: 14px;
        color: #666;
        font-weight: 500;
    }
    
    /* Calendário mobile */
    .calendar-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .calendar-controls .btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .calendar-container {
        padding: 15px;
        margin: 10px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .calendar-container table {
        min-width: 600px;
        font-size: 12px;
    }
    
    .calendar-container th,
    .calendar-container td {
        padding: 8px 4px;
        text-align: center;
        min-width: 40px;
    }
    
    .calendar-container .event-item {
        font-size: 10px;
        padding: 2px 4px;
        margin: 1px 0;
        border-radius: 3px;
    }
    
    .calendar-container .event-time {
        font-size: 9px;
    }
    
    .calendar-container .event-title {
        font-size: 10px;
        line-height: 1.2;
    }
}

/* ===== RESPONSIVIDADE EXTRA PEQUENA (320px) ===== */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .header {
        padding: 10px 5px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .nav-tab {
        padding: 10px;
        font-size: 13px;
    }
    
    .client-card {
        padding: 12px;
    }
    
    .client-name {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .modal {
        padding: 15px;
        margin: 5px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 16px;
    }
    
    .stats-grid {
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* Navegação para telas muito pequenas */
    nav {
        padding: 5px;
        gap: 5px;
    }
    
    .nav-btn {
        padding: 12px 8px;
        font-size: 12px;
        min-height: 45px;
    }
    
    /* Calendário para telas muito pequenas */
    .calendar-container {
        padding: 10px;
    }
    
    .calendar-container table {
        min-width: 500px;
        font-size: 10px;
    }
    
    .calendar-container th,
    .calendar-container td {
        padding: 6px 2px;
        min-width: 35px;
    }
    
    .calendar-container .event-item {
        font-size: 8px;
        padding: 1px 2px;
    }
    
    .calendar-container .event-time {
        font-size: 8px;
    }
    
    .calendar-container .event-title {
        font-size: 8px;
    }
    
    /* Header para telas muito pequenas */
    .header {
        padding: 10px 5px;
    }
    
    .header h1 {
        font-size: 1.1rem;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .header-controls .btn {
        width: 100%;
        max-width: none;
        padding: 8px;
        font-size: 11px;
    }
}

/* ===== RESPONSIVIDADE PARA LANDSCAPE ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .modal {
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .imported-contacts-list {
        max-height: 200px;
    }
    
    .clients-checkbox-list,
    .tags-checkbox-list {
        max-height: 150px;
    }
    
    /* Navegação em landscape */
    nav {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 5px;
    }
    
    .nav-btn {
        flex-shrink: 0;
        min-width: 120px;
        padding: 10px 8px;
        font-size: 12px;
    }
    
    /* Calendário em landscape */
    .calendar-container {
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .calendar-container table {
        min-width: 700px;
    }
}

/* Responsive para Envio em Massa */
@media (max-width: 768px) {
    .mass-tabs {
        flex-direction: column;
    }
    
    .mass-tab {
        text-align: center;
    }
    
    .content-type-selector {
        flex-direction: column;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
    }
    
    .mass-actions {
        flex-direction: column;
    }
    
    .mass-actions button {
        width: 100%;
    }
}

/* ========== ESTILOS DO SISTEMA DE AGENDAMENTO ========== */

.agendamentos-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.agendamentos-controls .filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.agendamentos-controls .filters select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.agendamentos-controls .filters select:focus {
    outline: none;
    border-color: #667eea;
}

.agendamentos-controls .actions {
    display: flex;
    gap: 10px;
}

.agendamentos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.agendamento-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.agendamento-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.agendamento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.agendamento-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-aguardando {
    background: #fff3cd;
    color: #856404;
}

.status-confirmado {
    background: #d4edda;
    color: #155724;
}

.status-cancelado {
    background: #f8d7da;
    color: #721c24;
}

.status-finalizado {
    background: #d1ecf1;
    color: #0c5460;
}

.agendamento-info {
    margin-bottom: 15px;
}

.agendamento-info p {
    margin: 8px 0;
    color: #666;
    font-size: 0.95rem;
}

.agendamento-info strong {
    color: #333;
    margin-right: 5px;
}

.agendamento-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-small.btn-primary {
    background: #667eea;
    color: white;
}

.btn-small.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.btn-small.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-small.btn-secondary:hover {
    background: #5a6268;
}

.btn-small.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-small.btn-danger:hover {
    background: #c82333;
}

@media (max-width: 768px) {
    .agendamentos-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .agendamentos-controls .filters {
        flex-direction: column;
    }

    .agendamentos-controls .filters select {
        width: 100%;
    }

    .agendamentos-list {
        grid-template-columns: 1fr;
    }

    .agendamento-actions {
        flex-direction: column;
    }

    .agendamento-actions .btn-small {
        width: 100%;
    }
}

/* ========== ESTILOS PARA DATAS DISPONÍVEIS ========== */
.data-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.data-card:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.data-card.selected {
    border-color: #667eea;
    background: #f0f4ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.data-card h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1rem;
}

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

.data-disponibilidade {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.data-header h4 {
    margin: 0;
    color: #333;
}

.form-group-inline {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.form-group-inline input {
    flex: 1;
}

.adicionar-data-disponibilidade {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px dashed #4caf50;
}

.adicionar-data-disponibilidade h4 {
    margin-top: 0;
    color: #2e7d32;
}

/* ========== ESTILOS PARA SOLICITAÇÕES PERSONALIZADAS ========== */
.solicitacoes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.solicitacao-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.solicitacao-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.solicitacao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.solicitacao-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.status-aguardando {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-confirmado {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-cancelado {
    background: #f8d7da;
    color: #721c24;
}

.solicitacao-info {
    margin-bottom: 15px;
}

.solicitacao-info p {
    margin: 8px 0;
    color: #666;
    font-size: 0.95rem;
}

.solicitacao-info strong {
    color: #333;
}

.solicitacao-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.solicitacao-actions .btn-small {
    flex: 1;
}

/* ========== ESTILOS PARA CARDS DE DATA NA PÁGINA PÚBLICA ========== */
.data-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.data-card:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.data-card.selected {
    border-color: #667eea;
    background: #f0f4ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.data-card h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1rem;
}

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

/* ========== ESTILOS DAS ABAS DE AGENDAMENTO ========== */
.agendamentos-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #667eea;
    background: #f0f4ff;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f0f4ff;
}

.agendamentos-aba {
    display: none;
}

.agendamentos-aba.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

/* ========== ESTILOS DE LOCAIS ========== */
.locais-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.local-card-admin {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.local-card-admin:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.local-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.local-card-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.local-card-info {
    margin-bottom: 15px;
}

.local-card-info p {
    margin: 8px 0;
    color: #666;
    font-size: 0.95rem;
}

.local-card-info a {
    color: #667eea;
    text-decoration: none;
}

.local-card-info a:hover {
    text-decoration: underline;
}

.local-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

/* ========== ESTILOS DE DISPONIBILIDADE ========== */
.dia-disponibilidade {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.dia-disponibilidade h4 {
    margin-bottom: 15px;
    color: #333;
}

.horarios-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-horario {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-horario:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.checkbox-horario input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-horario input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #667eea;
}

.checkbox-horario:has(input[type="checkbox"]:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

.horario-custom {
    display: flex;
    gap: 10px;
    align-items: center;
}

.horario-custom input[type="time"] {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ========== ESTILOS DO MODAL DE DETALHES ========== */
.modal-detalhes .modal-content {
    max-width: 800px;
}

.detalhes-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.detalhes-section:last-child {
    border-bottom: none;
}

.detalhes-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.detalhes-section p {
    margin: 8px 0;
    color: #666;
}

.detalhes-section ul {
    list-style: none;
    padding: 0;
}

.detalhes-section li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #c62828;
}

.modal-header {
    position: relative;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

@media (max-width: 768px) {
    .agendamentos-tabs {
        flex-direction: column;
    }

    .tab-btn {
        text-align: left;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .tab-btn.active {
        border-left-color: #667eea;
        border-bottom-color: transparent;
    }

    .locais-list {
        grid-template-columns: 1fr;
    }

    .local-card-actions {
        flex-direction: column;
    }

    .local-card-actions .btn-small {
        width: 100%;
    }

    .horarios-checkbox {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* ========== ESTILOS PARA PÁGINA DE AGENDAMENTO - FASE 2 MELHORADA ========== */

/* Grid de datas moderno */
.datas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.data-card-clickable {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.data-card-clickable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.data-card-clickable:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

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

.data-card-clickable.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eaf6 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transform: translateY(-5px);
}

.data-card-clickable.selected::before {
    transform: scaleX(1);
}

.data-card-header {
    margin-bottom: 15px;
}

.data-card-dia-semana {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.data-card-dia {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 5px;
}

.data-card-mes {
    font-size: 0.9rem;
    color: #666;
    text-transform: capitalize;
}

.data-card-footer {
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.horarios-count {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
}

.data-card-clickable.selected .horarios-count {
    color: #764ba2;
}

/* Grid de horários moderno */
.horarios-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.horario-btn-modern {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.horario-btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.horario-btn-modern:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
}

.horario-btn-modern:hover::before {
    opacity: 0.1;
}

.horario-btn-modern.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px);
}

.horario-btn-modern.selected::before {
    opacity: 0;
}

.horario-icon {
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.horario-text {
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.horario-btn-modern.selected .horario-icon,
.horario-btn-modern.selected .horario-text {
    color: white;
}

/* Solicitação personalizada fase 1 */
.solicitacao-personalizada-fase1 {
    animation: fadeInUp 0.5s ease;
}

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

.btn-light {
    background: white;
    color: #667eea;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* Responsividade para fase 2 */
@media (max-width: 768px) {
    .datas-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 15px;
    }
    
    .data-card-clickable {
        padding: 15px;
    }
    
    .data-card-dia {
        font-size: 2rem;
    }
    
    .horarios-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .horario-btn-modern {
        padding: 15px 10px;
    }
}

