:root {
  color-scheme: light;
  --primary: #1f6f5c;
  --secondary: #174f43;
  --accent: #ffffff;
  --primary-fg: #ffffff;
  --body-fg: #202925;
  --body-bg: #f4f6f5;
  --body-quiet-color: #68736e;
  --body-loud-color: #111814;
  --header-color: #18211d;
  --header-branding-color: #18211d;
  --header-bg: #ffffff;
  --header-link-color: #3d4a44;
  --breadcrumbs-fg: #65716b;
  --breadcrumbs-link-fg: #34423c;
  --breadcrumbs-bg: #ffffff;
  --link-fg: #1d6756;
  --link-hover-color: #13483c;
  --link-selected-fg: #13483c;
  --hairline-color: #e2e7e4;
  --border-color: #d8dfdb;
  --error-fg: #a63b38;
  --message-success-bg: #e9f5ef;
  --message-warning-bg: #fff5df;
  --message-error-bg: #fbeceb;
  --darkened-bg: #edf1ef;
  --selected-bg: #e8f2ee;
  --selected-row: #f0f7f4;
  --button-fg: #ffffff;
  --button-bg: #1f6f5c;
  --button-hover-bg: #185846;
  --default-button-bg: #1f6f5c;
  --default-button-hover-bg: #185846;
  --close-button-bg: #5b6661;
  --close-button-hover-bg: #424c47;
  --delete-button-bg: #b24642;
  --delete-button-hover-bg: #963733;
  --object-tools-fg: #ffffff;
  --object-tools-bg: #1f6f5c;
  --object-tools-hover-bg: #185846;
  --font-primary: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --surface: #ffffff;
  --surface-soft: #f7f9f8;
  --text: #202925;
  --muted: #68736e;
  --green: #1f6f5c;
  --green-soft: #e8f3ef;
  --amber: #9b6518;
  --amber-soft: #fff4dc;
  --red: #a63b38;
  --red-soft: #fbeceb;
  --blue: #326d91;
  --blue-soft: #eaf2f7;
  --shadow: 0 8px 24px rgba(27, 42, 35, 0.06);
}

* { box-sizing: border-box; letter-spacing: 0; }
html { background: var(--body-bg); }
body { min-width: 0; background: var(--body-bg); color: var(--text); font-family: var(--font-primary); }
a:link, a:visited { color: var(--link-fg); }
a:hover, a:focus { color: var(--link-hover-color); }

#container { min-height: 100vh; }
#header {
  min-height: 70px;
  padding: 0 28px;
  border-bottom: 1px solid var(--hairline-color);
  box-shadow: 0 1px 0 rgba(17, 24, 20, 0.02);
  align-items: center;
  gap: 24px;
}
#branding { display: flex; align-items: center; }
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; color: var(--text) !important; text-decoration: none; }
.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  object-fit: contain;
}
.brand-copy { display: grid; gap: 2px; line-height: 1.1; }
.brand-copy strong { color: var(--text); font-size: 16px; font-weight: 700; }
.brand-copy small { color: var(--muted); font-size: 11px; }
#user-tools { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
#user-tools a, #user-tools button { color: #42504a; text-decoration: none; }
#user-tools a:hover, #user-tools button:hover { color: var(--green); }
#user-tools form { display: inline-flex; }
#user-tools button { padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.account-summary { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.role-chip { padding: 4px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 700; }

