﻿:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: #172033;
  background: #f3f6fb;
  font-synthesis: none;
  --navy: #0b1e4a;
  --navy-soft: #102a5c;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --line: #e2e8f0;
  --muted: #64748b;
  --surface: #ffffff;
  --success: #12a36d;
  --warning: #d98908;
  --danger: #dc3855;
  --shadow: 0 18px 50px rgba(15, 23, 42, .09);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #07162f 0%, #0b1e4a 54%, #0c4a6e 100%);
}
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .2;
  background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to right, #000, transparent 75%);
}
.login-ambient { position: absolute; border-radius: 50%; filter: blur(3px); opacity: .28; }
.login-ambient-a { width: 520px; height: 520px; left: -170px; top: -220px; background: #1676ff; }
.login-ambient-b { width: 420px; height: 420px; right: 20%; bottom: -280px; background: #17d3e6; }
.login-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; min-height: 100vh; }
.login-intro { display: flex; flex-direction: column; padding: 48px clamp(48px, 7vw, 112px); color: white; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand strong { display: block; font-size: 20px; letter-spacing: .03em; }
.brand small { display: block; margin-top: 3px; font-size: 9px; letter-spacing: .22em; color: rgba(255,255,255,.48); }
.brand-mark { position: relative; display: block; width: 40px; height: 32px; color: #1fc5ee; }
.brand-mark span { position: absolute; border: 3px solid currentColor; border-radius: 999px; }
.brand-mark span:nth-child(1) { width: 26px; height: 19px; left: 7px; top: 8px; }
.brand-mark span:nth-child(2) { width: 18px; height: 14px; left: 1px; top: 13px; border-right-color: transparent; }
.brand-mark span:nth-child(3) { width: 21px; height: 13px; right: 0; top: 14px; border-left-color: transparent; }
.brand-mark.dark { color: var(--blue); }
.intro-copy { margin: auto 0 50px; max-width: 620px; }
.eyebrow, .modal-kicker { display: block; color: #56d9f5; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.intro-copy h1 { margin: 22px 0 20px; font-size: clamp(40px, 5vw, 70px); line-height: 1.12; letter-spacing: -.045em; }
.intro-copy p { max-width: 540px; margin: 0; color: rgba(231,241,255,.72); font-size: 16px; line-height: 1.9; }
.intro-points { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.14); padding-top: 26px; gap: 20px; }
.intro-points > div { display: flex; gap: 12px; align-items: flex-start; }
.intro-points > div > span { color: #37cdf2; font: 600 11px/1.5 monospace; }
.intro-points p { margin: 0; }
.intro-points strong, .intro-points small { display: block; }
.intro-points strong { font-size: 13px; }
.intro-points small { margin-top: 5px; color: rgba(255,255,255,.48); font-size: 11px; line-height: 1.5; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: rgba(243,246,251,.98); box-shadow: -20px 0 80px rgba(0,0,0,.16); }
.login-card { width: min(420px, 100%); }
.mobile-brand { display: none; }
.login-kicker { display: inline-flex; padding: 6px 10px; border-radius: 10px; background: #eaf2ff; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.login-card h2 { margin: 20px 0 8px; font-size: 34px; letter-spacing: -.03em; color: #10203a; }
.login-subtitle { margin: 0 0 32px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; margin-bottom: 8px; color: #36445b; font-size: 13px; font-weight: 600; }
.field input { width: 100%; height: 44px; padding: 0 14px; outline: none; border: 1px solid #dce3ed; border-radius: 14px; background: #fff; color: #15233b; transition: .2s; }
.field input:focus { border-color: #5591ff; box-shadow: 0 0 0 3px rgba(23,105,255,.11); }
.field input:disabled { background: #f0f3f7; color: #7f8999; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; width: 17px; left: 14px; top: 14px; color: #8d9bb0; }
.input-wrap input { padding-left: 42px; padding-right: 58px; }
.icon-button { position: absolute; right: 7px; top: 7px; height: 32px; border: 0; background: transparent; color: #708096; font-size: 12px; }
.primary-button, .secondary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 13px; transition: .18s;
}
.primary-button { color: white; background: linear-gradient(110deg, var(--blue), var(--cyan)); box-shadow: 0 8px 20px rgba(23,105,255,.2); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 11px 24px rgba(23,105,255,.28); }
.primary-button:disabled { cursor: wait; opacity: .65; }
.secondary-button { background: white; border-color: #dce3ed; color: #425169; box-shadow: 0 2px 5px rgba(14,31,56,.03); }
.secondary-button:hover { border-color: #adc4e9; background: #f8faff; color: var(--blue); }
.secondary-button svg { width: 15px; }
.login-button { width: 100%; height: 48px; margin-top: 5px; justify-content: space-between; padding: 0 20px; }
.button-arrow { font-size: 19px; font-weight: 400; }
.security-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px 0 0; color: #91a0b4; font-size: 11px; }
.security-note span { width: 7px; height: 7px; border: 2px solid #89a4c5; border-radius: 50%; }
.form-error { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #f3baca; border-radius: 12px; color: #bc2847; background: #fff1f4; font-size: 12px; line-height: 1.5; }

.admin-page { display: flex; min-height: 100vh; background: #f3f6fb; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 232px; padding: 0 14px 16px; background: linear-gradient(180deg, #0b1e4a 0%, #102a5c 100%); color: white; }
.sidebar::after { content: ""; position: absolute; right: -1px; top: 0; width: 1px; height: 100%; background: linear-gradient(transparent, rgba(60,183,255,.3), transparent); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; height: 74px; padding: 0 10px; border-bottom: 1px solid rgba(255,255,255,.09); }
.sidebar-brand .brand-mark { transform: scale(.78); transform-origin: left center; width: 34px; }
.sidebar-brand strong { display: block; font-size: 16px; }
.sidebar-brand small { display: block; margin-top: 3px; color: rgba(255,255,255,.42); font-size: 9px; letter-spacing: .1em; }
.sidebar-label { padding: 26px 12px 9px; color: rgba(255,255,255,.33); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 13px; border: 0; border-radius: 14px; background: transparent; color: rgba(227,238,255,.58); font-size: 13px; text-align: left; transition: .18s; }
.nav-item svg { width: 18px; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(255,255,255,.13); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: #41d9ff; }
.sidebar-bottom { margin-top: auto; padding: 14px 7px 0; border-top: 1px solid rgba(255,255,255,.08); }
.admin-identity { display: flex; align-items: center; gap: 10px; padding: 8px; }
.admin-identity > span { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 14px; background: linear-gradient(145deg, #2563eb, #11b8e6); font-size: 13px; font-weight: 700; }
.admin-identity p { min-width: 0; margin: 0; }
.admin-identity strong, .admin-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-identity strong { font-size: 12px; }
.admin-identity small { margin-top: 3px; color: rgba(255,255,255,.42); font-size: 10px; }
.logout-button { display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 6px; padding: 9px 10px; border: 0; background: transparent; color: rgba(255,255,255,.42); font-size: 11px; }
.logout-button:hover { color: #ffafbf; }
.logout-button svg { width: 15px; }

.main { width: calc(100% - 232px); min-height: 100vh; margin-left: 232px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 88px; padding: 18px 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); }
.breadcrumb { margin: 0 0 7px; color: #8b97a9; font-size: 10px; font-weight: 600; letter-spacing: .08em; }
.breadcrumb span { margin: 0 7px; color: #c3cbd6; }
.topbar h1 { margin: 0; color: #132039; font-size: 23px; letter-spacing: -.02em; }
.topbar h1 + p { margin: 5px 0 0; color: #7b8799; font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.environment-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #dce9e4; border-radius: 999px; color: #47806b; background: #f5fbf8; font-size: 11px; }
.environment-pill i { width: 7px; height: 7px; border-radius: 50%; background: #12ae74; box-shadow: 0 0 0 3px rgba(18,174,116,.11); }
.content { width: 100%; max-width: 1520px; margin: 0 auto; padding: 24px 28px 48px; }
.loading-state, .empty-state { display: grid; place-items: center; min-height: 320px; border: 1px solid var(--line); border-radius: 20px; background: white; color: var(--muted); font-size: 13px; }
.loading-dot { width: 28px; height: 28px; margin-bottom: 12px; border: 3px solid #dbe7f7; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { position: relative; overflow: hidden; min-height: 138px; padding: 21px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 8px 26px rgba(15,23,42,.05); }
.stat-card::after { content: ""; position: absolute; width: 82px; height: 82px; right: -30px; bottom: -36px; border-radius: 50%; background: var(--tint, #eef5ff); }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #718097; font-size: 12px; }
.stat-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 12px; color: var(--accent, var(--blue)); background: var(--tint, #edf4ff); font-size: 14px; font-weight: 700; }
.stat-value { margin: 13px 0 2px; color: #132039; font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.stat-note { color: #96a1b0; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: 16px; margin-top: 16px; }
.panel { border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 8px 26px rgba(15,23,42,.05); }
.panel-header { display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 16px 20px; border-bottom: 1px solid #edf0f5; }
.panel-header h2 { margin: 0; color: #1c2940; font-size: 15px; }
.panel-header p { margin: 5px 0 0; color: #8a96a8; font-size: 10px; }
.panel-body { padding: 18px 20px; }
.recent-list { margin: 0; padding: 0; list-style: none; }
.recent-list li { display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid #f0f2f6; }
.recent-list li:last-child { border-bottom: 0; }
.user-avatar { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 14px; background: #edf4ff; color: #2563eb; font-size: 12px; font-weight: 700; }
.user-info { min-width: 0; }
.user-info strong, .user-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-info strong { color: #26344b; font-size: 12px; }
.user-info span { margin-top: 4px; color: #929dab; font-size: 10px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 600; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }
.status-ok { color: #14815d; background: #e9f8f2; }
.status-ok::before { background: #18a977; }
.status-off { color: #bd3950; background: #ffedf1; }
.status-off::before { background: #dc3855; }
.status-warn { color: #b16e0a; background: #fff6e5; }
.status-warn::before { background: #e39a26; }
.progress-row { margin-bottom: 19px; }
.progress-row:last-child { margin-bottom: 0; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 7px; color: #536177; font-size: 11px; }
.progress-label strong { color: #26344b; }
.progress-track { height: 6px; overflow: hidden; border-radius: 10px; background: #edf1f6; }
.progress-bar { height: 100%; border-radius: 10px; background: linear-gradient(90deg, #2563eb, #06b6d4); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.search-box { position: relative; width: min(360px, 100%); }
.search-box input { width: 100%; height: 40px; padding: 0 14px 0 38px; border: 1px solid #dce3ed; border-radius: 12px; outline: none; background: white; }
.search-box input:focus { border-color: #75a3f7; box-shadow: 0 0 0 3px rgba(23,105,255,.08); }
.search-box::before { content: "⌕"; position: absolute; left: 13px; top: 7px; color: #8794a8; font-size: 20px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; min-width: 780px; border-collapse: collapse; }
.data-table th { padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8fafc; color: #7c899c; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-align: left; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid #edf0f4; color: #546176; font-size: 11px; vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfcff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.table-user { display: flex; align-items: center; gap: 10px; }
.table-user strong { color: #26344b; }
.table-user small { display: block; margin-top: 3px; color: #929dae; }
.admin-tag { margin-left: 6px; padding: 2px 5px; border-radius: 4px; color: #2563eb; background: #eaf2ff; font-size: 8px; }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; }
.tiny-button { padding: 6px 9px; border: 1px solid #dce3ed; border-radius: 10px; color: #536177; background: white; font-size: 10px; }
.tiny-button:hover { border-color: #92b4ef; color: #2563eb; }
.tiny-button.danger:hover { border-color: #f1afba; color: #c52f4a; background: #fff5f7; }
.table-footer { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 10px 16px; border-top: 1px solid var(--line); color: #8490a2; font-size: 10px; }
.pagination { display: flex; gap: 6px; align-items: center; }
.pagination button { padding: 6px 9px; border: 1px solid #dce3ed; border-radius: 10px; background: white; color: #5c687b; font-size: 10px; }
.pagination button:disabled { opacity: .4; cursor: default; }

.workflow-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.workflow-grid, .health-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.workflow-card, .health-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.workflow-card-top, .health-card-top { display: flex; align-items: center; justify-content: space-between; }
.workflow-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 12px; color: var(--blue); background: #edf4ff; font-size: 13px; font-weight: 700; }
.workflow-card h3, .health-card h3 { margin: 14px 0 5px; color: #26344b; font-size: 12px; }
.workflow-card p, .health-card p { margin: 0; color: #8b97a9; font: 9px/1.6 monospace; overflow-wrap: anywhere; }
.config-note { margin-top: 14px; padding: 11px 13px; border-radius: 20px; color: #69778c; background: #f6f8fb; font-size: 10px; }
.knowledge-dify-panel { margin-top: 16px; }
.knowledge-dify-header { gap: 18px; }
.knowledge-dify-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.knowledge-dify-status { min-width: 0; padding: 15px; border: 1px solid #e2e8f1; border-radius: 15px; background: linear-gradient(145deg, #fff, #f8faff); }
.knowledge-dify-status > span, .knowledge-dify-status strong, .knowledge-dify-status small { display: block; }
.knowledge-dify-status > span { color: #8491a3; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.knowledge-dify-status strong { margin-top: 9px; color: #26344b; font-size: 12px; overflow-wrap: anywhere; }
.knowledge-dify-status strong.monospace { font: 600 10px/1.6 monospace; }
.knowledge-dify-status small { margin-top: 7px; color: #99a4b3; font-size: 9px; line-height: 1.55; }
.knowledge-dify-status .status-badge { display: inline-flex; margin: 0; }
.knowledge-dify-warning, .knowledge-dify-notice { margin-top: 14px; padding: 11px 13px; border-radius: 13px; font-size: 11px; line-height: 1.65; }
.knowledge-dify-warning { border: 1px solid #f1d6a4; color: #93610e; background: #fff8e9; }
.knowledge-dify-notice { margin-top: 0; margin-bottom: 14px; }
.knowledge-dify-notice.success { border: 1px solid #bee7d9; color: #126e50; background: #edf9f5; }
.knowledge-dify-notice.error { border: 1px solid #f2c1cc; color: #b32946; background: #fff2f5; }
.knowledge-dify-form { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(260px, 1fr) auto; align-items: end; gap: 14px; margin-top: 15px; padding: 16px; border: 1px solid #e2e8f1; border-radius: 16px; background: #f8fafd; }
.knowledge-dify-form-copy { align-self: center; }
.knowledge-dify-form-copy strong, .knowledge-dify-form-copy span { display: block; }
.knowledge-dify-form-copy strong { color: #26344b; font-size: 12px; }
.knowledge-dify-form-copy span { margin-top: 6px; color: #8491a3; font-size: 10px; line-height: 1.6; }
.knowledge-dify-key-field { margin: 0; }
.knowledge-dify-input-wrap { position: relative; display: block; }
.knowledge-dify-input-wrap input { padding-right: 58px; font-family: monospace; }
.knowledge-dify-check { display: flex; grid-column: 2 / 3; align-items: flex-start; gap: 8px; color: #526077; cursor: pointer; }
.knowledge-dify-check input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--blue); }
.knowledge-dify-check span, .knowledge-dify-check strong, .knowledge-dify-check small { display: block; }
.knowledge-dify-check strong { color: #425169; font-size: 10px; }
.knowledge-dify-check small { margin-top: 3px; color: #919dad; font-size: 9px; }
.knowledge-dify-form .form-error { grid-column: 1 / -1; margin: 0; }
.knowledge-dify-actions { display: flex; grid-column: 3 / 4; grid-row: 1 / 3; align-self: end; gap: 8px; }
.danger-button { color: #b32946; border-color: #edc2cc; }
.danger-button:hover { color: #a51f3b; border-color: #df95a6; background: #fff5f7; }
.danger-button:disabled { cursor: not-allowed; opacity: .45; }
.health-card { position: relative; }
.health-card.ok { border-color: #d8eee6; background: linear-gradient(145deg, #fff, #f5fcf9); }
.health-card.error { border-color: #f2ced5; background: linear-gradient(145deg, #fff, #fff6f8); }
.health-signal { width: 10px; height: 10px; border-radius: 50%; background: #16a875; box-shadow: 0 0 0 4px rgba(22,168,117,.1); }
.health-card.error .health-signal { background: #dc3855; box-shadow: 0 0 0 4px rgba(220,56,85,.1); }
.health-card p { font-family: inherit; }
.health-latency { margin-top: 12px; color: #9aa5b3; font-size: 9px; }
.audit-detail { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: monospace; color: #8793a5; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,17,39,.58); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(540px, 100%); padding: 24px; border-radius: 28px; background: white; box-shadow: 0 25px 80px rgba(3,17,40,.3); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.modal-kicker { color: var(--blue); font-size: 9px; }
.modal-header h2 { margin: 7px 0 0; color: #1c2940; font-size: 20px; }
.close-button { border: 0; background: transparent; color: #8b97a9; font-size: 25px; line-height: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .field { margin-bottom: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; padding-top: 17px; border-top: 1px solid #edf0f4; }
.toast { position: fixed; z-index: 200; right: 24px; bottom: 24px; max-width: 360px; padding: 12px 16px; border-radius: 14px; color: white; background: #17365d; box-shadow: 0 14px 36px rgba(7,24,50,.24); font-size: 12px; animation: toast-in .22s ease-out; }
.toast.error { background: #c63350; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-grid, .health-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .knowledge-dify-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-dify-form { grid-template-columns: 1fr 1.2fr; }
  .knowledge-dify-check { grid-column: 2; }
  .knowledge-dify-actions { grid-column: 1 / -1; grid-row: auto; justify-content: flex-end; }
}
@media (max-width: 850px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { display: none; }
  .login-panel { min-height: 100vh; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 42px; color: #16305a; }
  .sidebar { width: 76px; padding-left: 9px; padding-right: 9px; }
  .sidebar-brand { justify-content: center; padding: 0; }
  .sidebar-brand > div, .sidebar-label, .nav-item span, .sidebar-bottom { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item.active::before { left: -9px; }
  .main { width: calc(100% - 76px); margin-left: 76px; }
  .topbar, .content { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 620px) {
  .login-panel { padding: 28px; }
  .topbar { align-items: flex-start; gap: 16px; }
  .topbar-actions { flex-direction: column; align-items: flex-end; }
  .environment-pill { display: none; }
  .content { padding: 18px 14px 40px; }
  .stats-grid, .workflow-summary, .workflow-grid, .health-grid { grid-template-columns: 1fr; }
  .knowledge-dify-status-grid, .knowledge-dify-form { grid-template-columns: 1fr; }
  .knowledge-dify-check, .knowledge-dify-actions { grid-column: 1; }
  .knowledge-dify-actions { justify-content: stretch; }
  .knowledge-dify-actions button { flex: 1; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
}

