/* --- CSS VARIABLES & RESET --- */
:root {
    --primary-blue: #0f2027;
    --primary-gradient: linear-gradient(to right, #0f2027, #203a43, #2c5364);
    --accent-green: #00b09b;
    --accent-gradient: linear-gradient(to right, #00b09b, #96c93d);
    --light-bg: #f4f7f6;
    --white: #ffffff;
    --text-dark: #333;
    --text-muted: #777;
    --border-radius: 12px;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body { background-color: var(--light-bg); color: var(--text-dark); }
a { text-decoration: none; }

/* --- BUTTONS & UTILITIES --- */
.btn { padding: 10px 24px; border-radius: 30px; border: none; cursor: pointer; font-weight: 600; transition: transform 0.2s; }
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--accent-gradient); color: white; }
.btn-light { background: white; color: var(--primary-blue); }
.btn-outline { border: 2px solid white; color: white; background: transparent; }
.btn-new-chat { width: 100%; background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); margin-bottom: 20px; }
.btn-send { background: var(--primary-blue); color: white; border-radius: 50%; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; }

.icon-btn { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 0 10px; transition: color 0.3s; }
.icon-btn:hover { color: var(--accent-green); }

/* --- LANDING PAGE --- */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 50px; background: white; box-shadow: var(--shadow); }
.logo { font-size: 1.5rem; font-weight: bold; color: var(--primary-blue); display: flex; align-items: center; gap: 10px; }
.nav-links { list-style: none; display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-dark); font-weight: 500; }

.hero { height: 90vh; background: var(--primary-gradient); color: white; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.hero-content { z-index: 2; max-width: 800px; padding: 20px; }
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; }
.hero .highlight { color: var(--accent-green); }
.tagline { font-size: 1.5rem; font-weight: 300; margin-bottom: 10px; letter-spacing: 1px; }
.sub-text { font-size: 1.1rem; opacity: 0.8; margin-bottom: 40px; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; }

/* Background pattern effect */
.hero-visual { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px); background-size: 30px 30px; opacity: 0.5; }

.features { padding: 80px 20px; text-align: center; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 50px; }
.card { background: white; padding: 30px; border-radius: var(--border-radius); box-shadow: var(--shadow); transition: 0.3s; }
.card:hover { transform: translateY(-5px); }
.icon-box { font-size: 2.5rem; color: var(--accent-green); margin-bottom: 20px; }

/* --- APP / CHAT INTERFACE --- */
.app-body { 
    height: 100vh; 
    overflow: hidden; 
}

