:root {
    /* --themeBgColor:linear-gradient(135deg, #101518, #2d2889) ;  002428 */
    /* --themeBgBtnColor: #eaeafa ;  */
    --themeBgColor:#1E3A8A;
    --themeBgBtnColor:aliceblue;

}
@font-face {
    font-family: "ChakraPetch-Bold";
    src: url('../fonts/Chakra_Petch/ChakraPetch-Bold.ttf');
}
@font-face {
    font-family: "ChakraPetch-Light";
    src: url('../fonts/Chakra_Petch/ChakraPetch-Light.ttf');
}
/* Base Styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    font-size: 14px;
    overflow: hidden;  /* Prevent body scrolling */
    font-family: "ChakraPetch-Light";
}
.header-wrapper {
    padding-top: 10px; /* prevents margin collapse */
    
}
/* Login page styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #1E3A8A;
    /* background-color: var(--themeBgColor); */
    font-family: Arial, sans-serif;
    flex-direction: row;
}

.login-container {
    
    padding: 2.5rem;
    border-radius: 0;
    width: 100%;
    max-width: 400px;
    border-left: 2px solid #5a5a5a;
    height: auto;
}
.login-container:first-child{
    border: none;
}
.error-message{
    text-align: center;
    color: #fff;
    padding: 10px 15px;
}
.login-header {
    text-align: center; margin-bottom: 40px;
 }

.login-header h2 {
   
    font-size: 25px;
    font-family: "ChakraPetch-Bold";
    margin-top: 0;
}
.login-header p{
     margin: 0px;color: #fff;text-transform: uppercase; font-size: 12px;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.login-form input {
    width: 90%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.login-form input::placeholder {
    font-size: 10px;color: var(--themeBgColor);letter-spacing: 0.5px;
}

.login-form input:focus {
    border-color: #000;
    outline: none;
    box-shadow: 0 0 0 2px rgb(86 102 103);
}
.login-container span {
    font-size: 12px;
    text-align: center;
    color: #fff;
    width: 90%;
    display: block;
    padding: 20px 15px;

}

.login-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--themeBgBtnColor);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-button:hover {
    background-color: #f169208f;
}

/* Header styles */
.header {
    /* background: linear-gradient(135deg, #1A1032, #2B1A4A); */
    background: var(--themeBgColor);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.header h1 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background-color: white;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.logout-btn:hover {
    background-color: #dc3545;
    color: white;
}

/* Layout */
.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;  /* Prevent wrapper scrolling */
    height: calc(100vh - 72px);  /* Subtract header height */
}

.main-content {
    flex: 1;
    padding: 0px;
    overflow-y: auto;  /* Allow vertical scroll only in main content */
    overflow-x: hidden;  /* Prevent horizontal scroll */
}

.chat-header {
    /* background: linear-gradient(to right, #1f1235, #2b0f4e); */
    background: var(--themeBgColor);
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #111827;
}
/* Chat Sidebar */
.chat-sidebar {
    display: flex;
        flex-direction: column;
        overflow: hidden;  /* Prevent sidebar scrolling */
}

.chat-messages {
    padding: 0px;
    overflow-y: auto;
    height: calc(100vh - 12.3rem);
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    background: white;
    /* background: linear-gradient(135deg, #101518, #2d2889); */
}

.chat-input-container {
    padding: 0;
    border-top: 0px solid #dee2e6;
    background: transparent;
    width: 100%
}

.chat-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 10px;
    color: aliceblue;
    background: transparent;
}

.chat-message {
    color: #1f2937;
    float: left;
    background-color:aliceblue;
    max-width: 70%;
    min-width: 40%;
    padding: 6px 25px 25px 10px;
    margin: 5px;
    border-radius: 6px 6px 6px 0;
    font-size: 14px;
    position: relative;
}
.user-message {
    background: var(--themeBgColor);
    color: white;
}
.system-message {
    align-self: flex-start;
}
.thinking-message {
    color: #1f1235;
    float: left;
    background-color: aliceblue;
    max-width: 70%;
    min-width: 40%;
    padding: 6px 10px 10px 10px;
    margin: 5px;
    border-radius: 6px 6px 6px 0;
    font-size: 14px;
    position: relative;
}
/* Upload Container Styles */
.upload-container {
    display: none;
    background:var(--themeBgBtnColor);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 80%;
    border: 1px solid #374151;
    box-sizing: border-box;  /* Include padding in width calculation */
    /* margin-top:0; */
}

