:root {
  --primary: #1e3a5f;
  --primary-light: #2d5a8a;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  --text: #1f2937;
  --muted: #6b7280;
  --sidebar-width: 280px;
}
body { margin: 0; font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); }
.app-container { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: var(--primary); color: white; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-header h1 { margin: 0; font-size: 1.1rem; }
.sidebar-header a { color: white; text-decoration: none; }
.sidebar-nav { padding: 10px 0; }
.sidebar-nav a { display: block; padding: 8px 20px; color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.9rem; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.1); color: white; }
.sidebar-nav .section-title { padding: 10px 20px 5px; font-size: 0.75rem; text-transform: uppercase; color: rgba(255,255,255,0.5); letter-spacing: 1px; }
.main-content { flex: 1; display: flex; flex-direction: column; }
.top-bar { background: white; padding: 12px 20px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: center; position: sticky; top: 0; z-index: 10; }
.search-box { flex: 1; max-width: 500px; }
.search-box input { width: 100%; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; }
.content-area { padding: 24px; max-width: 900px; margin: 0 auto; width: 100%; }
.card { background: var(--card); border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: white; border-radius: 10px; padding: 16px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stat-card .number { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .label { color: var(--muted); font-size: 0.85rem; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: var(--bg); text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); font-weight: 600; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
tr:hover { background: var(--bg); }
.btn { display: inline-block; padding: 6px 14px; border-radius: 6px; text-decoration: none; font-size: 0.85rem; cursor: pointer; border: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-outline { border: 1px solid var(--border); color: var(--text); background: white; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.page-header { margin-bottom: 24px; }
.page-header h2 { margin: 0 0 8px; font-size: 1.5rem; color: var(--primary); }
.page-header .meta { color: var(--muted); font-size: 0.9rem; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.quick-link { display: flex; align-items: center; gap: 12px; padding: 16px; background: white; border-radius: 10px; text-decoration: none; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: transform 0.2s, box-shadow 0.2s; }
.quick-link:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.quick-link .icon { font-size: 1.5rem; }
.nav-tree { background: white; border-radius: 12px; padding: 20px; }
.nav-section { margin-bottom: 16px; }
.nav-section-title { font-weight: 600; color: var(--primary); padding: 8px 0; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.nav-items { list-style: none; padding: 0; margin: 0; }
.nav-items li { padding: 4px 0; }
.nav-items a { color: var(--text); text-decoration: none; font-size: 0.9rem; }
.nav-items a:hover { color: var(--primary); }
.search-result { background: white; border-radius: 10px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.search-result h3 { margin: 0 0 8px; font-size: 1rem; color: var(--primary); }
.search-result .snippet { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.search-result mark { background: #fef08a; padding: 0 2px; }
.search-result .page-badge { display: inline-block; background: var(--bg); padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; margin-right: 8px; }
.pdf-container { background: #525659; border-radius: 10px; overflow: hidden; min-height: 600px; }
.pdf-toolbar { background: #323639; padding: 10px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pdf-toolbar input, .pdf-toolbar select { padding: 6px 10px; border: 1px solid #555; border-radius: 4px; background: #525659; color: white; font-size: 0.85rem; }
.pdf-toolbar button { padding: 6px 12px; background: #757575; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 0.85rem; }
.pdf-toolbar button:hover { background: #959595; }
.pdf-toolbar label { color: #ccc; font-size: 0.85rem; }
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar select, .filter-bar input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 4px; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem; font-family: inherit; }
.form-group textarea { resize: vertical; min-height: 80px; }
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-content { background: white; border-radius: 12px; padding: 24px; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h3 { margin: 0; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.note-item { background: white; border-radius: 10px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.note-item .note-header { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.note-item .note-date { color: var(--muted); font-size: 0.8rem; }
.note-item .note-text { font-size: 0.95rem; line-height: 1.5; }
.text-content { line-height: 1.7; }
.text-content h2 { color: var(--primary); font-size: 1.3rem; margin: 24px 0 12px; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.text-content h3 { color: var(--primary); font-size: 1.1rem; margin: 20px 0 10px; }
.text-content h4 { color: var(--text); font-size: 1rem; margin: 16px 0 8px; }
.text-content p { margin: 0 0 12px; }
.text-content ul, .text-content ol { margin: 0 0 12px; padding-left: 24px; }
.text-content li { margin-bottom: 4px; }
.text-content table { margin: 12px 0; font-size: 0.85rem; }
.text-content table th { background: var(--primary); color: white; }
.text-content table td, .text-content table th { padding: 8px 10px; border: 1px solid var(--border); }
.text-content pre { background: var(--bg); padding: 12px; border-radius: 6px; overflow-x: auto; font-size: 0.85rem; }
.text-content blockquote { border-left: 4px solid var(--primary); margin: 12px 0; padding: 8px 16px; background: var(--bg); }
.checklist-table { overflow-x: auto; }
.checklist-table table { min-width: 1000px; }
.checklist-cell { text-align: center; }
.checklist-cell input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
select.priority-low { background: #dcfce7; }
select.priority-medium { background: #fef9c3; }
select.priority-high { background: #fee2e2; }
.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 20px; }
.page-nav { display: flex; gap: 12px; justify-content: space-between; margin-top: 20px; }
.text-page-nav { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.page-select { display: flex; gap: 8px; align-items: center; }
.page-select select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem; }
.text-display { background: white; border-radius: 10px; padding: 20px; min-height: 400px; white-space: pre-wrap; font-family: Georgia, serif; line-height: 1.8; }
.info-box { background: #dbeafe; border-left: 4px solid var(--primary-light); padding: 12px 16px; border-radius: 0 8px 8px 0; margin-bottom: 16px; }
.info-box p { margin: 0; font-size: 0.9rem; }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; position: fixed; z-index: 100; }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: block; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .quick-links { grid-template-columns: 1fr; }
}
