:root { --sky:#00a4cb; --blue:#124274; --mid-blue:#1681b3; --line:#d8dde0; --neutral:#231f20; --ink:var(--neutral); --muted:#66758a; --bg:#f6f8f9; --panel:#fff; --bad:#ce181e; --ok:#0b7a4a; --warn:#a56200; --detail-width:clamp(340px,26vw,500px); }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html,body { height:100%; overflow:hidden; }
body { margin:0; min-height:100vh; font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--ink); background:var(--bg); }
button,input,select,textarea { font:inherit; }
button,.button-link { min-height:36px; border:1px solid var(--line); border-radius:6px; padding:7px 10px; background:#fff; color:var(--blue); cursor:pointer; font-weight:650; }
.button-link { display:inline-flex; align-items:center; text-decoration:none; }
button:hover,.button-link:hover { border-color:var(--sky); } button:disabled { opacity:.55; cursor:not-allowed; } button.primary { color:#fff; background:var(--blue); border-color:var(--blue); } button.danger { color:#7a271a; border-color:#f3b4ad; } button.ghost { background:#f8fafc; }
input,select,textarea { display:block; width:100%; min-width:0; border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--ink); padding:7px 9px; } textarea { min-height:54px; resize:vertical; } label { display:block; color:var(--muted); font-size:12px; } label > input,label > select,label > textarea { margin-top:4px; }
h1,h2,h3 { color:var(--blue); } h1 { margin:0; font-size:20px; font-weight:760; } h2 { margin:0; font-size:17px; } h3 { margin:0 0 9px; font-size:14px; } p { margin:3px 0 0; color:var(--muted); }
.app-header { height:auto; border-top:4px solid var(--sky); border-bottom:1px solid var(--line); background:var(--panel); padding:12px 20px; display:grid; grid-template-columns:minmax(360px,1fr) minmax(0,830px); align-items:center; gap:16px; box-shadow:0 1px 3px rgba(18,66,116,.08); }
.brand { display:flex; gap:14px; min-width:0; align-items:center; } .brand-logo { width:154px; max-height:46px; object-fit:contain; object-position:left center; flex:0 1 auto; } .brand p { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.identity { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:nowrap; overflow-x:auto; padding-bottom:2px; } .login-state { color:var(--blue); font-weight:700; white-space:nowrap; } .mini { display:block; color:var(--muted); font-size:12px; margin-top:2px; }.muted-value { color:var(--muted); }
#termbase-layout { height:calc(100vh - 88px); padding:14px 20px 20px; display:grid; grid-template-columns:minmax(0,1fr) 12px minmax(340px,var(--detail-width)); align-items:stretch; min-height:0; }
.panel { min-height:0; height:100%; display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--line); border-radius:8px; background:var(--panel); }.list-panel { border-top-right-radius:0; border-bottom-right-radius:0; }.detail-panel { border-top-left-radius:0; border-bottom-left-radius:0; }.splitter { display:flex; justify-content:center; cursor:col-resize; touch-action:none; }.splitter:before { content:""; width:3px; margin:0 4px; border-radius:999px; background:#c9d3dc; transition:.12s; }.splitter:hover:before,body.resizing .splitter:before { width:4px; background:var(--sky); }
.list-control-strip { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,310px); gap:10px; padding:10px 12px; border-bottom:1px solid var(--line); background:#f3f6f8; }.control-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:8px; }.filter-card { border-color:#d9e5ee; background:#f8fbfe; }.result-card { border-color:#cfe3ea; background:#f7fafc; }
.filters { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:7px; align-items:end; padding:9px; }.span-1 { grid-column:span 1; }.span-2 { grid-column:span 2; }.span-3 { grid-column:span 3; }.span-4 { grid-column:span 4; }.filters button { height:38px; align-self:end; }
.metric-grid { display:flex; gap:6px; align-items:stretch; flex-wrap:wrap; padding:9px; }.metric { flex:1 1 76px; min-width:68px; border:1px solid var(--line); border-radius:6px; padding:6px 7px; background:#fff; }.metric span { display:block; color:var(--muted); font-size:11px; }.metric strong { color:var(--blue); font-size:16px; line-height:1.15; }
.table-toolbar { display:grid; grid-template-columns:minmax(260px,1fr) minmax(410px,auto); gap:8px; align-items:start; padding:8px 12px; border-bottom:1px solid var(--line); }.bulkbar,.actions,.io-actions { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }.bulkbar { border:1px solid var(--line); border-radius:6px; padding:6px 8px; background:#fbfcfe; }.bulkbar strong { margin-right:auto; color:var(--blue); }.io-actions { justify-content:flex-end; }.io-actions button { min-height:34px; }
.drawer-panel { flex:0 0 auto; margin:0 12px 9px; overflow:hidden; border:1px solid var(--line); border-radius:8px; background:#fff; }.drawer-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 11px; border-bottom:1px solid #e8edf3; }.drawer-inner { padding:11px; }.drawer-inner .actions { margin-top:9px; }.drawer-copy { font-size:12px; }
.table-wrap { flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; } .term-table { width:100%; min-width:0; table-layout:fixed; border-collapse:collapse; background:#fff; } th,td { padding:8px 9px; text-align:left; vertical-align:top; overflow:hidden; overflow-wrap:anywhere; border-bottom:1px solid #e8edf3; } th { position:sticky; top:0; z-index:1; background:#fbfcfe; color:var(--muted); font-size:12px; font-weight:700; line-height:1.25; } .check-col { width:42px; text-align:center; } th:nth-child(2) { width:16%; } th:nth-child(3) { width:27%; } th:nth-child(4) { width:17%; } th:nth-child(5) { width:18%; } th:nth-child(6) { width:22%; } tr { cursor:pointer; } tr:hover { background:#f6faff; } tr.active { background:#eaf2ff; }
.term-name { display:-webkit-box; overflow:hidden; font-size:15px; line-height:1.3; -webkit-box-orient:vertical; -webkit-line-clamp:2; }.concept-id { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.cell-lines,.review-cell { display:grid; gap:3px; min-width:0; }.cell-line { display:grid; grid-template-columns:auto minmax(0,1fr); gap:5px; align-items:start; min-width:0; line-height:1.28; }.cell-line > span:last-child { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:1; }.cell-key { color:var(--muted); font-size:10px; font-weight:750; letter-spacing:.035em; white-space:nowrap; }.cell-divider { height:1px; margin:2px 0; background:#edf1f4; }.scope-domain { display:-webkit-box; overflow:hidden; line-height:1.28; -webkit-box-orient:vertical; -webkit-line-clamp:2; }.scope-detail { display:-webkit-box; overflow:hidden; color:var(--muted); line-height:1.28; -webkit-box-orient:vertical; -webkit-line-clamp:2; }.compact { display:-webkit-box; overflow:hidden; line-height:1.32; -webkit-box-orient:vertical; overflow-wrap:anywhere; }.clamp-2 { -webkit-line-clamp:2; }.review-meta { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.updated-meta { padding-top:2px; border-top:1px solid #edf1f4; }
.empty-cell { padding:28px; text-align:center; color:var(--muted); }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-bottom:1px solid var(--line); }.panel-body { flex:1 1 auto; min-height:0; overflow:auto; padding:12px 14px 18px; }.empty { margin:8px; padding:28px 16px; text-align:center; color:var(--muted); border:1px dashed #cfd9e3; border-radius:8px; background:#fbfcfe; }.form-section { border-top:1px solid #e8edf3; }.form-section:first-of-type { border-top:0; }.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.span { grid-column:1 / -1; }.form-actions { margin-top:16px; }.id-readout,.review-readout { display:flex; flex-direction:column; gap:2px; padding:8px 9px; border:1px solid #dce5ec; border-radius:6px; background:#f8fbfe; color:var(--muted); font-size:12px; }.id-readout code { color:var(--blue); overflow-wrap:anywhere; }.review-readout strong { color:var(--ink); font-size:13px; }.review-readout small { color:var(--muted); }
.duplicate-panel { margin:0 0 12px; padding:10px; border:1px solid #f1d39a; border-radius:8px; background:#fffaf0; }.duplicate-head { display:flex; justify-content:space-between; gap:8px; align-items:center; }.duplicate-results { margin-top:7px; color:#5f4a20; font-size:12px; }.duplicate-list { display:grid; gap:5px; margin-top:8px; }.duplicate-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 8px; align-items:center; padding:6px 7px; border:1px solid #ecd9ac; border-radius:5px; background:#fff; }.duplicate-item strong,.duplicate-item span,.duplicate-item small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.duplicate-item strong { color:var(--ink); }.duplicate-item span,.duplicate-item small { color:var(--muted); font-size:11px; }.duplicate-item small { grid-column:1 / -1; }.inline-button { min-height:26px; padding:3px 6px; font-size:11px; grid-row:1 / span 2; grid-column:2; }.duplicate-panel label { margin-top:9px; }
.pill { display:inline-flex; align-items:center; max-width:100%; border:1px solid var(--line); border-radius:999px; padding:2px 7px; color:var(--muted); background:#fbfcfe; font-size:12px; white-space:nowrap; }.pill.ok { color:var(--ok); border-color:#addcc8; background:#f1fbf6; }.pill.bad { color:var(--bad); border-color:#f3b4ad; background:#fff5f3; }.pill.warn { color:var(--warn); border-color:#f1d39a; background:#fff8e8; }.pill.neutral { color:var(--muted); }
.callout { margin:0 0 12px; padding:9px 11px; border:1px solid #cfe3ea; border-radius:8px; color:#31566d; background:#f7fbfd; }.callout.bad { color:#7a271a; border-color:#f3b4ad; background:#fff5f3; }.callout.ok { color:#0b5c3a; border-color:#addcc8; background:#f4fbf8; }.callout.warn { color:#714400; border-color:#f1d39a; background:#fff8e8; }
.release-list { display:grid; gap:8px; }.release-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; padding:10px; border:1px solid #e8edf3; border-radius:6px; background:#fbfcfe; }.release-item strong,.release-item code { overflow-wrap:anywhere; }.release-item code { display:block; color:var(--muted); font-size:11px; }
.login-shell { min-height:100vh; display:grid; place-items:center; padding:24px; }.login-card { width:min(460px,100%); border-top:4px solid var(--sky); border-radius:8px; padding:26px; background:#fff; box-shadow:0 16px 40px rgba(18,66,116,.14); }.login-card h1 { margin:18px 0 4px; }.login-brand { display:flex; align-items:center; }.login-brand img { width:auto; height:42px; max-width:100%; display:block; }.login-card form { display:grid; gap:12px; margin-top:18px; }.login-card form button { width:100%; }
dialog { width:min(560px,calc(100vw - 32px)); border:0; border-radius:8px; padding:0; box-shadow:0 20px 60px rgba(18,66,116,.28); } dialog::backdrop { background:rgba(18,66,116,.32); }.modal-card { position:relative; padding:22px; }.modal-close { position:absolute; top:10px; right:10px; min-height:32px; min-width:32px; padding:2px 8px; }.modal-card h2 { margin:0 36px 14px 0; }.modal-card code { display:block; max-height:180px; overflow:auto; padding:10px; border-radius:6px; color:#0a4a67; background:#f2f7fa; overflow-wrap:anywhere; }

/* Owner-only instance maintenance. The page stays inside this SPA so each instance has one local control plane. */
#maintenance-view { height:calc(100vh - 88px); overflow:auto; padding:18px 20px 28px; }.maintenance-shell { width:min(1180px,100%); margin:0 auto; }.maintenance-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:14px; }.maintenance-header h2 { margin-top:8px; }.back-button { min-height:30px; padding:4px 0; border:0; background:transparent; }.maintenance-tabs { display:flex; gap:4px; overflow:auto; padding:4px; border:1px solid var(--line); border-radius:8px; background:#eef3f6; }.maintenance-tabs button { flex:1 0 auto; min-height:34px; border:0; border-radius:5px; background:transparent; }.maintenance-tabs button.active { color:#fff; background:var(--blue); }.maintenance-panel { margin-top:12px; }.maintenance-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.maintenance-card { min-width:0; padding:15px; border:1px solid var(--line); border-radius:8px; background:#fff; box-shadow:0 1px 2px rgba(18,66,116,.04); }.maintenance-card.wide { grid-column:1 / -1; }.maintenance-card > p { margin-bottom:12px; }.section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }.key-value-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.key-value { min-width:0; padding:8px; border:1px solid #e6edf1; border-radius:6px; background:#fbfcfe; }.key-value span { display:block; color:var(--muted); font-size:11px; }.key-value strong { display:block; margin-top:2px; overflow:hidden; color:var(--ink); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }.checksum-list { display:grid; gap:5px; margin-top:10px; color:var(--muted); font-size:12px; }.checksum { display:inline-block; max-width:100%; margin-left:4px; color:#426172; overflow:hidden; text-overflow:ellipsis; vertical-align:bottom; white-space:nowrap; }.inline-form { display:grid; grid-template-columns:minmax(220px,1fr) 150px auto; gap:9px; align-items:end; padding:10px; border:1px solid #e4ebef; border-radius:7px; background:#f8fbfd; }.admin-table,.backup-list { display:grid; gap:7px; margin-top:12px; }.admin-row,.backup-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; border:1px solid #e4ebef; border-radius:7px; background:#fff; }.admin-row > div:first-child,.backup-row > div:first-child { display:grid; min-width:0; gap:3px; }.admin-row strong,.backup-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.admin-row .pill { width:max-content; }.admin-row small,.backup-row small,.backup-row code { color:var(--muted); font-size:11px; }.backup-row code { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.branding-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }.brand-preview { display:flex; align-items:flex-end; gap:18px; padding:10px; border:1px dashed #ccd9e2; border-radius:7px; background:#fbfcfe; }.brand-preview figure { margin:0; }.brand-preview figcaption { margin-bottom:6px; color:var(--muted); font-size:11px; }.brand-preview img { display:block; width:auto; height:50px; max-width:280px; object-fit:contain; object-position:left center; }.brand-preview figure:last-child img { width:42px; height:42px; }

@media (min-width:1700px) { .filters { grid-template-columns:repeat(12,minmax(0,1fr)); } }
@media (max-width:1240px) { .list-control-strip,.table-toolbar { grid-template-columns:1fr; }.io-actions { justify-content:flex-start; } }
@media (max-width:1080px) { html,body { height:auto; overflow:auto; } .app-header { grid-template-columns:1fr; }.identity { justify-content:flex-start; flex-wrap:wrap; } #termbase-layout { height:auto; min-height:calc(100vh - 88px); grid-template-columns:1fr; padding:12px; }.panel { height:auto; min-height:0; }.list-panel,.detail-panel { border-radius:8px; }.detail-panel { margin-top:14px; }.splitter { display:none; }.panel-body { overflow:visible; }.filters { grid-template-columns:repeat(2,minmax(0,1fr)); }.span-1,.span-2,.span-3,.span-4 { grid-column:span 1; } #maintenance-view { height:auto; min-height:calc(100vh - 88px); padding:14px 12px 24px; } }
@media (max-width:780px) { .table-wrap { overflow:visible; }.term-table,.term-table tbody,.term-table tr,.term-table td { display:block; width:100%; }.term-table thead { display:none; }.term-table tr { padding:8px 10px; border-bottom:1px solid var(--line); }.term-table td { min-height:0; padding:5px 0; border:0; }.term-table td:not(.check-col) { display:grid; grid-template-columns:112px minmax(0,1fr); gap:8px; }.term-table td:not(.check-col)::before { content:attr(data-label); color:var(--muted); font-size:11px; font-weight:700; }.term-table .check-col { display:flex; justify-content:flex-end; width:auto; margin-bottom:-25px; }.term-table .check-col input { width:auto; }.cell-lines,.review-cell { min-width:0; }.maintenance-grid { grid-template-columns:1fr; }.maintenance-card.wide { grid-column:auto; }.inline-form { grid-template-columns:1fr; }.admin-row,.backup-row { align-items:flex-start; flex-direction:column; }.key-value-grid { grid-template-columns:1fr; } }
@media (max-width:560px) { .app-header { padding:11px 12px; }.brand { align-items:flex-start; }.brand-logo { width:120px; }.brand p { white-space:normal; }.form-grid,.branding-form { grid-template-columns:1fr; }.io-actions button { width:100%; }.identity button { flex:1; }.list-control-strip,.table-toolbar { padding:9px; }.maintenance-header { flex-direction:column; }.maintenance-tabs button { flex:0 0 auto; }.brand-preview { align-items:flex-start; flex-direction:column; }.brand-preview img { max-width:210px; } }
