/* Sistema CRM Energia Solar - SINTEC */
/* Design com cores verdes escuras e gradientes tecnológicos */

:root {
    /* Paleta de cores profissionais */
    --primary-dark: #1a252f;
    --primary-medium: #2c3e50;
    --primary-light: #34495e;
    --accent-blue: #3498db;
    --bright-blue: #5dade2;
    --light-blue: #85c1e9;
    --success-green: #27ae60;
    
    /* Cores complementares */
    --dark-bg: #1a1a1a;
    --card-bg: #ffffff;
    --border-color: #e1e8ed;
    --text-primary: #2c3e50;
    --text-secondary: #5d6d7e;
    --text-muted: #85929e;
    
    /* Gradientes profissionais */
    --gradient-primary: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    --gradient-secondary: linear-gradient(45deg, #3498db 0%, #5dade2 100%);
    --gradient-accent: linear-gradient(90deg, #27ae60 0%, #58d68d 100%);
    --gradient-light: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    
    /* Sombras profissionais */
    --shadow-primary: 0 4px 20px rgba(52, 152, 219, 0.15);
    --shadow-secondary: 0 8px 32px rgba(44, 62, 80, 0.1);
    --shadow-glow: 0 0 20px rgba(52, 152, 219, 0.2);
    
    /* Transições */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

::-webkit-scrollbar-track {
    background: #f1f2f6;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

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

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* Header/Navbar */
.navbar {
    background: var(--gradient-primary);
    padding: 1rem 0;
    box-shadow: var(--shadow-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--accent-blue);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--light-blue);
    text-decoration: none;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    color: white;
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-glow);
}

/* Cards profissionais */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-primary);
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

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

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-secondary);
    border-color: var(--accent-blue);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    color: var(--accent-blue);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Botões profissionais */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-medium);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

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

.btn-success {
    background: linear-gradient(45deg, #52b788 0%, #74c69d 100%);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545 0%, #e74c3c 100%);
    color: var(--text-primary);
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107 0%, #ffb300 100%);
    color: #000;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-blue);
    color: var(--accent-blue);
}

.btn-outline:hover {
    background: var(--accent-blue);
    color: var(--text-primary);
}

/* Formulários tecnológicos */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-medium);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(116, 198, 157, 0.1);
    background: var(--card-bg);
}

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

select.form-control {
    cursor: pointer;
}

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

/* Tabelas tecnológicas */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.table th {
    background: var(--gradient-primary);
    color: var(--text-primary);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.table tr:hover {
    background: rgba(116, 198, 157, 0.05);
}

.table-striped tr:nth-child(even) {
    background: rgba(22, 43, 26, 0.3);
}

/* KPI Cards */
.kpi-card {
    background: var(--gradient-primary);
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(116, 198, 157, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-blue);
    text-shadow: 0 0 10px rgba(116, 198, 157, 0.5);
    position: relative;
    z-index: 1;
}

.kpi-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}

.kpi-change {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    position: relative;
    z-index: 1;
}

.kpi-change.positive {
    color: var(--secondary-blue);
}

.kpi-change.negative {
    color: #ff6b6b;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    min-height: 600px;
}

.kanban-column {
    min-width: 300px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    border: 2px solid var(--border-color);
}

.kanban-header {
    text-align: center;
    padding: 1rem;
    background: var(--gradient-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.kanban-card {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: move;
    transition: var(--transition-medium);
}

.kanban-card:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-primary);
    transform: scale(1.02);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

/* Chat */
.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--dark-bg);
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(116, 198, 157, 0.1);
    border-left: 3px solid var(--accent-blue);
}

.chat-input {
    display: flex;
    padding: 1rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.chat-input input {
    flex: 1;
    margin-right: 1rem;
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(82, 183, 136, 0.1);
    border-color: var(--secondary-blue);
    color: var(--secondary-blue);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #ff6b6b;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
    color: #ffeb3b;
}

.alert-info {
    background: rgba(116, 198, 157, 0.1);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* Utilitários */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

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

/* Grid responsivo */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-1 { flex: 0 0 8.333333%; }
.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666667%; }
.col-9 { flex: 0 0 75%; }
.col-12 { flex: 0 0 100%; }

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .kanban-board {
        flex-direction: column;
    }
    
    .kanban-column {
        min-width: auto;
    }
    
    .kpi-value {
        font-size: 2rem;
    }
    
    .row {
        margin: 0;
    }
    
    .col {
        padding: 0 10px;
        flex: 0 0 100%;
    }
}

/* Animações tecnológicas */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(116, 198, 157, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(116, 198, 157, 0.8);
    }
}

.animate-slide-up {
    animation: slideInUp 0.5s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-in;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Loading spinner tecnológico */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Modal tecnológico */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideInUp 0.3s ease;
}

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

.modal-title {
    color: var(--accent-blue);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

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