.upload-container h2 {
    color: #1f2937;
    margin: 0 0 5px 0;
    padding-bottom: 5px;
    /* border-bottom: 1px solid #5e6879; */
    font-size: 18px;
    font-weight: 700;
}

/* Form Row Layout */
.form-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
}

.upload-group {
    flex: 1;
    margin-bottom: 0;
    /* min-width: 200px; */
    min-width: 48%;
    width: 48%;
    display: inline-block;
    margin-top:0;
}
.upload-group:nth-child(odd){
    margin-right: 15px;
}
.upload-group:nth-child(even) {
    margin-right: 0px;width: 50%;
}
.upload-group label {
    display: block;
    margin-bottom: 2px;
    font-weight: 500;
    color: #1f2937;
    font-size: 14px;
}

.button-group {
    min-width: 120px;
    margin-bottom: 8px;
    align-self: flex-end;
    display: flex;
    gap: 8px;
}

/* File Input Styles */
.upload-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 0px dashed #5F3890;
    border-radius: 8px;
    background:transparent;
    transition: all 0.3s ease;
    height: 42px;
    box-sizing: border-box;
}

.upload-group input[type="file"]:hover {
    border-color: var(--themeBgBtnColor);
    background: transparent;
}

/* Button Styles */
.button-group button {
    height: 42px;
    padding: 0 20px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1A1032, #2B1A4A);
    /* background: linear-gradient(135deg, #C2953B, #7e6127); */

    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button-group button:hover {
    background: linear-gradient(135deg, #1A1032, #2B1A4A);
    /* background: linear-gradient(135deg, #C2953B, #7e6127);  */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button-group button:active {
    transform: translateY(1px);
}

/* Results Styles */
.results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.detection-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: calc(33.33% - 20px);
}

/* Progress Container */
.progress-container {
    max-width: 600px;
    margin: 20px auto;
    background: linear-gradient(135deg, #f8f9fa, #e3f2fd);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    border: 1px solid rgba(25, 118, 210, 0.1);
}

.progress-container h3 {
    color: var(--themeBgBtnColor);
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.progress-bar {
    width: 80%;
    height: 5px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    overflow: hidden;
    margin: 2px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    /* border: 1px solid rgba(25, 118, 210, 0.2); */
}

.progress-fill {
    width: 0%;
    height: 100%;
    /* background: linear-gradient(90deg, #1A1032, #2B1A4A); */
    background: linear-gradient(135deg, #C2953B, #7e6127);

    transition: width 0.3s ease;
    box-shadow: 0 0 8px #3D2461;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    color: var(--themeBgBtnColor);
    font-size: 0.9rem;
    margin-top: 10px;
    font-weight: 500;
}

/* Timeline Styles */
.timeline {
    max-width: 800px;
    margin: 20px auto;
    background: rgb(122, 157, 172);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
}

.timeline-track {
    position: relative;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    margin: 30px 0;
}

.match-point {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    top: -4px;
    transform: translateX(-50%);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.match-point:hover {
    transform: translateX(-50%) scale(1.2);
}

.match-point.face {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
}

.match-point.person {
    /* background: linear-gradient(135deg,  #1A1032, #2B1A4A); */
    background: linear-gradient(135deg, #C2953B, #7e6127);

}

.tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(33, 33, 33, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 100;
    margin-bottom: 8px;
}

.match-point:hover .tooltip {
    display: block;
}

/* Video Container */
.video-container {
    margin: 20px auto;
    max-width: 800px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    box-sizing: border-box;  /* Include padding in width calculation */
}

.video-container video {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Reference Preview Styles */
#referencePreview {
    margin-top: 20px;
    text-align: center;
}

#referencePreview img {
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.login-page  button[type="submit"] {
 padding: 10px 15px;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: center;
 background: var(--themeBgColor);
color: white;
border: none;
border-radius: 4px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
width: 100%;
width: 80%;
margin: 0 auto;
margin-top: 10px;
}
/* Update button styles to apply to all forms */
button[type="submit"] {
         /* height: 40px; */
    /* padding: 10px 15px; */
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(135deg, #1A1032, #2B1A4A); */
    background: var(--themeBgColor);
    color: white;
    /* border: none; */
    /* border-radius: 4px; */
    /* font-size: 14px; */
    /* font-weight: 500; */
    /* cursor: pointer; */
    /* transition: all 0.3s ease; */
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    width: 100%;
    margin: 0 auto;
    margin-top: 15px;
}


button[type="submit"]:hover {
    /* background: linear-gradient(135deg, #1A1032, #2B1A4A); */
    background:var(--themeBgColor);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button[type="submit"]:active {
    transform: translateY(1px);
}

/* Grid layout for detections */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(400px, 1fr));
    gap: 25px;
    padding: 20px;
    max-width: 1800px;
    margin: 0 auto;
}

.detection-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease;
    border: 1px solid #e0e0e0;
    height: fit-content;
    display: flex;
    flex-direction: column;
    min-width: 350px;
}

.detection-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.detection-header {
    /* background: linear-gradient(135deg, #1A1032, #2B1A4A); */
    background: linear-gradient(135deg, #C2953B, #7e6127);

    color: white;
    padding: 12px 15px;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detection-content {
    padding: 20px;
    display: flex;
    gap: 10px;
}

.detection-image-container {
    flex: 1;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    min-width: 150px;
}

.detection-image-container img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 5px;
}

.image-label {
    color: var(--themeBgBtnColor);
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.no-image {
    text-align: center;
    color: #666;
    padding: 20px;
    background: #eee;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }

    .detection-content {
        flex-direction: column;
    }

    .detection-image-container {
        width: 100%;
    }
}

/* Add icons from Material Icons */
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

        /* Container styles */
        #processingContainer {
            display: none;
        }

        /* File input styles */
        .file-name {
            margin-top: 0px;
            font-size: 0.9em;
            color: #1f2937;
        }

        /* Progress bar styles */
        .progress {
            height: 5px;
            margin: 0 0;
            background: #111827;
        }

        /* Card styles */
        .card {
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .card-header {
            border-bottom: none;
        }

        /* Table styles */
        .table td {
            padding: 0.5rem;
        }

        /* Badge styles */
        .badge {
            font-weight: normal;
            padding: 0.5em 0.8em;
        }

/* Report Button */
.report-button-container {
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
}

.report-button {
    /* background: linear-gradient(135deg, #1A1032, #2B1A4A); */
    background: linear-gradient(135deg, #C2953B, #7e6127);

    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.report-button:hover {
    background: linear-gradient(135deg, #130B25, #2B1A4A);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color:var(--themeBgBtnColor);
    margin: 1% auto;
    padding: 15px;
    width: 80%;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
}


.modal-footer {
    margin-top: 15px;
    text-align: right;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--themeBgBtnColor);
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.detection-report-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detection-report-card img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 10px;
}

.detection-info {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.detection-info p {
    margin: 5px 0;
    color: #fff;
    font-size: 14px;
}

/* Report Progress Styles */
.report-progress-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.report-progress-container p {
    margin: 0 0 10px 0;
    color: var(--themeBgBtnColor);
    font-weight: 500;
}

/* Add these styles */
.text-input {
    width: 100%;
    /* padding: 8px; */
    /* border: 1px solid #5e6879; */
    /* border-radius: 4px; */
    /* font-size: 14px; */
    margin-bottom: 10px;
    background-color: transparent;
                padding: 16px;
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: #ffffff;
            color: #1f2937;
}

.text-input:focus {
    border-color: var(--themeBgBtnColor);
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 16, 50, 0.2);
}

/* Footage table styles */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.footage-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.footage-table th,
.footage-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #5e6879;
}

.footage-table th {
    background: transparent;
    font-weight: 600;
    color: #1f2937;
}

.footage-table tr:hover {
    background: transparent;
}

.action-button {
    /* padding: 9px 12px; */
    background:var(--themeBgColor);
    color: white;
    border: none;
    /* border-radius: 4px; */
    padding: 16px 32px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 10px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;

    /* padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex
;
    align-items: center;
    justify-content: center;
    gap: 8px;
} */
}

.action-button:hover {
    /* background: #2B1A4A; */
    background: var(--themeBgColor);
}

/* Video modal styles */
.video-modal-content {
    max-width: 80%;
    padding: 20px;
}

.video-modal-content video {
    width: 100%;
    max-height: 70vh;
    margin-top: 15px;
}

.delete-button {
    background: #dc3545;
}

.delete-button:hover {
    background: #c82333;
}

/* Photo preview styles */
.photo-preview {
    margin: 10px 0px;
    max-width: 200px;
    min-height: 100px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
}

.photo-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* Reference photo grid styles */
.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.reference-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reference-info h3 {
    margin: 0 0 10px 0;
    color: var(--themeBgBtnColor);
}

.reference-info p {
    color: #666;
    margin: 0 0 15px 0;
    font-size: 0.9rem;
}

.reference-actions {
    display: flex;
    gap: 10px;
}

/* Photo modal styles */
.photo-modal-content {
    max-width: 600px;
}

.photo-modal-content img {
    width: 100%;
    height: auto;
    margin-top: 15px;
    border-radius: 4px;
}

/* New styles */
.form-select {
    width: 100%;
    /* padding: 10px;
    border: 1px solid #5e6879; */
    /* border-radius: 4px;
    font-size: 14px; */
    background-color: whitesmoke;
    cursor: pointer;
    color: black;margin-bottom: 10px;
                padding: 16px;
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            font-size: 16px;
            transition: all 0.3s ease;
            
}

.form-select:focus {
    border-color: #1f2937; 
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 16, 50, 0.2);
}

/* Reference selection styles */
.reference-select-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.reference-select-group .text-input {
    flex: 1;
}

.reference-select-card {
    background: whitesmoke;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.reference-select-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.reference-select-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.reference-select-info {
    text-align: center;
}

.reference-select-info h3 {
    margin: 0 0 10px 0;
    color: #000;
   
}

#referenceSelectorModal .modal-content {
    max-width: 900px;
}

#referenceSelector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 10px;
}

.pagination button {
    padding: 8px 16px;
    background:var(--themeBgColor);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:disabled {
    background:grey;
    cursor: not-allowed;
}

.pagination button:hover:not(:disabled) {
    background:var(--themeBgColor);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pagination span {
    color: #fff;
    font-weight: 500;
}
.userName {
    padding-left: 10px;
    font-size: 16px;
}
.welcomeTxt{
   color: #ffffffab;
}
.LogginedUserName{
    display: inline-flex; 
    justify-content: end;
    color: #ffffffab;
}
.VEuserName{
    font-size: 14px;
    margin-right: 15px;
}
.welcomeMsg{
    color: #ffffffab;
    line-height: 1.2;
}
.user-avatar {
    width: 20px;
    margin: 5px;
}
.user-container {
    display: inline-flex;
    align-items: end;
    flex-direction: row;
    justify-content: end;
}
.system-avatar,.user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #374151;
    padding: 0px;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    bottom: 4px;
    border: 1px solid #c2953b66;
}
.system-container {
    display: inline-flex;
    align-items: flex-end;
}
.logo{
    color: var(--themeBgBtnColor);
}

.location-input-group {
    display: flex;
    gap: 10px;
}

.location-input-group input {
    flex: 1;
}

.location-input-group button {
    padding: 8px 12px;
    white-space: nowrap;
}

#map {
    width: 100%;
    height: 345px;
    border-radius: 8px;
    margin: 15px 0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color:var(--themeBgBtnColor);
    margin: 5% auto;
    padding: 20px;
    width: 80%;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
}


.leaflet-container {
    height: 100%;
    width: 100%;
    background: #1a1a1a !important;
}

/* Dark theme for OpenStreetMap */
.leaflet-tile-pane {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.modal-header h2 {
    color: #1f2937;
    margin: 0;
    font-size: 1.5rem;
}

.map-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.map-search {
    flex: 1;
    padding: 10px;
    border: 1px solid #374151;
    border-radius: 4px;
    background-color: #1f2937;
    color: #fff;
    font-size: 14px;    height: 40px;
}

.map-search:focus {
    outline: none;
    border-color: var(--themeBgBtnColor);
}

.map-search::placeholder {
    color: #9ca3af;
}

#detectionsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
}

.detection-card {
    background: #1f2937;
    border-radius: 5px;
    padding: 1px;
    color: #fff;
}

.detection-card h3 {
    color: var(--themeBgBtnColor);
    margin-top: 0;
    margin-bottom: 10px;

}

.detection-card p {
    margin: 5px 0;
    font-size: 14px;
}

.detection-card img {
    width: 100px;
    height: 100px;
    cursor: pointer;
    border-radius: 5px;
    object-fit: cover;
}

.detection-card-known {
    background: #3E4C97;
    border-radius: 5px;
    /* padding: 10px; */
    color: #fff;
}

.detection-card-known h3 {
    color: var(--themeBgBtnColor);
    margin-top: 0;
    margin-bottom: 10px;

}

.detection-card-known p {
    margin: 5px 0;
    font-size: 14px;
}

.detection-card-known img {
    width: 100px;
    height: 100px;
    cursor: pointer;
    border-radius: 5px;
    object-fit: cover;
}


/* Autocomplete Styles */
.ui-autocomplete {
    background-color: var(--themeBgColor) !important;
    border: 1px solid #374151 !important;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
}

.ui-menu-item {
    padding: 8px 12px !important;
    color: #fff !important;
    cursor: pointer;
}

.ui-menu-item:hover,
.ui-menu-item .ui-state-active {
    background-color: #374151 !important;
    border: none !important;
}

.ui-menu .ui-menu-item-wrapper {
    padding: 4px 8px;
}

.ui-menu .ui-menu-item-wrapper.ui-state-active {
    background-color: var(--themeBgBtnColor) !important;
    border: none;
    color: #fff;
}

/* SIDEBAR CSS */
.move-to-left {
    transform: translateX(-400px);
  }
  /* .move-to-left-partly {
    transform: translateX(-200px);
  } */
  .sidebar {
    height: 100%;
    width: 400px;
    position: fixed;
    top: 5.3rem;
    z-index: 1;
    right: -400px;
    background-color: #0f1522;
    box-shadow: 0 1rem 5rem rgba(0, 0, 0, 0.4);
    transition: transform .7s ease-in-out;
    border-top: 1px solid #363f4f;
  }
  .container-liner{
    margin-left:0rem;
  }
  .sidebar-tab {
    height: 100%;
    width: 2rem;
    position: fixed;
    top: 5.3rem;
    z-index: 1;
    right: 0;
    background-color:  #1E3A8A;
    box-shadow: 0 1rem 5rem rgba(0, 0, 0, 0.5);
    transition: transform .7s ease-in-out;
    border: 1px solid #363f4f;
    
  }
  #sidebar-tab-text{ 
      width: 400px;
  }
  .vertical-text {
      transform: rotate(90deg);
      transform-origin: left 2rem;
    vertical-align:middle;
    padding-left: 30vh;    cursor: pointer;
    color: white;
    font-weight: bold;
  }
  .arrow {
    box-sizing: border-box;
    display: inline-block;
    cursor: pointer;
    position: relative;
    transform: rotate(0deg);
    transition: all 0.5s ease-in-out;
    width: 30px;
    height: 34px;
    z-index: 1;
    padding: 0px;
  }
  .arrow:after, .arrow:before {
    content: "";
    box-sizing: border-box;
    display: block;
    position: absolute;
    transition: all 0.25s ease-in-out;
    border-radius: 10px;
    background: white;
    width: 12px;
    height: 2.2px;
    top: 14.4px;
  }
  .arrow:after {
    transform: rotate(44deg);
    left: 3.2px;
  }
  .arrow:before {
    right: 7.2px;
    transform: rotate(-44deg);
  }
  .arrow.active:after {
    transform: rotate(-44deg);
  }
  .arrow.active:before {
    transform: rotate(44deg);
  }
  
  
  .card {
    margin-right: 260px;
    margin-left: 225px;
    box-shadow: .5rem .5rem 2rem rgba(0, 0, 0, 0.4);
  }
  .card-text {
    color: #000;
  }
  .btn.btn-primary {
    background-color: #F50057;
    border-color: #F50057;
  }

  .item {
    display: flex;
    flex-direction: column; /* Stack text and image vertically */
    align-items: center; /* Center the text and image horizontally */
}
.header-text{
    margin: 15px 0px 10px;
    width: 100%;
    text-align: center;
    font-size: 16px;
}
.image {
    max-width: 100%; /* Ensures the image does not exceed its container's width */
    margin-top: 5px; /* Adds some space between text and image */
}
.image-face-top {
    max-width: 100%; /* Ensures the image does not exceed its container's width */
    margin-top: 5px; /* Adds some space between text and image */
    object-fit: cover;
    object-position: top center;  /* aligns top of image in the view */
}        

#uploadStatus {
    position: fixed;
    bottom: 25px;
    left: 25px;
    /* Changed from right to left */
    width: 450px;
    max-height: 240px;
    overflow-y: auto;
    background: #1f2937;

    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    padding: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    display: none;
    overflow: hidden;
}

#uploadStatus.active {
    transform: translateY(0);
    /* Slide up when active */
}

#uploadStatus.close {
    display: none;
    /* Slide up when active */
}

.upload-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 15px 15px 10px 15px;
    border-bottom: 1px solid #5e6879;
    background:var(--themeBgBtnColor);
    position: sticky;
    top: 0;
    z-index: 1;
}

#uploadList {
    max-height: 175px;      /* adjust as needed */
    overflow-y: auto;
    padding: 12px 15px 15px 15px;
}
.upload-status-header h3 {
    margin: 0;
    font-size: 14px;
    color: #1f2937;
}

#cancelConfirmationPopup{
    position:fixed; inset:0;
    background:rgba(0,0,0,.6);
    display:none;
    z-index:1100;
}

