﻿@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --brand-primary: #1E4AFF;
    --brand-secondary: #0A2E1D;
    --surface: #ffffff;
    --background: #f4f6fb;
    --text: #101828;
}

body {
    font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f7f9ff 0%, #eef1f8 100%);
    min-height: 100vh;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--brand-secondary);
    color: #fff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.brand-name span {
    display: block;
    font-size: 12px;
    opacity: 0.7;
    font-weight: 400;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.main-content {
    flex: 1;
    padding: 28px 32px 40px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.topbar-title {
    font-size: 22px;
    font-weight: 600;
}

.topbar-user {
    background: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.page-content .card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #eef2f6;
    font-weight: 600;
    padding: 18px 22px;
}

.card-body {
    padding: 22px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--brand-secondary);
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #eef2f6;
}

.stat-label {
    color: #6b7280;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    margin-top: 8px;
}

.stat-sub {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.primary {
    background: rgba(30, 74, 255, 0.12);
    color: var(--brand-primary);
}

.stat-icon.warning {
    background: rgba(251, 191, 36, 0.18);
    color: #b45309;
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.18);
    color: #047857;
}

.stat-icon.dark {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #eef2f6;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.08);
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 74, 255, 0.12);
    color: var(--brand-primary);
    font-size: 18px;
}

.action-title {
    font-weight: 600;
}

.action-sub {
    font-size: 12px;
    color: #6b7280;
}

.health-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    margin-right: 6px;
    background: #e5e7eb;
    color: #1f2937;
}

.health-pill.ok {
    background: rgba(30, 74, 255, 0.15);
    color: var(--brand-primary);
}

.health-pill.bad {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.activity-type {
    background: var(--brand-primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.activity-text {
    font-size: 14px;
}

.activity-time {
    font-size: 12px;
    color: #6b7280;
}

.whatsapp-shell {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.whatsapp-panel,
.whatsapp-chat {
    overflow: hidden;
}

.panel-header {
    padding: 18px 22px;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.panel-title {
    font-weight: 600;
}

.panel-subtitle {
    font-size: 12px;
    color: #6b7280;
}

.contact-list {
    max-height: 600px;
    overflow-y: auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border: none;
    padding: 14px 18px;
}

.contact-item.active {
    background: rgba(30, 74, 255, 0.08);
}

.contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(30, 74, 255, 0.12);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.contact-avatar.large {
    width: 44px;
    height: 44px;
    font-size: 16px;
}

.contact-meta {
    display: flex;
    flex-direction: column;
}

.contact-name {
    font-weight: 600;
}

.contact-phone {
    font-size: 12px;
    color: #6b7280;
}

.chat-header {
    padding: 18px 22px;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.chat-contact {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #cbd5f5;
}

.status-dot.online {
    background: #22c55e;
}

.status-dot.offline {
    background: #cbd5f5;
}

.chat-body {
    min-height: 400px;
    max-height: 520px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
    padding: 18px;
}

.chat-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    position: relative;
}

.chat-bubble.in {
    align-self: flex-start;
    background: #fff;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
}

.chat-bubble.out {
    align-self: flex-end;
    background: rgba(30, 74, 255, 0.12);
    color: #0f172a;
}

.chat-time {
    font-size: 10px;
    color: #64748b;
    margin-top: 6px;
}

.chat-input {
    padding: 16px 18px;
    border-top: 1px solid #eef2f6;
    background: #fff;
}

.auth-body {
    background: linear-gradient(135deg, #eef2ff, #e3f9f0);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 40px 16px;
}

.auth-card {
    background: #fff;
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    max-width: 420px;
    width: 100%;
}

.btn-primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

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

.btn-outline-primary:hover {
    background: var(--brand-primary);
    color: #fff;
}

@media (max-width: 991px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: column;
        gap: 16px;
    }

    .main-content {
        padding: 24px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .sidebar .nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 8px;
    }

    .sidebar .nav-link {
        white-space: nowrap;
    }

    .whatsapp-shell {
        grid-template-columns: 1fr;
    }
}

