:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;color:#263630;background:#f5f7f5;font-size:14px}*{box-sizing:border-box}body{margin:0;display:flex;min-height:100vh}aside{width:228px;padding:36px 22px;background:#ecf1ed;border-right:1px solid #dfe6e0;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;font-size:27px;color:#1c563d;text-decoration:none;font-weight:700}.brand>span{font-size:19px;letter-spacing:-.4px}.brand small{display:block;font-size:11px;font-weight:400;color:#79877f;margin-top:4px}nav{display:grid;gap:8px;margin-top:56px}.nav{border:0;background:transparent;text-align:left;padding:13px 16px;color:#647269}.nav.active{background:#dce9df;color:#23553c;font-weight:600}.aside-bottom{margin-top:auto;font-size:11px;line-height:2;color:#79877f}main{margin-left:228px;padding:44px 48px;width:calc(100% - 228px);max-width:1700px}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:32px}.eyebrow{font-size:10px;font-weight:600;letter-spacing:1.8px;color:#819087}h1{font-size:30px;letter-spacing:-1px;margin:13px 0}h2{font-size:22px;margin:0 0 16px}p{color:#748178;line-height:1.7}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid #dce3dc;border-radius:7px;background:#fff;color:#41564a;padding:9px 14px;white-space:nowrap}button:hover{border-color:#678d72;background:#f1f6f1}button:disabled{opacity:.45;cursor:wait}.primary{background:#2f6247;color:white;border-color:#2f6247}.primary:hover{background:#244e38;color:white}.quiet{border:0;background:transparent;padding:6px 0;color:#748178}.danger{color:#ad4e44}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:34px}.stat{background:#fff;border:1px solid #e3e9e3;border-radius:12px;padding:23px}.stat span{font-size:12px;color:#7b8a80}.stat strong{display:block;font-size:31px;font-weight:550;margin-top:15px}.stat small{color:#9ba89f;font-size:10px;margin-left:8px}#toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px}#toolbar>div{display:flex;gap:8px;align-items:center}.panel{background:#fff;border:1px solid #e1e8e2;border-radius:12px;overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}th{color:#859287;font-weight:500;font-size:11px;letter-spacing:.3px;background:#fafcf9}td,th{padding:18px;border-bottom:1px solid #eef1ed}tbody tr:last-child td{border:0}td strong{font-size:13px;font-weight:600}td small{display:block;color:#94a095;margin-top:6px}.actions{display:flex;flex-wrap:wrap;gap:5px}.actions button{font-size:11px;padding:5px 8px}.badge{display:inline-block;font-size:11px;border-radius:5px;padding:5px 8px;background:#edf1ee;color:#718276}.badge.good{background:#e7f2e9;color:#3a7950}.badge.warn{background:#fff3df;color:#a27b37}.badge.bad{background:#fcece8;color:#a25a4e}.empty{padding:60px 24px;text-align:center;color:#819087}.empty h3{color:#4f6556;font-size:18px}.meta{color:#7d8b81;font-size:12px}#notice{padding:13px 18px;border:1px solid #d4e3d4;background:#ebf4e9;color:#416842;border-radius:7px;margin-bottom:20px}dialog{border:1px solid #e1e8e2;border-radius:16px;padding:30px;width:min(720px,94vw);box-shadow:0 25px 90px #1b332633;max-height:90vh}dialog::backdrop{background:#21362bbc;backdrop-filter:blur(4px)}#auth{width:430px}#auth h2{margin-top:15px}label{display:grid;gap:7px;font-size:12px;color:#627568;margin:15px 0}input,select,textarea{width:100%;padding:11px;border:1px solid #d9e3da;border-radius:6px;background:white;color:#294332}input:focus,textarea:focus,select:focus{outline:2px solid #a8c7af}textarea{min-height:280px;font:12px/1.7 ui-monospace,SFMono-Regular,monospace;resize:vertical}.row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.dialog-head h2{margin:0}footer{display:flex;justify-content:flex-end;margin-top:20px}.error{color:#b65746;font-size:12px}input[type=checkbox]{width:auto}.check-label{display:flex;align-items:center;gap:8px}img.captcha{max-width:100%;max-height:180px;border:1px solid #e0e6df;border-radius:7px}.site-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}.site-card{background:white;border:1px solid #e0e8e0;border-radius:12px;padding:24px}.site-card h3{margin-top:0}code{font-family:ui-monospace,monospace;background:#edf2ed;padding:2px 5px;border-radius:4px;font-size:11px}@media(max-width:1050px){aside{width:175px;padding:28px 16px}main{margin-left:175px;width:calc(100% - 175px);padding:30px 24px}.stats{gap:10px}.stat{padding:17px}td,th{padding:13px}}@media(max-width:720px){body{display:block}aside{position:static;width:auto;flex-direction:row;align-items:center;padding:15px;border-right:0;border-bottom:1px solid #dfe6e0}.brand small,.aside-bottom{display:none}nav{display:flex;margin:0 0 0 auto;gap:0}.nav{padding:10px;font-size:12px}.brand{font-size:20px}.brand>span{font-size:15px}main{margin:0;width:100%;padding:24px 14px}h1{font-size:25px}.stats{grid-template-columns:repeat(2,1fr);gap:10px}.stat{padding:15px}.stat strong{font-size:25px}#toolbar{align-items:flex-start;flex-wrap:wrap}.row{grid-template-columns:1fr}header{gap:10px}dialog{padding:22px}}

