@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: rgb(166, 148, 90);
    --primary-hover: rgb(141, 126, 77);
    --bg-color: #f3f4f6;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --glass-bg: #ffffff;
    --glass-border: #e5e7eb;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    color: #1f2937;
}

/* Login Page specific */
.login-body {
    background: #f3f4f6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-title {
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.5px;
    font-size: 2.5rem;
}

.brand-subtitle {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 1.1rem;
}

.glass-card {
    background: #ffffff;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-radius: 1rem;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(160, 147, 93, 0.3);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(160, 147, 93, 0.15);
}

.sidebar {
    min-height: calc(100vh - 56px);
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar .nav-link {
    color: #4b5563;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 0.5rem;
    margin: 0.25rem 0.75rem;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background-color: #f1ede1;
    color: var(--primary-color);
}

.dashboard-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

/* Global Bootstrap Overrides to ensure consistency */
.text-primary, .text-success, .text-info {
    color: var(--primary-color) !important;
}

.text-danger {
    color: #922b21 !important; /* Muted red-gold */
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-success {
    background-color: #4a6741 !important;
}

.bg-primary-light {
    background-color: rgba(175, 157, 100, 0.1) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

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

.btn-outline-danger {
    color: #922b21 !important;
    border-color: rgba(146, 43, 33, 0.3) !important;
}

.btn-outline-danger:hover {
    background-color: #922b21 !important;
    color: white !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background-color: var(--primary-color) !important;
}

/* Pagination Overrides */
.page-link {
    color: var(--primary-color) !important;
}

.page-item.active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.page-link:hover {
    background-color: #f1ede1 !important;
    color: var(--primary-hover) !important;
}

/* Status Badge Overrides for a unified look */
.badge.bg-success {
    background-color: #e6eee0 !important;
    color: #4a6741 !important;
    border: 1px solid rgba(74, 103, 65, 0.2) !important;
}

.badge.bg-warning {
    background-color: #fef9e7 !important;
    color: #7d6608 !important;
    border: 1px solid rgba(125, 102, 8, 0.2) !important;
}

.badge.bg-info {
    background-color: #ebf5fb !important;
    color: #21618c !important;
    border: 1px solid rgba(33, 97, 140, 0.2) !important;
}

.badge.bg-danger {
    background-color: #f9ebea !important;
    color: #922b21 !important;
    border: 1px solid rgba(146, 43, 33, 0.2) !important;
}

.badge.bg-secondary {
    background-color: #f4f6f7 !important;
    color: #566573 !important;
    border: 1px solid rgba(86, 101, 115, 0.2) !important;
}

.badge.bg-opacity-75 {
    opacity: 1 !important; /* Restore visibility with our custom colors */
}

/* Alert Overrides */
.alert-success {
    background-color: #e6eee0 !important;
    color: #4a6741 !important;
    border: 1px solid rgba(74, 103, 65, 0.1) !important;
}

.alert-danger {
    background-color: #f9ebea !important;
    color: #922b21 !important;
    border: 1px solid rgba(146, 43, 33, 0.1) !important;
}

.alert-info {
    background-color: #ebf5fb !important;
    color: #21618c !important;
    border: 1px solid rgba(33, 97, 140, 0.1) !important;
}

.alert-warning {
    background-color: #fef9e7 !important;
    color: #7d6608 !important;
    border: 1px solid rgba(125, 102, 8, 0.1) !important;
}

/* Table styling for a premium look */
.table thead th {
    background-color: #f9fafb !important;
    color: var(--text-muted) !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem !important;
    border-bottom: 2px solid #f3f4f6 !important;
}

.table tbody td {
    padding: 1rem 1.5rem !important;
    vertical-align: middle;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #af9d64;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9c8b55;
}

/* More specific Bootstrap Overrides */
.form-select:focus, .form-check-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(175, 157, 100, 0.15) !important;
}

.form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.dropdown-item.active, .dropdown-item:active {
    background-color: var(--primary-color) !important;
}

.dropdown-item:hover {
    background-color: #f1ede1 !important;
    color: var(--primary-color) !important;
}

.list-group-item.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(175, 157, 100, 0.15) !important;
}

/* Card Header theme */
.card-header {
    background-color: #f9fafb !important;
    border-bottom: 1px solid #f3f4f6 !important;
    font-weight: 600;
    color: var(--text-dark);
}

/* Ensure global icons use theme colors when appropriate */
.fa-primary {
    color: var(--primary-color) !important;
}





/* Kanban Board Styles */
.kanban-board {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    gap: 1.25rem;
    min-height: 70vh;
    align-items: flex-start;
}

.kanban-column {
    background-color: #ebedf0;
    border-radius: 12px;
    min-width: 300px;
    width: 300px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.kanban-column-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid #e2e8f0;
}

.kanban-column-title {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #4a5568;
    margin: 0;
}

.kanban-cards-container {
    padding: 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
    min-height: 100px; /* Essential for drop target when empty */
}

.kanban-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--primary-color);
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.kanban-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.kanban-card h6 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.kanban-card .card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.kanban-card .btn-group-sm {
    display: flex;
    gap: 4px;
    margin-top: 0.75rem;
}

.kanban-card .btn-wa {
    background-color: #25d366;
    color: white;
    border: none;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.kanban-card .btn-wa:hover {
    background-color: #128c7e;
    color: white;
}


.kanban-drag-over {
    background-color: rgba(175, 157, 100, 0.1);
    border: 2px dashed var(--primary-color);
}

/* Collapsed Columns (Vertical Mode) */
.kanban-column.collapsed {
    min-width: 60px;
    width: 60px;
    transition: all 0.3s ease;
}

.kanban-column.collapsed .kanban-cards-container {
    display: none !important;
}

.kanban-column.collapsed .kanban-column-header {
    flex-direction: column;
    height: 100%;
    padding: 1rem 0.5rem;
    border-radius: 12px;
}

.kanban-column.collapsed .kanban-column-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin: 1.5rem 0;
    font-size: 0.85rem;
    letter-spacing: 1px;
    order: 2;
}

.kanban-column.collapsed .count-badge {
    order: 1;
    margin-bottom: 0.5rem;
}

.kanban-column.collapsed .btn-toggle-column {
    order: 3;
    margin-top: auto;
}

.btn-toggle-column {
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.btn-toggle-column:hover {
    color: var(--primary-color);
}

/* Lead Details Modal */
#modalLeadDetalhes .modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

#modalLeadDetalhes .modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 1.5rem;
}

#modalLeadDetalhes .modal-body {
    padding: 2rem;
}

#modalLeadDetalhes label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.contact-group-icon {
    width: 32px;
    height: 32px;
    background: #f1ede1;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 12px;
}
