/* ====================================
   Report Portal Global Styles
   ==================================== */

@import url('/css/local-fonts.css');

:root {
    --primary-color: #007bff;
    --primary-deep: #0050c8;
    --primary-light: #00a2ff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --text-dark: #001132;
}

.top {
    position: relative;
    width: 100%;
    height: 18.46vw;
    overflow: hidden;
}

.top span {
    position: absolute;
    bottom: 0;
    left: 18%;
    transform: translate(-15%, 0);
    color: #fff;
    font-size: 3vw;
    font-weight: 500;
    text-shadow: #757a76 2px 2px 4px;
}

body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #e6f2ff 0%, #f4f7fb 45%, #e9f3ff 100%);
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2933;
}

body.search-page {
    background-image: url('/images/search-bg.jpg');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
}

[lang="zh-CN"] {
    font-family: 'Noto Sans SC', sans-serif;
}

[lang="zh-TW"], [lang="en"] {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Main content area padding (shared) */
.app-main-wrapper {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

/* Container width */
.app-container {
    max-width: 1120px;
}

/* Dark blue top bar: for admin-navbar */
.app-header {
    background: linear-gradient(90deg, #0050c8 0%, #007bff 55%, #00a2ff 100%);
    color: #ffffff;
}

.app-header .navbar-brand {
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* Shared white card */
.card-soft {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 18px 40px rgba(0, 40, 80, 0.08);
    background: rgba(255, 255, 255, 0.96);
}

/* Title text */
.heading-primary {
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-dark);
}

.heading-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
}

/* ====================================
   Public search form
   ==================================== */

.search-form {
    max-width: 500px;
    margin: 50px auto;
    background: #ffffff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.search-form .form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-search {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    color: #ffffff;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* ====================================
   PDF Viewer Container
   ==================================== */

.pdf-page-wrapper {
    background: #f3f6fb;
    min-height: 100vh;
}

.pdf-viewer-card {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1rem;
}

.pdf-viewer-header {
    border-bottom: 1px solid #e5e8ef;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.pdf-viewer-body {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
    border-radius: 0.5rem;
}

.pdf-object {
    width: 100%;
    height: 100%;
    border: none;
}


/* ====================================
   Messages
   ==================================== */

.messages-table {
    background-color: #ffffff;
    border-radius: 10px;
}

.messages-table th,
.messages-table td {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    font-size: 0.9rem;
}

.messages-table tr.unread-row {
    background-color: #E5F1FB;      /* light blue background */
}

.messages-table tr.unread-row .msg-time,
.messages-table tr.unread-row small,
.messages-table tr.unread-row .msg-preview {
    font-weight: 600;               /* bold text */
    color: #0F6CBD;                 /* darker text */
}

.messages-table tbody tr.read-row {
    background-color: #FFFFFF;
}

.messages-table tr.read-row .msg-time,
.messages-table tr.read-row small,
.messages-table tr.read-row .msg-preview {
    font-weight: 400;
    color: #444444;                 /* muted grey */
}

.messages-table tbody tr:hover {
    background-color: #f3f6ff;
}

.messages-table tbody tr.collapse > td {
    background-color: #f8fafc;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.messages-table .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.45rem;
}

.messages-table .message-full {
    margin-left: 0.5rem;
}

.messages-table td .msg-time {
    display: block;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8rem;
    color: #4b5563;
}

.messages-table td .msg-preview {
    display: block;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #6b7280;
}
/*
.messages-table .badge.bg-success {
    border-color: #198754;
    color: #198754;
}

.messages-table .btn-outline-success {
    border-color: #198754;
    color: #198754;
}

.messages-table .btn-outline-success:hover {
    background-color: #198754;
    color: #fff;
}
*/

/* ====================================
   Upload-Confirm
   ==================================== */

.table-compact {
    font-size: 0.875rem;
    line-height: 1.1;
}

.table-compact th,
.table-compact td {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.cell-warning {
    background-color: #fff3cd;
}

.confirm-table-wrapper {
    max-height: 60vh;
    overflow-y: auto;
}

.confirm-table-wrapper table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f8f9fa;
}

/* ====================================
   Report cards & admin list
   ==================================== */

.report-card {
    border-left: 5px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: #ffffff;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.btn-view,
.btn-download {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    margin: 0 5px;
    border: none;
    color: #ffffff;
}

.btn-view {
    background: linear-gradient(45deg, var(--success-color), #218838);
}

.btn-download {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
}

.table-admin {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.table-admin th {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 15px;
}

.table-admin td {
    padding: 15px;
    vertical-align: middle;
}

.status-new {
    color: var(--success-color);
    font-weight: bold;
}

.status-viewed {
    color: #6c757d;
    font-weight: bold;
}

.btn-reset {
    background: var(--success-color);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: #ffffff;
}

.btn-delete {
    background: var(--danger-color);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: #ffffff;
}

.drop-zone {
    border: 2px dashed #0d6efd;
    border-radius: 0.5rem;
    padding: 30px 15px;
    background-color: #f8f9ff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.drop-zone.drag-over {
    background-color: #e7f1ff;
    border-color: #0a58ca;
}

.btn-pulse {
    animation: btn-pulse 1s ease-in-out infinite;
}

@keyframes btn-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 6px rgba(13, 110, 253, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.0);
    }
}

.selected-file-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    margin-bottom: 6px;
    border-radius: 8px;
    background-color: #f8f9ff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.selected-file-item:hover {
    background-color: #eef3ff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.selected-file-remove {
    margin-right: 10px;
    color: #dc3545;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0 6px;
    line-height: 1;
}

.selected-file-remove:hover {
    color: #b02a37;
}

.selected-file-name {
    flex: 1;
    word-break: break-all;
}

#selected-files-info {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 992px) {
    .app-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .app-main-wrapper {
        padding-top: 1rem;
        padding-bottom: 1.5rem;
    }

    .search-form {
        margin: 20px 15px;
        padding: 1.5rem;
    }

    .app-container {
        padding: 0 10px;
    }

    .btn-view,
    .btn-download {
        width: 100%;
        margin: 5px 0;
    }
}

@media (max-width: 576px) {
    .search-form h1 {
        font-size: 1.5rem;
    }
}


.language-switcher .btn-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
}
.language-switcher .active {
    color: #007bff;
    font-weight: bold;
    cursor: default;
}
.language-switcher .disabled {
    pointer-events: none;
    opacity: 0.6;
}








.smallwechcode {
    display: none;
}

.bigwechcode {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.bigwechcode > div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