#cancelConfirmationPopup .popup-content{
    max-width:380px;
    margin:12% auto;
    background:var(--themeBgBtnColor);
    padding:28px 34px 32px;
    border-radius:8px;
    text-align:center;
    box-shadow:0 4px 24px rgba(0,0,0,.35);
    font-family:inherit;
}

#cancelConfirmationPopup h4{
    margin:0 0 6px;
    font-size:18px;
    color:#1f2937;
    font-weight:600;
}

#cancelConfirmationPopup p{
    margin:0 0 22px;
    color:#1f2937;
    font-size:14px;
}

/* ----------  Buttons (inline row)  ---------- */
#cancelConfirmationPopup button{
    appearance:none;
    border:0; outline:0;
    padding:10px 22px;
    border-radius:4px;
    font-size:14px;
    font-weight:500;
    cursor:pointer;
    display:inline-block;      /* keep side-by-side */
    margin:0 8px;              /* gap between buttons */
    white-space:nowrap;
    transition:background .18s ease, transform .18s ease;
}
/* flex row for the two buttons */
#cancelConfirmationPopup .button-row{
    display:flex;
    justify-content:center;   /* center in the dialog */
    gap:16px;                 /* space between buttons */
}

/* primary / neutral (first button) */
#cancelConfirmationPopup button:first-of-type{
    background:#4b5563;        /* slate-600 */
    color:#fff;
}
#cancelConfirmationPopup button:first-of-type:hover{
    background:#606b7b;
}

