* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', 'Noto Sans Tamil', sans-serif; height: 100vh; display: flex; flex-direction: column; }
#topbar { display: flex; align-items: center; gap: 16px; padding: 8px 14px; background: #1f3a5f; color: #fff; }
.brand { font-weight: 600; font-size: 17px; }
.actions { display: flex; gap: 8px; }
#topbar button { padding: 7px 12px; border: 0; border-radius: 4px; background: #3c78d8; color: #fff; cursor: pointer; }
#topbar button:disabled { background: #6b7c93; cursor: not-allowed; }
#status { margin-left: auto; font-size: 13px; opacity: 0.9; }
#layout { flex: 1; display: flex; min-height: 0; }
#sidebar { width: 280px; background: #f4f6f8; border-right: 1px solid #d5dbe1; display: flex; flex-direction: column; padding: 8px; }
.side-title { font-weight: 600; margin-bottom: 6px; }
#fileFilter { padding: 6px; margin-bottom: 8px; border: 1px solid #c5ccd3; border-radius: 4px; }
#fileList { flex: 1; overflow: auto; }
.file-item { padding: 7px 8px; cursor: pointer; border-radius: 4px; font-size: 14px; word-break: break-all; }
.file-item:hover { background: #e2e9f3; }
.file-item.active { background: #c9dcf5; font-weight: 600; }
.folder-item { padding: 6px 8px; font-weight: 600; font-size: 13px; color: #555; }
#editorWrap { flex: 1; min-width: 0; padding: 8px; }
.dialog { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.dialog.hidden { display: none; }
.dialog-box { background: #fff; padding: 20px; border-radius: 8px; width: 380px; display: flex; flex-direction: column; gap: 6px; }
.dialog-box input { padding: 7px; border: 1px solid #c5ccd3; border-radius: 4px; }
.dialog-actions { display: flex; gap: 8px; margin-top: 10px; }
.dialog-actions button { padding: 8px 14px; border: 0; border-radius: 4px; background: #3c78d8; color: #fff; cursor: pointer; }
.dialog-actions button#ghCancel { background: #888; }
.math { background: #f1f7ff; padding: 0 3px; cursor: pointer; }
