/* ============================================
   CHATBOT STYLES - Add to style.css
   ============================================ */

/* Chat Modal */
.chat-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    backdrop-filter: blur(8px);
    padding: 20px;
}

.chat-modal[aria-hidden="false"] {
    display: flex;
}

.chat-panel {
    width: 100%;
    max-width: 440px;
    height: 600px;
    max-height: 90vh;
    background: linear-gradient(180deg, #0d0d2b, #1a1a3e);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

/* Chat Header */
.chat-panel header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(247, 151, 30, 0.15), rgba(255, 210, 0, 0.05));
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    flex-shrink: 0;
}

.chat-panel header h4 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #ffd200;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-panel header h4::before {
    content: '🎮';
}

.chat-panel header .close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.3s;
}

.chat-panel header .close:hover {
    color: #fff;
}

/* Chat Body */
.chat-body {
    flex: 1;
    padding: 15px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 215, 0, 0.02), transparent);
}

.chat-body::-webkit-scrollbar {
    width: 4px;
}

.chat-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 10px;
}

/* Message Wrappers */
.message-wrapper {
    display: flex;
    animation: messageSlide 0.3s ease;
}

.message-wrapper.bot {
    justify-content: flex-start;
}

.message-wrapper.user {
    justify-content: flex-end;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Message Bubbles */
.message {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.bot {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #ddd;
    border-bottom-left-radius: 4px;
}

.message.user {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #0a0a1a;
    font-weight: 500;
    border-bottom-right-radius: 4px;
}

.message a {
    color: #ffd200;
    text-decoration: underline;
}

.message a.whatsapp-btn,
.message a.offer-link {
    display: inline-block;
    background: #25D366;
    color: #fff;
    padding: 8px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 5px;
    transition: transform 0.3s;
}

.message a.offer-link {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #0a0a1a;
}

.message a.whatsapp-btn:hover,
.message a.offer-link:hover {
    transform: scale(1.05);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #888;
    border-radius: 50%;
    animation: typingBounce 1.2s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* Model Info */
.model-info {
    font-size: 0.65rem;
    color: #555;
    text-align: center;
    padding: 4px 0;
    font-family: monospace;
}

/* Quick Replies */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    flex-shrink: 0;
}

.quick-reply {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.15);
    color: #ffd200;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.quick-reply:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
}

/* Chat Input */
.chat-input {
    padding: 10px 15px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
}

.chat-input form {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input input:focus {
    border-color: rgba(255, 215, 0, 0.3);
}

.chat-input input::placeholder {
    color: #555;
}

.chat-input input:disabled {
    opacity: 0.5;
}

.chat-input .btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    border: none;
    border-radius: 25px;
    color: #0a0a1a;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s;
    font-size: 0.9rem;
}

.chat-input .btn:hover {
    transform: scale(1.05);
}

.chat-input .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .chat-panel {
        height: 95vh;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .chat-body {
        padding: 12px 15px;
    }
    
    .message {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .quick-reply {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
    
    .chat-input input {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* ============================================
   ADMIN STYLES - Add these too
   ============================================ */
.admin-header {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: #ffd200;
    margin: 0;
}

.admin-main .stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.admin-main .stat {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-main .stat strong {
    color: #ffd200;
}

.filters {
    margin-bottom: 20px;
}

.filters form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filters input,
.filters select {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 0.9rem;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.3);
}

.lead-table {
    overflow-x: auto;
}

.lead-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.lead-table th {
    text-align: left;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 2px solid rgba(255, 215, 0, 0.1);
    color: #ffd200;
    font-weight: 600;
}

.lead-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.lead-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.lead-table .status-completed {
    color: #4ade80;
}

.lead-table .status-pending {
    color: #f87171;
}

.pagination {
    display: flex;
    gap: 5px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination .page {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination .page:hover,
.pagination .page.active {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
    color: #ffd200;
}

.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a1a, #1a1a3e);
}

.login-box {
    max-width: 380px;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.login-box h2 {
    font-family: 'Orbitron', sans-serif;
    color: #ffd200;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.login-box label {
    display: block;
    color: #ccc;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 0.95rem;
    margin-top: 4px;
}

.login-box input:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.3);
}

.login-box .remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-box .remember input {
    width: auto;
    margin: 0;
}

.login-box .btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    border: none;
    border-radius: 8px;
    color: #0a0a1a;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.login-box .btn:hover {
    transform: scale(1.02);
}

.login-box .error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: #f87171;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}