:root {
  color-scheme: light;
  --canvas: #f5f5f7;
  --surface: rgba(255, 255, 255, .86);
  --surface-solid: #fff;
  --sidebar: rgba(250, 250, 252, .9);
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --tertiary: #99999f;
  --line: rgba(60, 60, 67, .12);
  --soft-line: rgba(60, 60, 67, .075);
  --blue: #3478f6;
  --blue-soft: #eaf1ff;
  --green: #248a54;
  --green-soft: #e8f7ee;
  --orange: #b56b10;
  --orange-soft: #fff4df;
  --red: #d33b32;
  --red-soft: #fff0ef;
  --shadow: 0 14px 40px rgba(28, 31, 44, .055), 0 2px 8px rgba(28, 31, 44, .025);
  --focus: 0 0 0 4px rgba(52, 120, 246, .15);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--text); min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; box-shadow: var(--focus); }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 256px; padding: 24px 16px 16px; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--soft-line); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); }
.brand-row { display: flex; gap: 11px; align-items: center; min-height: 44px; padding: 0 8px; margin-bottom: 41px; }
.brand-row strong { display: block; font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.brand-row span { display: block; margin-top: 3px; font-size: 11px; color: var(--tertiary); letter-spacing: .03em; }
.brand-mark { width: 48px; height: 48px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(145deg, #4696ff, #155eea); box-shadow: 0 8px 18px rgba(29, 99, 231, .24); }
.brand-mark svg { width: 27px; height: 27px; fill: #fff; }
.brand-mark svg circle { fill: #2878f3; }
.brand-mark svg path:last-child { fill: none; stroke: #2878f3; stroke-width: 1.6; stroke-linecap: round; }
.brand-mark.small { width: 35px; height: 35px; margin: 0; border-radius: 11px; }
.brand-mark.small svg { width: 21px; height: 21px; }
.nav-label { padding: 0 12px; margin: 0 0 9px; color: #a0a0a6; font-size: 10px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; }
#main-nav { display: grid; gap: 4px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: #65656b; text-align: left; font-size: 13px; font-weight: 510; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.nav-item:hover { color: var(--text); background: rgba(118, 118, 128, .08); }
.nav-item:active { transform: scale(.985); }
.nav-item.active { background: #e9e9ed; color: #1d1d1f; font-weight: 620; }
.nav-icon { width: 19px; color: #85858b; font-size: 18px; line-height: 1; text-align: center; }
.nav-item.active .nav-icon { color: #3478f6; }
.nav-live { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #52b788; opacity: .7; }
.sidebar-spacer { flex: 1; min-height: 28px; }
.sidebar-status { display: flex; align-items: center; gap: 8px; padding: 12px 9px; font-size: 11px; color: var(--secondary); }
.status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #b4b4b8; box-shadow: 0 0 0 3px rgba(150, 150, 155, .11); }
.status-dot.online { background: #30a46c; box-shadow: 0 0 0 3px rgba(48, 164, 108, .12); }
.status-dot.warn { background: #e3a024; box-shadow: 0 0 0 3px rgba(227, 160, 36, .14); }
.user-card { display: flex; gap: 10px; align-items: center; padding: 11px 7px 4px; border-top: 1px solid var(--soft-line); }
.avatar { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; background: #e7eeff; color: #3478f6; font-size: 13px; font-weight: 650; }
.user-meta { min-width: 0; flex: 1; }
.user-meta strong, .user-meta span { display: block; }
.user-meta strong { font-size: 11px; font-weight: 600; }
.user-meta span { margin-top: 3px; color: var(--tertiary); font-size: 10px; }
.icon-button { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #85858b; font-size: 17px; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.icon-button:hover { background: rgba(118, 118, 128, .1); color: var(--text); }
.icon-button:active { transform: scale(.93); }
.theme-toggle { margin-left: auto; }
.mobile-close, .menu-toggle, .scrim { display: none; }

.main-area { width: calc(100% - 256px); min-height: 100vh; margin-left: 256px; }
.topbar { height: 66px; display: flex; align-items: center; padding: 0 clamp(24px, 5vw, 70px); border-bottom: 1px solid var(--soft-line); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #9a9aa0; font-size: 12px; }
.breadcrumbs strong { color: #4a4a4f; font-weight: 590; }
.crumb-slash { color: #c7c7cb; }
.topbar-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.header-time { color: #a0a0a6; font-size: 11px; font-variant-numeric: tabular-nums; }
.refresh-button { font-size: 19px; }
.page-content { max-width: 1210px; margin: 0 auto; padding: 40px clamp(24px, 5vw, 70px) 64px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 0 0 28px; }
.page-heading h1 { margin: 0; font-size: clamp(25px, 3vw, 32px); line-height: 1.15; letter-spacing: -.045em; font-weight: 680; }
.page-heading p { margin: 9px 0 0; color: var(--secondary); font-size: 13px; line-height: 1.55; }
.eyebrow { margin: 0 0 9px; color: var(--blue); font-size: 10px; font-weight: 670; letter-spacing: .12em; }
.muted { color: var(--secondary); }
.tiny { font-size: 11px; }
.card { background: var(--surface); border: 1px solid rgba(255, 255, 255, .8); border-radius: 18px; box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.card-pad { padding: 22px; }
.section-title { margin: 0; font-size: 15px; letter-spacing: -.025em; font-weight: 640; }
.section-subtitle { margin: 7px 0 0; color: var(--secondary); font-size: 12px; line-height: 1.55; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; }
.metric { min-height: 139px; padding: 19px 20px 17px; }
.metric-top { display: flex; justify-content: space-between; align-items: center; color: var(--secondary); font-size: 11px; }
.metric-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 15px; }
.metric-value { margin-top: 17px; font-size: 23px; line-height: 1; font-weight: 660; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.metric-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--tertiary); font-size: 10px; }
.metric-foot .status-dot { width: 6px; height: 6px; box-shadow: none; }
.overview-grid { margin-top: 16px; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .8fr); align-items: stretch; }
.service-card { padding: 23px; }
.service-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.service-title { display: flex; gap: 13px; align-items: center; }
.service-logo { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: #2b72eb; background: #ebf1ff; font-size: 20px; }
.service-title h2 { margin: 0; font-size: 15px; font-weight: 640; }
.service-title p { margin: 5px 0 0; color: var(--secondary); font-size: 11px; }
.pill { display: inline-flex; gap: 6px; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 20px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.pill.success { color: var(--green); background: var(--green-soft); }
.pill.warning { color: var(--orange); background: var(--orange-soft); }
.pill.error { color: var(--red); background: var(--red-soft); }
.pill.neutral { color: var(--secondary); background: rgba(118, 118, 128, .09); }
.pill .status-dot { width: 6px; height: 6px; box-shadow: none; }
.service-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; padding-top: 22px; margin-top: 21px; border-top: 1px solid var(--soft-line); }
.fact-label { color: var(--tertiary); font-size: 10px; }
.fact-value { margin-top: 6px; font-size: 12px; font-weight: 560; overflow-wrap: anywhere; }
.service-actions { display: flex; align-items: center; gap: 9px; margin-top: 22px; }
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-solid); color: #44444a; font-size: 11px; font-weight: 600; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { background: #f7f7f9; }
.button:active { transform: scale(.975); }
.button.primary { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 3px 8px rgba(52, 120, 246, .18); }
.button.primary:hover { background: #2468e9; }
.button.ghost { border-color: transparent; background: transparent; color: var(--blue); }
.button.danger { color: var(--red); border-color: rgba(211, 59, 50, .2); background: var(--red-soft); }
.button.small { min-height: 31px; padding: 0 11px; font-size: 10px; }
.button:disabled { opacity: .52; cursor: not-allowed; }
.quick-list { display: grid; gap: 1px; }
.quick-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--soft-line); font-size: 11px; }
.quick-row:last-child { border-bottom: 0; }
.quick-row span:first-child { color: var(--secondary); }
.quick-row span:last-child { font-weight: 560; text-align: right; }
.notice { display: flex; gap: 11px; padding: 15px 16px; border: 1px solid rgba(52, 120, 246, .1); border-radius: 14px; background: rgba(234, 241, 255, .63); color: #496387; font-size: 11px; line-height: 1.65; }
.notice strong { color: #305b9a; font-weight: 620; }
.notice-icon { flex: 0 0 auto; color: var(--blue); font-weight: 700; }
.activity { display: grid; gap: 0; }
.activity-row { display: grid; grid-template-columns: 13px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--soft-line); }
.activity-row:last-child { border-bottom: 0; }
.activity-mark { margin-top: 4px; width: 6px; height: 6px; border: 1.5px solid #74a1f2; border-radius: 50%; }
.activity-text { min-width: 0; color: #58585e; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.activity-time { color: #aaaab0; font-size: 9px; white-space: nowrap; }

.form-card { padding: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { color: #4a4a50; font-size: 11px; font-weight: 600; }
.field-hint { color: var(--tertiary); font-size: 10px; line-height: 1.5; }
input[type="text"], input[type="number"], input[type="password"], textarea, select { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-solid); color: var(--text); font-size: 12px; transition: border-color .18s ease, box-shadow .18s ease; }
input:hover, textarea:hover, select:hover { border-color: rgba(60, 60, 67, .23); }
textarea { min-height: 128px; resize: vertical; line-height: 1.6; }
textarea.code-list { min-height: 110px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
.field-inline { display: flex; gap: 12px; align-items: center; }
.switch { position: relative; width: 42px; height: 25px; display: inline-flex; align-items: center; padding: 3px; border: 0; border-radius: 20px; background: #d1d1d6; cursor: pointer; transition: background .2s ease; }
.switch::after { content: ''; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.switch[aria-checked="true"] { background: #34c759; }
.switch[aria-checked="true"]::after { transform: translateX(17px); }
.mode-group { display: flex; gap: 7px; padding: 4px; border: 1px solid var(--soft-line); border-radius: 11px; background: rgba(118, 118, 128, .065); }
.mode-option { flex: 1; min-height: 31px; border: 0; border-radius: 8px; background: transparent; color: var(--secondary); font-size: 10px; cursor: pointer; }
.mode-option.active { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); font-weight: 610; }
.field-divider { grid-column: 1 / -1; height: 1px; margin: 1px 0; background: var(--soft-line); }
.save-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; margin-top: 22px; border-top: 1px solid var(--soft-line); }
.save-row p { margin: 0; color: var(--tertiary); font-size: 10px; line-height: 1.5; }
.save-actions { display: flex; gap: 8px; }
.credential-list { display: grid; gap: 0; }
.credential-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--soft-line); }
.credential-row:last-child { border-bottom: 0; }
.credential-name { font-size: 11px; font-weight: 570; }
.credential-desc { margin-top: 4px; color: var(--tertiary); font-size: 10px; }
.code { padding: 2px 6px; border-radius: 5px; background: rgba(118, 118, 128, .09); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }
.log-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.log-search { max-width: 310px; }
.log-box { min-height: 340px; max-height: 60vh; overflow: auto; padding: 8px 15px; border-radius: 14px; background: #17181c; color: #d8d9de; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; line-height: 1.7; }
.log-line { display: grid; grid-template-columns: 145px 58px 1fr; gap: 12px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.045); white-space: pre-wrap; overflow-wrap: anywhere; }
.log-time { color: #777b87; }
.log-stream { color: #80aaff; text-transform: uppercase; }
.log-stream.stderr { color: #ff937f; }
.log-stream.admin { color: #83d6a5; }
.empty-state { padding: 28px; color: var(--tertiary); text-align: center; font-size: 11px; }
.command-list { display: grid; gap: 8px; }
.command-row { display: grid; grid-template-columns: 126px 1fr; gap: 12px; align-items: start; padding: 12px 13px; border: 1px solid var(--soft-line); border-radius: 12px; background: rgba(255,255,255,.4); }
.command-row p { margin: 0; color: var(--secondary); font-size: 11px; line-height: 1.55; }
.health-list { display: grid; gap: 0; }
.health-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--soft-line); font-size: 11px; }
.health-row:last-child { border-bottom: 0; }
.health-row > span:first-child { color: var(--secondary); }
.subtle-link { color: var(--blue); font-size: 10px; text-decoration: none; }
.subtle-link:hover { text-decoration: underline; }
.divider { height: 1px; margin: 20px 0; background: var(--soft-line); }
.toast-region { position: fixed; z-index: 50; right: 24px; bottom: 24px; display: grid; gap: 9px; }
.toast { min-width: 220px; max-width: min(360px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-solid); box-shadow: 0 12px 35px rgba(0,0,0,.12); color: var(--text); font-size: 11px; animation: toast-in .28s cubic-bezier(.2,.8,.2,1) both; }
.toast.error { color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(ellipse at 50% 20%, rgba(226, 236, 255, .78), transparent 46%), var(--canvas); }
.login-card { width: min(100%, 380px); padding: 39px 34px 28px; border: 1px solid rgba(255,255,255,.8); border-radius: 23px; background: rgba(255,255,255,.8); box-shadow: 0 24px 80px rgba(36, 53, 94, .1); backdrop-filter: blur(22px); text-align: center; }
.setup-card { width: min(100%, 590px); max-height: calc(100vh - 40px); overflow-y: auto; padding: 30px 34px 22px; text-align: left; }
.setup-card > .eyebrow, .setup-card > h1, .setup-card > .login-copy { text-align: center; }
.setup-card > .brand-mark { margin-top: 0; }
.setup-tip { margin: 0 0 19px; padding: 12px 14px; border: 1px solid rgba(52, 120, 246, .12); border-radius: 12px; background: rgba(234, 241, 255, .7); color: #5b6c85; font-size: 10px; line-height: 1.6; }
.setup-tip strong { color: #315b97; font-weight: 650; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 15px; }
.setup-grid .field { gap: 6px; }
.setup-grid input { min-height: 37px; font-size: 11px; }

.permission-group-title { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; }
.permission-group-title .field { flex: 1; min-width: 0; max-width: 430px; }
.permission-member-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 32px; gap: 12px; align-items: end; padding: 14px 0; border-top: 1px solid var(--soft-line); }
.permission-member-row:first-child { border-top: 0; }
.permission-remove { color: var(--tertiary); font-size: 20px; }
.permission-remove:hover { color: var(--red); background: var(--red-soft); }
.permission-empty { padding: 14px 0 4px; border-top: 1px solid var(--soft-line); color: var(--tertiary); font-size: 11px; }
.permission-group-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--soft-line); }
.permission-actions { display: flex; align-items: center; gap: 14px; }
.plugin-summary { margin: -4px 0 16px; }
.plugin-install-card { margin-bottom: 16px; }
.plugin-install-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.plugin-risk { margin-top: 17px; border-color: rgba(218, 150, 53, .16); background: rgba(255, 244, 224, .72); color: #79603c; }
.plugin-risk strong { color: #79551f; }
.plugin-list { display: grid; }
.plugin-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--soft-line); }
.plugin-row:first-child { padding-top: 0; }
.plugin-row:last-child { padding-bottom: 0; border-bottom: 0; }
.plugin-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.plugin-icon { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: 16px; }
.plugin-meta { min-width: 0; }
.plugin-title { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.plugin-title strong { max-width: 460px; font-size: 12px; font-weight: 620; overflow-wrap: anywhere; }
.plugin-description { margin-top: 6px; color: var(--tertiary); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.plugin-actions { display: flex; align-items: center; justify-content: flex-end; flex: 0 0 auto; gap: 7px; }
.setup-card .login-button { margin-top: 16px; }
.login-card .eyebrow { margin-bottom: 12px; font-size: 9px; }
.login-card h1 { margin: 0; font-size: 25px; letter-spacing: -.05em; }
.login-copy { margin: 9px 0 27px; font-size: 12px; }
.login-card form { text-align: left; }
.login-card label { display: block; margin-bottom: 8px; color: #55555b; font-size: 11px; font-weight: 600; }
.login-card input { min-height: 43px; }
.login-button { width: 100%; margin-top: 14px; min-height: 41px; }
.form-error { min-height: 17px; margin: 9px 0 0; color: var(--red); font-size: 10px; text-align: center; }
.login-footnote { margin: 21px 0 0; color: #a0a0a6; font-size: 9px; }

[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101114;
  --surface: rgba(30, 31, 36, .91);
  --surface-solid: #25262b;
  --sidebar: rgba(25, 26, 30, .93);
  --text: #f3f3f5;
  --secondary: #a5a5ad;
  --tertiary: #777981;
  --line: rgba(235, 235, 245, .16);
  --soft-line: rgba(235, 235, 245, .09);
  --blue-soft: rgba(52, 120, 246, .17);
  --green-soft: rgba(48, 164, 108, .17);
  --orange-soft: rgba(227, 160, 36, .16);
  --red-soft: rgba(211, 59, 50, .16);
  --shadow: 0 14px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.1);
}
[data-theme="dark"] .nav-item.active { background: #33343a; color: #f3f3f5; }
[data-theme="dark"] .nav-item:hover { background: rgba(255,255,255,.08); }
[data-theme="dark"] .breadcrumbs strong, [data-theme="dark"] .field label, [data-theme="dark"] .field-label { color: #dedee2; }
[data-theme="dark"] .button:not(.primary):not(.danger) { color: #dedee2; }
[data-theme="dark"] .button:hover { background: #33343a; }
[data-theme="dark"] .notice { background: rgba(52,120,246,.11); color: #b1c5e9; }
[data-theme="dark"] .notice strong { color: #c7d9ff; }
[data-theme="dark"] .command-row { background: rgba(255,255,255,.025); }
[data-theme="dark"] .login-shell { background: radial-gradient(ellipse at 50% 20%, rgba(46, 69, 116, .4), transparent 46%), var(--canvas); }
[data-theme="dark"] .login-card { background: rgba(30,31,36,.86); }
[data-theme="dark"] .setup-tip { background: rgba(52,120,246,.12); color: #b1c5e9; }
[data-theme="dark"] .setup-tip strong { color: #c7d9ff; }
[data-theme="dark"] .login-card label { color: #dedee2; }
[data-theme="dark"] .plugin-risk { border-color: rgba(255, 198, 98, .16); background: rgba(118, 83, 28, .17); color: #d8c5a3; }
[data-theme="dark"] .plugin-risk strong { color: #f0cf8b; }

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-102%); transition: transform .28s cubic-bezier(.2,.8,.2,1); width: min(290px, 84vw); }
  .sidebar.open { transform: translateX(0); }
  .mobile-close { display: inline-grid; margin-left: auto; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 9; background: rgba(0,0,0,.28); opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s ease; }
  .scrim.open { opacity: 1; visibility: visible; }
  .main-area { width: 100%; margin-left: 0; }
  .topbar { height: 58px; padding: 0 17px; gap: 8px; }
  .menu-toggle { display: inline-grid; margin-left: -5px; }
  .breadcrumbs { gap: 7px; font-size: 11px; }
  .header-time { display: none; }
  .page-content { padding: 29px 17px 45px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 22px; }
  .page-heading h1 { font-size: 27px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .field.full, .field-divider { grid-column: auto; }
  .service-card, .form-card { padding: 18px; }
  .permission-group-title { align-items: center; }
  .permission-member-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 8px; }
  .plugin-row { align-items: flex-start; flex-direction: column; gap: 13px; }
  .plugin-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .plugin-install-form { grid-template-columns: 1fr; }
  .service-top { flex-direction: column; }
  .service-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-line { grid-template-columns: 118px 47px 1fr; gap: 8px; font-size: 9px; }
  .log-toolbar { align-items: flex-start; flex-direction: column; }
  .log-search { max-width: none; }
  .setup-card { padding: 25px 21px 19px; }
  .setup-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { min-height: 126px; padding: 15px; }
  .metric-value { font-size: 20px; }
  .card-pad { padding: 17px; }
  .command-row { grid-template-columns: 100px 1fr; }
  .save-row { align-items: flex-start; flex-direction: column; }
  .save-actions { width: 100%; }
  .save-actions .button { flex: 1; }
  .permission-group-title { gap: 8px; }
  .permission-group-title .metric-icon { display: none; }
  .permission-group-foot, .permission-actions { align-items: flex-start; flex-direction: column; }
  .log-line { grid-template-columns: 1fr; gap: 0; }
  .log-stream { margin: 2px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .card, .login-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sidebar { background: var(--sidebar); }
  .card, .login-card { background: var(--surface-solid); }
}
