/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "HelveticaNeue-Medium", sans-serif;
    background-color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
    margin: 0 2rem;
}

/* Color variables */
:root {
    --primary: #6c5ba4;
    --secondary: #43c0ec;
    --tertiary: #f7a73e;
    --quaternary: #333;
}

/* Header styling */
.mmg-header {
    background-color: white;
    padding: 2rem 5rem 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 20;
}

/* Contact bar */
.contact-bar {
    background-color: #dadde1;
    padding: 0.8rem 5rem;
    border-radius: 15px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 20;
}

/* Title bar */
.title-bar {
    background-color: white;
    padding: 1rem;
    border-bottom: 3px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 20;
}

/* Login page header - no sidebar offset */
.login-header {
    margin-left: 0;
    padding: 7rem 5rem 1rem 5rem;
}

.mmg-logo {
    display: flex;
    align-items: center;
    font-family: "HelveticaNeue-Medium", sans-serif;
}

.logo-image {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.mmg-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
    font-size: 13px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.contact-number {
    font-size: 18px;
    color: #333;
}

.contact-text {
    font-weight: 100;
}

.contact-phone {
    font-weight: bold;
}

.nav-item {
    color: var(--quaternary);
    text-decoration: none;
    font-family: "HelveticaNeue-Medium", sans-serif;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--primary);
}

/* Main container */
.main-container {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 200px);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: #f8f9fa;
    border-right: 1px solid #e9ecef;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 5;
}

.sidebar-section h3 {
    color: var(--quaternary);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-family: "HelveticaNeue-Medium", sans-serif;
}

.sidebar-section p {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.sidebar-btn {
    background: white;
    color: #333;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-btn svg {
    flex-shrink: 0;
}

.sidebar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.logout-btn {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 50%, var(--tertiary) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 10px;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.sidebar-divider {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 1rem 0;
}

/* Content area */
.content-area {
    flex: 1;
    padding: 2rem 2rem 2rem 1rem;
    display: flex;
    flex-direction: column;
    margin-left: auto;
    min-height: calc(100vh - 0px);
    padding-bottom: 120px;
}

/* Main title */
.main-title {
    text-align: center;
    font-size: 36px;
    font-family: "HelveticaNeue-Medium", sans-serif;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding: 0 1rem;
}

/* Chat messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 2rem;
    padding: 1rem;  
    background: transparent;
    min-height: 400px;
    max-height: 600px;
}

.chat-message {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    max-width: 85%;
    position: relative;
    transition: all 0.3s ease;
}

.chat-message:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.chat-message.user {
    margin-left: auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    border: 1px solid rgba(108, 91, 164, 0.3);
}

.chat-message.user::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid rgba(108, 91, 164, 0.3);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.chat-message.assistant {
    margin-right: auto;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    border-left: 4px solid var(--secondary);
    box-shadow: 0 8px 25px rgba(67, 192, 236, 0.15);
    border: 1px solid rgba(67, 192, 236, 0.2);
}

.chat-message.assistant::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px;
    width: 0;
    height: 0;
    border-right: 8px solid rgba(67, 192, 236, 0.2);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.chat-message .role {
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-message.user .role::before {
    content: '👤';
    font-size: 1rem;
}

.chat-message.assistant .role::before {
    content: '🤖';
    font-size: 1rem;
}

.chat-message .content {
    line-height: 1.7;
    font-size: 1rem;
    color: inherit;
}

.chat-message.assistant .content {
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.8;
}

.chat-message.assistant .content strong {
    color: var(--primary);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chat-message.assistant .content .highlight-text {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 2px 4px rgba(108, 91, 164, 0.3);
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(108, 91, 164, 0.1), rgba(67, 192, 236, 0.1));
    border: 2px solid rgba(108, 91, 164, 0.2);
    margin: 2px 0;
    position: relative;
    z-index: 1;
}

.chat-message.assistant .content .highlight-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0.1;
    border-radius: 4px;
    z-index: -1;
}

.chat-message.assistant .content ol,
.chat-message.assistant .content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style: none;
}

.chat-message.assistant .content ul li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    position: relative;
    padding-left: 1.5rem;
}

.chat-message.assistant .content ul li::before {
    content: '●';
    color: var(--secondary);
    font-weight: bold;
    font-size: 0.8rem;
    position: absolute;
    left: 0;
    top: 0;
    text-shadow: 0 1px 2px rgba(67, 192, 236, 0.3);
}

.chat-message.assistant .content ol {
    counter-reset: list-counter;
}

.chat-message.assistant .content ol li {
    margin-bottom: 1rem;
    line-height: 1.7;
    position: relative;
    padding-left: 2.5rem;
    counter-increment: list-counter;
    font-size: 1rem;
}

.chat-message.assistant .content ol li::before {
    content: counter(list-counter) '.';
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
    font-weight: 700;
}

.chat-message.assistant .content h3,
.chat-message.assistant .content h4 {
    color: var(--primary);
    margin: 1.5rem 0 1rem 0;
    font-family: "HelveticaNeue-Medium", sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.chat-message.assistant .content h3 {
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 0.5rem;
    position: relative;
}

.chat-message.assistant .content h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(135deg, var(--secondary), var(--tertiary));
    border-radius: 1px;
}

.chat-message.assistant .content h4 {
    font-size: 1rem;
    color: var(--secondary);
}

.chat-message.assistant .content p {
    margin-bottom: 1rem;
}

.chat-message.assistant .content p:last-child {
    margin-bottom: 0;
}

/* Quick start section */
.quick-start {
    padding: 30px 40px 0 40px;
}

.quick-start h3 {
    color: #333;
    margin-bottom: 35px;
    font-size: 24px;
    font-family: "HelveticaNeue-Medium", sans-serif;
    font-weight: 300;
}

.quick-start p {
    color: #333;
    margin-bottom: 35px;
    font-size: 16px;
}

.sample-questions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 30px 40px;
}

.sample-question-btn {
    background: white;
    color: #333;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
}

.sample-question-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Chat input */
.chat-input-container {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 2rem 0;
    z-index: 10;
    margin-top: auto;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    border-radius: 8px;
    gap: 0;
}

.chat-input {
    flex: 1;
    border-radius: 25px;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(110deg, var(--secondary) 0%, var(--primary) 35%, var(--primary) 65%, var(--tertiary) 100%) border-box;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-right: -2px;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-btn {
    background: white;
    color: #333;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(110deg, var(--secondary) 0%, var(--primary) 35%, var(--primary) 65%, var(--tertiary) 100%) border-box;
    border-radius: 50%;
    padding: 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-left: 4px;
}

.search-btn svg {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
}

.search-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Login page styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: calc(100vh - 300px);
}

.login-container {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    max-width: 400px;
    width: 100%;
}

.login-form h3 {
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 91, 164, 0.1);
}