/* danger / cancel (second button) */
#cancelConfirmationPopup button:last-of-type{
    background:#dc2626;        /* red-600 */
    color:#fff;
}
#cancelConfirmationPopup button:last-of-type:hover{
    background:#b91c1c;
}

/* subtle “press” feedback */
#cancelConfirmationPopup button:active{
    transform:scale(.98);
}


.minimize-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.minimize-btn:hover {
    color: #333;
}

.upload-item {
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    background: #374151;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 1.2em;
    color: #4CAF50;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1f2937;
}

/* Map Modal Styles */
.map-modal-content {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 8px;
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
}

.map-modal-content h2 {
    color: #fff;
    margin-bottom: 20px;
}

.map-modal-content #map {
    height: 300px;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-footer {
    text-align: right;
}

.map-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.map-search {
    flex: 1;
    padding: 10px;
    border: 1px solid #374151;
    border-radius: 4px;
    background-color: #1f2937;
    color: #fff;
    font-size: 14px;
}

.map-search:focus {
    outline: none;
    border-color: var(--themeBgBtnColor);
}

.map-search::placeholder {
    color: #9ca3af;
}

.timeline-item {
    padding: 5px 10px;
    border-radius: 4px;
    background-color: var(--themeBgBtnColor);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.timeline-item:hover {
    background-color: #c2953b80;
}

.timeline-tooltip {
    background: #1f2937;
    border: 1px solid #374151;
    padding: 8px;
    border-radius: 4px;
    color: white;
}

.vis-timeline {
    border: 1px solid #374151;
    background-color: #111827;
    color: white;
}

.vis-item {
    background-color: var(--themeBgBtnColor) !important;
    border-color: var(--themeBgBtnColor) !important;
    color: white !important;
}

.vis-item.vis-selected {
    background-color: #c2953b80 !important;
    border-color: #c2953b80 !important;
}
#results-header{
    display: block;
    justify-content: space-between;
    align-items: center;
    align-content: center  ;
}
#results-content {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 25px;
    /* margin-top: 10px; */
    border-radius: 24px;
    /* padding: 20px; */
    align-items: center;
    align-content: center;
    justify-content: center;
    place-items: center;
     border: 1px solid #F0F8FF;
}
.ListView{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ListView span{
    display: flex;
    align-items: center;
    background: aliceblue;
    color: #1f1235;
    font-size: 13px;
    border-radius: 5px;
    /* border: #000000 solid 1px; */
}
.ListView img{
    margin-left: 5px;
}
.action-button-detection:hover {
    /* background: #2B1A4A; */
    background: var(--themeBgColor);
}
.action-button-detection {
    /* padding: 9px 12px; */
    background:var(--themeBgColor);
    color: white;
    border: none;
    /* border-radius: 4px; */
    padding: 12px 25px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.video-time-controls {
    margin-top: 15px;
    padding: 10px;
    background: #333;
    border-radius: 5px;
}

.time-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.time-btn {
    padding: 8px 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.time-btn:hover {
    background: #45a049;
}

.current-time {
    padding: 8px 15px;
    background: white;
    color: black;
    border-radius: 4px;
    font-family: monospace;
}

.chat-link{
    cursor: pointer;
    color:  #1f2937;
    text-decoration:underline;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}
.chat-link:hover{
    cursor: pointer;
    color:  #1f2937;
    text-decoration:underline;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.tabs-container {
    width: 100%;
    margin-top: 20px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    background-color:var(--themeBgBtnColor);
    color: white;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.tab-button:hover {
    background-color: #34495e;
}

.tab-button.active {
    background-color: #3498db;
}

.tab-button i {
    font-size: 16px;
}

.tab-content {
    display: none;
    padding: 20px;
    background: var(--themeBgColor);
    border-radius: 5px;
}

.tab-content.active {
    display: block;
}

#movementMap {
    border-radius: 5px;
    overflow: hidden;
}

#personTimeline {
    height: 400px !important;
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
}

.timeline-item {
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: var(--themeBgBtnColor);
    color: black;
    border-radius: 4px;
    min-width: 150px;
}

.timeline-event {
    background-color: var(--themeBgBtnColor) !important;
    color: black !important;
    border-color: var(--themeBgBtnColor) !important;
    font-size: 12px !important;
}

.vis-item {
    background-color: var(--themeBgBtnColor) !important;
    border-color: var(--themeBgBtnColor) !important;
    color: black !important;
}

.vis-timeline {
    background-color: var(--themeBgColor) !important;
    border: 1px solid #374151 !important;
}

.vis-time-axis .vis-text {
    color: white !important;
}

.vis-item.vis-selected {
    background-color: var(--themeBgBtnColor) !important;
    border-color: var(--themeBgBtnColor) !important;
}

.vis-item.vis-point {
    background-color: var(--themeBgBtnColor) !important;
    border-color: var(--themeBgBtnColor) !important;
}

.vis-item.vis-point .vis-item-content {
    padding: 5px 8px !important;
}
.timestamp {
    position: absolute;
    bottom: 2px;
    right: 10px;
    font-size: 0.75rem;
    color: black;
}
/* ========================================================== */
/* When sidebar is open: shrink content, show sidebar */
.app-container.move-to-left .content-wrapper {
    flex: 0 0 75%; /* Shrink to 75% width */
}
.app-container.move-to-left .sidebar {
    width: 25%; /* Show sidebar */
}

.move-to-left-partly .content-wrapper {
    flex: 0 0 75%;
    width: calc(100% - 400px);    transition: transform .7s ease-in-out;
}
/* .content-wrapper{
    border: 30px solid red;
} */  

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.collapse-btn {
    padding: 9px 12px;
    background: #1f2937;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 10px;
}

.collapse-btn.collapsed i {
    transform: rotate(180deg);
}

.form-collapsed {
    display: none;
}

#detectionImagesGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 5px;
    padding: 5px;
    height: 500px;
    overflow-y: auto;
    background:var(--themeBgBtnColor);
}

#imagesTab {
    height: 500px;
    overflow-y: auto;
    background:var(--themeBgBtnColor);
    color: whitesmoke;
}

.detection-info {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.detection-info p {
    margin: 5px 0;
    color: var(--themeTextColor);
    font-size: 14px;
}

#detectionImagesModal .modal-content {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    background:var(--themeBgBtnColor);
    color:whitesmoke;
}

.searched-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
    background: var(--themeBgColor);
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
}

