:root {
  color-scheme: light;
  --ink-950: #102925;
  --ink-900: #153832;
  --ink-800: #214b44;
  --ink-700: #315f57;
  --ink-600: #53736d;
  --ink-500: #738c87;
  --ink-300: #b9cbc7;
  --ink-200: #d7e3e0;
  --ink-100: #e9f0ee;
  --ink-50: #f4f8f7;
  --paper: #ffffff;
  --canvas: #f2f6f5;
  --teal-700: #087466;
  --teal-600: #0b8877;
  --teal-500: #13a08d;
  --teal-100: #d8f2eb;
  --teal-50: #edf9f6;
  --amber-700: #9b5b08;
  --amber-100: #feebc8;
  --amber-50: #fff8e9;
  --red-700: #a73f46;
  --red-100: #f8dfe1;
  --blue-700: #315f8d;
  --shadow-sm: 0 1px 2px rgba(16, 41, 37, .04), 0 5px 18px rgba(16, 41, 37, .04);
  --shadow-md: 0 16px 40px rgba(16, 41, 37, .10);
  --radius-sm: .65rem;
  --radius-md: .9rem;
  --radius-lg: 1.25rem;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  color: var(--ink-950);
  background: var(--canvas);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(19, 160, 141, .24);
  outline-offset: 2px;
}
.hidden, [hidden] { display: none !important; }
.subtle { color: var(--ink-600); }
.eyebrow {
  margin: 0 0 .35rem;
  color: var(--teal-700);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
}
.eyebrow.light { color: #85e0d1; }

/* 登录 */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 10%, rgba(30, 170, 145, .09), transparent 28rem),
    linear-gradient(145deg, #eaf2f0 0%, #f8faf9 48%, #edf4f2 100%);
}
.login-frame {
  width: min(68rem, 100%);
  min-height: 42rem;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 1.75rem;
  background: var(--paper);
  box-shadow: 0 35px 90px rgba(18, 58, 51, .17);
}
.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.25rem);
  color: white;
  background:
    radial-gradient(circle at 100% 0%, rgba(62, 208, 182, .24), transparent 22rem),
    linear-gradient(150deg, #123a34 0%, #0c5349 58%, #087466 100%);
}
.login-intro::before, .login-intro::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
}
.login-intro::before { width: 27rem; height: 27rem; right: -15rem; bottom: -7rem; }
.login-intro::after { width: 18rem; height: 18rem; right: -9rem; bottom: -2.5rem; }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: .8rem; font-weight: 800; letter-spacing: .08em; }
.brand-mark {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: .95rem;
  background: linear-gradient(145deg, #18ad97, #087466);
  color: white;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: inset 0 1px rgba(255,255,255,.25), 0 8px 24px rgba(4, 76, 65, .24);
}
.login-brand .brand-mark { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18); box-shadow: none; }
.login-copy { position: relative; z-index: 1; margin: auto 0 3.25rem; }
.login-copy h1 { margin: .5rem 0 1.4rem; max-width: 9em; font-size: clamp(2.35rem, 5vw, 3.55rem); line-height: 1.22; letter-spacing: -.04em; }
.login-copy > p:last-child { max-width: 27rem; margin: 0; color: rgba(255,255,255,.72); font-size: 1rem; }
.principle-list { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.principle-list > div { min-width: 0; padding: 1rem .9rem; border: 1px solid rgba(255,255,255,.11); border-radius: .85rem; background: rgba(255,255,255,.06); backdrop-filter: blur(8px); }
.principle-list span, .principle-list strong, .principle-list small { display: block; }
.principle-list span { color: #70d8c7; font-size: .72rem; font-weight: 800; }
.principle-list strong { margin: .2rem 0; font-size: .9rem; }
.principle-list small { color: rgba(255,255,255,.56); font-size: .68rem; line-height: 1.45; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(2.25rem, 5vw, 4.75rem); background: var(--paper); }
.login-card h2 { margin: .05rem 0 .2rem; font-size: 2rem; letter-spacing: -.03em; }
.mobile-brand { display: none; align-items: center; gap: .8rem; margin-bottom: 2rem; }
.stack { display: grid; gap: 1.1rem; margin-top: 1.75rem; }
.stack label, .field { display: grid; gap: .45rem; color: var(--ink-800); font-size: .9rem; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--ink-200);
  border-radius: .72rem;
  padding: .72rem .85rem;
  background: #fbfdfc;
  color: var(--ink-950);
  transition: border-color .16s, background .16s, box-shadow .16s;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-300); background: white; }
