@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
    --gold: #C9A84C;
    --gold-bright: #F5D68B;
    --gold-dark: #8A6E30;
    --navy: #070B14;
    --navy-mid: #0D1627;
    --navy-light: #15223A;
    --accent-glow: rgba(201, 168, 76, 0.15);
    --serif: 'Cormorant Garamond', serif;
    --sans: 'Montserrat', sans-serif;
    --text-light: #F8F8F8;
    --text-muted: #A0AAB8;
}

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

body {
    background: var(--navy);
    color: var(--text-light);
    font-family: var(--sans);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

/* SCROLLBARS */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--navy);
}
::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 3px;
}

.serif-font {
    font-family: var(--serif);
}

.gold-text {
    color: var(--gold);
}

/* APP LAYOUT */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: var(--navy-mid);
    border-right: 1px solid rgba(201, 168, 76, 0.15);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: 10;
}

.logo-area {
    text-align: center;
    margin-bottom: 40px;
}

.logo-area h1 {
    font-size: 2rem;
    line-height: 1.2;
}

.logo-area .subtitle {
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-item i {
    width: 20px;
    font-size: 1.1rem;
}

.nav-item:hover, .nav-item.active {
    background: var(--navy-light);
    color: var(--gold-bright);
    border-left: 4px solid var(--gold);
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 20px;
    text-align: center;
}

.status-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.status-tag.IA {
    background: rgba(201, 168, 76, 0.2);
    color: var(--gold-bright);
    border: 1px solid var(--gold);
}

/* MAIN CONTENT */
.main-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    background: linear-gradient(135deg, var(--navy), #020408);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    padding-bottom: 15px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 500;
}

/* BUTTONS */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.btn-prime {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: var(--navy);
    border: none;
    padding: 15px 30px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-prime:hover {
    box-shadow: 0 10px 30px rgba(201, 168, 76, 0.3);
}

.w-full { width: 100%; }
.max-w-600 { max-width: 600px; margin: 0 auto; }

/* GLASS PANEL */
.glass-panel {
    background: rgba(13, 22, 39, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: 8px;
    padding: 30px;
}

/* KANBAN */
.kanban-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    align-items: flex-start;
}

.kanban-column {
    flex: 1;
    min-width: 280px;
    background: rgba(13, 22, 39, 0.4);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 20px 15px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--navy-light);
    padding-bottom: 10px;
}

.column-header h3 {
    font-size: 1.1rem;
    color: var(--text-light);
}

.lead-count {
    background: var(--navy-light);
    color: var(--gold);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

.column-cards {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* CARD */
.lead-card {
    background: rgba(21, 34, 58, 0.6);
    border-left: 4px solid var(--gold);
    padding: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.lead-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-left-color: var(--gold-bright);
}

.card-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.card-details {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.card-footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.priority-tag {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.priority-tag.quente { background: rgba(232, 82, 60, 0.2); color: #E8523C; }
.priority-tag.morno { background: rgba(245, 214, 139, 0.2); color: #F5D68B; }
.priority-tag.frio { background: rgba(160, 170, 184, 0.2); color: #A0AAB8; }

.card-score {
    font-weight: bold;
    color: var(--gold);
}

/* TABLES */
.table-responsive {
    overflow-x: auto;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.premium-table th, .premium-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.premium-table th {
    font-family: var(--sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--gold);
    letter-spacing: 1px;
}

.premium-table tbody tr {
    transition: background 0.3s;
}

.premium-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.actions-cell {
    min-width: 170px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.action-buttons .btn-gold {
    width: 100%;
    justify-content: center;
}

.btn-danger-soft {
    background: linear-gradient(135deg, #b99238, #8a6e30);
}

/* FORMS */
.premium-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

label {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

input, select, textarea {
    background: var(--navy);
    border: 1px solid rgba(201, 168, 76, 0.3);
    padding: 12px 15px;
    border-radius: 4px;
    color: white;
    font-family: var(--sans);
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold-bright);
}

/* DRAWER (Painel Lateral de Detalhes) */
.lead-drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: 450px;
    height: 100vh;
    background: var(--navy-mid);
    border-left: 1px solid rgba(201, 168, 76, 0.3);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.lead-drawer.open {
    right: 0;
}

.drawer-header {
    padding: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    font-size: 1.5rem;
    color: var(--gold);
}

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

.drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.drawer-tabs {
    display: flex;
    border-bottom: 1px solid var(--navy-light);
    margin-bottom: 20px;
}

.drawer-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    font-family: var(--sans);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.drawer-tab.active {
    color: var(--gold-bright);
    border-bottom: 2px solid var(--gold);
}

.drawer-tab-content {
    display: none;
}

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

/* TIMELINE */
.ai-summary-box {
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.3);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.ai-summary-box h4 {
    color: var(--gold-bright);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.ai-summary-box p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.next-step-box {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(201, 168, 76, 0.2);
    font-size: 0.85rem;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-radius: 6px;
    max-width: 85%;
    font-size: 0.9rem;
}

.timeline-item.user {
    background: var(--navy-light);
    align-self: flex-start;
    border-left: 3px solid var(--gold);
}

.timeline-item.bot {
    background: rgba(13, 22, 39, 0.8);
    align-self: flex-end;
    border-right: 3px solid var(--text-muted);
    text-align: right;
}

.timeline-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* TASKS */
.add-task-box {
    background: rgba(255,255,255,0.02);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    background: var(--navy-light);
    padding: 12px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-info h5 {
    font-size: 0.9rem;
}

.task-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Drawer overflow fixes */
.drawer-content {
    overflow-x: hidden;
}

.drawer-tabs {
    overflow-x: auto;
    gap: 6px;
}

.drawer-tab {
    min-width: 110px;
}

.add-task-box {
    overflow: hidden;
}

#task-form .form-row {
    flex-wrap: wrap;
}

#task-form .form-row input,
#task-form .form-row select {
    flex: 1 1 160px;
    min-width: 0;
    width: 100%;
}

.task-item {
    gap: 12px;
}

.task-info {
    min-width: 0;
    flex: 1;
}

.task-info h5 {
    word-break: break-word;
}