.app-container { 
    display: grid; 
    grid-template-columns: 280px 1fr; 
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar { 
    background: var(--primary-blue); 
    color: white; 
    padding: 20px; 
    display: flex; 
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.sidebar-header { 
    margin-bottom: 30px; 
    font-weight: bold; 
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Scrollable history list */
.history-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 20px;
    padding-right: 5px;
}

/* Custom scrollbar for sidebar */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.history-item { 
    display: flex; 
    align-items: center; 
    padding: 12px; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: 0.2s; 
    margin-bottom: 5px;
    flex-shrink: 0;
}

.history-item:hover, .history-item.active { 
    background: rgba(255,255,255,0.1); 
}

.status-dot { 
    width: 10px; 
    height: 10px; 
    border-radius: 50%; 
    margin-right: 12px;
    flex-shrink: 0;
}

.status-dot.online { 
    background: var(--accent-green); 
}

.status-dot.resolved { 
    background: #888; 
}

.history-info p { 
    font-size: 0.9rem; 
    margin: 0; 
}

.history-date { 
    font-size: 0.75rem; 
    opacity: 0.6; 
}

.sidebar-footer { 
    margin-top: auto; 
    padding-top: 20px; 
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.sidebar-footer a { 
    color: rgba(255,255,255,0.7); 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

/* Chat Main */
.chat-interface { 
    display: flex; 
    flex-direction: column; 
    background: white; 
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.chat-header { 
    padding: 15px 30px; 
    border-bottom: 1px solid #eee; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: white; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    z-index: 10;
    flex-shrink: 0;
}

.agent-info { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

.agent-avatar { 
    width: 40px; 
    height: 40px; 
    background: #eee; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--primary-blue); 
}

.status-text { 
    font-size: 0.8rem; 
    color: var(--accent-green); 
}

.chat-window { 
    flex: 1; 
    padding: 30px; 
    overflow-y: auto; 
    overflow-x: hidden;
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    background: #fafafa;
}

/* Custom scrollbar for chat window */
.chat-window::-webkit-scrollbar {
    width: 8px;
}

.chat-window::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-window::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.chat-window::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Messages */
.message { max-width: 70%; display: flex; flex-direction: column; }
.message.agent { align-self: flex-start; }
.message.user { align-self: flex-end; align-items: flex-end; }

.bubble { padding: 15px 20px; border-radius: 18px; font-size: 0.95rem; line-height: 1.5; position: relative; }
.agent .bubble { background: white; border: 1px solid #e0e0e0; border-bottom-left-radius: 2px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.user .bubble { background: var(--primary-gradient); color: white; border-bottom-right-radius: 2px; }

.timestamp { font-size: 0.7rem; color: #999; margin-top: 5px; margin-left: 5px; }

/* Input Area - Fixed at bottom */
.input-area { 
    padding: 20px; 
    background: white; 
    border-top: 1px solid #eee; 
    display: flex; 
    align-items: center; 
    gap: 15px;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

#messageInput { 
    flex: 1; 
    border: 1px solid #eee; 
    background: #f9f9f9; 
    padding: 15px; 
    border-radius: 25px; 
    outline: none; 
    transition: 0.3s; 
}

#messageInput:focus { 
    border-color: var(--accent-green); 
    background: white; 
    box-shadow: 0 0 0 3px rgba(0, 176, 155, 0.1); 
}

/* Loading Spinner */
.typing-indicator { display: flex; gap: 5px; padding: 15px; background: white; width: fit-content; border-radius: 18px; border: 1px solid #e0e0e0; }
.dot { width: 8px; height: 8px; background: #ccc; border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; }
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Progress Bar (For Uploads) */
.upload-progress { width: 100%; height: 4px; background: #eee; margin-top: 10px; border-radius: 2px; overflow: hidden; display: none; }
.progress-bar { height: 100%; background: var(--accent-green); width: 0%; transition: width 0.3s; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .app-container { grid-template-columns: 1fr; }
    .sidebar { display: none; /* In real app, toggle with hamburger */ }
    .hero h1 { font-size: 2.5rem; }
}


/* --- AUTHENTICATION MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-dark);
}

.auth-form h2 {
    margin-bottom: 30px;
    color: var(--primary-blue);
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-green);
}

.error-message {
    display: none;
    background-color: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.btn-full {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--accent-green);
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* --- LOGIN REQUIRED OVERLAY --- */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-prompt {
    background: white;
    padding: 50px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.login-prompt i {
    font-size: 4rem;
    color: var(--accent-green);
    margin-bottom: 20px;
}

.login-prompt h2 {
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.login-prompt p {
    margin-bottom: 30px;
    color: var(--text-muted);
}

.login-prompt .btn {
    margin: 10px;
}

/* --- GUEST NOTICE --- */
.guest-notice {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.guest-notice p {
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.8);
}

.guest-notice .small-text {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* --- USER INFO --- */
#userInfo {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
}

.user-email {
    color: white;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.user-tier {
    color: var(--accent-green);
    font-size: 0.85rem;
    font-weight: 500;
}

/* --- PERSONA SELECTION --- */
/* Persona list styling is defined in modal section to avoid duplicates */

.persona-card {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.persona-card:hover {
    border-color: var(--accent-green);
    box-shadow: 0 4px 12px rgba(0, 176, 155, 0.15);
    transform: translateY(-2px);
}

.persona-card.selected {
    border-color: var(--accent-green);
    background: rgba(0, 176, 155, 0.05);
}

.persona-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.persona-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.persona-card-info h4 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.persona-gender {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.persona-description {
    color: var(--text-dark);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.persona-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.specialty-tag {
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-dark);
}

.persona-card.selected .specialty-tag {
    background: rgba(0, 176, 155, 0.15);
    color: var(--accent-green);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-blue);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.agent-description {
    font-size: 0.85em;
    color: #888;
    margin-top: 2px;
}

/* Persona preference indicator */
.persona-preferred-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--accent-green);
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 10px;
    font-weight: 600;
}

/* Voice Glow Effect */
.voice-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 176, 155, 0.6), rgba(0, 176, 155, 0.2), transparent);
    animation: pulse-glow 1.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.voice-glow.active {
    animation: pulse-glow-active 0.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

@keyframes pulse-glow-active {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 1;
    }
}

.agent-avatar {
    position: relative;
}

/* Voice Toggle Button States */
#voiceToggleBtn.voice-enabled {
    color: var(--accent-green);
}

#voiceToggleBtn.voice-disabled {
    color: var(--text-muted);
}

/* File Upload Progress */
.upload-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent-green);
    transition: width 0.3s ease;
}

/* Guest Notice */
.guest-notice {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.guest-notice .small-text {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
}

/* User Info */
.user-email {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-tier {
    font-size: 0.8rem;
    opacity: 0.8;
    padding: 4px 8px;
    background: rgba(0, 176, 155, 0.2);
    border-radius: 4px;
    display: inline-block;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-prompt {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 400px;
}

.login-prompt i {
    font-size: 3rem;
    color: var(--accent-green);
    margin-bottom: 20px;
}

.login-prompt h2 {
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.login-prompt p {
    margin-bottom: 30px;
    color: var(--text-muted);
}

.login-prompt .btn {
    margin: 5px;
}

/* Persona Styles */
.persona-preferred-badge {
    font-size: 0.7rem;
    background: var(--accent-green);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: calc(80vh - 140px); /* Account for header and footer */
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.persona-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    /* Remove overflow from here - let modal-body handle scrolling */
}

.persona-card {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.persona-card:hover {
    border-color: var(--accent-green);
    box-shadow: 0 4px 12px rgba(0, 176, 155, 0.2);
}

.persona-card.selected {
    border-color: var(--accent-green);
    background: rgba(0, 176, 155, 0.05);
}

.persona-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.persona-icon {
    width: 40px;
    height: 40px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
}

.persona-card-info h4 {
    margin: 0;
    font-size: 1rem;
}

.persona-gender {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.persona-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 10px 0;
}

.persona-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.specialty-tag {
    font-size: 0.75rem;
    background: var(--light-bg);
    padding: 3px 8px;
    border-radius: 12px;
    color: var(--text-dark);
}

/* Streaming message indicator */
.message.streaming .bubble {
    position: relative;
}

.message.streaming .bubble::after {
    content: '▋';
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Typing Indicator Animation */
.typing-indicator .dot {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.typing-indicator-wrapper {
    max-width: 70%;
}

.typing-indicator-wrapper.agent {
    align-self: flex-start;
}

/* --- PAYMENT MODAL STYLES --- */
.payment-modal .modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.pricing-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pricing-tier {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.pricing-tier:hover {
    border-color: var(--accent-green);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 176, 155, 0.2);
}

.pricing-tier.selected {
    border-color: var(--accent-green);
    background: rgba(0, 176, 155, 0.05);
}

.pricing-tier h4 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.pricing-tier .price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-green);
    margin: 15px 0;
}

.pricing-tier .price-currency {
    font-size: 1.2rem;
    vertical-align: super;
}

.pricing-tier .price-period {
    font-size: 0.9rem;
    color: #666;
}

.pricing-tier .features {
    list-style: none;
    margin-top: 15px;
    text-align: left;
}

.pricing-tier .features li {
    padding: 8px 0;
    color: #666;
    font-size: 0.9rem;
}

.pricing-tier .features li i {
    color: var(--accent-green);
    margin-right: 8px;
}

.payment-methods {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.payment-method-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.payment-method-btn:hover {
    border-color: var(--accent-green);
    background: rgba(0, 176, 155, 0.05);
}

.payment-method-btn i {
    font-size: 2rem;
    color: var(--accent-green);
}

.payment-method-info h5 {
    margin: 0 0 5px 0;
    color: var(--primary-blue);
}

.payment-method-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.stripe-card-element {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    background: #f9f9f9;
}

.payment-processing,
.payment-success,
.payment-failed {
    text-align: center;
    padding: 40px 20px;
}

.payment-processing i,
.payment-success i,
.payment-failed i {
    margin-bottom: 20px;
}

.payment-processing h4,
.payment-success h4,
.payment-failed h4 {
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.payment-processing p,
.payment-success p,
.payment-failed p {
    color: #666;
    margin-bottom: 20px;
}

.receipt-info {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.receipt-info .receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.receipt-info .receipt-row:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.receipt-info .receipt-label {
    color: #666;
}

.receipt-info .receipt-value {
    color: var(--primary-blue);
    font-weight: 500;
}

.error-details {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #856404;
    font-size: 0.9rem;
}

.payment-retry-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn-back {
    margin-bottom: 15px;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

#paynowOptions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

#paynowMobileForm {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-blue);
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(0, 176, 155, 0.1);
}

/* Upgrade prompt in chat */
.upgrade-prompt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}

.upgrade-prompt h4 {
    margin-bottom: 10px;
}

.upgrade-prompt p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.upgrade-prompt .btn {
    background: white;
    color: #667eea;
    font-weight: bold;
}


/* ============================================
   Integration Layer Styles
   ============================================ */

/* Global Loader */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.global-loader.active {
    display: flex;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-text {
    font-size: 16px;
    font-weight: 500;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Toast Container */
.error-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.error-toast {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(450px);
    transition: transform 0.3s ease;
    border-left: 4px solid;
}

.error-toast.show {
    transform: translateX(0);
}

.error-toast.error-error {
    border-left-color: #dc3545;
}

.error-toast.error-error i {
    color: #dc3545;
}

.error-toast.error-success {
    border-left-color: #28a745;
}

.error-toast.error-success i {
    color: #28a745;
}

.error-toast.error-warning {
    border-left-color: #ffc107;
}

.error-toast.error-warning i {
    color: #ffc107;
}

.error-toast.error-info {
    border-left-color: #17a2b8;
}

.error-toast.error-info i {
    color: #17a2b8;
}

.error-toast i {
    font-size: 20px;
}

.error-toast span {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.error-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: color 0.2s;
}

.error-close:hover {
    color: #333;
}

/* Connection Status Indicator */
.connection-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 10px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    z-index: 9998;
    transition: all 0.3s;
}

.connection-status.offline {
    display: flex;
    background: #dc3545;
    color: white;
}

.connection-status.online {
    display: none;
}

.connection-status i {
    font-size: 16px;
}

/* Loading States for Buttons */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Skeleton Loading for Chat History */
.history-skeleton {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 12px;
}

.skeleton-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-text {
    flex: 1;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-line:last-child {
    width: 60%;
    margin-bottom: 0;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Enhanced Message Animations */
.message {
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Streaming Message Indicator */
.message.streaming .bubble::after {
    content: '▋';
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Enhanced Voice Glow */
.voice-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.4) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}

.voice-glow.active {
    animation: voiceGlow 0.5s ease-in-out infinite;
}

@keyframes voiceGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

/* Upgrade Prompt in Chat */
.upgrade-prompt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}

.upgrade-prompt h4 {
    margin: 0 0 12px 0;
    font-size: 20px;
}

.upgrade-prompt p {
    margin: 8px 0;
    opacity: 0.95;
}

.upgrade-prompt .btn {
    margin-top: 16px;
    background: white;
    color: #667eea;
    font-weight: 600;
}

.upgrade-prompt .btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .error-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .error-toast {
        transform: translateY(-100px);
    }
    
    .error-toast.show {
        transform: translateY(0);
    }
    
    .connection-status {
        left: 50%;
        transform: translateX(-50%);
        bottom: 10px;
    }
}

/* Accessibility Improvements */
.btn:focus,
.icon-btn:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.btn:focus:not(:focus-visible),
.icon-btn:focus:not(:focus-visible) {
    outline: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .error-toast {
        border: 2px solid currentColor;
    }
    
    .global-loader {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .message,
    .error-toast,
    .loader-spinner,
    .voice-glow {
        animation: none;
    }
    
    .error-toast {
        transition: none;
    }
}

/* --- CODE BLOCKS & MARKDOWN FORMATTING --- */
.code-block {
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.code-language {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.copy-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

.copy-btn.copied {
    background: #28a745;
    border-color: #28a745;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    background: #1e1e1e;
}

.code-block code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #d4d4d4;
    display: block;
}

/* Inline code */
.inline-code {
    background: rgba(0,0,0,0.08);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

/* Markdown text formatting */
.bubble strong {
    font-weight: 700;
    color: inherit;
}

.bubble em {
    font-style: italic;
    color: inherit;
}

/* Scrollbar styling for code blocks */
.code-block pre::-webkit-scrollbar {
    height: 8px;
}

.code-block pre::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.code-block pre::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.code-block pre::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* --- MICROPHONE & VOICE CONTROLS --- */
.voice-btn {
    transition: all 0.3s ease;
}

.voice-btn.active {
    color: var(--accent-green);
    background: rgba(0, 176, 155, 0.1);
    border-radius: 50%;
}

.voice-btn.recording {
    animation: pulse-recording 1.5s infinite;
    color: #dc3545;
}

@keyframes pulse-recording {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Microphone muted state */
.voice-btn .fa-microphone-slash {
    color: #999;
}

/* Microphone active state */
.voice-btn.active .fa-microphone {
    color: var(--accent-green);
}

/* Voice synthesis toggle states */
#voiceToggleBtn.voice-enabled {
    color: var(--accent-green);
}

#voiceToggleBtn.voice-disabled {
    color: #dc3545;
}

/* Persona modal specific styles */
#personaModal .modal-body {
    display: flex;
    flex-direction: column;
}

#personaModal .modal-body > p {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

#personaModal .persona-list {
    flex: 1;
    overflow: visible; /* Let parent handle scrolling */
}

/* Persona Switch Notification */
.system-message.persona-switch {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.persona-switch-notification {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
}

.persona-switch-notification i {
    font-size: 24px;
    flex-shrink: 0;
}

.persona-switch-content {
    flex: 1;
}

.persona-switch-content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.persona-switch-content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- TYPING EFFECT ANIMATION --- */
.typing-cursor {
    display: inline-block;
    margin-left: 2px;
    animation: blink 1s infinite;
    font-weight: 100;
    color: var(--accent-green);
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

.message.typing-animation .bubble {
    position: relative;
}

.message.typing-animation .typed-content {
    display: inline;
}

/* Smooth typing effect for streaming messages */
.message.streaming .stream-content {
    display: inline-block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Typing indicator dots animation */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: fit-content;
}

.typing-indicator .dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}


/* ============================================
   HTML5 RENDERING STYLES
   ============================================ */

/* Code Block Wrapper with Copy Button */
.code-block-wrapper {
    position: relative;
    margin: 16px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.code-language {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-code-btn {
    padding: 4px 12px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.copy-code-btn.copied {
    background: #10b981;
    border-color: #10b981;
}

.code-block-wrapper pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    background: #1e1e1e;
}

.code-block-wrapper code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #d4d4d4;
}

/* Diagnostic Step Styling */
.diagnostic-step {
    margin: 16px 0;
    padding: 16px;
    border-left: 4px solid #667eea;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.diagnostic-step[data-type="warning"] {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.diagnostic-step[data-type="note"] {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.diagnostic-step[data-type="action"] {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.step-header {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: #667eea;
    color: white;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
}

.step-title {
    flex: 1;
    color: #374151;
}

.step-content {
    color: #4b5563;
    line-height: 1.6;
}

.step-content p {
    margin: 8px 0;
}

.step-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.step-action-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.step-action-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Diagnostic Warning/Note/Important Styles */
.diagnostic-important,
.diagnostic-note,
.diagnostic-warning,
.diagnostic-caution,
.diagnostic-tip {
    margin: 12px 0;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.diagnostic-important {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.diagnostic-note {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
}

.diagnostic-warning {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
}

.diagnostic-caution {
    background: #fed7aa;
    border-left: 4px solid #f97316;
}

.diagnostic-tip {
    background: #d1fae5;
    border-left: 4px solid #10b981;
}

.important-label,
.note-label,
.warning-label,
.caution-label,
.tip-label {
    font-weight: 700;
    margin-right: 4px;
}

.important-text,
.note-text,
.warning-text,
.caution-text,
.tip-text {
    flex: 1;
}

/* Progress Indicator */
.diagnostic-progress {
    margin: 16px 0;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 8px;
}

.progress-label {
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.progress-bar {
    width: 100%;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    background: #e5e7eb;
    border: none;
}

.progress-bar::-webkit-progress-bar {
    background: #e5e7eb;
    border-radius: 12px;
}

.progress-bar::-webkit-progress-value {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.progress-bar::-moz-progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.progress-percentage {
    display: inline-block;
    margin-left: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
}

/* Syntax Highlighting Theme (VS Code Dark+) */
.hljs {
    background: #1e1e1e;
    color: #d4d4d4;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
    color: #569cd6;
}

.hljs-string {
    color: #ce9178;
}

.hljs-number {
    color: #b5cea8;
}

.hljs-comment {
    color: #6a9955;
    font-style: italic;
}

.hljs-function,
.hljs-title {
    color: #dcdcaa;
}

.hljs-params {
    color: #9cdcfe;
}

.hljs-built_in,
.hljs-class .hljs-title {
    color: #4ec9b0;
}

.hljs-attr,
.hljs-variable,
.hljs-template-variable {
    color: #9cdcfe;
}

.hljs-type {
    color: #4ec9b0;
}

.hljs-meta {
    color: #d7ba7d;
}

.hljs-emphasis {
    font-style: italic;
}

.hljs-strong {
    font-weight: bold;
}

/* Responsive Design for HTML5 Content */
@media (max-width: 768px) {
    .code-block-wrapper {
        margin: 12px 0;
    }
    
    .code-block-header {
        padding: 6px 12px;
    }
    
    .code-block-wrapper pre {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .diagnostic-step {
        padding: 12px;
        margin: 12px 0;
    }
    
    .step-header {
        font-size: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .step-actions {
        flex-direction: column;
    }
    
    .step-action-btn {
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .diagnostic-step {
        background: #1f2937;
        border-left-color: #667eea;
    }
    
    .diagnostic-step[data-type="warning"] {
        background: #422006;
    }
    
    .diagnostic-step[data-type="note"] {
        background: #1e3a8a;
    }
    
    .diagnostic-step[data-type="action"] {
        background: #064e3b;
    }
    
    .step-header,
    .step-title {
        color: #f3f4f6;
    }
    
    .step-content {
        color: #d1d5db;
    }
    
    .diagnostic-progress {
        background: #1f2937;
    }
    
    .progress-label {
        color: #f3f4f6;
    }
    
    .progress-bar {
        background: #374151;
    }
    
    .progress-bar::-webkit-progress-bar {
        background: #374151;
    }
}


/* ============================================
   FILE UPLOAD IMPROVEMENTS
   ============================================ */

/* Inline file loading indicator (no overlay) */
.file-upload-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    margin: 12px 0;
    background: #f3f4f6;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.file-loading-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 500;
}

.file-loading-content i {
    font-size: 1.2rem;
}

/* File preview below input */
.file-preview {
    padding: 12px 16px;
    background: #f0f9ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-preview-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-preview-content i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.file-preview-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e40af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-preview-remove {
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.file-preview-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Dark mode support for file upload */
@media (prefers-color-scheme: dark) {
    .file-upload-loading {
        background: #1f2937;
        border-left-color: #818cf8;
    }
    
    .file-loading-content {
        color: #a5b4fc;
    }
    
    .file-preview {
        background: #1e3a8a;
        border-color: #60a5fa;
    }
    
    .file-preview-name {
        color: #93c5fd;
    }
    
    .file-preview-remove:hover {
        background: #7f1d1d;
        color: #fca5a5;
    }
}
