/**
 * Theme Name: CyberLab Genesis (實驗室科技風 + 發光藍)
 * Version: 1.1.0
 * Description: A futuristic, laboratory-themed UI with neon blue accents, glassmorphism, and high-performance layout.
 * Author: Antigravity AI
  */

:root {
    --primary: #00d4ff;
    --secondary: #00a8ff;
    --accent: #10b981;
    --danger: #FFB300;
    --warning: #FFD600;
    --bg-dark: #0a0f1d;
    --card-bg: rgba(20, 30, 50, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --shadow-neon: 0 0 20px rgba(0, 212, 255, 0.4);
    --glass-blur: blur(20px);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 40%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

/* Background Decoration */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Typography & Headers */
h1, h2, h3, .orbitron {
    font-family: 'Orbitron', sans-serif;
}

/* Navigation & Buttons */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.back-btn, .btn, .btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--primary);
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
    backdrop-filter: blur(5px);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.back-btn:hover, .btn:hover, .btn-submit:hover {
    background: var(--primary);
    color: #000;
    transform: scale(1.05);
    box-shadow: var(--shadow-neon);
}

.btn-danger, .logout-link {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(255, 179, 0, 0.1);
}

.btn-danger:hover, .logout-link:hover {
    background: var(--danger);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 179, 0, 0.4);
    transform: scale(1.05);
}

.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--danger);
    backdrop-filter: blur(5px);
    cursor: pointer;
}


/* Header & Logo Section */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo-img {
    height: 100px;
    width: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 0 35px rgba(0, 212, 255, 0.5);
    animation: pulse 3s infinite ease-in-out;
    margin-bottom: 25px;
}

.header h1 {
    font-size: 3.2em;
    font-weight: 800;
    background: linear-gradient(180deg, #ffffff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
    margin: 0;
    text-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    line-height: 1.2;
}

.header .subtitle {
    color: var(--text-muted);
    font-size: 1.25em;
    margin-top: 15px;
    letter-spacing: 6px;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    opacity: 0.8;
}

/* Status Bar */
.status-bar {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.status-bar .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-bar .status-dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

.status-bar a {
    color: var(--primary);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    transition: all 0.3s;
    margin-left: 10px;
}

.status-bar a:hover {
    background: var(--primary);
    color: #000;
}

/* Menu Grid & Cards */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.menu-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.4s;
}

.menu-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 212, 255, 0.1);
}

.menu-card:hover::before {
    transform: scaleX(1);
}

.menu-card .card-icon {
    width: 100%;
    height: 160px;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.menu-card .card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-card:hover .card-icon img {
    transform: scale(1.1);
}

.menu-card .card-title {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.menu-card .card-desc {
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.6;
}

.menu-card.full {
    --card-accent: var(--warning);
    background: linear-gradient(135deg, rgba(255, 179, 0, 0.1) 0%, var(--card-bg) 100%);
}

/* Sections & Typography */
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 50px 0 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), transparent);
}

/* Cards & Containers */
.glass-card, .login-card, .table-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.login-card {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.type-full .login-card {
    max-width: 800px;
}

/* Login Header / Icon Box */
.icon-box {
    width: calc(100% + 80px);
    height: 160px;
    margin: -40px -40px 25px -40px;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    border-bottom: 1px solid var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.icon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
    transition: 0.6s;
}

.login-card:hover .icon-box img {
    filter: brightness(1);
    transform: scale(1.05);
}

.card-header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

.header-back {
    position: absolute;
    left: 0;
    top: 175px;
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    padding: 6px 16px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    transition: 0.3s;
    z-index: 10;
}

.header-back:hover {
    background: rgba(0, 212, 255, 0.2);
    color: #fff;
    transform: translateX(5px);
}

.card-header h2 {
    font-size: 1.6rem;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-top: 40px;
}

/* Forms */
.form-group, .form-group-advanced {
    margin-bottom: 25px;
}

.form-group-advanced {
    flex: 1 1 calc(50% - 15px);
    min-width: 300px;
}

.form-group label, .form-group-advanced label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
}

.form-group input, .form-group-advanced input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 18px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus, .form-group-advanced input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.advanced-form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 30px;
}

.hint-text-small {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
    display: block;
}

/* Date Pickers */
.date-box-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
}