.login-btn {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 50%, var(--tertiary) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
}

/* Footer styling */
.mmg-footer {
    background: white;
    color: #333;
    padding: 1rem 2rem 1rem 2rem;
    border-top: 8px solid;
    border-image: linear-gradient(110deg, var(--secondary) 0%, var(--primary) 35%, var(--primary) 65%, var(--tertiary) 100%) 1;
    margin-top: auto;
    position: relative;
    z-index: 20;
}

/* Login page footer - no sidebar offset */
.login-footer {
    margin-left: 0;
    padding: 2rem 2rem 1rem 2rem;
}

.footer-content {
    max-width: 100%;
    margin: 5px 0;
}

.footer-logo-section {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 120px;
}

.footer-social-section {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    min-width: 120px;
}

.footer-logo-image {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
    padding-right: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: auto 1fr 1fr 1fr 1fr auto;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: rgb(19, 18, 20);
    font-size: 0.9rem;
    font-family: "HelveticaNeue-Medium", sans-serif;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    padding: 1rem 0rem;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.3rem;
}

.footer-links a {
    color: #020202;
    text-decoration: none;
    font-size: 12px;
    font-family: "GreycliffCF-Regular", Arial, sans-serif !important;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: right;
    padding-top: 1rem;
    border-image: linear-gradient(110deg, var(--secondary) 0%, var(--primary) 35%, var(--primary) 65%, var(--tertiary) 100%) 1;
    border-top: 3px solid;
    color: #666;
    font-size: 12px;
    margin: 0 -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons-top {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
}

.social-icon {
    width: 30px;
    height: 30px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.social-icon:hover {
    transform: scale(1.1);
}

.payment-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    max-width: 200px;
}

.payment-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

.payment-icon a {
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.payment-logo {
    height: 24px !important;
    width: auto !important;
    object-fit: contain !important;
    transition: transform 0.3s ease !important;
    cursor: pointer !important;
}

.payment-logo:hover {
    transform: scale(1.05) !important;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .mmg-nav {
        display: none;
    }
    
    .mmg-header {
        padding: 1rem;
        margin-left: 0;
    }
    
    .contact-bar {
        padding: 0.5rem 1rem;
    }
    
    .title-bar {
        padding: 0.5rem;
    }
    
    .mmg-logo {
        font-size: 20px;
    }
    
    .logo-image {
        height: 40px;
    }
    
    .mmg-nav {
        align-items: center;
    }
    
    .contact-number {
        font-size: 14px;
    }
    
    .main-container {
        flex-direction: column;
        margin-left: 0;
    }
    
    .sidebar {
        position: relative;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding: 1rem;
        height: auto;
        overflow-y: visible;
    }
    
    .content-area {
        margin-left: 0;
        max-width: 100%;
        padding: 1rem;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .quick-start {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .sample-questions {
        grid-template-columns: 1fr;
    }
    
    .chat-input-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .send-btn {
        width: 100%;
        border-radius: 8px;
    }
    
    .mmg-footer {
        padding: 2rem 1rem 1rem 1rem;
        margin-left: 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-logo-section,
    .footer-social-section {
        justify-content: center;
        align-items: center;
    }
    
    .social-icons-top {
        flex-direction: row;
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .login-container {
        margin: 1rem;
        padding: 2rem;
    }
}
