/* ===== 全局变量 ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --bg: #f0f4f8;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-sm: 6px;
  --day-color: #2563eb;
  --night-color: #7c3aed;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== 顶部导航 ===== */
.topbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-center { flex: 1; display: flex; justify-content: center; }
.app-title { font-size: 18px; font-weight: 700; white-space: nowrap; }

.icon-btn {
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px;
  cursor: pointer; font-size: 18px; transition: all 0.15s;
}
.icon-btn:hover { background: var(--bg); border-color: var(--primary); }

/* 角色切换 */
.role-switcher { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: var(--radius); }
.role-btn {
  border: none; background: none; padding: 6px 14px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
  color: var(--text-light); transition: all 0.15s; white-space: nowrap;
}
.role-btn:hover { color: var(--text); }
.role-btn.active { background: var(--card-bg); color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }

/* ===== 主布局 ===== */
.main-layout { display: flex; min-height: calc(100vh - 56px); }

/* ===== 侧边栏 ===== */
.sidebar {
  width: 260px; background: var(--sidebar-bg); color: var(--sidebar-text);
  padding: 16px 0; flex-shrink: 0; overflow-y: auto;
  transition: transform 0.25s, width 0.25s;
}
.sidebar.collapsed { width: 0; padding: 0; overflow: hidden; }
.sidebar-section { padding: 0 12px; margin-bottom: 20px; }
.sidebar-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-lighter); margin-bottom: 8px; padding: 0 8px; }
/* 可折叠标题 */
.sidebar-title.collapsible-title { cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: space-between; transition: color 0.15s; }
.sidebar-title.collapsible-title:hover { color: var(--sidebar-text); }
.collapse-arrow { font-size: 10px; transition: transform 0.2s; }
.sidebar-title.collapsed .collapse-arrow { transform: rotate(-90deg); }
.sidebar-section-content { overflow: hidden; max-height: 1000px; transition: max-height 0.25s ease, opacity 0.2s; opacity: 1; }
.sidebar-section.collapsed .sidebar-section-content { max-height: 0; opacity: 0; }
/* 桌面端侧边栏收起时内容区自动撑满 */
.main-layout.sidebar-collapsed .content { margin-left: 0; }
.sidebar-toggle-btn { display: none; }
@media (min-width: 769px) {
  .main-layout.sidebar-collapsed .sidebar { width: 0; padding: 0; }
  .sidebar-toggle-btn { display: flex; }
}
.report-type-list { display: flex; flex-direction: column; gap: 4px; }
.report-type-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: none; background: none; color: var(--sidebar-text);
  border-radius: var(--radius-sm); cursor: pointer; text-align: left; font-size: 14px;
  transition: all 0.15s;
}
.report-type-btn:hover { background: rgba(255,255,255,0.08); }
.report-type-btn .rt-icon { font-size: 18px; }

.sidebar-history { flex: 1; }
.history-list { display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow-y: auto; }
.history-item {
  padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; transition: all 0.15s; border-left: 3px solid transparent;
}
.history-item:hover { background: rgba(255,255,255,0.08); }
.history-item.active { background: rgba(37,99,235,0.2); border-left-color: var(--primary); }
.history-item .hi-type { font-weight: 600; }
.history-item .hi-meta { font-size: 11px; color: var(--text-lighter); }
.history-item .hi-badge { font-size: 10px; padding: 1px 6px; border-radius: 10px; margin-left: 4px; }
.badge-day { background: rgba(37,99,235,0.3); color: #93c5fd; }
.badge-night { background: rgba(124,58,237,0.3); color: #c4b5fd; }

/* ===== 内容区 ===== */
.content { flex: 1; padding: 20px; overflow-y: auto; max-width: 100%; }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h2 { font-size: 22px; color: var(--text); margin-bottom: 8px; }
.empty-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; max-width: 600px; margin: 32px auto 0; }
.feature-card { background: var(--card-bg); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 8px; transition: transform 0.15s, box-shadow 0.15s; }
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 32px; }

/* ===== 报告表单 ===== */
.report-header {
  background: var(--card-bg); border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 16px; box-shadow: var(--shadow);
}
.report-header h2 { font-size: 18px; margin-bottom: 12px; }
.report-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.meta-field { display: flex; flex-direction: column; gap: 4px; }
.meta-field label { font-size: 12px; color: var(--text-light); font-weight: 600; }
.meta-field input, .meta-field select {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; min-width: 120px;
}
.meta-field input:focus, .meta-field select:focus { outline: none; border-color: var(--primary); }

