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

:root {
    --color-primary: #4f46e5;
    --color-bg-dark: #0f172a;
    --color-bg-card: #1e293b;
    --color-text-main: #ffffff;
    --color-text-muted: #94a3b8;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* Animations */
@keyframes slide-in {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.animate-slide-in { animation: slide-in 0.3s ease-out; }

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fade-in 0.5s ease-out forwards; }

@keyframes pulse-ring {
    0% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Sidebar */
.sidebar-desk {
    transition: width 0.3s ease;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}
.sidebar-link.active {
    background: linear-gradient(90deg, var(--color-primary), #4338ca);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.sidebar-link i { width: 24px; text-align: center; }

/* Phone Frame */
.phone-frame {
    width: 380px;
    height: 750px;
    background: #0b141a; /* WhatsApp Dark BG */
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 8px solid #334155;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background: #334155;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 50;
}
.whatsapp-bg {
    background-image: url('../images/wa-bg.png'); /* Ensure this asset exists or use CSS pattern */
    background-color: #0b141a;
    background-blend-mode: overlay;
    background-size: 400px;
}

/* Chat Bubbles */
.chat-bubble {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    position: relative;
    margin-bottom: 8px;
    animation: fade-in 0.2s ease-out;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.bubble-in {
    background: #202c33;
    color: #e9edef;
    align-self: flex-start;
    border-top-left-radius: 0;
}
.bubble-out {
    background: #005c4b;
    color: #e9edef;
    align-self: flex-end;
    border-top-right-radius: 0;
}
.wa-time {
    font-size: 10px;
    opacity: 0.6;
    text-align: right;
    margin-top: 4px;
    margin-bottom: -4px;
}
.wa-btn {
    background: #202c33;
    border: 1px solid #37404a;
    color: #00a884;
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
    width: 100%;
}
.wa-btn:hover { background: #2a3942; }

/* Typing Indicator */
.typing-indicator::after {
    content: '...';
    animation: typing 1s infinite;
    letter-spacing: 2px;
}
@keyframes typing { 0%{content:'.'} 33%{content:'..'} 66%{content:'...'} }

/* Attachment Drawer */
.attachment-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #202c33;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 40;
}
.attachment-drawer.open { transform: translateY(0); }
.attach-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    margin-bottom: 8px;
    transition: transform 0.2s;
}
.attach-icon:hover { transform: scale(1.1); }

/* Scanlines Effect for Logs */
.scanlines {
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: #1e293b;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    border-left: 4px solid #4f46e5;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.toast.show { transform: translateX(0); }
.toast.success { border-color: #10b981; }
.toast.error { border-color: #f43f5e; }

/* Table Styles */
table th { letter-spacing: 0.05em; }
table td { vertical-align: middle; }
