/* Global Styles */
:root {
    --primary-color:#EAD8B1;
    --secondary-color: #3A6D8C
;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #CDC2A5;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    
}

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

body {
    font-family: 'Times New Roman', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #001F3F;
    background-color: #EAE4DD;
}

/* Navigation */
/* .navbar {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    position: relative;
    
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.navbar-brand i {
    margin-right: 8px;
} */

.navbar {
    background: rgba(233, 226, 210, 0.2) !important;
     /* transparent with tint */
    backdrop-filter: blur(8px);  /* glass effect */
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    padding: 4px 20px;  /* make it thinner */
    height: 30px;       /* force thin height */
}

.navbar .nav-link {
    color: #080352 !important;
    font-size: 0.9rem;
    padding: 6px 12px;
    transition: color 0.3s ease;
}

.navbar .nav-link:hover {
    color: #222 !important;
}


.dropdown-menu {

    border: none;
    position: absolute;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    position: absolute;
    z-index: 4000 !important;
}

.dropdown-item {
    padding: 10px 16px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--secondary-color);
}

.dropdown-item i {
    margin-right: 8px;
    width: 16px;
}

/* Cards */
.card {
border-bottom: thick double #32a1ce;   
 border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #E1D7C6 100%);
    border: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    font-weight: 600;
}

.card-title {
    font-weight: 600;
    color: #2c3e50;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    padding: 10px 20px;
}

.btn i {
    margin-right: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #3A6D8C 100%);
    box-shadow: 0 2px 10px #DED3C4;
}s

.btn-primary:hover {
    background: linear-gradient(135deg, #DED3C4 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px #DED3C4;
}

.btn-success {
    background: linear-gradient(135deg, #3A6D8C 100%);
    box-shadow: 0 2px 10px rgb(234, 216, 177);
}

.btn-success:hover {
    background: linear-gradient(135deg, #3A6D8C);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* Forms */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #000000;
    padding: 12px 16px;
    transition: var(--transition);
    
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
    border-radius: var(--border-radius);
    border: 2px solid #010102;
    padding: 12px 16px;
    border: 2px solid #000000;
}

.input-group-text {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #000000;
    border-right: none;
    color: #6c757d;
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    font-weight: 600;
    color: #495057;
    padding: 16px;
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Badges */
.badge {
    color: #EAE4DD;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Progress bars */
.progress {
    height: 12px;
    border-radius: 6px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 6px;
    transition: width 0.6s ease;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.alert-dismissible .btn-close {
    padding: 1rem 1rem;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 10px;
}

/* List Groups */
.list-group-item {
    border: 1px solid #e9ecef;
    transition: var(--transition);
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item.active {
    background: linear-gradient(135deg, #6A9AB0);
    border-color: var(--secondary-color);
}

.chat-footer,
.main-chat,
.fixed-bottom {
    display: none !important;
}

.bi {
    color: #021341; /* change this to your desired color */
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .container-fluid {
        padding: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #a8a8a8;  
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3A6D8C;
}

/* Floating elements */
.position-fixed {
    z-index: 1000;
}

/* File upload drag and drop */
.drag-area {
    border: 2px dashed #ccc;
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.drag-area:hover,
.drag-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.05);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Status indicators */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-online {
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

.status-offline {
    background-color: var(--secondary-color);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #2c3e50;
}

.text-gradient {
    background: linear-gradient(135deg, #CDC2A5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom utilities */
.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.rounded-xl {
    border-radius: 1rem !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* Chat specific styles */
.chat-container {
    height: 100vh;
    overflow: hidden;
}

.message-container {
    max-width: 85%;
    margin-bottom: 1rem;
}

.user-message {
    margin-left: auto;
    text-align: right;
     margin-right: 0;     /* ensure it sticks to right */
    display: inline-block;
    text-align: right;
    /* border-radius: 12px;
    padding: 10px 14px; */
    /* max-width: 70%;      prevents bubble from being too wide */
}

.assistant-message {
    margin-right: auto;
}

.message-bubble {
    padding: 12px 18px;
    border-radius: 18px;
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
}

.user-bubble {
    background: linear-gradient(135deg,#295F98 100%);
    color: white;
     /* prevents bubble from being too wide */

}

.assistant-bubble {
    background: white;
    border: 1px solid #e9ecef;
    color: #333;
}

/* Document grid styles */
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.document-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Admin panel specific */
.admin-stat-card {
    background: linear-gradient(135deg, #CDC2A5 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.admin-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
}

/* Login page specific */
/* Centering */
.auth-form {
    max-width: 400px;
    width: 100%;
    padding: 30px 20px;
}

/* Headings */
.auth-form h2 {
    font-weight: 700;
    margin-bottom: 20px;
    color: #001F3F
;
}

/* Labels */
.auth-form label {
    font-weight: 500;
    color: #001F3F;
    margin-bottom: 6px;
    display: block;
}

/* Input fields */
.auth-form .form-control {
    border: 1px solid #EAE4DD;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.auth-form .form-control:focus {
    border-color: #295F98;
    box-shadow: 0 0 6px #295F98;
}

/* Input group icons */
.auth-form .input-group-text {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #295F98;
}

/* Buttons */
.auth-form button[type="submit"] {
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-form button[type="submit"]:hover {
    transform: translateY(-2px);
    /* box-shadow: 0 4px 12px #030bf5; */
}

/* Links */
.auth-form a {
    color: #001F3F;
    text-decoration: none;
    font-weight: 500;
}

.auth-form a:hover {
    text-decoration: underline;
}

/* Checkbox */
.auth-form .form-check-label {
    font-size: 14px;
    color: #001F3F;
}

/* Forgot password link */
.auth-form .text-muted {
    font-size: 13px;
    display: inline-block;
    margin-top: 8px;
}


/* Responsive design */
@media (max-width: 576px) {
    .auth-card .card-body {
        padding: 30px 20px;
    }
    
    .container-fluid {
        padding: 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;


    -webkit-box-orient: vertical;
    overflow: hidden;
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, #CDC2A5 100%) 1;
}

.bg-pattern {
    background-image: url("/static/Design.png");
}

/* Ensure dropdown always stays on top */
.navbar {
    position: relative;
    z-index: 5000 !important;
}

.dropdown-menu {
    position: absolute;
    z-index: 6000 !important;
}

/* Fix clipping from card/hero sections */
.card,
.admin-card,
.hero-section,
.container-fluid {
    overflow: visible !important;
    z-index: auto !important; /* reset stacking */
}
