:root {
    --ink: #15233b;
    --muted: #6f7d93;
    --line: #dfe5ee;
    --canvas: #f4f6fa;
    --surface: #ffffff;
    --navy: #101b31;
    --blue: #2368f2;
    --blue-dark: #174ec2;
    --green: #159a70;
    --amber: #d98a15;
    --violet: #7756d9;
    --danger: #d74646;
    --shadow: 0 18px 50px rgba(30, 48, 78, .08);
    font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

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

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px 20px; color: #fff; background: var(--navy); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 30px; }
.brand-mark { width: 38px; height: 38px; display: block; flex: 0 0 auto; object-fit: contain; filter: drop-shadow(0 8px 11px rgba(46,111,244,.28)); }
.brand strong, .sidebar-foot strong { display: block; font-size: 14px; letter-spacing: .01em; }
.brand small, .sidebar-foot small { display: block; margin-top: 3px; color: #8190aa; font-size: 9px; letter-spacing: .16em; }
.nav-section { display: block; padding: 25px 12px 9px; color: #66758f; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 44px; margin: 4px 0; padding: 0 13px; border-radius: 10px; color: #b8c2d4; font-size: 14px; text-decoration: none; }
.nav-item.active { color: #fff; background: rgba(64, 126, 246, .17); box-shadow: inset 3px 0 #4b8aff; }
.nav-item.muted { opacity: .58; cursor: default; }
.nav-icon { width: 20px; text-align: center; font-size: 17px; }
.sidebar-foot { position: relative; margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #3bd49e; box-shadow: 0 0 0 4px rgba(59,212,158,.12); }

.main-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 42px 46px 56px; overflow: hidden; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; margin-bottom: 29px; }
.user-avatar { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; background: #eaf1ff; }
.user-avatar-fallback { display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #2368f2, #7756d9); font-size: 14px; font-weight: 800; }
.user-menu-trigger { width: 100%; min-height: 48px; padding: 7px; display: flex; align-items: center; gap: 9px; color: #fff; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.user-menu-trigger:hover, .user-menu-trigger[aria-expanded="true"] { background: rgba(255,255,255,.08); }
.user-details { min-width: 0; flex: 1; line-height: 1.2; }
.user-details strong, .user-details small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-details strong { color: #eef3fb; font-size: 12px; }
.user-details small { margin-top: 3px; color: #8190aa; font-size: 10px; }
.user-menu-chevron { color: #8190aa; font-size: 14px; transition: transform .18s ease; }
.user-menu-trigger[aria-expanded="true"] .user-menu-chevron { transform: rotate(180deg); }
.user-popover { position: absolute; z-index: 30; right: 0; bottom: calc(100% + 10px); left: 0; padding: 6px; border: 1px solid #dfe5ee; border-radius: 10px; background: #fff; box-shadow: 0 14px 36px rgba(5,13,28,.28); }
.user-popover::after { content: ""; position: absolute; right: 18px; bottom: -6px; width: 10px; height: 10px; border-right: 1px solid #dfe5ee; border-bottom: 1px solid #dfe5ee; background: #fff; transform: rotate(45deg); }
.logout-button { position: relative; z-index: 1; width: 100%; min-height: 38px; padding: 0 11px; display: flex; align-items: center; gap: 9px; color: #5d697d; border: 0; border-radius: 7px; background: transparent; font-size: 12px; font-weight: 700; text-align: left; }
.logout-button:hover { color: var(--danger); background: #fff0f0; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: -.02em; }
.subtitle { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.primary-button, .secondary-button, .danger-button, .text-button { min-height: 40px; padding: 0 17px; border-radius: 8px; border: 1px solid transparent; font-weight: 700; font-size: 13px; transition: .18s ease; }
.primary-button { color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(35,104,242,.18); }
.primary-button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.secondary-button { color: #344258; border-color: #d8dee8; background: #fff; }
.secondary-button:hover { border-color: #aeb9ca; background: #f9fafc; }
.text-button { padding-inline: 10px; color: var(--muted); background: transparent; }
.text-button:hover { color: var(--blue); }
.danger-button { color: #fff; background: var(--danger); }
.danger-button:hover { background: #bd3434; }
button:disabled { opacity: .56; cursor: wait; transform: none !important; }

.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.summary-card { position: relative; min-height: 124px; padding: 22px 22px 18px; border: 1px solid #e3e8ef; border-radius: 12px; background: var(--surface); box-shadow: 0 5px 18px rgba(31,48,76,.035); overflow: hidden; }
.summary-card::before { content: ""; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent); }
.summary-card::after { content: ""; position: absolute; width: 80px; height: 80px; top: -48px; right: -30px; border-radius: 50%; background: var(--accent); opacity: .08; }
.accent-blue { --accent: var(--blue); }
.accent-green { --accent: var(--green); }
.accent-amber { --accent: var(--amber); }
.accent-violet { --accent: var(--violet); }
.summary-label { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.summary-card strong { display: block; margin: 9px 0 3px; font-size: 29px; letter-spacing: -.03em; }
.summary-card strong.time-value { padding-top: 7px; font-size: 15px; letter-spacing: 0; }
.summary-card small { color: #9aa5b5; font-size: 10px; }

.workspace-card { border: 1px solid #e0e5ed; border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.filters { min-height: 74px; padding: 15px 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.filters input, .filters select, .field input, .field select { height: 40px; padding: 0 12px; color: var(--ink); border: 1px solid #d7dee8; border-radius: 8px; outline: none; background: #fff; }
.filters input:focus, .filters select:focus, .field input:focus, .field select:focus, textarea:focus { border-color: #6c9cf8; box-shadow: 0 0 0 3px rgba(35,104,242,.09); }
.search-box { position: relative; min-width: 260px; }
.search-box span { position: absolute; left: 12px; top: 50%; color: #8c98aa; font-size: 19px; line-height: 1; transform: translateY(-50%); }
.search-box input { width: 100%; padding-right: 36px; padding-left: 36px; }
.clearable-field { position: relative; }
.clearable-field input { padding-right: 36px; }
.clear-field-button { position: absolute; z-index: 2; top: 50%; right: 9px; width: 22px; height: 22px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; color: #8794a7; background: transparent; font-size: 18px; line-height: 1; transform: translateY(-50%); }
.clear-field-button:hover { color: #315fba; background: #eaf1ff; }
.clear-field-button:focus-visible { outline: 2px solid #6c9cf8; outline-offset: 1px; }
.field.clearable-field .clear-field-button { top: auto; bottom: 9px; transform: none; }
.filter-remark-field { position: relative; width: 220px; }
.filter-remark-field input { width: 100%; padding-right: 36px; }
.clearable-field input[type="search"] { appearance: none; -webkit-appearance: none; }
.clearable-field input[type="search"]::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }
.filters select { min-width: 128px; }
.result-count { margin-left: auto; color: #8c98aa; font-size: 12px; }
.table-wrap { position: relative; min-height: 340px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th { height: 44px; padding: 0 18px; color: #738097; background: #f8f9fb; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; text-align: left; letter-spacing: .03em; }
td { height: 68px; padding: 10px 18px; border-bottom: 1px solid #edf0f4; color: #46536a; font-size: 13px; }
tbody tr:hover { background: #fafcff; }
.file-cell strong { display: block; color: #1e2c43; font-size: 13px; }
.remark-cell { max-width: 340px; color: #69768a; white-space: normal; overflow-wrap: anywhere; }
.server-table { min-width: 1040px; }
.server-table td { white-space: nowrap; }
.server-name { color: #1e2c43; font-weight: 750; }
.server-instance { max-width: 240px; overflow: hidden; color: #607089; font-family: "Cascadia Code", Consolas, monospace; text-overflow: ellipsis; }
.server-address { color: #315f9f; font-family: "Cascadia Code", Consolas, monospace; }
.actions-column { width: 240px; text-align: right; }
.actions { display: flex; justify-content: flex-end; gap: 4px; }
.table-button { padding: 6px 8px; color: #58708e; border: 0; border-radius: 6px; background: transparent; font-size: 12px; }
.table-button:hover { color: var(--blue); background: #edf3ff; }
.table-button.source { color: #315fba; }
.table-button.key { color: #58708e; }
.table-button.delete:hover { color: var(--danger); background: #fff0f0; }
.empty-state, .loading-state { min-height: 295px; display: grid; place-content: center; justify-items: center; color: #909bad; text-align: center; }
.empty-state span { font-size: 34px; color: #b4becc; }
.empty-state h2 { margin: 10px 0 4px; color: #536176; font-size: 16px; }
.empty-state p { margin: 0; font-size: 12px; }
.loading-state { display: flex; gap: 10px; font-size: 13px; }
.spinner { width: 17px; height: 17px; border: 2px solid #dce4f0; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

dialog { width: min(760px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 0 30px 90px rgba(12,24,46,.26); }
.editor-dialog { width: min(940px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: hidden; }
.editor-dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
.editor-dialog .dialog-head, .editor-dialog .dialog-actions { flex: 0 0 auto; }
.editor-dialog .dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.editor-dialog.maximized { inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; border-radius: 0; box-shadow: none; }
.editor-dialog.maximized form { height: 100%; max-height: none; }
.editor-dialog.maximized .dialog-head, .editor-dialog.maximized .form-grid,
.editor-dialog.maximized .editor-toolbar, .editor-dialog.maximized #yamlEditorPanel > .editor-stats { display: none; }
.editor-dialog.maximized .dialog-body { display: flex; flex: 1; flex-direction: column; padding: 0; overflow: hidden; }
.editor-dialog.maximized .editor-field { flex: 1; min-height: 0; margin: 0; gap: 0; }
.editor-dialog.maximized #yamlEditorPanel { position: relative; display: flex; flex: 1; min-height: 0; flex-direction: column; }
.editor-dialog.maximized .yaml-editor-controls { position: absolute; z-index: 4; top: 10px; right: 18px; margin: 0; }
.editor-dialog.maximized .yaml-editor { flex: 1; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.editor-dialog.maximized .yaml-editor:focus-within { border: 0; box-shadow: none; }
.editor-dialog.maximized .yaml-editor textarea { height: 100%; min-height: 100%; resize: none; }
.editor-dialog.maximized .yaml-highlight { height: auto; min-height: 0; }
.editor-dialog.maximized .dialog-actions { min-height: 60px; padding: 10px 18px; border-color: #273854; background: #0d1829; }
.editor-dialog.maximized #cancelButton { display: none; }
dialog::backdrop { background: rgba(10,20,38,.56); backdrop-filter: blur(2px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.dialog-head h2, .confirm-dialog h2 { margin: 0; font-size: 20px; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 8px; color: #748198; background: #f1f3f6; font-size: 22px; }
.dialog-body { padding: 22px 26px 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; color: #536176; font-size: 12px; font-weight: 700; }
.field b { color: var(--danger); }
.field-wide { grid-column: span 2; }
.editor-field { margin-top: 18px; gap: 10px; }
.editor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.editor-view-switch { display: inline-flex; padding: 3px; border: 1px solid #dce3ed; border-radius: 8px; background: #f3f5f8; }
.editor-view-switch button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 6px; color: #718096; background: transparent; font-size: 11px; font-weight: 700; transition: .16s ease; }
.editor-view-switch button:hover:not(:disabled) { color: var(--blue); }
.editor-view-switch button.active { color: #174fbd; background: #fff; box-shadow: 0 2px 7px rgba(30,48,78,.11); }
.editor-view-switch button:disabled { color: #adb5c2; }
.yaml-editor-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 7px; }
.yaml-font-controls { display: inline-flex; align-items: center; height: 30px; overflow: hidden; border: 1px solid #d8e0eb; border-radius: 7px; background: #fff; }
.yaml-font-controls button, .yaml-maximize-button { height: 30px; padding: 0 10px; border: 0; color: #526178; background: #fff; font-size: 11px; font-weight: 700; }
.yaml-font-controls button:hover:not(:disabled), .yaml-maximize-button:hover { color: var(--blue); background: #edf4ff; }
.yaml-font-controls button:disabled { color: #bdc5d1; cursor: not-allowed; }
.yaml-font-controls output { min-width: 43px; color: #738197; border-inline: 1px solid #e3e8ef; font: 10px/28px "Cascadia Code", Consolas, monospace; text-align: center; }
.yaml-maximize-button { border: 1px solid #d8e0eb; border-radius: 7px; }
.yaml-close-button { display: none; width: 30px; height: 30px; padding: 0; place-items: center; border: 1px solid #d8e0eb; border-radius: 7px; color: #66758b; background: #fff; font-size: 20px; line-height: 1; }
.yaml-close-button:hover { color: var(--danger); border-color: #f1c5c5; background: #fff0f0; }
.editor-dialog.maximized .yaml-close-button { display: grid; }
.yaml-editor { --yaml-font-size: 16px; --yaml-line-height: 27px; --yaml-scrollbar-height: 12px; position: relative; overflow: hidden; border: 1px solid #273854; border-radius: 9px; background: #111d31; box-shadow: inset 0 1px 0 rgba(255,255,255,.025); }
.yaml-editor:focus-within { border-color: #4f8df7; box-shadow: 0 0 0 3px rgba(51,119,238,.12), inset 0 1px 0 rgba(255,255,255,.025); }
.yaml-highlight, .yaml-editor textarea { width: 100%; min-height: 290px; margin: 0; padding: 0 15px 15px 45px; border: 0; font-family: "Cascadia Code", Consolas, monospace; font-size: var(--yaml-font-size); line-height: var(--yaml-line-height); tab-size: 2; white-space: pre; }
.yaml-line-numbers { position: absolute; z-index: 2; top: 0; bottom: var(--yaml-scrollbar-height); left: 0; width: 45px; margin: 0; padding: 0 9px 15px 0; overflow: hidden; color: #52627a; border-right: 1px solid rgba(148,163,184,.12); background: #0d1829; font-family: "Cascadia Code", Consolas, monospace; font-size: calc(var(--yaml-font-size) - 1px); line-height: var(--yaml-line-height); text-align: right; pointer-events: none; user-select: none; }
.yaml-line-numbers span { display: block; height: var(--yaml-line-height); }
.yaml-line-numbers span.active { color: #93c5fd; font-weight: 700; }
.yaml-highlight { position: absolute; inset: 0 0 var(--yaml-scrollbar-height); min-height: 0; overflow: hidden; color: #cbd5e1; background: transparent; pointer-events: none; }
.yaml-editor textarea { position: relative; display: block; overflow-x: scroll; overflow-y: auto; resize: vertical; outline: none; color: transparent; caret-color: #f8fafc; background: transparent; -webkit-text-fill-color: transparent; }
.yaml-editor textarea::-webkit-scrollbar { height: var(--yaml-scrollbar-height); }
.yaml-editor textarea::-webkit-scrollbar-track:horizontal { background: #0d1829; }
.yaml-editor textarea::-webkit-scrollbar-thumb:horizontal { border: 3px solid #0d1829; border-radius: 8px; background: #52627a; }
.yaml-editor textarea::placeholder { color: #66758c; -webkit-text-fill-color: #66758c; }
.yaml-editor textarea::selection { color: transparent; background: rgba(72,129,229,.32); -webkit-text-fill-color: transparent; }
.yaml-key { color: #7dd3fc; font-weight: 650; }
.yaml-string, .yaml-value { color: #86efac; }
.yaml-number { color: #fbbf24; }
.yaml-boolean { color: #c4b5fd; font-weight: 650; }
.yaml-null { color: #94a3b8; font-style: italic; }
.yaml-comment { color: #64748b; font-style: italic; }
.yaml-punctuation { color: #94a3b8; }
.yaml-list-marker { color: #f472b6; font-weight: 700; }
.yaml-anchor { color: #d8b4fe; }
.editor-stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 10px; margin-top: 7px; color: #9aa5b5; font-weight: 400; }
.yaml-shortcuts { color: #7f8da2; font-size: 10px; letter-spacing: .01em; }
.key-add-row { display: grid; grid-template-columns: minmax(230px, .9fr) minmax(280px, 1.1fr) auto; gap: 10px; margin-bottom: 10px; }
.key-add-row label { min-width: 0; }
.key-add-row input { width: 100%; height: 40px; padding: 0 11px; border: 1px solid #d7dee8; border-radius: 8px; outline: none; color: #29384f; background: #fff; font: 12px "Cascadia Code", Consolas, monospace; }
.key-add-row input:focus { border-color: #6c9cf8; box-shadow: 0 0 0 3px rgba(35,104,242,.09); }
.key-add-row .secondary-button { white-space: nowrap; }
.key-editor-head, .key-editor-row { display: grid; grid-template-columns: 26px minmax(230px, .9fr) minmax(280px, 1.1fr); gap: 12px; align-items: center; }
.key-editor-head { min-height: 38px; padding: 0 14px; color: #77849a; border: 1px solid #dce2eb; border-bottom: 0; border-radius: 9px 9px 0 0; background: #f7f9fc; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.key-editor-list { min-height: 290px; max-height: 390px; overflow-y: auto; border: 1px solid #dce2eb; border-radius: 0 0 9px 9px; background: #fff; }
.key-editor-row { min-height: 52px; padding: 7px 14px; border-bottom: 1px solid #edf0f4; }
.key-editor-row:last-child { border-bottom: 0; }
.key-editor-row:hover { background: #fafcff; }
.key-editor-row.dragging { opacity: .48; }
.key-editor-row.drag-over { background: #eef4ff; box-shadow: inset 0 2px var(--blue); }
.drag-handle { width: 24px; height: 32px; padding: 0; border: 0; border-radius: 6px; color: #9aa6b8; background: transparent; cursor: grab; font-size: 14px; letter-spacing: -3px; }
.drag-handle:hover { color: var(--blue); background: #eaf1ff; }
.drag-handle:active { cursor: grabbing; }
.key-editor-row code { overflow: hidden; color: #31517d; font: 11px/1.5 "Cascadia Code", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.key-name-control { min-width: 0; display: flex; align-items: center; }
.key-name-control small { max-width: 52%; overflow: hidden; color: #8794a7; font: 10px/1.5 "Cascadia Code", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.key-name-control input { min-width: 80px; width: 100%; height: 36px; padding: 0 10px; border: 1px solid #d7dee8; border-radius: 7px; outline: none; color: #31517d; background: #fff; font: 12px "Cascadia Code", Consolas, monospace; }
.key-value-control { grid-column: 3; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.key-value-input-wrap { position: relative; min-width: 0; }
.key-value-control input { width: 100%; height: 36px; padding: 0 35px 0 11px; border: 1px solid #d7dee8; border-radius: 7px; outline: none; color: #29384f; background: #fff; cursor: text; user-select: text; font: 12px "Cascadia Code", Consolas, monospace; }
.key-value-control .clear-field-button { right: 7px; }
.file-value-button { height: 32px; padding: 0 8px; border: 1px solid #cbd8ec; border-radius: 6px; color: #315f9f; background: #f4f8ff; cursor: pointer; white-space: nowrap; font-size: 10px; font-weight: 700; }
.file-value-button:hover { border-color: #82aaf0; color: #1956b1; background: #eaf2ff; }
.file-value-button:disabled { opacity: .55; cursor: wait; }
.key-editor-row input:focus { border-color: #6c9cf8; box-shadow: 0 0 0 3px rgba(35,104,242,.09); }
.key-editor-empty { min-height: 290px; margin-top: -1px; display: grid; place-items: center; border: 1px solid #dce2eb; border-radius: 0 0 9px 9px; color: #929dad; background: #fbfcfd; font-size: 12px; }
.file-upload-dialog { width: min(480px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 13px; color: var(--ink); background: #fff; box-shadow: 0 24px 70px rgba(12,28,55,.28); }
.file-upload-dialog::backdrop { background: rgba(13,25,45,.5); backdrop-filter: blur(2px); }
.file-upload-dialog-head { padding: 21px 24px 17px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 1px solid var(--line); }
.file-upload-dialog-head h2 { margin: 0; font-size: 19px; }
.file-upload-dialog-body { padding: 22px 24px; display: grid; gap: 17px; }
.file-upload-option-field { display: grid; gap: 7px; color: #536177; font-size: 12px; font-weight: 750; }
.file-upload-option-field select, .file-upload-option-field input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d3ddeb; border-radius: 8px; outline: none; color: #29384f; background: #fff; font-size: 13px; font-weight: 400; }
.file-upload-option-field select:focus, .file-upload-option-field input:focus { border-color: #6c9cf8; box-shadow: 0 0 0 3px rgba(35,104,242,.09); }
.file-upload-option-field small, .file-upload-public-hint { margin: 0; color: #8a96a8; font-size: 11px; font-weight: 400; line-height: 1.55; }
.file-upload-public-hint { padding: 10px 12px; border-radius: 7px; background: #f2f6fd; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--line); background: #fafbfc; }
.confirm-dialog { width: min(430px, calc(100vw - 32px)); padding: 30px 30px 0; text-align: center; }
.confirm-dialog .confirm-icon { width: 44px; height: 44px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 50%; color: var(--danger); background: #fff0f0; font-weight: 800; }
.confirm-dialog p { margin: 10px 0 25px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.confirm-dialog .dialog-actions { margin: 0 -30px; }
.toast { position: fixed; top: auto; right: 24px; bottom: 24px; left: auto; z-index: 20; min-width: 240px; max-width: 400px; margin: 0; padding: 13px 16px; border: 0; border-radius: 9px; color: #fff; background: #17243a; box-shadow: 0 14px 35px rgba(13,25,45,.22); font-size: 13px; opacity: 0; transform: translateY(15px); pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #b83b3b; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
    .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
    .sidebar { padding-inline: 12px; }
    .brand { padding-inline: 7px; }
    .brand div, .nav-label, .nav-section, .sidebar-foot .user-details, .user-menu-chevron { display: none; }
    .nav-item { justify-content: center; padding: 0; }
    .nav-icon { font-size: 20px; }
    .sidebar-foot { display: flex; justify-content: center; }
    .user-menu-trigger { width: 48px; padding: 7px; }
    .user-popover { right: auto; width: 180px; }
    .main-content { padding-inline: 28px; }
    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters { flex-wrap: wrap; }
    .result-count { width: 100%; margin-left: 0; }
}

@media (max-width: 680px) {
    .app-shell { display: block; }
    .sidebar { position: static; width: 100%; height: 68px; padding: 14px 18px; flex-direction: row; align-items: center; }
    .brand { padding: 0; }
    .brand div { display: block; }
    .sidebar nav { display: none; }
    .sidebar-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
    .user-popover { top: calc(100% + 10px); right: 0; bottom: auto; left: auto; }
    .user-popover::after { top: -6px; right: 18px; bottom: auto; border: 0; border-top: 1px solid #dfe5ee; border-left: 1px solid #dfe5ee; }
    .main-content { padding: 26px 16px 38px; }
    .topbar { align-items: flex-end; }
    .user-avatar { width: 29px; height: 29px; }
    .subtitle { display: none; }
    h1 { font-size: 25px; }
    .summary-grid { grid-template-columns: 1fr 1fr; }
    .summary-card { min-height: 104px; padding: 17px; }
    .summary-card strong { font-size: 24px; }
    .filters > label, .search-box, .filter-remark-field { width: 100%; min-width: 0; }
    .filters input, .filters select { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
    .dialog-body, .dialog-head { padding-inline: 18px; }
    textarea { min-height: 240px; }
    .editor-toolbar { align-items: flex-start; flex-direction: column; }
    .key-add-row { grid-template-columns: 1fr; }
    .key-editor-head, .key-editor-row { grid-template-columns: 26px minmax(0, 1fr); gap: 6px 10px; }
    .key-editor-head span:last-child { display: none; }
    .key-value-control { grid-column: 2; }
    .key-editor-list, .key-editor-empty { min-height: 240px; }
}
