/* General Styles */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.main-content {
    flex: 1;
}
body.admin-view-active .main-content {
    padding-top: 70px; 
    padding-bottom: 80px; 
}

@media (max-width: 991.98px) {
    body.admin-view-active .main-content {
        padding-top: 85px; /* 你测量到的移动端导航栏高度 (99.333px) 向上取整再加一点空隙 */
    }
}

body.public-view-active .main-content {
    padding-top: 0;
    padding-bottom: 0;
}


/* Navbar */
.navbar-brand {
    font-weight: bold;
}
.navbar .nav-link i, .navbar .dropdown-item i {
    margin-right: 8px;
}
@media (min-width: 992px) {
    .navbar .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}


/* Footer */
.footer { /* For admin view */
    background-color: #e9ecef;
    padding: 15px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    width: 100%;
}
.footer p { margin-bottom: 0.25rem; }
.footer a { color: #6c757d; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Minimal public footer styles */
.public-footer-minimal {
    background-color: #f8f9fa; 
    padding: 10px 0;
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    width: 100%;
}
.public-footer-minimal p { margin-bottom: 0.25rem; }
.public-footer-minimal a { color: #6c757d; text-decoration: none; }
.public-footer-minimal a:hover { text-decoration: underline; }


/* DataTables Action Column */
.actions-column a, .actions-column button {
    margin-right: 0.25rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
}
.actions-column i {
    font-size: 0.9rem;
    vertical-align: middle;
}
.dataTables_wrapper .row:first-child {
    margin-bottom: 1rem;
}
table.dataTable thead th, table.dataTable thead td {
    white-space: nowrap;
}

/* Login Page Specific */
.login-page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
     width: 100%;
}

.login-form-card {
    padding: 2rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    width: 100%;
}


.user-table-scroll-wrapper {}

/* PDF Viewer Styles */
#pdf-display-area {}
#loading-indicator,
#pdf-loading-indicator-direct {
    text-align: center;
    padding: 3rem 0;
}
#pdf-error-message,
#pdf-error-message-direct,
#pdf-error-message-inline {
    text-align: center;
}

.pdf-render-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #e9ecef;
    padding: 10px 0;
    width: 100%;
}
.pdf-render-area canvas {
    display: block;
    margin-bottom: 10px;
    max-width: 100%;
    width: 95%;
    height: auto !important;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid #ccc;
}


/* Public Page Headers (verifyPublic.js and viewDirect.js) */
.public-verify-header {
    background-color: #fff;
    padding: 0.75rem 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.public-verify-header h4 {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 1.2rem;
}
.public-verify-header h4 i {
    margin-right: 0.5rem;
}

/* Company Info display (verifyPublic.js and viewDirect.js) */
.company-info-display {
    text-align: center;
    font-size: 0.85rem;
    color: #6c757d;
    background-color: #f0f0f0;
    padding: 8px 15px;
    border-bottom: 1px solid #dee2e6;
}
.company-info-display p {
    margin-bottom: 0;
}


/* Floating Button for Internal Query Return */
.btn-floating-return {
    position: fixed;
    top: 110px;
    right: 25px;
    width: 50px;
    height: 50px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 1040;
    transition: background-color 0.2s ease;
    cursor: pointer;
    user-select: none;
}
.btn-floating-return:hover {
    color: white;
    background-color: #0b5ed7;
    text-decoration: none;
}

/* QR Code Modal */
#qrCodeModal .modal-body img {
    display: block;
    margin: 1rem auto;
    max-width: 80%;
    height: auto;
    border: 1px solid #ddd;
}
#qrCodeModal .modal-body p {
    text-align: center;
    margin-top: 0.5rem;
    font-weight: bold;
}

/* Upload Page Dropzone Styles */
.dropzone {
    border: 2px dashed #adb5bd; /* Bootstrap default border color */
    border-radius: .375rem; /* Bootstrap default border-radius */
    padding: 2rem;
    background-color: #f8f9fa; /* Light background */
    cursor: pointer;
    transition: border-color .15s ease-in-out, background-color .15s ease-in-out;
    min-height: 200px; /* Increased height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.dropzone:hover {
    border-color: #0d6efd; 
    background-color: #e9ecef;
}
.dropzone.dragover {
    border-color: #0d6efd;
    background-color: #cfe2ff;
}

/* Wrapper for content inside dropzone to handle visibility toggle and flex centering */
.dropzone-content-wrapper {
    display: flex; 
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}


/* Common style for icons within dropzone (initial and selected state) */
.dropzone .dropzone-icon,
.dropzone .dropzone-icon-selected {
    font-size: 3rem; 
    margin-bottom: 1rem; 
}
.dropzone .dropzone-icon { 
    color: #0d6efd; 
}
.dropzone .dropzone-icon-selected { 
    color: #198754; 
    margin-bottom: 0.5rem; 
}

/* Text within dropzone */
.dropzone-text { 
    margin-bottom: 0;
    color: #6c757d; 
    font-size: 1.1rem;
}
#selected_file_name_text { 
    font-weight: 500; 
    word-break: break-all; 
    font-size: 1.1rem; 
    text-align: center;
    max-width: 90%;
}
#dropzone_file_selected_content small { 
    font-size: 0.85rem;
    margin-top: 0.25rem;
}


/* Style for dropzone when invalid (custom validation) */
.dropzone.is-invalid {
    border-color: #dc3545 !important; /* Bootstrap danger color */
}

.dropzone.is-invalid + #pdf_file_invalid_feedback, 
#pdf_file_dropzone.is-invalid ~ #pdf_file_invalid_feedback { 

    display: block !important;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .footer, .public-footer-minimal { font-size: 0.8rem; padding: 10px 0; }
    .pdf-render-area canvas { margin-bottom: 8px; width: 100%; }
    .btn-floating-return {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
        right: 15px;
        top: 180px;
    }
    .public-verify-header h4 {
        font-size: 1.1rem;
    }
    .company-info-display {
        font-size: 0.8rem;
    }
    .dropzone {
        min-height: 150px;
        padding: 1.5rem;
    }
    .dropzone .dropzone-icon,
    .dropzone .dropzone-icon-selected {
        font-size: 2.5rem;
    }
    .dropzone-text,
    #selected_file_name_text {
        font-size: 1rem;
    }
}

/* Utility class for loading spinners inside buttons */
.btn .spinner-border {
    vertical-align: middle;
    margin-left: 5px;
}
