/**
 * ArquiDisparo - CSS Global
 * Tema: Dark Navy com acentos dourados
 */

/* ========================================
   VARIÁVEIS CSS
   ======================================== */
:root {
    /* Backgrounds */
    --bg-primary: #0A0E1A;
    --bg-secondary: #111827;
    --bg-tertiary: #1A2236;
    
    /* Acentos */
    --accent-primary: #D4A843;
    --accent-hover: #E8C068;
    --accent-gradient: linear-gradient(135deg, #D4A843, #F0C060);
    
    /* Status */
    --success: #10B981;
    --error: #EF4444;
    --info: #3B82F6;
    --warning: #F59E0B;
    --whatsapp: #25D366;
    
    /* Texto */
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    /* Bordas */
    --border: #1E2D45;
    --border-light: #2D3E5A;
    
    /* Sombras */
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    
    /* Dimensões */
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transições */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   TIPOGRAFIA
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-accent { color: var(--accent-primary); }

/* ========================================
   LAYOUT - SIDEBAR
   ======================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
}

.sidebar-logo-text {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    transition: var(--transition);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(212, 168, 67, 0.1);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(212, 168, 67, 0.15);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item span {
    font-weight: 500;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

/* ========================================
   LAYOUT - MAIN CONTENT
   ======================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-content {
    flex: 1;
    padding: 30px;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

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

.card-title {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1rem;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-tertiary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Stat Cards */
.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.gold { background: rgba(212, 168, 67, 0.15); color: var(--accent-primary); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.stat-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--error); }

.stat-content {
    flex: 1;
}

.stat-value {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ========================================
   BOTÕES
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

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

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 168, 67, 0.3);
}

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

.btn-secondary:hover:not(:disabled) {
    background: rgba(212, 168, 67, 0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.btn-danger:hover:not(:disabled) {
    background: #DC2626;
}

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

.btn-success:hover:not(:disabled) {
    background: #059669;
}

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

.btn-whatsapp:hover:not(:disabled) {
    background: #1DA851;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
    width: 28px;
    height: 28px;
}

/* ========================================
   FORMULÁRIOS
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label.required::after {
    content: ' *';
    color: var(--error);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-error {
    font-size: 12px;
    color: var(--error);
    margin-top: 6px;
}

/* Checkbox e Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.form-check-label {
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: var(--bg-primary);
}

/* ========================================
   TABELAS
   ======================================== */
.table-container {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: rgba(212, 168, 67, 0.05);
}

.table td {
    font-size: 14px;
    color: var(--text-primary);
}

.table-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: rgba(212, 168, 67, 0.15);
    color: var(--accent-primary);
}

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

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

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

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

.badge-gray {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

/* Status badges específicos */
.status-pendente { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }
.status-contatado { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.status-respondido { background: rgba(212, 168, 67, 0.15); color: var(--accent-primary); }
.status-enviou_orcamento { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-nao_respondeu { background: rgba(239, 68, 68, 0.15); color: var(--error); }

.status-rascunho { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }
.status-ativa { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-pausada { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-concluida { background: rgba(59, 130, 246, 0.15); color: var(--info); }

/* ========================================
   MODAIS
   ======================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

.modal-lg {
    max-width: 900px;
    max-height: 90vh;
}

.modal-sm {
    max-width: 400px;
    max-height: 80vh;
}

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

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

.modal-title {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: calc(85vh - 140px);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

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

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

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

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

/* ========================================
   TOASTS
   ======================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 450px;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid;
}

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

.toast.toast-out {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--error); }
.toast-warning { border-color: var(--warning); }
.toast-info { border-color: var(--info); }

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--error); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: 14px;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

/* ========================================
   PAGINAÇÃO
   ======================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

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

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 16px;
}

/* ========================================
   TABS
   ======================================== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 20px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

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

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

.tab-content {
    display: none;
}

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

/* ========================================
   FILTROS
   ======================================== */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.filter-control {
    min-width: 180px;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--text-muted);
}

.empty-state-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ========================================
   LOADING
   ======================================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

/* ========================================
   VARIÁVEIS CLICÁVEIS
   ======================================== */
.variable-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.variable-badge {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: monospace;
    color: var(--accent-primary);
    cursor: pointer;
    transition: var(--transition);
}

.variable-badge:hover {
    background: rgba(212, 168, 67, 0.1);
    border-color: var(--accent-primary);
}

/* ========================================
   GRID
   ======================================== */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ========================================
   UTILITÁRIOS
   ======================================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }

.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

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

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hidden { display: none !important; }

/* ========================================
   CHARTS
   ======================================== */
.chart-container {
    position: relative;
    height: 300px;
}

/* ========================================
   DRAG AND DROP (SortableJS)
   ======================================== */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    background: var(--bg-tertiary);
}

.drag-handle {
    cursor: grab;
    color: var(--text-muted);
    padding: 4px;
}

.drag-handle:active {
    cursor: grabbing;
}

/* ========================================
   MOBILE MENU
   ======================================== */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .topbar {
        padding: 0 16px;
    }
    
    .page-content {
        padding: 16px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-control {
        width: 100%;
    }
    
    .modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ========================================
   SELEÇÃO DE TEXTO
   ======================================== */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: var(--text-primary);
}

/* ========================================
   ANIMAÇÕES
   ======================================== */
.fade-in {
    animation: fadeIn 0.3s ease;
}

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

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

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

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-primary);
}

.login-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-logo {
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--bg-primary);
}