.shift-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.shift-toggle button { border: none; padding: 6px 16px; cursor: pointer; font-size: 13px; background: none; }
.shift-toggle button.active.day { background: var(--day-color); color: white; }
.shift-toggle button.active.night { background: var(--night-color); color: white; }

/* 统计区 */
.stats-section { background: var(--card-bg); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 12px; box-shadow: var(--shadow); }
.stats-section h3 { font-size: 15px; margin-bottom: 12px; color: var(--text); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.stat-item { display: flex; flex-direction: column; gap: 4px; }
.stat-item label { font-size: 12px; color: var(--text-light); }
.stat-item input {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px;
}
.stat-item input:focus { outline: none; border-color: var(--primary); }

/* 表格区 */
.records-section {
  background: var(--card-bg); border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 16px; box-shadow: var(--shadow); overflow-x: auto;
}
.records-section h3 { font-size: 15px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.records-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.records-table th {
  background: var(--bg); padding: 8px 10px; text-align: left; font-size: 12px;
  color: var(--text-light); font-weight: 600; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.records-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.records-table input, .records-table textarea {
  width: 100%; border: 1px solid transparent; border-radius: 4px; padding: 4px 6px;
  font-size: 13px; font-family: inherit; resize: vertical; background: transparent;
}
.records-table input:focus, .records-table textarea:focus { outline: none; border-color: var(--primary); background: white; }
.records-table .col-room { width: 80px; }
.records-table .col-name { width: 90px; }
.records-table .col-level { width: 90px; }
.records-table .col-actions { width: 110px; white-space: nowrap; }
.records-table .row-num { color: var(--text-lighter); font-size: 12px; text-align: center; width: 36px; }

/* 行操作按钮 */
.row-actions { display: flex; gap: 4px; align-items: center; }
.row-actions button { border: none; background: none; cursor: pointer; font-size: 16px; padding: 2px; border-radius: 4px; transition: all 0.15s; }
.row-actions button:hover { background: var(--bg); }
.row-actions .btn-delete:hover { background: #fee2e2; }
.att-count { font-size: 10px; background: var(--primary-light); color: var(--primary); padding: 1px 5px; border-radius: 8px; }
.att-count-display { display: inline-flex; align-items: center; }
.att-count-badge { font-size: 10px; background: var(--primary); color: white; padding: 1px 6px; border-radius: 8px; font-weight: 600; min-width: 16px; text-align: center; }

/* 附件区 */
.attachments-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.att-thumb {
  width: 44px; height: 44px; border-radius: 4px; object-fit: cover; cursor: pointer;
  border: 1px solid var(--border); transition: transform 0.15s;
}
.att-thumb:hover { transform: scale(1.1); }
.att-audio-thumb {
  width: auto; height: 44px; padding: 0 10px; display: flex; align-items: center; gap: 4px;
  background: var(--primary-light); border-radius: 4px; cursor: pointer; font-size: 12px; color: var(--primary);
}
.att-remove { font-size: 12px; color: var(--danger); cursor: pointer; margin-left: 2px; }

/* 签字区 */
.sign-section {
  background: var(--card-bg); border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 16px; box-shadow: var(--shadow);
}
.sign-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.sign-item { display: flex; flex-direction: column; gap: 4px; }
.sign-item label { font-size: 12px; color: var(--text-light); font-weight: 600; }
.sign-item input { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.sign-item input:focus { outline: none; border-color: var(--primary); }

/* 交班要求提示 */
.requirements-box {
  background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-size: 13px; color: #78350f;
}
.requirements-box strong { display: block; margin-bottom: 4px; }
.requirements-box ul { padding-left: 18px; }
.requirements-box li { margin-bottom: 2px; }

/* 底部操作栏 */
.action-bar {
  display: flex; gap: 12px; justify-content: flex-end; padding: 12px 0;
}
.btn {
  padding: 8px 20px; border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 14px; font-weight: 600; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #15803d; }
.btn-sm { padding: 4px 12px; font-size: 12px; }

/* ===== 语音录入浮层 ===== */
.voice-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.voice-overlay-content { background: white; padding: 32px; border-radius: 16px; text-align: center; max-width: 400px; width: 90%; }
.voice-pulse {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--primary-light); display: flex; align-items: center; justify-content: center;
  font-size: 36px; animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.voice-text { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.voice-transcript { font-size: 14px; color: var(--text-light); min-height: 60px; max-height: 200px; overflow-y: auto; text-align: left; background: var(--bg); padding: 12px; border-radius: var(--radius-sm); }
.voice-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }

/* ===== 录音/拍照浮层 ===== */
.recorder-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.recorder-content { text-align: center; max-width: 600px; width: 90%; }
.camera-preview { max-width: 100%; max-height: 60vh; border-radius: var(--radius); background: black; }
.audio-recording { color: white; font-size: 24px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px; }
.rec-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.recorder-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
#photo-canvas { max-width: 100%; max-height: 60vh; border-radius: var(--radius); }

/* 桌面端更紧凑的网格 */
@media (min-width: 1024px) {
  .content { max-width: 1400px; }
  .stats-grid { gap: 10px; }
  .stat-item { gap: 2px; }
}

/* ===== 附件预览 ===== */
.attachment-viewer {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.viewer-content { max-width: 90vw; max-height: 90vh; position: relative; }
.viewer-close { position: absolute; top: -40px; right: 0; background: white; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px; }
.viewer-content img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius); }
.viewer-content audio { width: 400px; max-width: 90vw; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: white; padding: 10px 24px; border-radius: var(--radius);
  font-size: 14px; z-index: 2000; box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ===== 工具类 ===== */
.hidden { display: none !important; }

/* 护理员记录表 */
.caregiver-records { display: flex; flex-direction: column; gap: 12px; }
.caregiver-record {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px;
  background: var(--bg);
}
.caregiver-record textarea {
  width: 100%; min-height: 80px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px; font-size: 13px; font-family: inherit; resize: vertical; background: white;
}
.caregiver-record textarea:focus { outline: none; border-color: var(--primary); }
.caregiver-record .cr-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

/* 响应式 */
@media (max-width: 768px) {
  .topbar-center { display: none; }
  .sidebar { position: fixed; left: 0; top: 56px; bottom: 0; z-index: 50; transform: translateX(-100%); width: 280px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; }
  .content { padding: 12px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .records-table { min-width: 500px; }
  .report-meta { flex-direction: column; align-items: stretch; }
  .report-meta .meta-field { min-width: 100%; }
  .shift-toggle button { padding: 6px 10px; font-size: 12px; }
  .action-bar { flex-wrap: wrap; }
  .action-bar .btn { flex: 1; min-width: 120px; justify-content: center; }
}

/* 移动端角色选择条 */
.mobile-role-bar { display: none; }
@media (max-width: 768px) {
  .mobile-role-bar {
    display: flex; overflow-x: auto; gap: 4px; padding: 6px 12px;
    background: var(--card-bg); border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
  }
  .mobile-role-bar .role-btn { flex-shrink: 0; padding: 6px 14px; font-size: 12px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg); }
  .mobile-role-bar .role-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: none; }
}

/* 侧边栏遮罩 */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 40; }
.sidebar-backdrop.show { display: block; }

/* 历史搜索栏 */
.history-search { display: flex; gap: 6px; margin-bottom: 8px; padding: 0 4px; }
.history-search input {
  flex: 1; padding: 5px 8px; border: 1px solid var(--text-lighter); border-radius: var(--radius-sm);
  font-size: 12px; background: rgba(255,255,255,0.1); color: var(--sidebar-text);
}
/* 侧边栏统计概览 */
.sidebar-stats { display: flex; flex-direction: column; gap: 6px; }
.sidebar-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; background: rgba(255,255,255,0.05); border-radius: var(--radius-sm); font-size: 12px; }
.sidebar-stat-row .ss-label { color: var(--text-lighter); }
.sidebar-stat-row .ss-value { font-weight: 600; color: var(--sidebar-text); }

/* 历史搜索栏 */
.history-search input::placeholder { color: var(--text-lighter); }
.history-search input:focus { outline: none; border-color: var(--primary); background: rgba(255,255,255,0.15); }
.history-search select {
  padding: 5px 6px; border: 1px solid var(--text-lighter); border-radius: var(--radius-sm);
  font-size: 12px; background: rgba(255,255,255,0.1); color: var(--sidebar-text); cursor: pointer;
}
.history-search select option { background: var(--sidebar-bg); }

/* 自动保存指示器 */
.save-indicator {
  position: fixed; bottom: 20px; right: 20px; background: var(--card-bg);
  padding: 6px 14px; border-radius: 20px; box-shadow: var(--shadow-lg);
  font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 6px;
  z-index: 90; transition: opacity 0.3s;
}
.save-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.save-indicator.saving .save-dot { background: var(--warning); animation: blink 0.8s infinite; }

/* 交班要求可折叠 */
.requirements-box { cursor: pointer; user-select: none; }
.requirements-box .req-toggle { float: right; font-size: 12px; font-weight: normal; }
.requirements-box.collapsed ul { display: none; }
.requirements-box.collapsed .req-toggle::before { content: '展开 ▼'; }
.requirements-box .req-toggle::before { content: '收起 ▲'; }

/* 时间快速填充按钮 */
.time-fill-btn {
  border: 1px solid var(--border); background: var(--bg); border-radius: 4px;
  padding: 2px 8px; font-size: 11px; cursor: pointer; color: var(--primary);
  white-space: nowrap;
}
.time-fill-btn:hover { background: var(--primary-light); }
.sign-item { position: relative; }
.sign-item .time-fill-btn { position: absolute; right: 8px; bottom: 6px; }

/* 复制上一班按钮 */
.copy-prev-btn {
  font-size: 11px; padding: 3px 10px; border: 1px solid var(--primary);
  background: var(--primary-light); color: var(--primary); border-radius: 12px;
  cursor: pointer; white-space: nowrap;
}
.copy-prev-btn:hover { background: var(--primary); color: white; }

/* 校验高亮 */
input.required-error, textarea.required-error, select.required-error {
  border-color: var(--danger) !important; background: #fef2f2 !important;
  animation: shake 0.3s;
}
@keyframes shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-3px);} 75%{transform:translateX(3px);} }

