/* ========================================
   Discador Axxis - Professional Corporate Design
   Cores: Azul #000425 | Laranja #ff6d00
   Fontes: Outfit (principal) | Sora (subtextos)
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Sora:wght@300;400;500;600&display=swap');

:root {
    --bg-primary: #000425;
    --bg-secondary: #000a3d;
    --bg-card: #001052;
    --bg-hover: #001a6e;
    --bg-input: #000c45;

    --accent-primary: #ff6d00;
    --accent-secondary: #ff9100;
    --accent-glow: rgba(255, 109, 0, 0.25);
    --gradient: linear-gradient(135deg, #ff6d00, #ff9100);

    --text-primary: #ffffff;
    --text-secondary: #a0b4d4;
    --text-muted: #5a6f8f;

    --success: #00e676;
    --warning: #ffab00;
    --danger: #ff5252;
    --info: #40c4ff;

    --border: rgba(255, 109, 0, 0.15);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ========== NAVBAR ========== */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo-highlight {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    font-family: 'Sora', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--bg-card);
    color: var(--accent-primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-family: 'Sora', sans-serif;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    padding: 32px 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ========== PAGE HEADER ========== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-subtitle {
    font-family: 'Sora', sans-serif;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.header-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    text-align: right;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: block;
}

.stat-label {
    font-family: 'Sora', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contador de ligações hoje */
.ligacoes-hoje {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(46, 204, 113, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    margin-left: auto;
}

.hoje-icon {
    font-size: 1rem;
}

.hoje-count {
    font-family: 'Sora', sans-serif;
    font-size: 0.8rem;
    color: var(--success);
}

.hoje-count strong {
    font-weight: 700;
    font-size: 1rem;
}

/* ========== PROGRESS ========== */
.progress-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.progress-label {
    font-family: 'Sora', sans-serif;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.progress-count {
    font-family: 'Sora', sans-serif;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.progress-count strong {
    color: var(--accent-primary);
}

.progress-bar-container {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s ease;
}

.progress-percent {
    text-align: right;
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 600;
}

/* ========== MAIN GRID ========== */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    margin-bottom: 24px;
}

/* ========== LEAD CARD ========== */
.lead-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(255, 109, 0, 0.05), transparent);
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lead-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.lead-badge {
    font-family: 'Sora', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(90, 111, 143, 0.2);
    color: var(--text-secondary);
}

.lead-badge.success {
    background: rgba(0, 230, 118, 0.15);
    color: var(--success);
}

.lead-badge.warning {
    background: rgba(255, 171, 0, 0.15);
    color: var(--warning);
}

.lead-badge.danger {
    background: rgba(255, 82, 82, 0.15);
    color: var(--danger);
}

.lead-badge.tentativas {
    background: rgba(103, 58, 183, 0.15);
    /* Roxo deep */
    color: #b39ddb;
    border: 1px solid rgba(103, 58, 183, 0.3);



}

.contact-stats-panel {
    margin: 16px 0;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-line {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: 'Sora', sans-serif;
    font-weight: 500;
}

.stat-line span {
    color: var(--text-primary);
    font-weight: 600;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Lead Details */
.lead-details {
    padding: 24px;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-row.full {
    grid-template-columns: 1fr;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-family: 'Sora', sans-serif;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

/* Phone Section */
.phone-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 109, 0, 0.1), rgba(255, 145, 0, 0.05));
    border-top: 1px solid var(--border);
}

.phone-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.phone-label {
    font-family: 'Sora', sans-serif;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.phone-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 1px;
}

/* ========== ACTIONS PANEL ========== */
.actions-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-title {
    font-family: 'Sora', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Call Button */
.btn-call {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px;
    background: var(--accent-primary);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-call:hover {
    opacity: 0.9;
}

.call-icon {
    display: none;
}

.call-text {
    font-family: 'Sora', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.call-shortcut {
    font-family: 'Sora', sans-serif;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 5px;
}

/* Status Actions */
.status-actions {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}

.status-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.status-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 5px;
    font-family: 'Sora', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.status-btn:hover {
    opacity: 0.9;
}

.status-icon {
    display: none;
}

.status-btn.success {
    background: var(--success);
    color: #000425;
}

.status-btn.warning {
    background: var(--warning);
    color: #000425;
}

.status-btn.danger {
    background: var(--danger);
    color: white;
}

.status-btn.info {
    background: var(--info);
    color: #000425;
}

/* Navigation */
.navigation-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.nav-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: 'Sora', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-btn.primary {
    background: var(--accent-primary);
    border: none;
    color: white;
}

.nav-btn.primary:hover {
    opacity: 0.9;
}

/* Shortcuts */
.shortcuts-panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}

.shortcuts-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.shortcut {
    font-family: 'Sora', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

kbd {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.6875rem;
    color: var(--accent-primary);
}

/* ========== SETTINGS FOOTER ========== */
.settings-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    animation: pulse 2s infinite;
}

.connection-status.connected .status-dot {
    background: var(--success);
}

.connection-status.error .status-dot {
    background: var(--danger);
    animation: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.settings-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-form label {
    font-family: 'Sora', sans-serif;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.settings-form input {
    width: 280px;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8125rem;
}

.settings-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.btn-reconnect {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: 'Sora', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-reconnect:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .actions-panel {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .actions-panel>* {
        flex: 1;
        min-width: 200px;
    }

    .btn-call {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
    }

    .container {
        padding: 0 16px;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
    }

    .header-stats {
        width: 100%;
        justify-content: space-between;
    }

    .detail-row {
        grid-template-columns: 1fr;
    }

    .settings-footer {
        flex-direction: column;
        gap: 12px;
    }

    .settings-form {
        width: 100%;
        flex-wrap: wrap;
    }

    .settings-form input {
        flex: 1;
        width: auto;
    }
}

/* ========== ANIMATIONS ========== */
.lead-card.updating {
    animation: cardPulse 0.3s ease;
}

@keyframes cardPulse {
    50% {
        opacity: 0.8;
        transform: scale(0.99);
    }
}

/* ========== FILTERS SECTION ========== */
.filters-section {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: 5px;
    border: 1px solid var(--border);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-family: 'Sora', sans-serif;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    font-size: 0.8125rem;
    min-width: 150px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.btn-limpar-filtros {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-secondary);
    font-family: 'Sora', sans-serif;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-limpar-filtros:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

@media (max-width: 768px) {
    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }
}

/* ========== OBSERVACAO SECTION ========== */
.observacao-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Nova observação inline no card */
.obs-input-row {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex !important;
    flex-direction: row !important;
    gap: 12px;
    align-items: flex-end;
}

.obs-textarea {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 200px;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 50px;
}

.obs-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.obs-textarea::placeholder {
    color: var(--text-muted);
}

.obs-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    padding: 12px 24px;
    background: var(--accent-primary);
    border: none;
    border-radius: 5px;
    color: white;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.obs-btn:hover {
    opacity: 0.9;
}

.obs-btn.saved {
    background: var(--success);
}

/* Observação dentro do card */
.observacao-input-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.observacao-input-section .observacao-input {
    flex: 1;
    min-width: 0;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 60px;
}

.observacao-input-section .observacao-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.observacao-input-section .observacao-input::placeholder {
    color: var(--text-muted);
}

.observacao-input-section .btn-salvar-obs {
    padding: 12px 20px;
    background: var(--accent-primary);
    border: none;
    border-radius: 5px;
    color: white;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    align-self: flex-end;
}

.observacao-input-section .btn-salvar-obs:hover {
    opacity: 0.9;
}

.observacao-input-section .btn-salvar-obs.saved {
    background: var(--success);
}

.observacao-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 12px;
}

.observacao-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.observacao-input::placeholder {
    color: var(--text-muted);
}

.btn-salvar-obs {
    width: 100%;
    padding: 10px;
    background: var(--accent-primary);
    border: none;
    border-radius: 5px;
    color: white;
    font-family: 'Sora', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-salvar-obs:hover {
    opacity: 0.9;
}

.btn-salvar-obs.saved {
    background: var(--success);
}