.login-logo-text {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-top: 8px;
}

.login-form {
    margin-top: 32px;
}

.login-form .form-control {
    text-align: center;
    font-size: 18px;
    letter-spacing: 2px;
    padding: 16px;
}

.login-form .btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-top: 16px;
}

/* ========================================
   CONFIRM DIALOG
   ======================================== */
.confirm-dialog {
    text-align: center;
}

.confirm-dialog-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--warning);
}

.confirm-dialog-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.confirm-dialog-message {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.confirm-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ========================================
   CHAR COUNTER
   ======================================== */
.char-counter {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
}

.char-counter.warning {
    color: var(--warning);
}

.char-counter.error {
    color: var(--error);
}

/* ========================================
   ACTIVITY LOG
   ======================================== */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(212, 168, 67, 0.15);
    color: var(--accent-primary);
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: var(--text-primary);
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========================================
   SEARCH RESULTS (Google Maps)
   ======================================== */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-card:hover {
    border-color: var(--accent-primary);
}

.search-result-card.selected {
    border-color: var(--accent-primary);
    background: rgba(212, 168, 67, 0.1);
}

.search-result-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.search-result-checkbox {
    margin-top: 2px;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 500;
    color: var(--text-primary);
}

.search-result-address {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.search-result-phone {
    font-size: 13px;
    color: var(--accent-primary);
    margin-top: 4px;
}

.search-result-badge {
    margin-top: 8px;
}

/* ========================================
   FILE UPLOAD
   ======================================== */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload:hover {
    border-color: var(--accent-primary);
    background: rgba(212, 168, 67, 0.05);
}

.file-upload.dragover {
    border-color: var(--accent-primary);
    background: rgba(212, 168, 67, 0.1);
}

.file-upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: var(--text-muted);
}

.file-upload-text {
    color: var(--text-secondary);
}

.file-upload-text strong {
    color: var(--accent-primary);
}

.file-upload input[type="file"] {
    display: none;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-top: 12px;
}

.file-preview-icon {
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.file-preview-name {
    font-weight: 500;
    color: var(--text-primary);
}

.file-preview-size {
    font-size: 12px;
    color: var(--text-muted);
}

.file-preview-remove {
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.file-preview-remove:hover {
    color: var(--error);
}