div.breadcrumbs { padding: 11px 28px; border-bottom: 1px solid var(--hairline-color); background: #fff; color: var(--muted); }
.breadcrumbs a { font-weight: 600; }
.main { align-items: stretch; }
.content { padding: 26px 30px 34px; }
#content { max-width: 1480px; margin: 0 auto; padding: 0; }
body.dashboard #content { width: 100%; max-width: none; }
#content h1 { margin: 0 0 22px; color: #111814; font-size: 26px; font-weight: 700; }
#content h2 { color: #17201c; }
#footer { padding: 18px 30px; color: #7b8681; font-size: 12px; text-align: center; }

#nav-sidebar { width: 252px; min-width: 252px; border-right: 1px solid var(--hairline-color); background: #fff; }
#nav-sidebar .nav-sidebar-heading { display: grid; padding: 24px 20px 14px; gap: 4px; }
#nav-sidebar .nav-sidebar-heading span { color: #17201c; font-size: 15px; font-weight: 750; }
#nav-sidebar .nav-sidebar-heading small { color: #87918c; font-size: 10px; }
#nav-sidebar #nav-filter { width: calc(100% - 28px); margin: 0 14px 8px; padding: 9px 11px; border-color: #dbe2de; background: #f7f9f8; font-size: 12px; }
#nav-sidebar #nav-filter:focus { border-color: var(--green); background: #fff; }
#nav-sidebar .nav-section { padding: 4px 10px 10px; border-bottom: 1px solid #edf0ee; }
#nav-sidebar .nav-section:last-child { border-bottom: 0; }
#nav-sidebar .nav-section > p { margin: 0; padding: 15px 10px 7px; color: #87918c; font-size: 11px; font-weight: 700; }
#nav-sidebar .nav-entry { display: flex; min-height: 43px; margin: 2px 0; padding: 9px 11px; align-items: center; justify-content: space-between; gap: 8px; border-radius: 6px; color: #33413b; text-decoration: none; }
#nav-sidebar .nav-entry span { font-weight: 650; }
#nav-sidebar .nav-entry small { color: #8a958f; font-size: 9px; white-space: nowrap; }
#nav-sidebar .nav-entry:hover { background: #f3f7f5; color: #17201c; }
#nav-sidebar .nav-entry.current { background: var(--green-soft); color: var(--green); }
#nav-sidebar .nav-entry.current small { color: #4b7d6f; }
#nav-sidebar .nav-section--priority { padding-top: 0; }
#nav-sidebar .module { margin: 0; border: 0; background: transparent; }
#nav-sidebar .module caption { padding: 18px 20px 7px; background: transparent; color: #87918c; font-size: 11px; font-weight: 700; text-transform: none; }
#nav-sidebar .module th, #nav-sidebar .module td { padding: 0; border: 0; }
#nav-sidebar .module th a, #nav-sidebar .module td a { display: block; margin: 2px 10px; padding: 10px 12px; border-radius: 6px; color: #33413b; font-weight: 600; }
#nav-sidebar .current-model th a, #nav-sidebar .current-model td a { background: var(--green-soft); color: var(--green); }
.toggle-nav-sidebar { border-right: 1px solid var(--hairline-color); background: #fff; color: var(--green); }

@media (min-width: 768px) {
  #nav-sidebar { position: sticky; top: 0; height: calc(100vh - 70px); margin-left: 0 !important; overflow-x: hidden; overflow-y: auto; }
  .toggle-nav-sidebar { display: none; }
}

.module { border: 1px solid var(--hairline-color); border-radius: 7px; background: var(--surface); overflow: hidden; box-shadow: none; }
.module h2, .module caption, .inline-group h2 { padding: 12px 16px; background: #f4f7f5; color: #29352f; font-size: 13px; font-weight: 700; }
.module table { border-collapse: collapse; }
.module th, .module td { border-bottom-color: #e8ece9; }

.button, input[type=submit], input[type=button], .submit-row input, a.button {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #fff;
  color: #25312c;
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 18px;
  box-shadow: none;
}
.button:hover, input[type=submit]:hover, input[type=button]:hover, a.button:hover { border-color: #aeb9b3; background: #f7f9f8; color: #17201c; }
.button.default, input[type=submit].default, .submit-row input.default, .button-primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff !important;
}
a.button.button-primary { border-color: var(--green) !important; background-color: var(--green) !important; color: #fff !important; }
a.button.button-primary:hover { border-color: #185846 !important; background-color: #185846 !important; }
.button.default:hover, input[type=submit].default:hover, .submit-row input.default:hover, .button-primary:hover { border-color: #185846; background: #185846; }
form.is-submitting { pointer-events: none; opacity: 0.72; }
.object-tools { margin-top: -54px; }
.object-tools a:link, .object-tools a:visited { border-radius: 6px; background: var(--green); font-weight: 600; }
.object-tools a:hover { background: #185846; }

input, textarea, select, .vTextField { border: 1px solid #ccd5d0; border-radius: 6px; background: #fff; color: var(--text); font-family: var(--font-primary); }
input:focus, textarea:focus, select:focus { border-color: var(--green); outline: 3px solid rgba(31, 111, 92, 0.12); }
input[type=checkbox], input[type=radio] { accent-color: var(--green); }
.form-row { border-bottom-color: var(--hairline-color); }
.help, p.help, form p.help, div.help, form div.help, div.help li { color: var(--muted); }
.submit-row { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 16px; border: 1px solid var(--hairline-color); border-radius: 7px; background: #f8faf9; box-shadow: none; }
.submit-row a.deletelink { margin-left: 0; }

#changelist { border: 0; background: transparent; box-shadow: none; overflow: visible; }
#changelist .changelist-form-container { border: 1px solid var(--hairline-color); border-radius: 7px; background: #fff; overflow: hidden; }
#changelist #toolbar { padding: 13px 16px; border: 0; border-bottom: 1px solid var(--hairline-color); background: #fff; }
#changelist #toolbar form input[type=text] { min-height: 36px; padding: 7px 10px; }
#changelist .results { overflow-x: auto; }
#changelist table thead th { padding: 12px 10px; border-bottom: 1px solid #dfe5e1; background: #f6f8f7; color: #56625c; font-size: 12px; }
#changelist table tbody td, #changelist table tbody th { padding: 13px 10px; border-bottom: 1px solid #edf0ee; vertical-align: middle; }
#changelist table tbody tr:hover { background: #f7faf8; }
#changelist-filter { border: 1px solid var(--hairline-color); border-radius: 7px; background: #fff; }
#changelist-filter h2 { border-radius: 7px 7px 0 0; background: #34443c; }
#changelist-filter h3 { color: #36433d; }
.paginator { border: 0 !important; background: #fff !important; }

.status-chip { display: inline-flex; align-items: center; width: max-content; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.status-chip--success { background: var(--green-soft); color: var(--green); }
.status-chip--warning { background: var(--amber-soft); color: var(--amber); }
.status-chip--danger { background: var(--red-soft); color: var(--red); }
.status-chip--info { background: var(--blue-soft); color: var(--blue); }
.status-chip--neutral { background: #edf0ee; color: #5f6a65; }
.expiry-cell, .event-label { display: grid; gap: 5px; }
.revenue-cell { display: grid; gap: 4px; }
.revenue-cell small { color: var(--muted); font-size: 10px; }
.expiry-cell small, .event-label small { font-size: 10px; }
.event-label strong { color: #25312c; }
.event-label small { color: var(--muted); font-family: ui-monospace, Consolas, monospace; }

ul.messagelist { max-width: 1480px; margin: 0 auto 18px; padding: 0; }
ul.messagelist li { border: 1px solid #cfe3da; border-radius: 6px; background: var(--message-success-bg); color: #235c4b; }
ul.messagelist li.warning { border-color: #ead59f; background: var(--message-warning-bg); color: #76531c; }
ul.messagelist li.error { border-color: #e8c1bf; background: var(--message-error-bg); color: var(--red); }
.errornote { border: 1px solid #e8c1bf; border-radius: 6px; background: var(--red-soft); color: var(--red); }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 22px; }
.page-heading h1 { margin: 2px 0 0 !important; }
.page-eyebrow { margin: 0; color: var(--green); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.metric-card { min-height: 126px; padding: 17px 18px; border: 1px solid var(--hairline-color); border-top: 3px solid #c9d1cd; border-radius: 7px; background: #fff; box-shadow: var(--shadow); }
.metric-card--accent { border-top-color: var(--green); }
.metric-card--warning { border-top-color: #c58a2d; }
.metric-card span, .metric-card small { display: block; color: var(--muted); }
.metric-card span { font-size: 13px; font-weight: 600; }
.metric-card strong { display: block; margin: 11px 0 7px; color: #111814; font-size: 30px; line-height: 1; }
.metric-card small { font-size: 11px; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.8fr); gap: 22px; align-items: start; }
.dashboard-section { min-width: 0; }
.dashboard-activity { width: 100%; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.section-heading h2 { margin: 2px 0 0; font-size: 17px; }
.section-heading > a { font-size: 12px; font-weight: 600; }
.dashboard .module { margin-bottom: 10px; }
.dashboard .module table { width: 100%; table-layout: fixed; }
.dashboard .module table thead { display: none; }
.dashboard .module table caption { padding: 12px 15px; border-bottom: 1px solid var(--hairline-color); background: #fff; }
.dashboard .module table caption a { color: #223029; font-size: 13px; }
.dashboard .module table th, .dashboard .module table td { padding: 12px 15px; }
.dashboard .module table th { width: auto; }
.dashboard .module table td { width: 82px; }
.dashboard .module table th a { color: #33413b; }
.dashboard .module table td a { font-size: 12px; }
.activity-list { border: 1px solid var(--hairline-color); border-radius: 7px; background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.activity-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 13px 14px; border-bottom: 1px solid #edf0ee; color: var(--text) !important; text-decoration: none; }
.activity-row:last-child { border-bottom: 0; }
.activity-row:hover { background: #f7faf8; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.activity-main { display: grid; gap: 3px; min-width: 0; }
.activity-main strong { overflow: hidden; color: #27342e; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.activity-main small, .activity-target { color: var(--muted); font-size: 10px; }
.activity-target { padding: 4px 7px; border-radius: 999px; background: #edf1ef; white-space: nowrap; }
.empty-state { display: grid; gap: 6px; padding: 35px 18px; color: var(--muted); text-align: center; }
.empty-state strong { color: #43514a; }

.focused-form-page { max-width: 880px; }
.focused-form-intro { margin-bottom: 18px; }
.focused-form-intro h2 { margin: 5px 0 7px; font-size: 21px; }
.focused-form-intro > p:last-child { color: var(--muted); }
.panel-form .module { margin: 0; }
.panel-form .form-row { display: grid; grid-template-columns: minmax(180px, 0.42fr) minmax(240px, 1fr); gap: 22px; align-items: start; padding: 17px 19px; }
.panel-form .field-label { display: grid; gap: 5px; }
.panel-form .field-label label { color: #2a3731; font-weight: 700; }
.panel-form .field-label span { color: var(--muted); font-size: 11px; }
.panel-form .field-control input:not([type=checkbox]), .panel-form .field-control select { width: min(100%, 460px); min-height: 38px; }
.panel-form .submit-row { margin-top: 12px; }
.generated-key-panel { padding: 28px; border: 1px solid var(--hairline-color); border-top: 3px solid var(--green); border-radius: 7px; background: #fff; box-shadow: var(--shadow); }
.result-icon { display: grid; width: 40px; height: 40px; margin-bottom: 16px; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 19px; font-weight: 700; }
.generated-key-panel h2 { margin: 6px 0; font-size: 22px; }
.generated-key-panel > p:not(.page-eyebrow) { color: var(--muted); }
.copy-field { display: flex; gap: 9px; margin: 22px 0; }
.copy-field input { min-width: 0; flex: 1; min-height: 42px; padding: 9px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 15px; }
.result-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--hairline-color); }
.result-details div { padding: 16px 0 0; }
.result-details dt { color: var(--muted); font-size: 11px; }
.result-details dd { margin: 5px 0 0; color: #27342e; font-weight: 700; }

.heading-actions { display: flex; gap: 9px; }
.key-overview-page, .issue-key-page, .supervisor-page { width: 100%; }
.key-security-notice { display: grid; margin-bottom: 14px; padding: 13px 16px; gap: 4px; border: 1px solid #d7e5df; border-left: 3px solid var(--green); border-radius: 6px; background: #f7fbf9; }
.key-security-notice strong { color: #24352d; font-size: 12px; }
.key-security-notice span { color: var(--muted); font-size: 10px; line-height: 1.55; }
.overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px; border: 1px solid var(--hairline-color); border-radius: 7px; background: #fff; overflow: hidden; }
.overview-metrics article { position: relative; min-height: 92px; padding: 16px 18px; border-right: 1px solid var(--hairline-color); }
.overview-metrics article:last-child { border-right: 0; }
.overview-metrics span, .overview-metrics small { display: block; color: var(--muted); font-size: 11px; }
.overview-metrics strong { display: inline-block; margin-top: 10px; color: #17201c; font-size: 24px; line-height: 1; }
.overview-metrics small { display: inline-block; margin-left: 5px; }
.overview-metrics .metric-danger { background: #fffafa; }
.overview-metrics .metric-danger strong { color: var(--red); }

.supervisor-directory { margin-bottom: 14px; border: 1px solid var(--hairline-color); border-radius: 7px; background: #fff; overflow: hidden; }
.supervisor-directory > summary, .supervisor-group > summary { display: flex; list-style: none; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }
.supervisor-directory > summary::-webkit-details-marker, .supervisor-group > summary::-webkit-details-marker { display: none; }
.supervisor-directory > summary { min-height: 68px; padding: 14px 18px; border-bottom: 1px solid transparent; }
.supervisor-directory[open] > summary { border-bottom-color: var(--hairline-color); }
.supervisor-directory > summary > span { display: grid; gap: 4px; }
.supervisor-directory > summary strong { color: #1c2923; font-size: 16px; }
.supervisor-directory > summary small { color: var(--muted); font-size: 11px; }
.supervisor-directory > summary b { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 12px; }
.supervisor-groups { padding: 12px; background: #f7f9f8; }
.supervisor-group { margin-bottom: 9px; border: 1px solid #dfe5e1; border-radius: 6px; background: #fff; overflow: hidden; }
.supervisor-group:last-child { margin-bottom: 0; }
.supervisor-group > summary { min-height: 60px; padding: 12px 15px; }
.supervisor-group[open] > summary { border-bottom: 1px solid var(--hairline-color); background: #fbfcfb; }
.supervisor-identity { display: grid; gap: 3px; }
.supervisor-identity strong { color: #27342e; font-size: 14px; }
.supervisor-identity small { color: var(--muted); font-size: 10px; }
.supervisor-summary { display: flex; align-items: center; gap: 18px; }
.supervisor-summary em { color: #66736d; font-size: 11px; font-style: normal; white-space: nowrap; }
.text-danger { color: var(--red) !important; }
.key-records { display: grid; padding: 12px; gap: 10px; }
.key-record { border: 1px solid #dfe5e1; border-left: 3px solid var(--green); border-radius: 6px; background: #fff; overflow: hidden; }
.key-record--expired { border-left-color: var(--red); }
.key-record-head { display: flex; min-height: 64px; padding: 13px 15px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf0ee; }
.key-record-head > div:first-child { display: grid; gap: 4px; }
.key-record-head strong { color: #17201c; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.key-record-head small { color: var(--muted); font-size: 10px; }
.key-record-secret { display: flex; align-items: center; gap: 7px; }
.key-record-secret input { width: 330px; max-width: 52vw; min-height: 34px; padding: 6px 9px; border: 1px solid #d8dfdb; border-radius: 5px; background: #fbfcfb; color: #17201c; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.key-record-secret .button { min-height: 34px; padding: 6px 11px; }
.key-record-state { display: flex; align-items: center; gap: 9px; }
.expiry-text { color: #63706a; font-size: 11px; }
.key-record-data { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid #edf0ee; background: #fafcfb; }
.key-record-data > div { display: grid; padding: 12px 15px; gap: 4px; border-right: 1px solid #edf0ee; }
.key-record-data > div:last-child { border-right: 0; }
.key-record-data span { color: var(--muted); font-size: 10px; }
.key-record-data strong { color: #2b3832; font-size: 12px; }
.key-record-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 13px 15px; gap: 14px; align-items: end; }
.key-operation-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(150px, 210px) auto; gap: 10px; align-items: end; }
.key-operation-form label, .key-renew-form label { display: grid; gap: 6px; color: #4f5d56; font-size: 10px; }
.key-operation-form input, .key-renew-form input { width: 100%; min-height: 36px; padding: 7px 9px; }
.key-owner-actions { display: flex; align-items: end; gap: 9px; padding-left: 14px; border-left: 1px solid #e3e8e5; }
.key-renew-form { display: grid; grid-template-columns: 130px auto; gap: 9px; align-items: end; }
.key-delete-form { display: flex; align-items: end; }
.button.button-danger { border-color: #d9aaa8; background: #fff7f7; color: var(--red); }
.button.button-danger:hover { border-color: var(--red); background: var(--red); color: #fff; }
.key-renew-form label { position: relative; }
.key-renew-form label small { position: absolute; right: 10px; bottom: 10px; color: var(--muted); }
.key-renew-form input { padding-right: 28px; }
.key-renew-form button:disabled { opacity: 0.5; cursor: not-allowed; }

.issue-key-page { max-width: 1120px; }
.issue-key-form, .supervisor-create-form { display: grid; gap: 14px; }
.form-section { border: 1px solid var(--hairline-color); border-radius: 7px; background: #fff; overflow: hidden; }
.form-section-heading { display: flex; min-height: 54px; padding: 12px 17px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--hairline-color); background: #f8faf9; }
.form-section-heading strong { color: #24312b; font-size: 14px; }
.form-section-heading small { color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 17px; gap: 16px; }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-field { display: grid; align-content: start; gap: 7px; color: #33413b; font-size: 12px; font-weight: 650; }
.form-field--wide { grid-column: 1 / -1; }
.form-field input:not([type=checkbox]), .form-field select, .form-field textarea { width: 100%; min-height: 40px; padding: 8px 10px; font-weight: 400; }
.form-field textarea { min-height: 78px; resize: vertical; }
.form-field > small { color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.5; }
.form-field .errorlist { margin: 0; color: var(--red); font-size: 11px; font-weight: 400; }
.choice-grid > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice-grid label { display: flex; min-height: 40px; padding: 8px 10px; align-items: center; gap: 8px; border: 1px solid #dce3df; border-radius: 6px; background: #fbfcfb; font-weight: 500; }
.issue-key-submit { display: flex; min-height: 64px; padding: 12px 15px; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--hairline-color); border-radius: 7px; background: #fff; }
.issue-key-submit span { color: var(--muted); font-size: 11px; }

.supervisor-table-wrap { border: 1px solid var(--hairline-color); border-radius: 7px; background: #fff; overflow-x: auto; }
.supervisor-table { width: 100%; border-collapse: collapse; }
.supervisor-table th { padding: 12px 14px; border-bottom: 1px solid var(--hairline-color); background: #f7f9f8; color: #68736e; font-size: 11px; text-align: left; }
.supervisor-table td { padding: 15px 14px; border-bottom: 1px solid #edf0ee; color: #39463f; font-size: 12px; }
.supervisor-table tbody tr:last-child td { border-bottom: 0; }
.supervisor-create-page { max-width: 840px; }

body.login { margin: 0; background: #e4ebe8; }
body.login #container { width: 100%; max-width: none; min-width: 0; min-height: 100vh; margin: 0; border: 0; background: transparent; }
body.login #header, body.login div.breadcrumbs, body.login #footer { display: none; }
body.login #main { display: block; min-height: 100vh; }
body.login #content-start { display: block; width: 100%; max-width: none; min-height: 100vh; margin: 0; padding: 0; }
body.login #content { width: 100%; max-width: none; margin: 0; padding: 0; }
body.login #content-main { width: 100%; }
body.login br.clear { display: none; }

.auth-layout { display: grid; grid-template-columns: minmax(520px, 1.12fr) minmax(460px, 0.88fr); width: 100%; min-height: 100vh; background: #fff; }
.auth-context { position: relative; display: flex; min-width: 0; padding: 58px 72px 46px; flex-direction: column; background: #e8f0ed; overflow: hidden; }
.auth-context::before { position: absolute; top: 0; right: 0; width: 1px; height: 100%; background: #d4dfda; content: ""; }
.auth-context::after { position: absolute; top: 140px; right: 0; width: 4px; height: 96px; background: #1f6f5c; content: ""; opacity: 0.48; }
.auth-signal-canvas { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.9; }
.auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.brand-mark--large { width: 50px; height: 50px; flex-basis: 50px; }
.auth-brand-copy { display: grid; gap: 2px; }
.auth-brand-copy strong { color: #17201c; font-size: 17px; line-height: 1.2; }
.auth-brand-copy small { color: #6b7771; font-size: 11px; }
.auth-context-copy { position: relative; z-index: 1; max-width: 680px; margin: clamp(112px, 16vh, 176px) 0 0; }
.auth-eyebrow { margin: 0 0 14px; color: var(--green); font-size: 11px; font-weight: 800; }
.auth-context-copy h1 { margin: 0 0 22px !important; color: #101713 !important; font-size: 50px !important; font-weight: 720 !important; line-height: 1.18; }
.auth-context-copy > p:last-child { margin: 0; color: #56635d; font-size: 17px; line-height: 1.75; }
.status-indicator { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #21936f; box-shadow: 0 0 0 3px rgba(33, 147, 111, 0.12); }
.auth-context-footnote { position: relative; z-index: 1; margin: auto 0 0; color: #84908a; font-size: 11px; }

.auth-panel { display: flex; min-width: 0; padding: 58px 54px 34px; align-items: center; justify-content: center; flex-direction: column; background: #fff; }
.login-shell { width: min(100%, 440px); padding: 36px 38px 34px; border: 1px solid #e0e6e3; border-radius: 8px; background: #fff; box-shadow: 0 18px 46px rgba(25, 40, 33, 0.08); }
.login-heading { margin-bottom: 30px; }
.login-heading .auth-eyebrow { margin-bottom: 12px; }
.login-heading h2 { margin: 0 0 8px; color: #121a16; font-size: 25px; font-weight: 720; }
.login-heading > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
body.login .errornote, .login-client-error { margin: 0 0 18px; padding: 11px 12px; border: 1px solid #e8c1bf; border-radius: 6px; background: var(--red-soft); color: var(--red); font-size: 12px; line-height: 1.6; }
body.login .form-row { padding: 0 0 19px; border: 0; }
body.login .form-row label { display: block; margin-bottom: 8px; color: #34413b; font-size: 12px; font-weight: 700; }
body.login .form-row input { width: 100%; min-height: 48px; padding: 10px 13px; border-color: #cbd5d0; background: #fbfcfb; color: #111814; font-size: 14px; }
body.login .form-row input:hover { border-color: #aebbb4; background: #fff; }
body.login .form-row input:focus { border-color: var(--green); background: #fff; outline: 3px solid rgba(31, 111, 92, 0.12); }
body.login .submit-row { display: block; margin: 5px 0 0; padding: 0; border: 0; background: transparent; }
.login-submit { display: flex; width: 100%; min-height: 48px; padding: 0 15px; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--green); border-radius: 6px; background: var(--green); color: #fff; font-family: var(--font-primary); font-size: 14px; font-weight: 700; cursor: pointer; }
.login-submit:hover { border-color: #185846; background: #185846; }
.login-submit:focus-visible { outline: 3px solid rgba(31, 111, 92, 0.2); outline-offset: 2px; }
.login-submit:disabled { border-color: #82a99e; background: #82a99e; cursor: wait; }
.login-submit.is-loading span { animation: login-pulse 900ms ease-in-out infinite; }
.login-security-note { display: flex; margin-top: 21px; align-items: center; justify-content: center; gap: 9px; color: #77827d; font-size: 10px; }
.login-security-note .status-indicator { width: 6px; height: 6px; }
.auth-copyright { margin: 25px 0 0; color: #929b97; font-size: 10px; }

@keyframes login-pulse { 50% { opacity: 0.35; } }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-columns { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: minmax(480px, 1fr) minmax(420px, 0.88fr); }
  .auth-context { padding: 44px 46px 38px; }
  .auth-context-copy { margin-top: clamp(92px, 13vh, 124px); }
  .auth-context-copy h1 { font-size: 42px !important; }
  .auth-panel { padding: 44px 34px 28px; }
  .key-record-actions { grid-template-columns: 1fr; }
  .key-owner-actions { width: 100%; padding: 12px 0 0; border-top: 1px solid #e3e8e5; border-left: 0; }
  .key-renew-form { grid-template-columns: minmax(130px, 220px) auto; width: max-content; }
}

@media (max-width: 900px) {
  .auth-layout { display: block; min-height: 100vh; }
  .auth-context { min-height: 270px; padding: 32px 34px 30px; }
  .auth-context-copy { margin: 52px 0 0; }
  .auth-context-copy h1 { margin-bottom: 12px !important; font-size: 34px !important; }
  .auth-context-copy > p:last-child { font-size: 14px; }
  .auth-context-footnote { display: none; }
  .auth-panel { padding: 38px 22px 34px; }
}

@media (max-width: 767px) {
  #header { min-height: 62px; padding: 10px 16px; gap: 10px; }
  .brand-copy small, .account-summary .role-chip { display: none; }
  #user-tools { gap: 9px; }
  #user-tools .account-summary strong { display: none; }
  div.breadcrumbs { padding: 10px 16px; }
  .content { padding: 20px 16px 28px; }
  #content h1 { font-size: 23px; }
  .page-heading { align-items: center; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 112px; padding: 14px; }
  .metric-card strong { font-size: 26px; }
  .panel-form .form-row { grid-template-columns: 1fr; gap: 9px; }
  .copy-field { flex-direction: column; }
  .result-details { grid-template-columns: 1fr; }
  .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-metrics article:nth-child(2) { border-right: 0; }
  .overview-metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--hairline-color); }
  .supervisor-summary { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .key-record-data { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-record-data > div:nth-child(2) { border-right: 0; }
  .key-record-data > div:nth-child(-n+2) { border-bottom: 1px solid #edf0ee; }
  .key-operation-form { grid-template-columns: 1fr; }
  .form-grid, .form-grid--three { grid-template-columns: 1fr; }
  .choice-grid > div { grid-template-columns: 1fr; }
  .issue-key-submit { align-items: stretch; flex-direction: column; }
  body.login #content-start { padding: 0; }
  .auth-layout { display: block; min-height: 100vh; }
  .auth-context { min-height: 255px; padding: 28px 24px 26px; }
  .auth-context-copy { margin: 48px 0 0; }
  .auth-context-copy h1 { margin-bottom: 12px !important; font-size: 31px !important; }
  .auth-context-copy > p:last-child { font-size: 14px; }
  .auth-context-footnote { display: none; }
  .auth-panel { padding: 34px 20px 30px; }
  .login-shell { width: min(100%, 440px); padding: 28px 24px 26px; box-shadow: none; }
}

@media (max-width: 480px) {
  .brand-copy strong { font-size: 14px; }
  #user-tools a { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card:last-child { grid-column: 1 / -1; }
  .metric-card { min-height: 102px; }
  .activity-target { display: none; }
  .activity-row { grid-template-columns: 8px minmax(0, 1fr); }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; flex-wrap: wrap; }
  .key-record-head { align-items: flex-start; flex-direction: column; }
  .key-record-secret input { width: min(330px, 65vw); max-width: 65vw; }
  .key-record-state { align-items: flex-start; flex-direction: column; }
  .key-renew-form { grid-template-columns: 1fr; width: 100%; }
  .supervisor-directory > summary, .supervisor-group > summary { align-items: flex-start; }
  .supervisor-group > summary { flex-direction: column; }
  .supervisor-summary { justify-content: flex-start; }
}
