:root {
  --bg: #f3f6f9;
  --surface: #fff;
  --ink: #172c3d;
  --muted: #728191;
  --line: #e4ebf0;
  --navy: #101f30;
  --navy-soft: #1d3045;
  --teal: #0c8074;
  --teal-deep: #08675e;
  --teal-pale: #e9f7f3;
  --amber: #9a6813;
  --amber-pale: #fff6e5;
  --danger: #b8454b;
  --danger-pale: #fff0f0;
  --blue: #416eb0;
  --blue-pale: #edf3fb;
  --radius: 14px;
  --shadow: 0 5px 18px rgba(20, 43, 65, .035);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; }
button:disabled { opacity: .52; }
input, select, textarea { color: var(--ink); border: 1px solid #dce5eb; border-radius: 8px; background: #fff; padding: 10px 12px; outline: none; width: 100%; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #9aa6b0; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12,128,116,.10); }
input[readonly] { background: #f7f9fb; }
input[type="checkbox"] { accent-color: var(--teal); width: 16px; height: 16px; padding: 0; vertical-align: middle; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-deep); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #55bdb2; outline-offset: 3px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.35; letter-spacing: -.02em; }
h1 { font-size: 28px; margin-bottom: 9px; font-weight: 700; }
h2 { font-size: 18px; margin-bottom: 8px; font-weight: 650; }
h3 { font-size: 15px; margin-bottom: 7px; font-weight: 650; }
p { margin-bottom: 12px; }
small { font-size: 12px; }
svg { flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.danger-text { color: var(--danger) !important; }
.success-text { color: var(--teal) !important; }
.mono { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.wrap { overflow-wrap: anywhere; }
.eyebrow { color: var(--teal); font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px; }
.eyebrow.light { color: #8ad7ca; }
.skip-link { position: fixed; left: 12px; top: -70px; padding: 10px 15px; background: white; z-index: 100; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.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; }
.boot-screen { height: 100vh; display: flex; gap: 15px; align-items: center; justify-content: center; flex-direction: column; background: #fbfcfd; color: var(--muted); }
.boot-screen p { margin-bottom: 0; font-size: 13px; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; display: inline-flex; position: relative; align-items: center; justify-content: center; background: var(--teal); color: #fff; font-size: 26px; font-weight: 800; border-radius: 11px; line-height: 1; letter-spacing: -.08em; padding-right: 2px; }
.brand-mark::after { content: ""; position: absolute; top: -4px; right: 5px; width: 0; height: 0; border-left: 8px solid #87d9cb; border-top: 8px solid transparent; }
.brand-mark-large { width: 54px; height: 54px; font-size: 37px; border-radius: 15px; flex-basis: 54px; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid #cce3df; border-top-color: var(--teal); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Login */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(370px, 46%) 1fr; background: #fff; }
.login-story { display: flex; flex-direction: column; background: var(--navy); color: white; padding: 48px 12% 34px; position: relative; overflow: hidden; }
.login-story::before, .login-story::after { content: ""; position: absolute; border: 1px solid rgba(129, 205, 191, .12); border-radius: 50%; width: 530px; height: 530px; right: -290px; top: 26%; pointer-events: none; }
.login-story::after { width: 680px; height: 680px; right: -365px; top: calc(26% - 75px); }
.login-brand { display: flex; align-items: center; gap: 14px; font-size: 20px; font-weight: 650; position: relative; z-index: 1; }
.brand-en { display: block; font-size: 8px; letter-spacing: .18em; color: #95a9bc; font-weight: 500; margin-top: 3px; }
.login-story-content { margin: auto 0; padding: 70px 0; position: relative; z-index: 1; }
.login-story h1 { font-size: clamp(30px, 3.0vw, 46px); line-height: 1.5; letter-spacing: -.045em; margin: 20px 0; }
.login-description { color: #a2b2c1; line-height: 1.9; max-width: 335px; font-size: 14px; }
.login-flow { display: flex; gap: 24px; margin-top: 45px; font-size: 12px; color: #b7c7d5; }
.login-flow b { display: block; color: #74cbbd; font-size: 20px; font-weight: 500; margin-bottom: 5px; font-family: var(--mono); }
.login-version { font-size: 11px; color: #8b9faf; margin: 0; }
.login-version span { margin-left: 20px; color: #637b90; }
.login-panel { display: flex; align-items: center; justify-content: center; flex-direction: column; position: relative; padding: 64px 40px; }
.login-form-wrap { width: 100%; max-width: 365px; margin: auto; padding: 20px 0; }
.login-form-wrap h2 { font-size: 27px; margin-bottom: 10px; }
.login-subtitle { font-size: 13px; margin-bottom: 32px; }
.field { margin-bottom: 18px; }
.field label, .field-label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 7px; color: #3a5163; }
.field-hint { display: block; font-size: 11px; line-height: 1.6; margin-top: 6px; color: var(--muted); }
.password-input { position: relative; }
.password-input input { padding-right: 58px; }
.password-toggle { background: none; border: 0; color: var(--muted); position: absolute; right: 5px; top: 3px; padding: 9px; font-size: 11px; }
.captcha-row { display: flex; gap: 12px; }
.captcha-row input { min-width: 0; }
.captcha-button { flex: 0 0 126px; width: 126px; border: 1px solid var(--line); padding: 0; background: #f5f8fa; border-radius: 8px; overflow: hidden; min-height: 43px; color: var(--muted); font-size: 12px; }
.captcha-button img { display: block; max-width: 100%; width: 126px; height: 43px; object-fit: contain; }
.login-notice { margin: 22px 0 0; text-align: center; font-size: 11px; color: #8996a3; }
.login-bottom { position: absolute; bottom: 22px; margin: 0; color: #9aa6b1; font-size: 10px; }
.login-bottom span { margin: 0 8px; }

/* Navigation and shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 230px; display: flex; flex-direction: column; z-index: 40; background: var(--navy); color: #97a8b9; }
.sidebar-brand { display: flex; gap: 12px; align-items: center; color: #fff; padding: 30px 26px 27px; font-size: 18px; font-weight: 650; line-height: 1.45; }
.sidebar-brand:hover { color: #fff; }
.sidebar-brand small { display: block; font-size: 10px; color: #7f94a9; font-weight: 450; letter-spacing: .05em; margin-top: 2px; }
.main-nav { flex: 1; overflow: auto; padding: 0 14px 20px; scrollbar-width: thin; scrollbar-color: #34475b transparent; }
.nav-section { color: #5f768c; font-size: 10px; font-weight: 600; margin: 18px 14px 8px; letter-spacing: .1em; }
.nav-link { display: flex; align-items: center; gap: 11px; color: #91a5b8; font-size: 12px; padding: 11px 14px; border-radius: 8px; position: relative; margin-bottom: 3px; transition: background .15s, color .15s; }
.nav-link:hover { background: rgba(255,255,255,.035); color: #d6e1e9; }
.nav-link.active { background: #1d3e45; color: #b5eee2; }
.nav-link.active::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: #5cd0b8; }
.nav-link svg { opacity: .85; }
.nav-chip { margin-left: auto; border: 1px solid #3b6463; border-radius: 4px; font-size: 8px; padding: 0 4px; color: #9cc7bd; line-height: 1.7; }
.sidebar-bottom { margin: 0 25px; border-top: 1px solid #213346; padding: 19px 0 22px; }
.sidebar-runtime { display: flex; align-items: center; gap: 8px; font-size: 10px; color: #93a7b8; margin-bottom: 10px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8193a2; flex-shrink: 0; }
.status-dot.success { background: #54c8ab; }
.status-dot.warning { background: #efc270; }
.status-dot.danger { background: #e88787; }
.sidebar-version { font-size: 9px; color: #637b91; }
.sidebar-version span { float: right; }
.workspace { margin-left: 230px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 79px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 35px; background: #fff; position: relative; z-index: 30; }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 18px; }
.topbar-brand { font-size: 12px; color: #8a98a5; }
.topbar-divider { width: 1px; height: 13px; background: #dfe6ed; }
#breadcrumb { color: #41596d; font-size: 12px; font-weight: 500; }
.network-badge { color: #668076; background: #f0f7f4; border: 1px solid #e4eee9; padding: 3px 9px; border-radius: 20px; font-size: 10px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #81909e; min-width: 32px; min-height: 32px; padding: 6px; }
.icon-button:hover { color: var(--ink); background: #f1f5f8; }
.account-button { display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 0; text-align: left; }
.avatar { width: 33px; height: 33px; background: #e7f0ef; color: var(--teal); border: 2px solid #f6faf9; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 750; }
.account-name strong { display: block; font-size: 11px; font-weight: 600; max-width: 140px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.account-name small { display: block; color: var(--muted); font-size: 9px; }
.chevron { font-size: 13px; color: #8496a6; margin-left: 2px; }
.account-menu { position: absolute; right: 34px; top: 68px; width: 180px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 30px rgba(20,43,65,.13); padding: 5px; }
.account-menu button { border: 0; background: none; width: 100%; text-align: left; color: #425b70; padding: 10px 12px; border-radius: 6px; font-size: 12px; }
.account-menu button:hover { background: var(--bg); }
.menu-button { display: none; }
.page-content { padding: 31px 35px 20px; width: 100%; max-width: 1640px; margin: 0 auto; flex: 1; outline: none; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; padding: 18px 35px 21px; color: #96a4b1; font-size: 9px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { font-size: 25px; margin-bottom: 7px; }
.page-heading p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.7; max-width: 760px; }
.page-heading .eyebrow { margin-bottom: 6px; font-size: 9px; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; padding-top: 7px; flex-shrink: 0; max-width: 60%; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dce5ec; background: #fff; color: #53697d; padding: 9px 13px; border-radius: 7px; font-size: 11px; font-weight: 600; min-height: 35px; white-space: nowrap; line-height: 1.45; transition: background .15s, box-shadow .15s; }
.button:hover { background: #f8fafc; color: #304b61; border-color: #ccd8e1; }
.button.primary { color: #fff; border-color: var(--teal); background: var(--teal); box-shadow: 0 2px 4px rgba(12,128,116,.08); }
.button.primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); }
.button.danger { color: var(--danger); background: #fff; border-color: #edd7da; }
.button.danger:hover { background: var(--danger-pale); }
.button.ghost { border-color: transparent; background: none; }
.button.small { font-size: 10px; padding: 5px 9px; min-height: 27px; }
.button-full { width: 100%; font-size: 13px; min-height: 44px; }
.button .spinner { width: 13px; height: 13px; border-width: 1.5px; }
.button.primary .spinner { border-color: rgba(255,255,255,.4); border-top-color: #fff; }
.link-button { border: 0; color: var(--teal); background: none; font-size: 11px; padding: 3px 0; cursor: pointer; }
.link-button:hover { color: var(--teal-deep); text-decoration: underline; }
.link-button:disabled { text-decoration: none; }
.text-button { border: 0; background: none; color: inherit; padding: 0; text-align: left; }

/* Cards and overview */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.card-body { padding: 22px; }
.card-header { padding: 18px 22px; border-bottom: 1px solid #edf1f5; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.card-header h2 { font-size: 14px; margin: 0; }
.card-header p { font-size: 10px; color: var(--muted); margin: 4px 0 0; }
.card-header .tag { flex-shrink: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 21px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 20px 21px; box-shadow: var(--shadow); min-width: 0; }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; color: #738496; font-size: 11px; }
.stat-icon { display: inline-flex; width: 29px; height: 29px; align-items: center; justify-content: center; border-radius: 8px; color: var(--teal); background: #eef8f5; }
.stat-icon.blue { background: #eff4fb; color: #7591b5; }
.stat-icon.amber { background: #fbf5e9; color: #c49c55; }
.stat-value { font-size: 28px; color: #213d50; line-height: 1.2; letter-spacing: -.035em; font-weight: 650; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 10px; color: #90a0ad; font-weight: 500; letter-spacing: 0; margin-left: 7px; }
.stat-caption { color: #98a4af; font-size: 9px; margin-top: 9px; }
.overview-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,1fr); gap: 20px; }
.overview-grid .card { height: calc(100% - 20px); }
.runtime-banner { background: #eaf5f1; border: 1px solid #dceee6; border-radius: 12px; padding: 22px 25px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.runtime-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 650; color: #2b685b; margin-bottom: 5px; }
.runtime-title .status-dot { width: 7px; height: 7px; background: var(--teal); }
.runtime-banner p { font-size: 11px; color: #6e9489; margin: 0; }
.runtime-banner.warning { background: #fff8ed; border-color: #f1e6ce; }
.runtime-banner.warning .runtime-title { color: #8b681f; }
.runtime-banner.warning p { color: #9a8a68; }
.runtime-banner.warning .status-dot { background: #c5a055; }
.runtime-metrics { display: flex; align-items: center; gap: 28px; flex-shrink: 0; }
.runtime-metrics div { border-left: 1px solid #d4e7df; padding-left: 24px; }
.runtime-metrics span { display: block; font-size: 9px; color: #82a196; margin-bottom: 3px; }
.runtime-metrics strong { font-size: 16px; font-family: var(--mono); color: #446b60; font-weight: 500; }
.summary-pair { display: grid; grid-template-columns: 1fr 1fr; padding: 23px; gap: 26px; }
.summary-pair > div + div { border-left: 1px solid var(--line); padding-left: 25px; }
.summary-pair dt { font-size: 10px; color: var(--muted); margin-bottom: 9px; }
.summary-pair dd { margin: 0; font-size: 22px; font-weight: 650; color: #325164; letter-spacing: -.025em; overflow-wrap: anywhere; }
.summary-pair dd small { font-size: 9px; font-weight: 500; color: #96a4af; margin-left: 6px; }
.summary-pair dl { margin: 0; }
.rule-strip { display: grid; grid-template-columns: repeat(3,1fr); margin: 0 22px 22px; border: 1px solid #e7efed; background: #f8fbfa; border-radius: 9px; padding: 16px 18px; gap: 15px; }
.rule-strip span { display: block; font-size: 10px; color: #91a49c; }
.rule-strip strong { display: block; font-size: 11px; color: #456e61; margin: 3px 0; font-weight: 600; }
.rule-strip small { color: #9caea6; font-size: 9px; }
.progress-track { height: 5px; background: #edf2f4; border-radius: 3px; overflow: hidden; margin: 11px 0 14px; }
.progress-fill { height: 100%; background: #63b5a5; border-radius: 3px; }
.readiness-summary { font-size: 11px; color: #667e90; display: flex; align-items: center; justify-content: space-between; }
.readiness-summary strong { color: #38566a; }
.readiness-progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 3px; overflow: hidden; appearance: none; background: #edf2f4; margin: 11px 0 14px; }
.readiness-progress::-webkit-progress-bar { background: #edf2f4; border-radius: 3px; }
.readiness-progress::-webkit-progress-value { background: #63b5a5; border-radius: 3px; }
.readiness-progress::-moz-progress-bar { background: #63b5a5; border-radius: 3px; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 11px; padding: 10px 0; border-bottom: 1px solid #f0f3f6; }
.check-list li:last-child { border-bottom: 0; }
.check-list strong { font-weight: 550; display: block; color: #50687a; }
.check-list p { color: #95a3ae; font-size: 10px; margin: 3px 0 0; line-height: 1.6; }
.check-icon { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; flex: 0 0 17px; border-radius: 50%; background: #eaf7f2; color: #479d82; font-size: 10px; margin-top: 1px; }
.check-icon.warning { color: #af8b3a; background: #fcf4e3; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 22px 22px; }
.quick-action { display: flex; align-items: center; gap: 10px; border: 1px solid #e9eef2; border-radius: 8px; background: #fff; padding: 14px 12px; text-align: left; color: #688092; }
.quick-action:hover { border-color: #bfded5; background: #f8fcfa; }
.quick-action span { display: block; font-size: 11px; color: #4c687a; font-weight: 550; }
.quick-action small { display: block; color: #9aa7b1; font-size: 9px; margin-top: 3px; }
.notice { display: flex; align-items: flex-start; gap: 11px; padding: 15px 18px; background: #f0f6fb; border: 1px solid #dfeaf4; border-radius: 9px; color: #627f9a; font-size: 11px; margin-bottom: 20px; }
.notice p { margin: 0; line-height: 1.8; }
.notice strong { color: #426582; font-weight: 600; }
.notice.warning { background: var(--amber-pale); color: #9a834e; border-color: #f0e5ca; }
.notice.warning strong { color: #927126; }
.notice.success { background: #edf8f3; border-color: #d9eee3; color: #608876; }
.notice.success strong { color: #33775c; }
.notice svg { margin-top: 2px; }

/* Data tables */
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 1px solid #eaf0f4; }
.search-form { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.search-wrap { position: relative; min-width: 100px; flex: 1; max-width: 370px; }
.search-wrap > svg { position: absolute; left: 11px; top: 12px; color: #9baab5; }
.search-wrap input { font-size: 11px; padding: 9px 12px 9px 34px; height: 36px; }
.search-form select { font-size: 11px; padding: 8px 26px 8px 10px; height: 36px; width: auto; min-width: 110px; }
.table-count { font-size: 10px; color: #9aa7b2; white-space: nowrap; }
.table-wrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #cbd8e1 #f6f8fa; }
.data-table { border-collapse: collapse; width: 100%; min-width: 740px; text-align: left; font-size: 11px; }
.data-table th { font-size: 10px; font-weight: 550; color: #8a9ba9; padding: 12px 18px; background: #fbfcfd; border-bottom: 1px solid #edf1f5; white-space: nowrap; }
.data-table td { padding: 15px 18px; border-bottom: 1px solid #edf1f5; color: #567083; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfd; }
.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 22px; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: #3c596e; }
.data-table .select-col { width: 42px; padding-right: 5px; }
.compact-table { min-width: 450px; }
.compact-table th, .compact-table td { padding: 12px 18px; }
.table-primary { color: #3a5b71; font-weight: 550; }
.table-secondary { display: block; color: #9aabb8; font-size: 9px; margin-top: 3px; max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 11px; flex-wrap: wrap; white-space: nowrap; align-items: center; }
.address-cell { display: inline-flex; align-items: center; gap: 6px; }
.address-link { font-family: var(--mono); font-size: 10px; letter-spacing: -.015em; color: #53788e; }
.copy-button { color: #b2bec7; padding: 3px; min-width: 19px; min-height: 21px; border: 0; border-radius: 4px; background: none; display: inline-flex; align-items: center; justify-content: center; }
.copy-button:hover { background: #eaf2f6; color: #698499; }
.tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; padding: 3px 7px; font-size: 9px; line-height: 1.45; font-weight: 500; white-space: nowrap; color: #7c8f9e; background: #f0f4f7; }
.tag.success { color: #36896d; background: #eaf7f0; }
.tag.warning { color: #ae8437; background: #fff6e6; }
.tag.danger { color: #bd656c; background: #fceef0; }
.tag.blue { color: #6287b2; background: #eef4fb; }
.tag.level { color: #658695; background: #edf5f7; font-family: var(--mono); font-weight: 600; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 21px; border-top: 1px solid #edf1f5; color: #9aa8b4; font-size: 10px; }
.page-controls { display: flex; align-items: center; gap: 9px; }
.page-controls button { min-width: 27px; min-height: 27px; padding: 4px 7px; }
.page-controls select { font-size: 10px; padding: 5px 8px; width: auto; }
.page-number { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; font-variant-numeric: tabular-nums; }
.empty-state { text-align: center; padding: 49px 24px 48px; color: #96a6b2; }
.empty-icon { width: 45px; height: 45px; margin: 0 auto 15px; display: flex; align-items: center; justify-content: center; background: #f2f6f9; color: #adbecb; border-radius: 14px; }
.empty-state h3 { font-size: 12px; font-weight: 500; color: #7890a1; margin-bottom: 7px; }
.empty-state p { font-size: 10px; max-width: 440px; margin: 0 auto; line-height: 1.8; }
.empty-state .button { margin-top: 17px; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 65px 20px; color: #8d9da9; font-size: 12px; }
.table-error { padding: 30px; }
.tabs { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; border-bottom: 1px solid #dfe7ed; }
.tab-button { padding: 0 2px 13px; margin-bottom: -1px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: #91a0ad; font-size: 12px; }
.tab-button.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 600; }
.selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 20px; background: #eff8f4; border-bottom: 1px solid #ddede5; color: #5e8d78; font-size: 11px; }
.small-note { font-size: 10px; line-height: 1.8; color: #91a0ad; }

/* Detail panels, settings and modal forms */
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-three { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 24px; margin: 0; }
.detail-item { min-width: 0; }
.detail-item.wide { grid-column: 1/-1; }
.detail-item dt { color: #92a2af; font-size: 10px; margin-bottom: 5px; }
.detail-item dd { margin: 0; color: #3b5a6f; font-size: 12px; overflow-wrap: anywhere; }
.detail-item dd.mono { font-size: 11px; }
.detail-section { margin-bottom: 24px; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section h3 { font-size: 12px; color: #577489; margin-bottom: 14px; }
.detail-section .data-table { border: 1px solid var(--line); border-radius: 8px; }
.raw-details { margin-top: 20px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.raw-details summary { cursor: pointer; font-size: 11px; color: #7b90a0; padding: 10px 13px; background: #f9fbfc; }
.code-block { margin: 0; padding: 14px; background: #f8fafc; color: #637e91; font-family: var(--mono); font-size: 10px; line-height: 1.8; overflow: auto; max-height: 340px; white-space: pre-wrap; overflow-wrap: anywhere; }
.key-value-list { margin: 0; }
.key-value-list > div { display: grid; grid-template-columns: minmax(140px,.8fr) minmax(0,1.7fr); gap: 15px; padding: 11px 0; border-bottom: 1px solid #edf1f4; }
.key-value-list > div:last-child { border-bottom: 0; }
.key-value-list dt { font-size: 11px; color: #8b9fac; }
.key-value-list dd { font-size: 11px; color: #526f83; overflow-wrap: anywhere; margin: 0; }
.key-value-list .code-block { padding: 0; background: none; font-size: 10px; }
.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.qr-card { text-align: center; }
.qr-card .card-body { padding: 25px 22px; }
.qr-image { display: block; width: 176px; height: 176px; border: 1px solid #edf1f4; padding: 8px; background: white; border-radius: 9px; margin: 12px auto 19px; }
.qr-card h3 { font-size: 15px; color: #3e6074; margin-bottom: 5px; }
.qr-card .qr-description { font-size: 10px; color: #96a5b1; margin-bottom: 10px; }
.qr-address { font-size: 10px; line-height: 1.7; color: #537c8e; overflow-wrap: anywhere; font-family: var(--mono); margin-bottom: 10px; }
.qr-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-bottom: 15px; }
.qr-unavailable { width: 176px; min-height: 176px; margin: 12px auto 19px; padding: 35px 16px; border: 1px dashed #d9e4ec; border-radius: 9px; color: #9faeba; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.rule-table { min-width: 580px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .wide { grid-column: 1/-1; }
.form-grid .field { margin-bottom: 17px; }
.inline-form { display: flex; align-items: flex-end; gap: 12px; }
.inline-form .field { flex: 1; margin-bottom: 0; }
.inline-form .button { height: 42px; }
.checkbox-field { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #5d778b; padding: 7px 0; }
.checkbox-field label { margin: 0; font-size: 12px; font-weight: 500; }
.preview-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.preview-value { background: #f5f9f8; border: 1px solid #e5eeea; border-radius: 9px; padding: 15px 14px; }
.preview-value span { display: block; color: #8fa79d; font-size: 10px; margin-bottom: 8px; }
.preview-value strong { display: block; color: #306e57; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.preview-value small { font-size: 9px; color: #92a69c; font-weight: 450; }
.operation-summary { font-size: 13px; color: #385a70; line-height: 1.8; padding-bottom: 15px; margin-bottom: 17px; border-bottom: 1px solid var(--line); white-space: pre-line; }
.operation-key { font-size: 9px; color: #a2aeb7; font-family: var(--mono); margin: 17px 0 0; overflow-wrap: anywhere; }
.inline-alert { font-size: 11px; padding: 11px 13px; border-radius: 7px; margin-bottom: 15px; color: #778c9c; background: #f0f5f8; line-height: 1.8; overflow-wrap: anywhere; }
.inline-alert.danger { color: var(--danger); background: var(--danger-pale); border: 1px solid #f2dfe2; }
.inline-alert.warning { background: var(--amber-pale); color: #a27a2e; border: 1px solid #f0e4c7; }
.inline-alert.success { background: var(--teal-pale); color: var(--teal); border: 1px solid #d9eee5; }
.dialog { padding: 0; border: 1px solid #e0e9ef; border-radius: 15px; width: min(740px, calc(100% - 40px)); max-height: calc(100vh - 72px); color: var(--ink); box-shadow: 0 20px 80px rgba(8,31,48,.2); }
.dialog::backdrop { background: rgba(9,25,40,.42); backdrop-filter: blur(2px); }
.dialog[open] { display: flex; flex-direction: column; }
.dialog.wide { width: min(970px, calc(100% - 40px)); }
.dialog-header { flex-shrink: 0; padding: 23px 26px 20px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 20px; }
.dialog-header .eyebrow { font-size: 8px; margin-bottom: 6px; }
.dialog-header h2 { margin: 0; font-size: 19px; }
.dialog-header .icon-button { font-size: 24px; font-weight: 300; line-height: 1; margin: -3px -7px 0 0; }
.dialog-body { padding: 24px 26px; overflow-y: auto; overscroll-behavior: contain; }
.dialog-footer { flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 15px 26px; background: #fcfdfe; border-top: 1px solid var(--line); min-height: 67px; }
.dialog-footer .footer-note { margin-right: auto; font-size: 10px; color: #97a8b5; }
.dialog .notice { margin-bottom: 18px; }
.dialog .table-wrap { border: 1px solid #e8eff3; border-radius: 8px; }
.dialog .data-table { min-width: 480px; }
.toast-region { position: fixed; right: 24px; bottom: 25px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(400px,calc(100vw - 30px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 14px 17px; border: 1px solid #dbe8e1; border-radius: 10px; color: #4e7e69; background: #f8fffb; box-shadow: 0 7px 26px rgba(14,44,65,.10); font-size: 11px; pointer-events: auto; animation: toast-in .18s ease-out; }
.toast.danger { color: #b06167; background: #fffafb; border-color: #f0dfe1; }
.toast.warning { color: #9f8248; background: #fffdf8; border-color: #eee2c9; }
.toast p { margin: 0; flex: 1; overflow-wrap: anywhere; }
.toast button { color: inherit; border: 0; padding: 0 0 0 5px; font-size: 16px; line-height: 1; background: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.noscript-notice { position: fixed; top: 0; left: 0; right: 0; z-index: 300; background: #fff4df; color: #8e691d; padding: 20px; text-align: center; }

@media (min-width: 1450px) {
  .stats-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .stat-card { padding: 18px 17px; }
  .stat-value { font-size: 25px; }
  .stat-top { font-size: 10px; }
  .stat-icon { width: 25px; height: 25px; }
}
@media (max-width: 1100px) {
  .sidebar { width: 205px; }
  .workspace { margin-left: 205px; }
  .sidebar-brand { padding-left: 22px; padding-right: 15px; font-size: 17px; }
  .main-nav { padding-left: 11px; padding-right: 11px; }
  .nav-link { padding-left: 12px; }
  .topbar { padding-left: 25px; padding-right: 25px; }
  .topbar-actions { gap: 12px; }
  .page-content { padding: 27px 25px 15px; }
  .workspace-footer { padding-left: 25px; padding-right: 25px; }
  .overview-grid { grid-template-columns: 1fr; gap: 0; }
  .overview-grid .card { height: auto; }
  .runtime-metrics { gap: 18px; }
  .runtime-metrics div { padding-left: 18px; }
  .runtime-banner { padding: 20px; gap: 18px; }
  .grid-two { gap: 16px; }
}
@media (max-width: 800px) {
  .sidebar { transform: translateX(-100%); width: 235px; transition: transform .2s ease; }
  body.nav-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; border: 0; background: rgba(5,22,35,.42); z-index: 39; }
  .workspace { margin-left: 0; }
  .menu-button { display: inline-flex; margin-left: -7px; }
  .topbar { height: 66px; padding: 0 22px; }
  .topbar-left { gap: 11px; }
  .topbar-brand, .topbar-divider { display: none; }
  .page-content { padding: 24px 22px 12px; }
  .account-menu { right: 20px; top: 58px; }
  .page-heading { gap: 15px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading p { font-size: 11px; }
  .login-screen { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; padding: 44px 28px; background: #fbfcfd; }
  .login-form-wrap { max-width: 380px; padding: 28px; background: white; border: 1px solid var(--line); border-radius: 15px; }
  .login-form-wrap h2 { font-size: 23px; }
  .login-form-wrap .eyebrow { font-size: 9px; }
  .login-subtitle { margin-bottom: 24px; }
  .grid-three { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .page-content { padding: 21px 15px 12px; }
  .topbar { padding: 0 15px; }
  .topbar-actions { gap: 8px; }
  .account-name { display: none; }
  .account-button { gap: 3px; }
  .chevron { display: none; }
  .network-badge { font-size: 8px; padding: 3px 6px; max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #breadcrumb { font-size: 11px; }
  .page-heading { display: block; margin-bottom: 19px; }
  .heading-actions { padding-top: 15px; max-width: 100%; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-bottom: 16px; }
  .stat-card { padding: 15px; }
  .stat-top { font-size: 10px; margin-bottom: 11px; }
  .stat-value { font-size: 23px; }
  .stat-icon { width: 24px; height: 24px; border-radius: 6px; }
  .stat-icon svg { width: 14px; }
  .stat-caption { font-size: 8px; margin-top: 8px; }
  .runtime-banner { display: block; padding: 18px; margin-bottom: 18px; }
  .runtime-title { font-size: 12px; }
  .runtime-banner p { font-size: 10px; }
  .runtime-metrics { display: flex; margin-top: 16px; padding-top: 13px; border-top: 1px solid #d6e8e0; gap: 23px; }
  .runtime-metrics div { border: 0; padding-left: 0; }
  .runtime-metrics strong { font-size: 14px; }
  .summary-pair { padding: 20px 18px; gap: 16px; }
  .summary-pair > div + div { padding-left: 15px; }
  .summary-pair dd { font-size: 18px; }
  .summary-pair dt { font-size: 9px; }
  .rule-strip { margin: 0 18px 18px; gap: 9px; padding: 14px 12px; }
  .rule-strip strong { font-size: 10px; }
  .rule-strip span, .rule-strip small { font-size: 8px; }
  .card-header { padding: 15px 18px; }
  .card-header h2 { font-size: 13px; }
  .card-body { padding: 18px; }
  .quick-grid { padding: 15px 18px 18px; gap: 9px; }
  .quick-action { padding: 12px 10px; gap: 8px; }
  .quick-action span { font-size: 10px; }
  .quick-action small { font-size: 8px; }
  .grid-two, .qr-grid { grid-template-columns: 1fr; gap: 0; }
  .notice { padding: 13px 14px; font-size: 10px; }
  .table-toolbar { padding: 14px; gap: 12px; display: block; }
  .search-form { flex-wrap: wrap; gap: 8px; }
  .search-wrap { max-width: none; flex: 1 1 100%; }
  .search-form select { flex: 1; min-width: 0; }
  .table-count { margin-top: 9px; display: block; font-size: 9px; }
  .pagination { padding: 12px 14px; flex-wrap: wrap; font-size: 9px; }
  .page-controls { gap: 7px; }
  .workspace-footer { font-size: 8px; padding: 15px; gap: 10px; }
  .tabs { gap: 22px; overflow-x: auto; white-space: nowrap; }
  .tab-button { font-size: 11px; }
  .dialog, .dialog.wide { width: calc(100% - 20px); max-height: calc(100dvh - 30px); border-radius: 12px; }
  .dialog-header { padding: 19px 19px 16px; }
  .dialog-header h2 { font-size: 17px; }
  .dialog-body { padding: 20px 19px; }
  .dialog-footer { padding: 13px 19px; flex-wrap: wrap; }
  .dialog-footer .footer-note { flex: 1 1 100%; font-size: 9px; }
  .detail-grid { gap: 18px; }
  .detail-item dt { font-size: 9px; }
  .detail-item dd { font-size: 11px; }
  .form-grid { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .preview-values { gap: 8px; }
  .preview-value { padding: 12px 10px; }
  .preview-value span { font-size: 8px; }
  .preview-value strong { font-size: 16px; }
  .key-value-list > div { grid-template-columns: 1fr; gap: 5px; }
  .toast-region { right: 15px; bottom: 15px; }
  .login-form-wrap { padding: 23px; }
  .login-panel { padding: 38px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
