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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
.header {
    background: #ffffff;
    padding: 1rem 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.header h1 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Login page styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: #ffffff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

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

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

/* Support button - text only style */
.btn-support {
    background: none;
    border: none;
    color: #3498db;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    min-width: auto;
}

.btn-support:hover {
    color: #2980b9;
    text-decoration: underline;
    transform: none;
    background: none;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-1px);
}

/* Dashboard styles */
.dashboard-content {
    background: #ffffff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-icon svg {
    filter: drop-shadow(0 4px 8px rgba(52, 152, 219, 0.3));
    transition: transform 0.3s ease;
}

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

.welcome-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.welcome-section p {
    color: #7f8c8d;
    font-size: 1.2rem;
}

.dashboard-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.link-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-icon svg {
    filter: drop-shadow(0 2px 4px rgba(52, 152, 219, 0.2));
    transition: transform 0.3s ease;
}

.link-card:hover .card-icon svg {
    transform: scale(1.1);
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.link-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.link-card p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Table styles */
.content {
    background: #ffffff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
}

.data-table tr:hover {
    background-color: #f5f5f5;
}

.data-table tr:nth-child(even) {
    background-color: #fafafa;
}

.data-table tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

/* Status badges */
.status-approved {
    background-color: #d4edda;
    color: #155724;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Loading and error states */
.loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-style: italic;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border: 1px solid #f5c6cb;
    display: none;
}

.error-message.show {
    display: block;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .dashboard-links {
        grid-template-columns: 1fr;
    }
    
    .welcome-section h2 {
        font-size: 2rem;
    }
    
    .welcome-section p {
        font-size: 1rem;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}

/* Chat Modal Styles */
.chat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    height: 77%;
    background: transparent;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    margin-top: 5%;
    margin-left: 10%;
}

.chat-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-modal-content {
    width: 90%;
    max-width: 1200px;
    height: 90%;
    max-height: 800px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chat-header {
    background: linear-gradient(135deg, #f7c215 0%, #e6b800 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chat-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.chat-header p {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

.chat-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 80%;
    word-wrap: break-word;
}

.message.bot-message {
    align-self: flex-start;
    margin-right: auto;
}

.message.user-message {
    align-self: flex-end;
    margin-left: auto;
}

.message-content {
    background: #f8f9fa;
    padding: 16px 20px;
    border-radius: 20px 20px 20px 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
}

.message.user-message .message-content {
    background: #007bff;
    color: white;
    border-radius: 20px 20px 6px 20px;
}

.message-tail {
    position: absolute;
    width: 0;
    height: 0;
}

.bot-tail {
    left: -8px;
    top: 20px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #f8f9fa;
}

.user-tail {
    right: -8px;
    top: 20px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #007bff;
}

.message-content p {
    margin: 0;
    color: #333333;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message.user-message .message-content p {
    color: white;
}

.chat-input-container {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    outline: none;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.chat-input:focus {
    border-color: #f7c215;
    box-shadow: 0 0 0 3px rgba(247, 194, 21, 0.1);
    background: white;
}

.chat-send-btn {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #f7c215 0%, #e6b800 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(247, 194, 21, 0.3);
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(247, 194, 21, 0.4);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #f7c215;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Modal animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive design for chat modal */
@media (max-width: 768px) {
    .chat-modal-content {
        width: 95%;
        height: 95%;
        max-height: none;
    }
    
    .chat-header {
        padding: 15px 20px;
    }
    
    .chat-header h3 {
        font-size: 20px;
    }
    
    .chat-messages {
        padding: 20px;
    }
    
    .chat-input-container {
        padding: 15px 20px;
    }
    
    .message {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 50px auto;
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .header-actions .btn {
        width: 100%;
    }
    
    .chat-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .chat-header {
        padding: 12px 15px;
    }
    
    .chat-header h3 {
        font-size: 18px;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .chat-input-container {
        padding: 12px 15px;
    }
}


