:root {
    --primary: #0a2540; --primary-hover: #1e3a5a; --secondary: #00d2ff; --accent: #00b4d8; 
    --bg-dark: #f8fafc; --bg-card: #ffffff; --text-main: #0f172a; --text-muted: #64748b; 
    --border: #e2e8f0; --glass-bg: rgba(255, 255, 255, 0.8); --glass-border: rgba(10, 37, 64, 0.1);
    --shadow: 0 4px 6px -1px rgba(10, 37, 64, 0.1), 0 2px 4px -1px rgba(10, 37, 64, 0.06); 
    --font-main: 'Inter', sans-serif; --font-display: 'Outfit', sans-serif;
    --report-header-bg: #f8fafc;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-main); background-color: var(--bg-dark); color: var(--text-main); min-height: 100vh; overflow-x: hidden; }
.layout-container { display: flex; height: 100vh; width: 100vw; overflow: hidden; }
.sidebar { width: 260px; height: 100%; background: #ffffff; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 20px; flex-shrink: 0; }
.sidebar-logo { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-bottom: 24px; color: var(--primary); display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--text-muted); border-radius: 8px; margin-bottom: 4px; font-weight: 500; transition: 0.2s; background: none; border: none; width: 100%; text-align: left; cursor: pointer; }
.nav-link:hover, .nav-link.active { background: rgba(10, 37, 64, 0.05); color: var(--primary); }
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.top-bar { height: 60px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: #ffffff; flex-shrink: 0; }
.glass-card { background: var(--bg-card); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.btn-primary { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 4px; font-weight: 600; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 8px; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

/* Pane Layout */
.pane-left { width: 320px; border-right: 1px solid var(--border); background: #ffffff; display: flex; flex-direction: column; padding: 20px; flex-shrink: 0; height: 100%; overflow-y: auto; }
.pane-right { flex: 1; background: #f1f5f9; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 40px 0; }

/* Doc List Items */
.doc-list-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; margin-bottom: 4px; cursor: pointer; transition: 0.2s; border: 1px solid transparent; }
.doc-list-item:hover { background: #f8fafc; border-color: var(--border); }
.doc-list-item.active { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.month-header { padding: 10px 12px; font-weight: 800; color: var(--primary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; justify-content: space-between; cursor: pointer; margin-top: 10px; }

/* Report PDF High-Fidelity Styles */
.report-container { background: white; color: #1e293b; padding: 50px 40px; width: 1060px; height: 1499px; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; position: relative; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-radius: 4px; }
.paper-inner { flex: 1; display: flex; flex-direction: column; }
.report-title-box { text-align: center; margin-bottom: 25px; position: relative; }
.report-title-box h1 { font-family: var(--font-display); font-size: 2.5rem; font-weight: 900; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; }
.report-title-box .page-tag { font-size: 0.9rem; color: var(--accent); margin-top: 8px; font-weight: 700; }
.report-title-box::after { content: ''; display: block; width: 80px; height: 4px; background: var(--accent); margin: 10px auto 0; }

.report-section { margin-bottom: 25px; }
.report-section-title { font-size: 0.95rem; font-weight: 800; color: var(--primary); margin-bottom: 12px; text-transform: uppercase; border-bottom: 2px solid var(--primary); padding-bottom: 4px; }

.info-grid { border: 1px solid #cbd5e1; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.info-row { display: flex; border-bottom: 1px solid #e2e8f0; }
.info-row:last-child { border-bottom: none; }
.info-cell { display: flex; flex: 1; border-right: 1px solid #e2e8f0; }
.info-cell:last-child { border-right: none; }
.info-label { width: 130px; background: #f8fafc; padding: 10px 15px; font-size: 0.8rem; font-weight: 700; color: var(--primary); border-right: 1px solid #e2e8f0; display: flex; align-items: center; }
.info-value { flex: 1; padding: 10px 15px; font-size: 0.85rem; display: flex; align-items: center; }

.inspection-table { width: 100%; border-collapse: collapse; border: 1px solid #cbd5e1; }
.inspection-table th { background: #f8fafc; padding: 10px; font-size: 0.85rem; font-weight: 700; color: var(--primary); border: 1px solid #cbd5e1; text-align: center; }
.inspection-table td { padding: 8px 12px; font-size: 0.85rem; border: 1px solid #cbd5e1; height: 36px; position: relative; }
.status-pill { padding: 4px 10px; border-radius: 4px; font-weight: 800; font-size: 0.75rem; display: inline-flex; align-items: center; gap: 4px; }
.status-normal { color: #059669; }
.status-abnormal { color: #ef4444; }

/* Merge cell style */
.merged-cell { border-top: 1px solid transparent !important; color: transparent !important; }
.merged-cell::before { content: ''; }

.remarks-box { border: 1px solid #cbd5e1; border-radius: 4px; flex: 1; min-height: 100px; padding: 15px; font-size: 0.85rem; color: #334155; line-height: 1.6; }

.footer-area { margin-top: auto; padding-top: 20px; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: flex-end; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-weight: 900; color: var(--primary); opacity: 0.8; }
.footer-text { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }

/* Account Management */
.status-badge { padding: 4px 8px; border-radius: 99px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.status-badge.success { background: #d1fae5; color: #065f46; }
.status-badge.failure { background: #fee2e2; color: #991b1b; }

/* Utilities */
.form-input { width: 100%; padding: 10px 12px; background: #ffffff; border: 1px solid var(--border); border-radius: 6px; color: var(--text-main); outline: none; margin-bottom: 12px; font-size: 0.9rem; transition: 0.2s; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.1); }
.btn-icon { background: none; border: none; padding: 6px; cursor: pointer; color: var(--text-muted); transition: 0.2s; border-radius: 4px; }
.btn-icon:hover { background: #f1f5f9; color: var(--primary); }

.tab-btn { padding: 10px 20px; border: none; background: none; font-weight: 700; color: var(--text-muted); cursor: pointer; border-bottom: 3px solid transparent; transition: 0.2s; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

@media print {
    body * { visibility: hidden; }
    .report-container, .report-container * { visibility: visible; }
    .report-container { position: absolute; left: 0; top: 0; width: 210mm; height: 297mm; padding: 15mm; margin: 0; box-shadow: none; }
}
