/**
 * AuditFlow - Componentes CSS Compartilhados
 * 
 * Este arquivo contém estilos reutilizáveis em todas as páginas.
 */

/* ============================================
   Botões
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn svg {
    width: 18px;
    height: 18px;
}

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

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

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-outline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}


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

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
}

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

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

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

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

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

.btn-sm svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   Formulários
   ============================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-glass) 100%, transparent);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}


.form-select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: color-mix(in srgb, var(--bg-glass) 80%, transparent);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none; /* Remove default arrow for consistent padding */
    padding: 0.75rem 1rem;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2371717A' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 7px;
 }

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-checkbox[disabled],
.form-select[disabled],
.form-input[disabled],
.form-textarea[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    background: color-mix(in srgb, var(--bg-glass) 20%, transparent);
    border-color: var(--border);
}
.form-checkbox[readonly],
.form-select[readonly],
.form-input[readonly],
.form-textarea[readonly] {
    background: color-mix(in srgb, var(--bg-glass) 20%, transparent);
    border-color: var(--border);
    color: var(--text-secondary);
    cursor: not-allowed;
}



.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-glass) 100%, transparent);
    accent-color: var(--primary);
    transition: border-color 0.2s;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    height: 100%;
    min-height: 44px;
}

.form-checkbox input[type="checkbox"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-range {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    height: 100%;
    min-height: 44px;
}

.form-range label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-range input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 6px;
    background: var(--border);
    accent-color: var(--primary);
    margin: 0;
    transition: box-shadow 0.2s;
}

.form-range input[type="range"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-glow);
}


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

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 1.5rem;
}

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

.card h3 svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}


/* ============================================
   Toast / Notificações
   ============================================ */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: #10b981;
}

.toast.error {
    border-color: #ef4444;
}

.toast svg {
    width: 20px;
    height: 20px;
}

.toast.success svg {
    color: #10b981;
}

.toast.error svg {
    color: #ef4444;
}

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

.empty-state > svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* ============================================
   Status Badges
   ============================================ */
.status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-draft,
.status-new {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.status-pending,
.status-pending-approval {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.status-approved,
.status-qualified {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-sent,
.status-contacted {
    background: rgba(58, 134, 255, 0.2);
    color: var(--primary);
}

.status-converted {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.status-lost,
.status-failed,
.status-bounced {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary);
}

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

/* ============================================
   Page Header
   ============================================ */
.page-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header h1 svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

/* ============================================
   Page Container
   ============================================ */
.page-container {
    min-height: 100vh;
    padding-top: 80px;
}

.page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem 2rem;
}

/* ============================================
   Login Required Modal
   ============================================ */
.login-required-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-required-modal .modal {
    text-align: center;
    padding: 2rem;
}

.login-required-modal .modal h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.login-required-modal .modal p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ============================================
   Página de Captação
   ============================================ */

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 1rem;
}

.tab-button:hover {
    background: var(--bg-hover);
}

.tab-button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tab-button i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tab-content {
    display: none;
}

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

/* Formulários */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

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

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

.form-group input,
.form-group select {
    appearance: none;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ============================================
   Search Input
   ============================================ */

/*remove e manter somente .search-input:*/
.search-wrapper {
    position: relative;
}

.search-wrapper svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button input {
    flex: 1;
}

.btn-location {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.btn-location:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-location i {
    width: 18px;
    height: 18px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Filters Bar */
.filters-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    flex: 1;
}

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

.filter-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 120px;
}

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

.filter-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

/* Search Bar */
.search-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    flex: 1;
}

/* Batch */
.batch-searches {
    margin-bottom: 1.5rem;
}

.batch-search-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.batch-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.batch-search-header h4 {
    margin: 0;
    color: var(--text-primary);
}

.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

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

.btn-danger:hover {
    background: #dc2626;
}

.batch-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

/* Tasks */
.tasks-list {
    margin-bottom: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state p {
    margin: 0.5rem 0;
}

/* Results */
.results-section {
    margin-top: 2rem;
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #16a34a;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #d97706;
}

.alert h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.alert p {
    margin: 0;
}

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

    .tab-button {
        border-radius: 10px;
        border: 1px solid var(--border);
    }

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

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

    .batch-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .batch-search-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}


/* Login Card */
.login-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
}

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

.login-header h1 {
    font-family: "Tomorrow", sans-serif;
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: 12px;
}

.tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

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

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

.form-label svg {
    width: 16px;
    height: 16px;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

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

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

.alert {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

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

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

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.user-details h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-details span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

[x-cloak] { display: none !important; }

/* Modal */


/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

/* ============================================
   Navigation Components
   ============================================ */

/* Hamburger button (mobile only) */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    z-index: 101;
}

.nav-hamburger:hover {
    background: var(--bg-secondary);
}

.nav-hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Navigation menu container */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-link svg {
    width: 18px;
    height: 18px;
}

/* CRM Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
    background: none;
    border: none;
}

.nav-dropdown-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.nav-dropdown .nav-dropdown-toggle:hover .nav-dropdown-icon {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    z-index: 100;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-dropdown-item svg {
    width: 18px;
    height: 18px;
}

/* User menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

.btn-logout svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   Responsive Navigation (Mobile)
   ============================================ */

@media (max-width: 768px) {
    /* Show hamburger button */
    .nav-hamburger {
        display: flex;
    }

    /* Navigation menu becomes mobile menu */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-card);
        border-left: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 5rem 0 1rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        box-shadow: var(--shadow-xl);
        z-index: 100;
    }

    .nav-menu-open {
        right: 0 !important;
        background-color: var(--bg-primary);
    }

    /* Navigation links */
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 0 1rem;
        border-bottom: 1px solid var(--border);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .nav-link {
        width: 100%;
        padding: 1rem;
        justify-content: flex-start;
        border-radius: 10px;
    }

    /* CRM Dropdown in mobile */
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--bg-secondary);
        margin-top: 0.5rem;
        border-radius: 10px;
    }

    .nav-dropdown-item {
        padding-left: 2rem;
    }

    /* User actions in mobile menu */
    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
        border-top: 1px solid var(--border);
        margin-top: auto;
    }

    .user-menu {
        justify-content: center;
        padding: 0.5rem;
        background: var(--bg-secondary);
        border-radius: 10px;
    }

    .theme-toggle {
        margin: 0 auto;
    }

    /* Adjust nav padding for smaller screens */
    .nav {
        padding: 1rem;
    }

    /* Logo adjustments */
    .logo-text {
        font-size: 1.25rem;
    }

    .logo-img {
        height: 32px;
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-links {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .nav-link svg {
        width: 16px;
        height: 16px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .nav-menu {
        width: 100%;
        right: -100%;
    }

    .nav {
        padding: 0.75rem 1rem;
    }
}



/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

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

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
}

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

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.w-100 {
    width: 100%;
}