/* 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: 100px; /* 你测量到的移动端导航栏高度 (99.333px) 向上取整再加一点空隙 */
    }
}


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


/* Navbar */
.navbar-brand {
    font-weight: bold;
    display: flex; /* 让图标和文字在同一行且方便对齐 */
    align-items: center; /* 垂直居中对齐图标和文字 */
}

.navbar-brand-icon {
    height: 2.5em;       /* 图标的高度，单位为文字的大小 */
    width: auto;         /* 图标的宽度保持纵横比 */
    margin-right: 8px;   /* 图标与文字的距离 */
    vertical-align: text-bottom; 
}

.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;
}
/* ==========================================================================
   多媒体工单查看页 - 移动端优先样式
   配套 mediaView.js
   ========================================================================== */

/* 整页容器 */
.media-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 0 40px;
    background: var(--bs-body-bg);
    min-height: 100vh;
}

/* 加载态 */
.media-loading {
    text-align: center;
    padding: 80px 20px;
}

/* 错误页 */
.media-error-page {
    text-align: center;
    padding: 100px 24px;
}
.media-error-icon .bi { font-size: 4rem; }
.media-error-page h1 { font-size: 1.5rem; margin: 16px 0 8px; }
.media-error-page p { color: #64748b; }

/* 公司头 */
.media-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    padding: 24px 20px 22px;
    text-align: center;
}
.media-h1 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 6px;
    letter-spacing: 0.5px;
}
.media-h2 {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #a5b4fc;
}
.media-subtitle {
    font-size: 0.95rem;
    color: #cbd5e1;
    letter-spacing: 1px;
}

/* 信息卡片 */
.media-info-card {
    background: #fff;
    margin: 12px 12px 0;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.media-info-title {
    font-weight: 600;
    color: var(--bs-primary);
    padding-bottom: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1rem;
}
.media-info-row {
    display: flex;
    padding: 7px 0;
    border-bottom: 1px dashed #f1f5f9;
    font-size: 0.92rem;
    line-height: 1.5;
}
.media-info-row:last-child { border-bottom: none; }
.media-info-key {
    flex: 0 0 88px;
    color: #64748b;
    font-weight: 500;
}
.media-info-val {
    flex: 1;
    color: #1e293b;
    word-break: break-all;
}

/* 通用 section */
.media-section {
    background: #fff;
    margin: 12px 12px 0;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.media-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e7ff;
}
.media-section-title .bi {
    color: var(--bs-primary);
    margin-right: 4px;
}

/* 照片区 */
.media-photos {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.media-photo-item {
    text-align: center;
}
.media-photo-name {
    font-size: 0.88rem;
    color: #475569;
    margin-bottom: 6px;
    font-weight: 500;
    background: #f8fafc;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}
.media-photo-img {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    cursor: pointer;
    background: #f1f5f9;
    min-height: 120px;
    transition: opacity 0.3s;
}
.media-photo-img:hover { opacity: 0.95; }

/* 图片全屏预览 */
.media-photo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 12px;
}
.media-photo-overlay img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

/* 视频区 */
.media-videos {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.media-video-item {
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid var(--bs-primary);
}
.media-video-link {
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
}
.media-video-link:hover { text-decoration: underline; }
.media-video-link .bi { font-size: 1.1rem; }

/* 视频播放模态层 */
.media-video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.media-video-modal-inner {
    position: relative;
    width: 100%;
    max-width: 720px;
}
.media-video-close {
    position: absolute;
    top: -38px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
.media-video-player {
    width: 100%;
    max-height: 80vh;
    background: #000;
    border-radius: 4px;
}

/* PDF 报告区 */
.media-reports {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.media-report-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #fef2f2;
    border-radius: 8px;
    color: #b91c1c;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}
.media-report-link:hover { background: #fee2e2; }
.media-report-link .bi { font-size: 1.1rem; }

/* 底部 */
.media-footer {
    text-align: center;
    margin-top: 24px;
    padding: 16px 12px;
    color: #94a3b8;
    font-size: 0.78rem;
    border-top: 1px solid #e2e8f0;
}
.media-footer-sub {
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 0.7rem;
}

/* ---------- 移动端微调 ---------- */
@media (max-width: 480px) {
    .media-h1 { font-size: 1rem; }
    .media-h2 { font-size: 1.3rem; }
    .media-info-key { flex-basis: 76px; font-size: 0.85rem; }
    .media-info-val { font-size: 0.88rem; }
    .media-section-title { font-size: 0.95rem; }
}