.date-range-title {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.date-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.date-box {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.date-label {
    color: var(--primary);
    font-weight: 800;
    min-width: 25px;
}

.date-box input {
    width: 50px;
    padding: 8px 3px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--primary);
}

.date-box input.year-input {
    width: 70px;
}

/* Banner / Header Section */
.report-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--glass-border);
}

.header-icon, .patient-avatar {
    width: 80px;
    height: 80px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    overflow: hidden;
}

.header-icon img, .patient-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-info h1 {
    font-size: 1.8rem;
    color: var(--primary);
    letter-spacing: 2px;
}

/* Info Grids */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid var(--secondary);
    transition: transform 0.3s;
}

.info-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.info-box.highlight {
    border-left-color: var(--primary);
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Search Box */
/* Search Box Redesign - No absolute positioning */
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px 15px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.search-icon {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

.search-icon::before {
    content: '🔍';
    font-size: 1.1rem;
}

.search-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 1rem;
    padding: 10px 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.clear-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 6px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s;
}

.clear-btn:hover {
    background: var(--danger);
    color: #fff;
}

.result-count {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 15px;
    white-space: nowrap;
}

/* Filter Summary (for search ranges) */
.filter-summary {
    font-size: 0.85em;
    color: var(--primary);
    margin-bottom: 15px;
    background: rgba(0, 212, 255, 0.05);
    padding: 8px 15px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    display: inline-block;
}

.filter-label {
    opacity: 0.7;
}

.filter-separator {
    margin-left: 10px;
    opacity: 0.7;
}

/* Button Variants */
.btn-view, .btn-view:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 20px;
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary) !important;
    border-radius: 50px;
    font-size: 0.85em;
    font-weight: 700;
    text-decoration: none !important;
    border: 1px solid var(--primary);
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.1);
}

.btn-view:hover {
    background: var(--primary);
    color: #000 !important;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

/* Tables */
.data-table, .report-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .report-table th {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    padding: 15px;
    text-align: left;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
}

.data-table td, .report-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95em;
}

.data-table tr:nth-child(even) td, .report-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tr:hover td, .report-table tr:hover td {
    background: rgba(255, 255, 0, 0.2) !important;
    transition: 0.2s;
}