.searched-image-info {
    text-align: center;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;

}

.searched-image-info h3 {
    margin-bottom: 20px;
    color: var(--themeTextColor);
}
.searched-image-info img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
}
.searched-image-info .image-type {
    font-size: 14px;
    color:var(--themeBgBtnColor);
    margin-top: 5px;
}
#searchedImageDisplay {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}
#searchedImageDisplay img {
    max-height: 400px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);

}

#searchedImageDisplay .image-type {
    margin-top: 10px;
    color: var(--themeTextColor);
    font-size: 14px;
}
#searchedImageModal .modal-content {
    max-width: 800px;
    width: 90%;
    margin: 20px auto;
}

#searchedImageModal .modal-body {
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
}

/* Report Loading Message Styles */
#reportLoadingMessage {
    color: #fff;
    margin-top: 10px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding: 20px;
    border-radius: 5px;
    background: var(--themeBgColor);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#reportLoadingMessage .spinner-container {
    color:var(--themeBgBtnColor);
}

.quick-date-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.date-range-btn {
padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
background: var(--themeBgColor);
    color: white;
    /* border: none; */
    /* border-radius: 4px; */
    cursor: pointer;
    transition: background-color 0.3s ease;
    /* font-size: 14px; */
}

.date-range-btn:hover {
    background-color: #c2953b80;
}
.modal-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
  }
