:root { --bg:#f6f7f8; --panel:#fff; --line:#e5e7eb; --text:#202124; --muted:#6b7280; --accent:#2563eb; --soft:#eff6ff; --danger:#b42318; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:var(--bg); color:var(--text); font:15px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; }
a { color:inherit; text-decoration:none; }
button,input,select,textarea { font:inherit; }
.app-shell { min-height:100vh; display:grid; grid-template-columns:224px minmax(0,1fr); }
.sidebar { display:flex; flex-direction:column; gap:28px; padding:24px 14px; border-right:1px solid var(--line); background:#fff; }
.brand { display:grid; gap:2px; padding:0 10px; font-size:20px; font-weight:720; letter-spacing:-.03em; }
.brand small { color:var(--muted); font-size:12px; font-weight:500; letter-spacing:0; }
.sidebar nav { display:grid; gap:4px; }
.sidebar nav a,.logout { border-radius:8px; color:#4b5563; padding:9px 10px; }
.sidebar nav a:hover,.sidebar nav a.active { background:var(--soft); color:#1d4ed8; }
.logout { margin-top:auto; color:var(--muted); font-size:13px; }
.page { max-width:1280px; width:100%; margin:0 auto; padding:44px 48px; }
h1,h2,h3,p { margin-top:0; } h1 { margin-bottom:28px; font-size:30px; letter-spacing:-.035em; } h2 { font-size:17px; margin-bottom:16px; } .eyebrow { margin-bottom:6px; color:var(--muted); font-size:13px; }
.panel { margin-bottom:18px; padding:22px; border:1px solid var(--line); border-radius:12px; background:var(--panel); }
.muted { color:var(--muted); font-size:13px; } .notice { margin-bottom:18px; padding:12px 14px; border-radius:9px; } .notice.success { background:#ecfdf3; color:#067647; } .notice.error { background:#fef3f2; color:var(--danger); }
.update-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }.update-summary span { display:block; margin-bottom:4px; color:var(--muted); font-size:13px; }.update-summary strong { font-size:18px; }
.checklist { display:grid; gap:9px; margin:0; padding:0; list-style:none; }.checklist .ok { color:#067647; }.checklist .bad { color:var(--danger); }.changelog { overflow:auto; margin:0; padding:14px; border-radius:8px; background:#f9fafb; color:#374151; font:12px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace; white-space:pre-wrap; }.update-action { margin-top:24px; }.primary { border:0; border-radius:8px; padding:10px 15px; background:var(--accent); color:#fff; cursor:pointer; font-weight:650; }.primary:disabled { cursor:not-allowed; opacity:.5; }

.file-heading,.file-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }.file-heading h1 { margin-bottom:0; }.file-toolbar { justify-content:flex-start; }.file-toolbar input,.file-toolbar select,.form-grid input,.form-grid select,.form-grid textarea { width:100%; border:1px solid #d1d5db; border-radius:8px; padding:9px 10px; background:#fff; color:var(--text); }.file-toolbar input { max-width:320px; }.secondary,.danger { display:inline-block; border:1px solid #d1d5db; border-radius:8px; padding:9px 12px; background:#fff; cursor:pointer; }.danger { margin-top:18px; color:var(--danger); border-color:#fecaca; }.manager { display:grid; min-height:590px; grid-template-columns:210px minmax(230px,.8fr) minmax(300px,1.35fr); border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fff; }.folder-tree,.file-list,.file-preview { padding:16px; }.folder-tree,.file-list { border-right:1px solid var(--line); }.tree-root,.tree-item { display:flex; justify-content:space-between; gap:5px; padding:7px 8px; border-radius:7px; color:#4b5563; }.tree-item { margin-left:10px; }.tree-root.selected,.tree-item.selected,.file-row.selected { background:var(--soft); color:#1d4ed8; }.tree-item small { color:var(--muted); }.breadcrumbs { margin-bottom:12px; color:var(--muted); font-size:12px; }.file-list { padding:12px; }.file-row { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:8px; padding:10px 8px; border-radius:8px; }.file-row:hover { background:#f9fafb; }.file-row strong,.file-row small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.file-row small { color:var(--muted); font-size:12px; }.type-icon { color:var(--muted); font-size:11px; font-weight:700; }.file-preview h2 { overflow-wrap:anywhere; }.code-preview { overflow:auto; padding:14px; background:#f9fafb; border-radius:8px; font:12px/1.55 ui-monospace,SFMono-Regular,monospace; }.markdown-preview { min-height:170px; white-space:normal; }.image-preview { display:block; max-width:100%; max-height:390px; margin-bottom:20px; border:1px solid var(--line); border-radius:8px; }.metadata { display:grid; grid-template-columns:110px 1fr; gap:5px 12px; padding-top:16px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }.metadata dt { color:#374151; }.metadata dd { margin:0; overflow-wrap:anywhere; }.empty { color:var(--muted); padding:24px 8px; }.form-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }.form-grid label { display:grid; gap:6px; color:#4b5563; font-size:13px; }.form-grid .wide { grid-column:1/-1; }

.storage-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }.storage-stats .panel { margin:0; }.storage-stats span { display:block; color:var(--muted); font-size:13px; }.storage-stats strong { display:block; margin-top:5px; font-size:24px; }.two-columns { display:grid; grid-template-columns:1.4fr 1fr; gap:18px; margin-top:18px; }.recent-file,.type-total { display:flex; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); }.recent-file:hover { color:#1d4ed8; }.recent-file small { display:block; color:var(--muted); font-size:12px; }.type-total strong { font-weight:650; }

/* The earlier PHP pages retain their functions while inheriting the same calm, light product shell. */
body > .min-h-screen { min-height:100vh; } nav.bg-white { background:#fff!important; border-bottom:1px solid var(--line); box-shadow:none!important; } aside.bg-white { background:#fff!important; border-right:1px solid var(--line); box-shadow:none!important; } .bg-gray-100 { background:var(--bg)!important; } .bg-white { background:#fff!important; } .shadow,.shadow-lg,.shadow-xl { box-shadow:none!important; } .text-gray-800,.text-gray-900 { color:var(--text)!important; } .text-gray-700,.text-gray-600,.text-gray-500 { color:var(--muted)!important; } .text-purple-600,.text-blue-600 { color:var(--accent)!important; } .bg-purple-600,.bg-blue-600 { background:var(--accent)!important; } .hover\:bg-purple-700:hover,.hover\:bg-blue-700:hover { background:#1d4ed8!important; } .rounded-lg { border-radius:10px!important; } input,select,textarea { border-color:#d1d5db!important; } table { background:#fff; } th { color:var(--muted)!important; } tr.hover\:bg-gray-50:hover { background:#f9fafb!important; }
@media (max-width:900px) { .manager { grid-template-columns:180px minmax(230px,1fr); }.file-preview { grid-column:1/-1; border-top:1px solid var(--line); }.folder-tree { border-right:1px solid var(--line); } }
@media (max-width:760px) { .app-shell { grid-template-columns:1fr; }.sidebar { min-height:auto; gap:14px; border-right:0; border-bottom:1px solid var(--line); }.sidebar nav { grid-template-columns:repeat(2,minmax(0,1fr)); }.logout { margin-top:0; }.page { padding:28px 18px; }.update-summary,.form-grid { grid-template-columns:1fr; }.file-heading,.file-toolbar { align-items:stretch; flex-direction:column; }.file-toolbar input { max-width:none; }.manager { grid-template-columns:1fr; }.folder-tree,.file-list { border-right:0; border-bottom:1px solid var(--line); }.file-preview { grid-column:auto; } }
