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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary-color: #0f172a;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --success-color: #10b981;
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --info-color: #06b6d4;
    --info-light: #ecfeff;
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    width: var(--sidebar-width);
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
    box-shadow: 4px 0 10px rgba(0,0,0,0.05);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-brand {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-menu {
    padding: 1rem 0;
    list-style: none;
    margin-bottom: 0;
}

.sidebar-item {
    padding: 0.25rem 1rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.925rem;
    transition: all 0.2s ease;
}

.sidebar-link i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.sidebar-link:hover {
    color: #ffffff;
    background-color: rgba(255,255,255,0.05);
}

.sidebar-item.active .sidebar-link {
    color: #ffffff;
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Main Content Area */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.top-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    z-index: 99;
}

.content-body {
    padding: 2rem;
    flex-grow: 1;
}

/* Cards Design */
.card-premium {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
    margin-bottom: 1.5rem;
}

.card-premium:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

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

.card-premium-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0;
}

.card-premium-body {
    padding: 1.5rem;
}

/* KPI Stats Styling */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #ffffff;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Kanban Board Styling */
.kanban-board {
    display: flex;
    overflow-x: auto;
    padding-bottom: 1rem;
    gap: 1.25rem;
    align-items: flex-start;
}

.kanban-column {
    flex: 0 0 300px;
    width: 300px;
    background-color: #f1f5f9;
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 700;
}

.kanban-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* WhatsApp Simulator Interface */
.whatsapp-chat-container {
    height: calc(100vh - 220px);
    background-color: #f0f2f5;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.whatsapp-chat-header {
    background-color: #075e54;
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
}

.whatsapp-chat-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.whatsapp-msg {
    max-width: 70%;
    padding: 0.5rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.whatsapp-msg-inbound {
    background-color: #ffffff;
    align-self: flex-start;
    border-top-left-radius: 0;
}

.whatsapp-msg-outbound {
    background-color: #d9fdd3;
    align-self: flex-end;
    border-top-right-radius: 0;
}

.whatsapp-msg-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.25rem;
}

.whatsapp-chat-footer {
    background-color: #f0f2f5;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

/* Buttons */
.btn-primary-premium {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
    transition: all 0.2s ease;
}

.btn-primary-premium:hover {
    background-color: var(--primary-hover);
    color: white;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
}

/* Badges */
.badge-custom {
    padding: 0.35em 0.65em;
    font-weight: 600;
    border-radius: 10rem;
    font-size: 0.75rem;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.ai-pulse-button {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    animation: pulse 2.5s infinite;
}

.ai-pulse-button:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