.report-footnote {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.footnote-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.footnote-symbol {
    color: var(--primary);
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}

.mk-up { color: #ff4d4d !important; }
.mk-down { color: #00d4ff !important; }
.symbol-danger { color: #ffb300 !important; }
.symbol-low { color: #3b82f6 !important; }

/* Abnormal Values */
.abnormal-value {
    color: var(--danger) !important;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(255, 179, 0, 0.6);
}

.mk-cell {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    width: 40px;
}

/* Alerts */
.alert {
    background: rgba(255, 77, 77, 0.15);
    border: 1px solid var(--danger);
    color: #ffb3b3;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
}

/* Footer Section */
.footer {
    text-align: center;
    margin-top: 80px;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.9em;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-simple {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 40px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: 'Orbitron', sans-serif;
}

.footer-system-info {
    margin-top: 12px;
    font-size: 0.85em;
    opacity: 0.6;
    letter-spacing: 1px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container { padding: 20px 10px; }
    
    .glass-card, .login-card, .table-card { padding: 20px 15px; border-radius: 16px; }
    
    .header h1 { font-size: 1.8em; letter-spacing: 1px; }
    .header .subtitle { font-size: 0.9em; letter-spacing: 3px; }
    
    .advanced-form-container { flex-direction: column; }
    .form-group-advanced { min-width: 100%; }
    
    .top-nav { flex-direction: column; gap: 15px; align-items: center; text-align: center; }
    .top-nav div { width: 100%; display: flex; justify-content: center; gap: 8px; }
    
    .info-grid { grid-template-columns: 1fr; gap: 12px; }
    
    .search-box { flex-wrap: wrap; padding: 12px; gap: 12px; }
    .search-icon { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; }
    .search-input { width: 100%; flex: none; order: 2; padding: 12px 0 !important; }
    .clear-btn { order: 3; flex: 1; text-align: center; }
    .result-count { order: 4; flex: 1; border-left: none; text-align: right; padding-left: 0; }
    
    .data-table thead, .report-table thead { display: none; }
    .data-table tr, .report-table tr { 
        margin-bottom: 20px;
        display: block;
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.02) !important;
        overflow: hidden;
    }
    
    .data-table td, .report-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .data-table td:last-child, .report-table td:last-child { border-bottom: none; }
    
    .data-table td::before, .report-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--primary);
        text-align: left;
        flex: 1;
        font-size: 0.82rem;
        margin-right: 10px;
    }
    
    .btn-view { width: 100%; padding: 10px; margin-top: 5px; }

    .report-header { flex-direction: column; text-align: center; gap: 15px; }
    .header-icon, .patient-avatar { margin: 0 auto; width: 60px; height: 60px; }
    .header-info h1 { font-size: 1.4rem; }
    
    .report-footnote { flex-direction: column; gap: 10px; padding: 15px; }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* --- Security & Utility Classes (For CSP Compliance) --- */
.flex-gap-10 {
    display: flex;
    gap: 10px;
}

.orbitron-muted-small {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.orbitron-muted-normal {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.noto-muted-desc {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.6;
}

.text-secondary {
    color: var(--secondary);
}

.text-muted {
    color: var(--text-muted);
}

.font-06em {
    font-size: 0.6em;
}

.border-none {
    border-bottom: none !important;
}

.pb-0 {
    padding-bottom: 0 !important;
}

.fw-500 {
    font-weight: 500;
}

.mt-8 {
    margin-top: 8px;
}

.update-status {
    font-size: 12px;
    color: var(--primary);
    text-align: center;
    min-height: 18px;
}

/* ===== Print Styles for A4 (白底黑字) ===== */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* 白底 */
    body {
        background: white !important;
        background-image: none !important;
        color: #000 !important;
    }

    .container {
        max-width: 100%;
        padding: 5mm;
    }

    /* 隱藏工具列和頁尾 */
    .top-nav,
    .footer-simple,
    .bg-animation {
        display: none !important;
    }

    /* 卡片區塊 - 移除外框線 */
    .glass-card, .table-card {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        padding: 15px 0 !important;
    }

    /* 標題區 - 強制水平排列 */
    .report-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        gap: 20px !important;
        border-bottom: 2px solid #333 !important;
    }

    .header-info h1 {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
        font-size: 1.6rem !important;
    }

    .patient-avatar {
        border-color: #333 !important;
        margin: 0 !important;
        width: 60px !important;
        height: 60px !important;
    }

    /* 資訊區塊 - 強制四欄網格 */
    .info-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 15px !important;
    }

    .info-box {
        background: #f8f8f8 !important;
        border-left: 4px solid #333 !important;
        padding: 12px !important;
    }

    .info-label {
        color: #666 !important;
        font-size: 0.7rem !important;
    }

    .info-value {
        color: #000 !important;
        font-size: 1rem !important;
    }

    /* 表格 - 強制桌面版表格佈局 */
    .table-responsive {
        overflow: visible !important;
    }

    .report-table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    /* 強制顯示表頭 */
    .report-table thead {
        display: table-header-group !important;
    }

    /* 強制使用表格行佈局 */
    .report-table tr {
        display: table-row !important;
        margin-bottom: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .report-table th {
        display: table-cell !important;
        background: #e0e0e0 !important;
        color: #000 !important;
        border: 1px solid #999 !important;
        padding: 8px !important;
        text-align: left !important;
    }

    .report-table td {
        display: table-cell !important;
        color: #000 !important;
        border: 1px solid #ccc !important;
        padding: 6px 8px !important;
        text-align: left !important;
    }

    /* 隱藏手機版的 data-label */
    .report-table td::before {
        display: none !important;
        content: none !important;
    }

    .report-table tr:nth-child(even) td {
        background: #f5f5f5 !important;
    }

    .report-table tr:hover td {
        background: inherit !important;
    }

    /* 異常值保留紅色 */
    .abnormal-value {
        color: #cc0000 !important;
    }

    .mk-up {
        color: #cc0000 !important;
    }

    .mk-down {
        color: #000 !important;
    }

    /* 註記區 - 強制水平排列 */
    .report-footnote {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 20px !important;
        background: #f8f8f8 !important;
        border: 1px solid #ccc !important;
        padding: 10px 15px !important;
    }

    .footnote-symbol {
        color: #000 !important;
    }

    .footnote-item {
        color: #333 !important;
    }

    /* A4 頁面設定 */
    @page {
        size: A4;
        margin: 8mm;
    }
}