[hidden]{display:none!important}
.nav{text-decoration:none;display:block}.button{display:inline-block;text-decoration:none;font:inherit;cursor:pointer;border:1px solid #dce3dc;border-radius:7px;background:#fff;color:#41564a;padding:9px 14px;white-space:nowrap}.button:hover{border-color:#678d72;background:#f1f6f1}.button.primary{background:#2f6247;color:white}.actions form{margin:0}.actions .button{font-size:11px;padding:5px 8px}.editor-panel{max-width:850px;background:#fff;border:1px solid #e1e8e2;border-radius:14px;padding:28px}.login-page{margin:0;width:100%;max-width:none;min-height:100vh;display:grid;place-items:center;padding:24px}.login-panel{width:min(440px,100%)}.plugin-list{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.template-picker{padding-bottom:20px;border-bottom:1px solid #edf1ed;margin-bottom:20px}#toolbar form{margin:0}.editor-panel>form+form{border-top:1px solid #edf1ed;padding-top:15px;margin-top:25px}

/* Compact plugin forms; advanced endpoint JSON retains its larger editor. */
.editor-panel textarea.plugin-option { min-height: 80px; height: 80px; }
.editor-panel label.check, .editor-panel span.check { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.editor-panel .check input[type=checkbox] { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
.notification-filters { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.editor-panel details { border: 1px solid #d9e1dc; border-radius: 8px; padding: 12px; margin: 12px 0; }
.editor-panel summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.button.danger, button.danger { color: #a23b32; border-color: #e7c8c3; }
.button.danger:hover, button.danger:hover { background: #fff0ed; border-color: #b66056; }
.account-management { border-top: 1px solid #edf1ed; margin-top: 24px; padding-top: 12px; }
.workspace { display: contents; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: #21362ba6; backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; overflow: auto; }
dialog.account-dialog { position: relative; inset: auto; margin: 0; width: min(520px,100%); max-height: calc(100dvh - 48px); overflow: auto; }
.login-type { display: flex; gap: 24px; border: 0; padding: 0; margin: 18px 0; }
.login-type legend { font-size: 12px; color: #627568; margin-bottom: 8px; }
.login-type label { margin: 0; }
.login-type input { width: auto; }
.credentials-form:has(input[name=login_mode][value=cookie]:checked) .password-fields,
.credentials-form:has(input[name=login_mode][value=password]:checked) .cookie-fields { display: none; }
textarea.credential-cookie { min-height: 120px; height: 120px; overflow-wrap: anywhere; }
.captcha-refresh { text-align: center; margin: 20px 0; }
.captcha-image-button { padding: 4px; border: 1px solid #d9e3da; background: #f8faf8; }
.captcha-image-button img.captcha { display: block; border: 0; max-height: 150px; }
@media(max-width:720px) {
    aside { flex-wrap: wrap; gap: 12px; }
    nav { width: 100%; margin: 0; }
    .nav { flex: 1; text-align: center; padding: 10px 6px; }
}

/* Asynchronous workspace and native, keyboard-accessible dialogs. */
#app { display: contents; }
.has-dialog { overflow: hidden; }
.has-dialog .modal-backdrop { display: contents; }
.has-dialog dialog.account-dialog { position: fixed; inset: 0; margin: auto; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); }
.has-dialog dialog.editor-dialog { width: min(900px, calc(100vw - 32px)); }
dialog.editor-dialog { width: min(900px, 100%); }
dialog.editor-dialog > .editor-panel { border: 0; padding: 0; max-width: none; }
dialog::backdrop { background: #21362b99; backdrop-filter: blur(5px); }
#progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 1000; overflow: hidden; background: #dce9df; }
#progress::after { content: ''; display: block; width: 35%; height: 100%; background: #347752; animation: loading-bar 1s ease-in-out infinite; }
#toasts { margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; inset: auto 24px 24px auto; position: fixed; right: 24px; bottom: 24px; z-index: 200; width: min(460px, calc(100vw - 32px)); }
/* Toasts also remain visible while a dialog occupies the browser's top layer. */
.toast { display: flex; align-items: flex-start; gap: 16px; padding: 16px 18px; background: #fff; color: #294332; border: 1px solid #c8dccc; border-left: 4px solid #4a8761; border-radius: 10px; box-shadow: 0 8px 35px #21362b26; line-height: 1.6; animation: appear .16s ease-out; }
.toast.error { border-left-color: #bc5949; }
.toast.info { border-left-color: #789488; }
.toast span { flex: 1; overflow-wrap: anywhere; }
.toast button { border: 0; padding: 0 4px; font-size: 20px; line-height: 1.2; }
.form-error { background: #fff1ee; color: #9c3e31; border: 1px solid #f0c9bf; border-radius: 8px; padding: 12px 14px; overflow-wrap: anywhere; }
button.is-loading { display: inline-flex; align-items: center; gap: 8px; opacity: .75; }
button.is-loading::before { content: ''; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid #4c8c61; outline-offset: 3px; }
@keyframes loading-bar { from { transform: translateX(-100%); } to { transform: translateX(390%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }
@media (max-width: 720px) { #toasts { right: 16px; bottom: 16px; } }
/* Backup discovery and recovery share aligned, spaced sections. */
.backup-config { max-width: none; }
.backup-section { padding: 24px 28px; margin-top: 24px; }
.backup-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.backup-section-head h3 { margin: 0; font-size: 17px; }
.backup-section-head button { flex-shrink: 0; }
.backup-section-actions { margin-top: 18px; }
.backup-section > .meta { margin-bottom: 0; }
#remote-backups { min-width: 0; line-height: 1.6; }
#remote-backups table { table-layout: fixed; }
#remote-backups th:first-child { width: 50%; }
#remote-backups th:nth-child(2) { width: 23%; }
#remote-backups th:nth-child(3) { width: 12%; }
#remote-backups th:nth-child(4) { width: 15%; }
#remote-backups td { overflow-wrap: anywhere; vertical-align: middle; }
#remote-backups td:last-child { text-align: right; }
#remote-backups th:last-child { text-align: right; }
#remote-backups td .button { min-height: 36px; }
dialog.restore-dialog, .has-dialog dialog.restore-dialog { width: min(640px, calc(100vw - 32px)); }
.restore-dialog .dialog-head { gap: 16px; }
.restore-dialog .dialog-head .button { flex-shrink: 0; }
.restore-dialog .check-label { align-items: flex-start; line-height: 1.6; }
.restore-dialog .check-label input { flex: 0 0 auto; margin: 3px 0 0; }
.restore-actions { gap: 10px; border-top: 1px solid #edf1ed; padding-top: 20px; margin-top: 24px; }
.restore-actions > * { min-height: 40px; }
@media (max-width: 720px) {
  .backup-config, .backup-section { padding: 20px; }
  #remote-backups table, #remote-backups tbody { display: block; }
  #remote-backups thead { display: none; }
  #remote-backups tbody tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; border: 1px solid #e1e8e2; border-radius: 10px; padding: 16px; margin-bottom: 12px; }
  #remote-backups td { display: block; min-width: 0; padding: 0; border: 0; }
  #remote-backups td::before { content: attr(data-label); display: block; font-size: 11px; color: #7d8b81; margin-bottom: 5px; }
  #remote-backups td:first-child, #remote-backups td:last-child { grid-column: 1 / -1; }
  #remote-backups td:last-child { display: flex; align-items: center; justify-content: space-between; text-align: left; gap: 12px; }
  #remote-backups td:last-child::before { margin-bottom: 0; }
  .restore-actions > * { flex: 1; text-align: center; }
}