/* 审核模式 */
.supervisor-banner {
  background: linear-gradient(135deg, #16a34a, #15803d); color: white;
  padding: 12px 20px; border-radius: var(--radius); margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.supervisor-banner .sb-icon { font-size: 24px; }
.supervisor-banner .sb-text { flex: 1; }
.supervisor-banner .sb-text strong { font-size: 15px; }
.supervisor-banner .sb-text p { font-size: 12px; opacity: 0.9; }

/* 状态标签 */
.status-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.status-draft { background: #fef3c7; color: #92400e; }
.status-submitted { background: #dbeafe; color: #1e40af; }
.status-signed { background: #d1fae5; color: #065f46; }

/* 主管签字区 */
.supervisor-sign-area { display: inline-flex; gap: 12px; align-items: center; margin-right: auto; }
.ssa-field { display: flex; flex-direction: column; gap: 2px; }
.ssa-field label { font-size: 12px; color: var(--text-light); font-weight: 600; }
.ssa-field input { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.ssa-field input:focus { outline: none; border-color: var(--primary); }
.signed-tag { display: inline-flex; align-items: center; gap: 4px; background: #d1fae5; color: #065f46; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-right: 8px; }
.att-thumb-placeholder { width: 44px; height: 44px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--border); font-size: 20px; cursor: pointer; }

/* 打印样式 */
@media print {
  .topbar, .sidebar, .row-actions, .icon-btn, .role-switcher,
  .mobile-role-bar, .sidebar-backdrop, .save-indicator, .requirements-box,
  .voice-input-btn, .add-row, #toast { display: none !important; }
  /* 主管签字区在打印模式中保留可见（显示签字人姓名和时间） */
  .supervisor-sign-area { display: inline-flex !important; }
  .signed-tag { display: inline-flex !important; }
  .ssa-field { display: flex !important; }
  .action-bar { display: block !important; border-top: 1px solid #ccc; padding-top: 8px; margin-top: 8px; }
  .content { padding: 0; max-width: 100%; }
  .main-layout { display: block; }
  body { background: white; font-size: 12px; }
  .report-header, .stats-section, .records-section, .sign-section {
    box-shadow: none; border: 1px solid #999; page-break-inside: avoid; margin-bottom: 8px;
  }
  .stats-grid { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .stat-item input { border: 1px solid #ccc; font-size: 11px; }
  .records-table { min-width: auto; width: 100%; font-size: 11px; }
  .records-table input, .records-table textarea { border: 1px solid #ddd; font-size: 11px; }
  .sign-grid { grid-template-columns: repeat(4, 1fr); }
  .report-header h2 { font-size: 16px; }
  h3 { font-size: 13px; }
  @page { margin: 1.5cm; }
}