.image-box {
    width: 200px;
    height: 530px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
  
 .image-container {
  flex: 1; /* Fills all remaining space */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 15px 10px; /* includes bottom padding */
  box-sizing: border-box;
  background-color: #374151;
}

/*---------------For the website landing page---------------*/
.site-title {
    font-family: "ChakraPetch-Bold";
    color: var(--themeBgBtnColor);
    margin-bottom: 0.25em;
    font-size: 2rem;
  }
  
  .site-subtitle {
    color: #ddd;
    font-weight: 300;
    margin-top: 0;
    font-size: 1.25rem;
  }
  
  .site-tagline {
    color: #aaa;
    margin-top: 0.5em;
    font-weight: 300;
    font-size: 1rem;
  }
  
  .intro p,
  .why-choose p,
  .get-started p {
    color: #ccc;
    line-height: 1.5em;
    margin-top: 1em;
    font-size: 0.95rem;
  }
  
  .features h3,
  .why-choose h3,
  .get-started h3 {
    color: var(--themeBgBtnColor);
    margin-top: 2em;
    font-family: "ChakraPetch-Bold";
    font-size: 1.2rem;
  }
  
  .features ul {
    color: #ddd;
    margin-left: 1.25em;
    line-height: 1.5em;
    font-size: 0.95rem;
    padding-left: 1em;
  }
  
  .features li {
    margin-bottom: 0.5em;
  }
  
  .btn-register {
    display: inline-block;
    background-color: var(--themeBgBtnColor);
    color: var(--themeBgColor);
    padding: 0.75em 1.5em;
    border-radius: 4px;
    text-decoration: none;
    font-family: "ChakraPetch-Bold";
    font-size: 1rem;
    transition: background-color 0.3s ease;
    margin-top: 1em;
  }
  
  .btn-register:hover,
  .btn-register:focus {
    background-color: #a67f2c;
    outline: none;
    cursor: pointer;
  }
  