input:focus, select:focus, textarea:focus { border-color: var(--teal-500); background: white; box-shadow: 0 0 0 3px rgba(19, 160, 141, .11); }
textarea { min-height: 6rem; resize: vertical; }
.primary, .secondary, .danger, .ghost, .icon-button {
  min-height: 2.65rem;
  border: 0;
  border-radius: .7rem;
  padding: .65rem 1rem;
  font-weight: 800;
  transition: transform .14s, box-shadow .14s, background .14s;
}
.primary { background: linear-gradient(135deg, var(--teal-700), var(--teal-600)); color: white; box-shadow: 0 6px 18px rgba(8, 116, 102, .19); }
.primary:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(8, 116, 102, .25); }
.secondary { background: var(--teal-50); color: var(--teal-700); border: 1px solid #ccebe4; }
.secondary:hover { background: var(--teal-100); }
.danger { background: #fff0f1; color: var(--red-700); border: 1px solid var(--red-100); }
.ghost { background: white; color: var(--ink-700); border: 1px solid var(--ink-200); }
.ghost:hover { background: var(--ink-50); }
.login-submit { display: flex; align-items: center; justify-content: space-between; margin-top: .3rem; padding-inline: 1.2rem; }
.login-submit span { font-size: 1.15rem; }
.demo-hint { display: grid; gap: .15rem; margin-top: 1.5rem; padding: 1rem 1.05rem; border: 1px dashed var(--ink-200); border-radius: .8rem; background: var(--ink-50); color: var(--ink-600); font-size: .75rem; }
.demo-hint strong { color: var(--ink-800); font-size: .8rem; }
.privacy-note { margin: 1.1rem 0 0; color: var(--ink-500); font-size: .75rem; }
.privacy-note span { color: var(--teal-500); font-size: .55rem; }

/* 应用框架 */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 16rem minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem 1.15rem;
  color: #e9f4f1;
  background:
    radial-gradient(circle at 20% 0%, rgba(28, 168, 145, .17), transparent 15rem),
    linear-gradient(180deg, #102f2a 0%, #102925 100%);
  box-shadow: 8px 0 34px rgba(12, 44, 39, .07);
}
.brand { display: flex; align-items: center; gap: .75rem; padding: 0 .45rem 2.1rem; }
.brand .brand-mark.small { width: 2.55rem; height: 2.55rem; border-radius: .75rem; font-size: 1rem; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .96rem; letter-spacing: .03em; }
.brand small { margin-top: .08rem; color: #86aaa3; font-size: .68rem; }
.sidebar nav { display: grid; gap: .3rem; }
.nav-label { margin: 1.1rem .8rem .35rem; color: #6f918b; font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.sidebar nav button {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  border: 0;
  border-radius: .72rem;
  padding: .72rem .75rem;
  background: transparent;
  color: #a9c0bc;
  text-align: left;
  font-size: .9rem;
  font-weight: 700;
  transition: background .16s, color .16s, transform .16s;
}
.sidebar nav button:hover { color: white; background: rgba(255,255,255,.055); transform: translateX(2px); }
.sidebar nav button.active { color: white; background: linear-gradient(100deg, rgba(25, 169, 145, .22), rgba(255,255,255,.06)); box-shadow: inset 3px 0 #3bc7af; }
.nav-icon { width: 1.85rem; height: 1.85rem; display: grid; place-items: center; border-radius: .55rem; background: rgba(255,255,255,.055); color: #a7c8c1; font-size: 1rem; }
.sidebar nav button.active .nav-icon { color: white; background: rgba(45, 193, 169, .2); }
.sidebar-foot { display: grid; grid-template-columns: 2.25rem 1fr 2.25rem; align-items: center; gap: .65rem; margin-top: auto; padding: .9rem .45rem 0; border-top: 1px solid rgba(255,255,255,.08); }
.user-avatar { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #2f7f71, #1b594f); color: white; font-size: .8rem; font-weight: 800; }
.sidebar-foot strong, .sidebar-foot small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot strong { font-size: .8rem; }
.sidebar-foot small { color: #7fa29c; font-size: .67rem; }
.icon-button { width: 2.25rem; min-height: 2.25rem; padding: 0; background: rgba(255,255,255,.06); color: #9bb6b1; border: 1px solid rgba(255,255,255,.08); }
.icon-button:hover { color: white; background: rgba(255,255,255,.11); }
main { min-width: 0; background: var(--canvas); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 6.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem clamp(1.25rem, 3.2vw, 3rem);
  border-bottom: 1px solid rgba(185, 203, 199, .6);
  background: rgba(248, 251, 250, .87);
  backdrop-filter: blur(14px);
}
.breadcrumb { margin: 0 0 .14rem; color: var(--ink-500); font-size: .72rem; font-weight: 700; }
.breadcrumb span { margin: 0 .35rem; color: var(--ink-300); }
.topbar h2 { margin: 0; font-size: 1.55rem; line-height: 1.25; letter-spacing: -.025em; }
.topbar-meta { display: flex; align-items: center; gap: .7rem; }
.system-status, .security-badge { display: inline-flex; align-items: center; gap: .45rem; padding: .42rem .72rem; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.system-status { border: 1px solid var(--ink-200); background: rgba(255,255,255,.75); color: var(--ink-600); }
.system-status i { width: .42rem; height: .42rem; border-radius: 50%; background: var(--teal-500); box-shadow: 0 0 0 3px rgba(19,160,141,.12); }
.security-badge { background: var(--amber-50); color: var(--amber-700); border: 1px solid var(--amber-100); }
.content { width: min(100%, 92rem); padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1.25rem, 3.2vw, 3rem) 4rem; }
.grid { display: grid; gap: 1rem; }
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric, .card { border: 1px solid rgba(185, 203, 199, .72); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-sm); }
.metric { position: relative; overflow: hidden; min-height: 8.5rem; padding: 1.25rem; }
.metric::after { content: ""; position: absolute; width: 5.5rem; height: 5.5rem; right: -2.1rem; top: -2.3rem; border-radius: 50%; background: var(--teal-50); }
.metric-icon { position: absolute; z-index: 1; top: .9rem; right: .95rem; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: .62rem; background: var(--teal-50); color: var(--teal-700); font-size: .72rem; font-weight: 900; }
.metric-blue::after, .metric-blue .metric-icon { background: #edf4fb; }
.metric-blue .metric-icon { color: var(--blue-700); }
.metric-amber::after, .metric-amber .metric-icon { background: var(--amber-50); }
.metric-amber .metric-icon { color: var(--amber-700); }
.metric-red::after, .metric-red .metric-icon { background: #fff1f2; }
.metric-red .metric-icon { color: var(--red-700); }
.metric span { color: var(--ink-600); font-size: .85rem; font-weight: 700; }
.metric strong { display: block; margin-top: .65rem; font-size: 2.05rem; line-height: 1; letter-spacing: -.05em; }
.metric small { display: block; margin-top: .75rem; color: var(--ink-500); font-size: .7rem; }
.card { padding: 1.3rem; }
.card h3 { margin: 0 0 .85rem; font-size: 1.04rem; letter-spacing: -.01em; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; }
.section-head h3 { margin: 0; font-size: 1.12rem; }
.section-head p { margin: .2rem 0 0; font-size: .82rem; }
.notice { margin: 1rem 0; padding: .9rem 1rem; border: 1px solid #cce8e2; border-left: 4px solid var(--teal-500); border-radius: .25rem var(--radius-md) var(--radius-md) .25rem; background: linear-gradient(90deg, var(--teal-50), white); color: var(--ink-700); font-size: .86rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .55rem; }
.two-col { grid-template-columns: minmax(0, 1.08fr) minmax(18rem, .92fr); margin-top: 1rem; }
.workflow-card { min-height: 15rem; }
.workflow { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: 1.25rem; }
.workflow > div { position: relative; display: grid; justify-items: start; gap: .7rem; min-width: 0; }
.workflow > div:not(:last-child)::after { content: ""; position: absolute; left: 2.25rem; right: -.25rem; top: 1rem; height: 1px; background: var(--ink-200); }
.workflow i { position: relative; z-index: 1; width: 2rem; height: 2rem; display: grid; place-items: center; border: 4px solid white; border-radius: 50%; background: var(--teal-100); color: var(--teal-700); box-shadow: 0 0 0 1px #c6e7df; font-size: .68rem; font-style: normal; font-weight: 900; }
.workflow span, .workflow strong, .workflow small { display: block; }
.workflow strong { font-size: .8rem; }
.workflow small { margin-top: .15rem; color: var(--ink-500); font-size: .67rem; line-height: 1.4; }
.access-card { position: relative; display: grid; grid-template-columns: 4.25rem 1fr; align-items: center; gap: 1.15rem; overflow: hidden; background: linear-gradient(145deg, white, var(--teal-50)); }
.access-card::after { content: ""; position: absolute; right: -4rem; bottom: -5rem; width: 11rem; height: 11rem; border: 1px solid rgba(19,160,141,.12); border-radius: 50%; }
.access-card > * { position: relative; z-index: 1; }
.access-symbol { width: 4.25rem; height: 4.25rem; display: grid; place-items: center; border-radius: 1.2rem; background: linear-gradient(145deg, var(--teal-700), var(--teal-500)); color: white; box-shadow: 0 12px 28px rgba(8,116,102,.2); font-size: 1.45rem; font-weight: 900; }
.access-card h3 { margin: 0; font-size: 1.3rem; }
.access-card p.subtle { margin: .45rem 0 1.1rem; font-size: .78rem; }
.access-card .secondary span { margin-left: .45rem; }
.data-card { padding: 0; overflow: hidden; }
.data-card > .section-head { margin: 0; padding: 1.25rem 1.3rem; }
.data-card > .table-wrap { border-width: 1px 0 0; border-radius: 0; }

/* 数据与内容 */
.table-wrap { overflow: auto; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: white; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: transparent; }
th, td { padding: .82rem .8rem; border-bottom: 1px solid var(--ink-100); text-align: left; vertical-align: middle; }
th { background: #f7faf9; color: var(--ink-600); font-size: .72rem; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
tbody tr { transition: background .13s; }
tbody tr:hover { background: #f8fcfb; }
tbody tr:last-child td { border-bottom: 0; }
td { font-size: .86rem; }
.link-btn { border: 0; border-radius: .45rem; padding: .28rem .5rem; background: transparent; color: var(--teal-700); font-weight: 800; }
.link-btn:hover { background: var(--teal-50); }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border: 1px solid var(--ink-200); border-radius: 999px; background: var(--ink-50); color: var(--ink-700); font-size: .7rem; font-weight: 800; white-space: nowrap; }
.pill.good { background: var(--teal-50); color: var(--teal-700); border-color: #cce8e2; }
.pill.warn { background: var(--amber-50); color: var(--amber-700); border-color: var(--amber-100); }
.pill.alert { background: #fff1f2; color: var(--red-700); border-color: var(--red-100); }
.empty { padding: 3rem 1.25rem; text-align: center; color: var(--ink-500); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.35rem; }
.detail-head h3 { margin: .4rem 0 .2rem; font-size: 1.7rem; letter-spacing: -.035em; }
.detail-head p { margin: 0; font-size: .86rem; }
.tabs { display: flex; gap: .1rem; overflow-x: auto; margin-bottom: 1rem; padding: .3rem; border: 1px solid var(--ink-200); border-radius: .9rem; background: rgba(255,255,255,.72); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; min-height: 2.45rem; border: 0; border-radius: .65rem; padding: .55rem .9rem; background: transparent; color: var(--ink-600); font-size: .82rem; font-weight: 700; }
.tabs button:hover { background: var(--ink-50); color: var(--ink-900); }
.tabs button.active { background: white; color: var(--teal-700); box-shadow: 0 2px 10px rgba(16,41,37,.08); }
.list { display: grid; gap: .7rem; }
.list-item { padding: 1rem; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: linear-gradient(180deg, white, #fcfdfd); transition: border-color .16s, box-shadow .16s, transform .16s; }
.list-item:hover { border-color: var(--ink-300); box-shadow: 0 7px 18px rgba(16,41,37,.055); }
.list-item header { display: flex; align-items: flex-start; justify-content: space-between; gap: .9rem; margin-bottom: .4rem; }
.list-item p { margin: .35rem 0; }
.meta { color: var(--ink-500); font-size: .72rem; }
.score-grid { display: grid; gap: .8rem; }
.score-row { position: relative; overflow: hidden; padding: 1rem 1rem 1rem 1.25rem; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: white; }
.score-row::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--amber-700); }
.score-row.protective::before { background: var(--teal-500); }
.score-row .score-controls { display: grid; grid-template-columns: minmax(7rem,.7fr) minmax(12rem,1.6fr) 5rem; gap: .7rem; margin-top: .85rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.form-grid .wide { grid-column: 1 / -1; }
.actions { display: flex; justify-content: flex-end; gap: .55rem; margin-top: 1rem; }
.risk { border-left: 4px solid #d99536; }
.protective { border-left: 4px solid var(--teal-500); }
.attachment-box { margin: .5rem 0; padding: .55rem .75rem; border: 1px dashed var(--teal-500); border-radius: var(--radius-sm); background: var(--teal-50); font-size: .82rem; }
.att-chip { display: inline-flex; align-items: center; gap: .35rem; margin: .2rem .5rem .2rem 0; background: white; padding: .2rem .5rem; border: 1px solid var(--ink-200); border-radius: .4rem; font-size: .78rem; }
.alert-text { color: var(--red-700) !important; font-weight: bold; }
.alert-text:hover { background: #fff1f2 !important; }
hr { height: 1px; margin: 1.4rem 0; border: 0; background: var(--ink-100); }

/* 弹窗与反馈 */
dialog {
  width: min(47rem, calc(100% - 2rem));
  max-height: 90vh;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 1.25rem;
  padding: 0;
  background: white;
  color: var(--ink-950);
  box-shadow: 0 30px 90px rgba(10, 38, 33, .3);
  transition: width .2s ease;
}
dialog.modal-wide {
  width: min(78rem, calc(100% - 2rem));
}
dialog::backdrop { background: rgba(10, 31, 28, .58); backdrop-filter: blur(4px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1.15rem 1.35rem; border-bottom: 1px solid var(--ink-100); background: rgba(255,255,255,.95); }
.modal-head h3 { margin: 0; font-size: 1.1rem; }
.modal-head button { width: 2.1rem; height: 2.1rem; border: 0; border-radius: 50%; background: var(--ink-50); color: var(--ink-600); font-size: 1.3rem; line-height: 1; }
.modal-head button:hover { background: var(--ink-100); color: var(--ink-950); }
#modalBody { max-height: calc(90vh - 4.5rem); overflow: auto; padding: 1.35rem; background: #fbfdfc; }
.toast { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 20; max-width: min(24rem, calc(100% - 2rem)); padding: .75rem 1rem; border: 1px solid rgba(255,255,255,.1); border-radius: .8rem; background: var(--ink-900); color: white; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(.6rem); pointer-events: none; transition: opacity .2s, transform .2s; font-size: .84rem; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #8c343a; }

@media (max-width: 68rem) {
  .app-shell { grid-template-columns: 5rem minmax(0, 1fr); }
  .sidebar { padding-inline: .7rem; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand > div, .nav-label, .sidebar nav button > span:last-child, .sidebar-foot #currentUser { display: none; }
  .sidebar nav button { justify-content: center; padding-inline: 0; }
  .nav-icon { width: 2.2rem; height: 2.2rem; }
  .sidebar-foot { grid-template-columns: 1fr; justify-items: center; }
  .user-avatar { display: none; }
}
@media (max-width: 52rem) {
  .login-frame { width: min(31rem, 100%); min-height: auto; grid-template-columns: 1fr; }
  .login-intro { display: none; }
  .mobile-brand { display: flex; }
  .app-shell { display: block; }
  .sidebar { position: sticky; width: 100%; height: auto; min-height: 4.4rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: .65rem 1rem; }
  .brand { padding: 0; }
  .brand .brand-mark.small { width: 2.3rem; height: 2.3rem; }
  .sidebar nav { display: flex; justify-content: center; gap: .25rem; }
  .sidebar nav button { width: auto; padding: .45rem .7rem; }
  .sidebar nav button.active { box-shadow: none; }
  .sidebar nav button > span:last-child { display: inline; }
  .nav-icon { display: none; }
  .sidebar-foot { display: block; margin: 0; padding: 0; border: 0; }
  .sidebar-foot .icon-button { display: block; }
  .topbar { position: relative; min-height: 5.6rem; }
  .system-status { display: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: repeat(2, 1fr); row-gap: 1.25rem; }
  .workflow > div::after { display: none; }
  .score-row .score-controls { grid-template-columns: 1fr; }
}
@media (max-width: 36rem) {
  body { font-size: .95rem; }
  .login-shell { padding: .7rem; }
  .login-frame { border-radius: 1.25rem; }
  .login-card { padding: 2rem 1.4rem; }
  .form-grid, .metrics { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: 1fr 1fr; }
  .access-card { grid-template-columns: 3.5rem 1fr; }
  .access-symbol { width: 3.5rem; height: 3.5rem; }
  .topbar { padding: 1rem; }
  .breadcrumb { display: none; }
  .security-badge { display: none; }
  .content { padding: 1rem 1rem 3rem; }
  .metric { min-height: 7.3rem; }
  .section-head, .detail-head { align-items: stretch; flex-direction: column; }
  .section-head > button, .detail-head > button { width: 100%; }
  .actions { flex-direction: column-reverse; }
  .actions button { width: 100%; }
  dialog { width: calc(100% - 1rem); max-height: 94vh; border-radius: 1rem; }
  #modalBody { max-height: calc(94vh - 4.5rem); padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  @page { margin: 16mm; }
  body { background: white; color: black; font-size: 11pt; }
  .sidebar, .topbar, .toolbar, .tabs, .no-print, .toast { display: none !important; }
  .app-shell { display: block; }
  .content { width: 100%; padding: 0; }
  .card, .list-item, .metric { border-color: #bbb; box-shadow: none; break-inside: avoid; }
  .pill { border-color: #aaa; background: transparent !important; color: black !important; }
}
