* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    color: #e2e8f0;
}

/* Main Header */
.main-header {
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #a7f3d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-left p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
    color: #d1fae5;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.credit-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.credits-label {
    font-weight: 500;
}

.credits-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    color: #ffffff;
}

.credits-count.credits-low {
    background: #f59e0b;
    color: white;
}

.credits-count.credits-exhausted {
    background: #ef4444;
    color: white;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    font-size: 14px;
    font-weight: 500;
    color: #d1fae5;
}

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    font-size: 13px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Document Status */
.document-status {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.document-status small {
    font-size: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Alternative brighter green styling */
.document-status.success small {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

/* If documents are missing or have errors */
.document-status.error small {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Warning for partial documents */
.document-status.warning small {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Chat Container */
.chat-container {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    height: calc(100vh - 150px);
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Chat Box */
.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: #475569;
}

.welcome-message h3 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-message p {
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 16px;
    color: #64748b;
}

/* Sample Questions - Enhanced Clickable Style */
.sample-questions {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 16px;
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sample-questions h4 {
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

.sample-questions ul {
    list-style: none;
    padding: 0;
}

/* Enhanced Clickable Questions */
.sample-questions li {
    padding: 14px 18px;
    color: #059669;
    cursor: pointer;
    border: 2px solid #d1fae5;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.1);
    position: relative;
    overflow: hidden;
}

/* Add chat icon to indicate clickability */
.sample-questions li::before {
    content: "💎 ";
    margin-right: 10px;
    opacity: 0.8;
    transition: all 0.3s;
}

.sample-questions li:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(5, 150, 105, 0.4);
    border-color: #059669;
}

.sample-questions li:hover::before {
    opacity: 1;
    content: "✨ ";
}

.sample-questions li:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.5);
}

/* Ripple effect on click */
.sample-questions li::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.sample-questions li:active::after {
    width: 400px;
    height: 400px;
}

.sample-questions li:last-child {
    margin-bottom: 0;
}

/* Message Styles */
.message {
    margin-bottom: 20px;
    line-height: 1.5;
    padding: 16px 20px;
    border-radius: 18px;
    max-width: 85%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.message.user {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 6px;
}

.message.bot {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1e293b;
    border: 1px solid #e2e8f0;
    margin-right: auto;
    border-bottom-left-radius: 6px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}

.message-header strong {
    font-weight: 700;
}

.timestamp {
    opacity: 0.7;
    font-size: 11px;
    font-weight: normal;
}

.message-content {
    font-size: 15px;
    line-height: 1.5;
}

/* Loading indicator for when history is loading */
.loading-history {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-style: italic;
}

.message strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    opacity: 0.8;
}

/* Chat Form */
#chat-form {
    display: flex;
    gap: 15px;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-top: 1px solid #e2e8f0;
}

#message {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    outline: none;
    background: #ffffff;
    transition: all 0.3s;
    color: #1e293b;
}

#message:focus {
    border-color: #059669;
    background: white;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

#chat-form button {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

#chat-form button:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 35px;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1e293b;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
}

.modal-content p {
    text-align: center;
    color: #64748b;
    margin-bottom: 25px;
    line-height: 1.6;
}

.api-form .form-group {
    margin-bottom: 20px;
}

.api-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.api-form input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s;
    background: #ffffff;
}

.api-form input:focus {
    border-color: #059669;
    outline: none;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

.api-form button {
    width: 100%;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.api-form button:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.api-form button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.api-note {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    margin-top: 20px;
    line-height: 1.5;
}

.api-form small {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
    font-style: italic;
}

/* Error and Success Messages */
.error-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fecaca;
    color: #dc2626;
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
}

.success-message {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #bbf7d0;
    color: #16a34a;
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
}

/* Remove old header styles that conflict */
header {
    display: none;
}

.user-stats {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .header-left, .header-right {
        width: 100%;
    }
    
    .user-info {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
    
    .chat-container {
        margin: 10px;
        height: calc(100vh - 140px);
        border-radius: 16px;
    }
    
    #chat-form {
        padding: 20px;
    }
    
    #message {
        font-size: 15px;
        padding: 12px 16px;
    }
    
    .sample-questions {
        max-width: 100%;
        padding: 25px;
    }
    
    .sample-questions li {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .welcome-message {
        padding: 30px 20px;
    }
    
    .welcome-message h3 {
        font-size: 22px;
    }
    
    .welcome-message p {
        font-size: 15px;
    }
    /* Add these styles at the very end of your existing style.css file */
  }
/* Authentication Pages Styles - Fixed for your HTML structure */
.auth-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    font-family: 'Inter', sans-serif !important;
    margin: 0 !important;
}

.auth-container {
    width: 100% !important;
    max-width: 450px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.auth-form {
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 40px 35px !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.auth-form h2 {
    margin: 0 0 30px 0 !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-align: center !important;
}

.auth-form .form-group {
    margin-bottom: 25px !important;
    text-align: left !important;
}

.auth-form label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    font-size: 14px !important;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"] {
    width: 100% !important;
    padding: 15px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    transition: all 0.3s !important;
    background: #ffffff !important;
    color: #1e293b !important;
    font-family: 'Inter', sans-serif !important;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="email"]:focus {
    border-color: #059669 !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1) !important;
}

.auth-submit-btn {
    width: 100% !important;
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: white !important;
    border: none !important;
    padding: 16px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3) !important;
    margin-bottom: 20px !important;
    font-family: 'Inter', sans-serif !important;
}

.auth-submit-btn:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4) !important;
}

.auth-link {
    color: #64748b !important;
    font-size: 14px !important;
    margin: 0 !important;
    text-align: center !important;
}

.auth-link a {
    color: #059669 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: color 0.3s !important;
}

.auth-link a:hover {
    color: #047857 !important;
    text-decoration: underline !important;
}

/* Flash Messages for Auth Pages */
.flash-messages {
    margin-bottom: 20px !important;
}

.flash-messages .alert {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    border: 2px solid #fecaca !important;
    color: #dc2626 !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: center !important;
}

/* Override any conflicting styles */
body.auth-body * {
    box-sizing: border-box;
}

/* Responsive Design for Auth Pages */
@media (max-width: 768px) {
    .auth-form {
        padding: 30px 25px !important;
        border-radius: 16px !important;
        margin: 10px !important;
    }
    
    .auth-form h2 {
        font-size: 24px !important;
    }
    
    .auth-form input[type="text"],
    .auth-form input[type="password"],
    .auth-form input[type="email"] {
        padding: 12px !important;
        font-size: 15px !important;
    }
    
    .auth-submit-btn {
        padding: 14px !important;
        font-size: 15px !important;
    }
  }
