/* Independent administration workspace. */
:root {
  color-scheme: light;
  --blue: #0066cc;
  --blue-dark: #0053a7;
  --blue-light: #eaf3ff;
  --ink: #18334f;
  --text: #405870;
  --muted: #63758a;
  --line: #dce5ef;
  --canvas: #f3f6fb;
  --green: #14764e;
  --orange: #925b10;
  --red: #aa3440;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 16px; line-height: 1.65; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button, a, input, select { outline-offset: 4px; }
:focus-visible { outline: 3px solid #8bc2fa; }
input, select, textarea { min-width: 0; width: 100%; min-height: 50px; padding: 11px 14px; color: var(--ink); border: 1px solid #bdcddd; border-radius: 6px; background: #fff; font-size: 16px; }
input:hover, select:hover { border-color: #8daecc; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #0066cc12; }
input::placeholder { color: #718095; opacity: 1; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; margin: 3px 0 0; accent-color: var(--blue); }
h1, h2, h3, p, ul { margin: 0; }
h1 { font-size: 32px; font-weight: 650; line-height: 1.4; letter-spacing: -.4px; }
h2 { font-size: 21px; font-weight: 650; line-height: 1.5; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.5; }
small { font-size: 14px; }
.muted { color: var(--muted); }
.eyebrow { display: block; margin-bottom: 9px; color: #53718d; font-size: 14px; font-weight: 600; letter-spacing: 1px; }
.admin-icon { flex: 0 0 auto; display: inline-block; width: 22px; height: 22px; vertical-align: middle; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 10px 20px; border: 1px solid transparent; border-radius: 6px; font-size: 16px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.button.primary { color: #fff; background: var(--blue); box-shadow: 0 4px 12px #0066cc16; }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { color: #355775; border-color: #bdcfe1; background: #fff; }
.button.secondary:hover { color: var(--blue-dark); border-color: #74a7db; background: #f1f7ff; }
.button.wide { width: 100%; }
.text-button { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 0; border: 0; color: var(--blue); background: transparent; font-size: 15px; font-weight: 600; text-align: left; }
.text-button:hover { color: var(--blue-dark); text-decoration: underline; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 48px; min-height: 48px; padding: 10px; color: #385b7d; border: 1px solid #c8d7e7; border-radius: 6px; background: #fff; }
.icon-button:hover { background: var(--blue-light); color: var(--blue); }
.field { min-width: 0; }
.field label, .field-label { display: block; margin-bottom: 9px; color: #354e67; font-size: 15px; font-weight: 600; }
.field > small { display: block; margin-top: 7px; color: var(--muted); font-size: 14px; }
.form-message { min-height: 1px; margin-top: 14px; overflow-wrap: anywhere; font-size: 15px; }
.form-message:empty { margin: 0; }
.form-message.is-error:not(:empty) { padding: 12px 14px; color: var(--red); background: #fff0f1; border: 1px solid #f0ccd0; border-radius: 6px; }
.form-message.is-success:not(:empty) { padding: 12px 14px; color: var(--green); background: #eaf7ef; border-radius: 6px; }
.skip-link { position: fixed; left: 18px; top: -80px; z-index: 50; padding: 12px 20px; border-radius: 5px; color: #fff; background: var(--blue); }
.skip-link:focus { top: 12px; }

/* Login */
.admin-login-body { background: #fff; }
.admin-login-shell { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 100dvh; }
.admin-login-intro { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 48px 64px 38px; overflow: hidden; color: #fff; background: linear-gradient(145deg,#063b76,#0066cc 66%,#1475d2); }
.admin-brand { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 11px; color: var(--blue); }
.admin-brand:hover { color: var(--blue-dark); }
.brand-symbol { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 44px; font-size: 43px; font-weight: 800; line-height: 1; }
.admin-brand > span:last-child { font-size: 25px; font-weight: 700; line-height: 1.3; letter-spacing: .5px; color: var(--ink); }
.admin-brand small { display: block; margin-top: 4px; color: #5d748d; font-size: 14px; font-weight: 400; letter-spacing: 1.2px; }
.admin-login-intro .admin-brand, .admin-login-intro .admin-brand > span:last-child { color: #fff; }
.admin-login-intro .admin-brand small { color: #d0e7ff; }
.login-copy { position: relative; z-index: 1; margin: auto 0; padding: 72px 0 62px; }
.login-copy .eyebrow { color: #b6dbff; letter-spacing: 1.8px; }
.login-copy h1 { margin-top: 18px; font-size: clamp(38px,3.5vw,52px); line-height: 1.5; font-weight: 650; }
.login-copy > p { margin-top: 23px; color: #dcecff; font-size: 18px; line-height: 1.95; }
.login-feature-list { display: flex; flex-direction: column; gap: 17px; margin-top: 38px; color: #e3f0ff; font-size: 16px; }
.login-feature-list > span { display: flex; align-items: center; gap: 13px; }
.login-feature-list .admin-icon { color: #b9ddff; }
.admin-login-intro > footer { position: relative; z-index: 1; color: #c0ddfb; font-size: 14px; }
.login-blueprint { position: absolute; right: -145px; bottom: 20px; width: 500px; height: 500px; transform: rotate(-12deg); opacity: .16; pointer-events: none; }
.login-blueprint span { position: absolute; border: 1px solid #e5f5ff; border-radius: 38px; }
.login-blueprint span:nth-child(1) { inset: 0; }
.login-blueprint span:nth-child(2) { inset: 65px; }
.login-blueprint span:nth-child(3) { inset: 130px; background: #ffffff17; }
.admin-login-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; padding: 52px 44px 26px; }
.login-card { width: 100%; max-width: 420px; margin: auto 0; }
.login-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 21px; padding: 7px 12px; color: #3b6489; background: #eef5fe; border-radius: 5px; font-size: 14px; }
.login-badge .admin-icon { width: 18px; height: 18px; }
.login-card h2 { font-size: 30px; }
.login-card > p { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.login-card form { margin-top: 30px; }
.login-card .field + .field { margin-top: 21px; }
.login-card input { min-height: 54px; }
.login-card form > button { margin-top: 25px; min-height: 54px; }
.login-account-note { margin-top: 26px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 7px; background: #f8faff; }
.login-account-note strong { font-size: 15px; font-weight: 600; }
.login-account-note p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.login-home { display: inline-flex; align-items: center; min-height: 48px; margin-top: 14px; font-size: 15px; }
.admin-login-panel > footer { padding-top: 38px; color: var(--muted); font-size: 14px; }

/* Sidebar and workspace */
.admin-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: 250px; height: 100dvh; padding: 27px 19px 20px; overflow-y: auto; background: #fff; border-right: 1px solid var(--line); }
.admin-sidebar > .admin-brand { margin: 0 13px; }
.workspace-label { display: flex; align-items: center; gap: 11px; margin: 29px 0 22px; padding: 13px; border: 1px solid #dce8f5; border-radius: 7px; background: #f4f8ff; }
.workspace-label > span { display: grid; place-items: center; flex: 0 0 auto; width: 37px; height: 41px; color: var(--blue); background: #e0edff; border-radius: 5px; }
.workspace-label strong { display: block; font-size: 15px; font-weight: 600; }
.workspace-label small { display: block; margin-top: 3px; color: #5f7690; font-size: 14px; }
.admin-sidebar nav { flex: 0 0 auto; }
.nav-caption { margin: 21px 13px 9px; color: #738398; font-size: 14px; }
.nav-caption:first-child { margin-top: 0; }
.admin-nav-item { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-bottom: 5px; padding: 11px 14px; color: #415e7a; border-radius: 6px; font-size: 16px; }
.admin-nav-item > .admin-icon { color: #68849f; }
.admin-nav-item:hover { color: var(--blue-dark); background: #f2f7fd; }
.admin-nav-item.is-active { color: var(--blue); background: var(--blue-light); font-weight: 600; }
.admin-nav-item.is-active > .admin-icon { color: var(--blue); }
.active-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--blue); }
.nav-empty { padding: 15px; color: var(--muted); font-size: 15px; }
.sidebar-footer { margin-top: auto; padding-top: 28px; }
.safety-card { display: flex; align-items: flex-start; gap: 9px; padding: 14px 11px; margin-bottom: 12px; border-radius: 7px; background: #f6f9fc; }
.safety-card > .admin-icon { width: 19px; height: 19px; margin-top: 4px; color: #5f7f9c; }
.safety-card strong { font-size: 14px; font-weight: 600; }
.safety-card p { margin-top: 5px; font-size: 14px; line-height: 1.8; color: var(--muted); }
.sidebar-footer > a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 11px; color: #59748e; font-size: 14px; }
.admin-workspace-main { min-width: 0; margin-left: 250px; }
.admin-topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 80px; padding: 15px 36px; border-bottom: 1px solid var(--line); background: #fffffffa; backdrop-filter: blur(12px); }
.topbar-leading, .topbar-account { display: flex; align-items: center; gap: 13px; min-width: 0; }
.breadcrumb { font-size: 15px; color: #6a7c8e; white-space: nowrap; }
.breadcrumb > span { margin: 0 12px; color: #c4cfdc; }
.breadcrumb > .breadcrumb-root { margin: 0; color: #6a7c8e; }
.breadcrumb strong { color: #345371; font-weight: 500; }
.topbar-account { gap: 12px; }
.environment-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; color: #536f8b; background: #f0f5fb; border: 1px solid #e2eaf3; border-radius: 4px; font-size: 14px; white-space: nowrap; }
.environment-badge i { width: 6px; height: 6px; border-radius: 50%; background: #6c8bab; }
.admin-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 35px; height: 35px; border-radius: 50%; color: var(--blue); background: #e7f1ff; font-size: 15px; font-weight: 600; }
.account-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.logout-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 9px 10px; color: #58728c; background: transparent; border: 0; border-radius: 5px; font-size: 14px; }
.logout-button .admin-icon { width: 19px; height: 19px; }
.logout-button:hover { color: var(--blue); background: var(--blue-light); }
.mobile-menu-toggle { display: none; }
.sidebar-shade { display: none; }
.admin-content { width: 100%; min-width: 0; min-height: calc(100dvh - 150px); margin: 0 auto; padding: 27px 36px 36px; }
.environment-note { display: flex; align-items: center; gap: 15px; margin-bottom: 28px; padding: 13px 17px; color: #536d89; background: #eaf2fc; border: 1px solid #d8e7f8; border-radius: 6px; }
.environment-note > span { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; color: #315d85; font-size: 14px; font-weight: 600; }
.environment-note .admin-icon { width: 17px; height: 17px; }
.environment-note > p { font-size: 14px; line-height: 1.7; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 27px; }
.page-heading > div:first-child { min-width: 0; }
.page-heading p { max-width: 800px; margin-top: 11px; color: var(--muted); font-size: 16px; }
.heading-actions { flex: 0 0 auto; }
.admin-page-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; width: 100%; padding: 5px 36px 24px; color: #75869a; font-size: 14px; }

/* Records */
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 4px 16px #18334f03; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 24px 20px; }
.panel-heading p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.filter-bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 15px; padding: 19px 24px 23px; border-top: 1px solid #edf1f6; background: #fcfdff; }
.search-field { flex: 1 1 260px; }
.customer-id-field { flex: 0 1 190px; }
.filter-actions { display: flex; gap: 10px; }
.input-with-icon { position: relative; }
.input-with-icon .admin-icon { position: absolute; top: 15px; left: 13px; width: 20px; height: 20px; color: #7e91a7; pointer-events: none; }
.input-with-icon input { padding-left: 42px; }
.table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: #b7cadc #f3f6fb; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 15px; }
th { padding: 15px 22px; color: #4d6781; background: #f0f5fc; border-block: 1px solid #e0e8f2; font-size: 14px; font-weight: 600; }
td { padding: 17px 22px; color: #3f5870; border-bottom: 1px solid #e8eef5; line-height: 1.7; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdff; }
td strong { display: block; color: #244661; font-weight: 550; }
td small { display: block; margin-top: 4px; color: #73869a; font-size: 14px; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.amount-cell { color: #214f78; font-weight: 600; }
.business-table table { min-width: 950px; }
.audit-table table { min-width: 940px; }
.row-links { display: flex; gap: 17px; }
.row-links a { display: inline-flex; align-items: center; min-height: 46px; font-size: 14px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 3px 9px; border-radius: 4px; color: #5d7188; background: #edf2f7; font-size: 14px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.badge.success { color: #22734f; background: #e9f5ee; }
.badge.warning { color: var(--orange); background: #fff4df; }
.badge.danger { color: var(--red); background: #ffedef; }
.badge.blue { color: var(--blue); background: #eaf3ff; }
.table-note { padding: 16px 24px 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; }
.pagination > span { color: #6a7e93; font-size: 14px; }
.pagination > div { display: flex; gap: 10px; }
.pagination .button { min-height: 46px; padding: 9px 15px; font-size: 14px; }
.table-empty { height: 210px; padding: 35px; text-align: center; white-space: normal; }
.table-empty > .admin-icon { display: block; width: 31px; height: 31px; margin: 0 auto 14px; color: #90a8be; }
.table-empty > strong { display: block; font-size: 16px; color: #526e86; }
.table-empty > span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
.request-id { max-width: 220px; white-space: normal; overflow-wrap: anywhere; color: #6b8297; font-family: Consolas, "Segoe UI", monospace; font-size: 14px; }
.admin-user-cell { display: flex; align-items: center; gap: 11px; }
.user-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 7px; color: #3a70a6; background: #edf4fc; font-size: 15px; font-weight: 600; }

/* Overview */
.overview-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; margin-bottom: 23px; }
.stat-card { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #5a728b; font-size: 15px; }
.stat-label .admin-icon { width: 23px; height: 23px; color: #6f94b9; }
.stat-card > strong { display: block; margin-top: 15px; color: #173d62; font-size: 32px; line-height: 1.4; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #edf1f6; font-size: 14px; }
.stat-footer > span { color: #7a8da1; }
.overview-grid { display: grid; grid-template-columns: minmax(0,1.22fr) minmax(0,1fr); gap: 23px; margin-bottom: 23px; }
.balance-panel { display: flex; flex-direction: column; min-width: 0; padding: 29px 30px 0; color: #fff; border: 1px solid #0059b6; border-radius: 8px; background: linear-gradient(110deg,#005dba,#0873d7); box-shadow: 0 5px 18px #0066cc12; }
.balance-label { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.balance-label > span { padding: 1px 6px; color: #e3f1ff; border: 1px solid #ffffff40; border-radius: 3px; font-size: 14px; }
.balance-panel > strong { display: block; margin-top: 20px; color: #fff; overflow-wrap: anywhere; font-size: clamp(27px,3vw,38px); line-height: 1.4; font-weight: 600; font-variant-numeric: tabular-nums; }
.balance-panel > strong small { font-size: 24px; font-weight: 400; }
.balance-panel > p { margin-top: 9px; margin-bottom: 25px; color: #d6eaff; font-size: 14px; }
.balance-bottom { margin-top: auto; margin-inline: -30px; padding: 15px 30px; color: #dfedfb; background: #004ca52e; border-top: 1px solid #ffffff16; font-size: 14px; }
.permission-summary { position: relative; padding: 27px 28px; }
.card-symbol { position: absolute; right: 25px; top: 25px; display: grid; place-items: center; width: 43px; height: 43px; border-radius: 8px; background: var(--blue-light); color: var(--blue); }
.card-symbol .admin-icon { width: 25px; height: 25px; }
.permission-summary h2 { padding-right: 50px; }
.permission-summary > p { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.permission-labels { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.permission-labels span { padding: 4px 8px; border: 1px solid #e2eaf3; border-radius: 4px; background: #f8faff; color: #617b94; font-size: 14px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; font-size: 15px; }
.workflow-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.8fr); gap: 36px; padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.workflow-panel > div > p { margin-top: 13px; font-size: 15px; line-height: 1.85; color: var(--muted); }
.workflow-panel ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 25px; margin: 0; padding: 3px 0; list-style: none; }
.workflow-panel li > span { display: block; margin-bottom: 10px; color: #83a9cf; font-size: 21px; font-weight: 600; }
.workflow-panel li > strong { display: block; color: #355875; font-size: 15px; }
.workflow-panel li > p { margin-top: 8px; color: #72879a; font-size: 14px; line-height: 1.8; }

/* Administration forms and roles */
.editor-panel { min-width: 0; padding: 25px 27px; margin-bottom: 26px; border: 1px solid #bfd7ef; border-radius: 8px; background: #fff; box-shadow: 0 3px 16px #0066cc07; }
.editor-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.editor-panel > header .eyebrow { font-size: 14px; }
.editor-panel > header p { margin-top: 9px; color: var(--muted); font-size: 15px; }
.editor-panel > header .icon-button { width: 43px; min-height: 43px; border-color: #e1e8f1; }
.editor-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 24px; }
.static-field { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 50px; color: #254b70; font-weight: 600; font-size: 16px; }
.static-field > span { color: #7990a5; font-size: 14px; font-weight: 400; }
.editor-notice { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding: 12px 15px; border-radius: 5px; color: #557491; background: #f2f7fd; font-size: 14px; }
.editor-notice .admin-icon { width: 20px; height: 20px; }
.editor-panel form > footer { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.role-name-field { max-width: 460px; }
.permission-editor-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; margin: 27px 0 18px; font-size: 16px; }
.permission-editor-title > span { font-size: 14px; font-weight: 400; color: var(--muted); }
.permission-group { min-width: 0; padding: 18px 20px 20px; margin: 0 0 17px; border: 1px solid #dce6f0; border-radius: 6px; }
.permission-group > legend { padding: 0 9px; color: #496984; font-size: 15px; font-weight: 600; }
.permission-group > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px 22px; }
.permission-choice { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; cursor: pointer; }
.permission-choice strong { display: block; color: #3d5f7d; font-size: 15px; font-weight: 500; }
.permission-choice small { display: block; margin-top: 3px; color: #7990a5; font-size: 14px; overflow-wrap: anywhere; }
.permission-choice.is-unavailable { opacity: .72; cursor: default; }
.roles-summary { display: flex; align-items: center; gap: 17px; margin-bottom: 20px; }
.roles-summary > strong { color: #47647e; font-size: 16px; font-weight: 600; }
.roles-summary > span { color: #75889b; font-size: 14px; }
.role-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: 22px; }
.role-card { display: flex; flex-direction: column; min-width: 0; padding: 23px 24px 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.role-card > header { display: flex; align-items: flex-start; gap: 11px; }
.role-card > header > div { flex: 1; min-width: 0; }
.role-card > header h2 { color: #31526f; font-size: 19px; }
.role-card > header p { margin-top: 5px; color: #7a8da0; font-size: 14px; }
.role-card > header > .badge { margin-top: 3px; }
.role-card-icon { display: grid; place-items: center; flex: 0 0 auto; width: 37px; height: 39px; border-radius: 6px; color: #3778b9; background: #eef5fe; }
.role-permission-count { display: flex; align-items: baseline; gap: 9px; margin-top: 22px; }
.role-permission-count strong { color: #1e4a73; font-size: 29px; font-weight: 600; line-height: 1.4; }
.role-permission-count span { font-size: 14px; color: #7890a4; }
.role-permissions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px 10px; margin-top: 20px; margin-bottom: 25px; padding: 0; list-style: none; }
.role-permissions li { display: flex; align-items: flex-start; gap: 7px; min-width: 0; color: #5d7790; font-size: 14px; }
.role-permissions .admin-icon { width: 16px; height: 19px; margin-top: 1px; color: #82a6c8; }
.role-card > footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; min-height: 64px; margin-top: auto; padding: 10px 0; border-top: 1px solid #e8eef5; font-size: 14px; }
.role-card > footer > span:first-child { color: #8194a7; overflow-wrap: anywhere; }
.role-card > footer .text-button { font-size: 14px; min-height: 42px; }
.empty-panel { padding: 30px; }
.empty-panel p { margin-top: 10px; color: var(--muted); }

/* Loading, errors and feedback */
.admin-boot { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 19px; min-height: 100dvh; padding: 36px 24px; text-align: center; }
.admin-boot .boot-mark { color: var(--blue); font-size: 52px; font-weight: 800; line-height: 1.2; }
.admin-boot h1 { font-size: 27px; }
.admin-boot p { max-width: 560px; color: var(--muted); overflow-wrap: anywhere; }
.admin-boot .button { margin-top: 7px; }
.loading-panel, .error-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; padding: 35px 24px; text-align: center; }
.loading-panel h2, .error-panel h2 { margin-top: 18px; }
.loading-panel p, .error-panel p { max-width: 620px; margin-top: 10px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.error-panel > .admin-icon { width: 37px; height: 37px; color: #7094b4; }
.error-panel .button { margin-top: 25px; }
.loading-spinner { width: 30px; height: 30px; border: 3px solid #d6e8fa; border-top-color: #367fc6; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.admin-toast { position: fixed; z-index: 100; top: 23px; left: 50%; max-width: min(560px,calc(100vw - 36px)); padding: 15px 22px; transform: translateX(-50%); color: #1a6846; border: 1px solid #a6d7bb; border-radius: 7px; background: #f0fff5; box-shadow: 0 8px 25px #17354c1a; font-size: 15px; overflow-wrap: anywhere; }
.admin-toast.error { color: var(--red); background: #fff5f5; border-color: #e7bdc4; }

@media (min-width: 1680px) {
  .admin-content { padding-top: 33px; }
  .overview-stats { gap: 23px; }
  .stat-card { padding: 27px; }
  .role-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1320px) {
  .admin-content { padding-inline: 25px; }
  .admin-topbar { padding-inline: 25px; }
  .admin-page-footer { padding-inline: 25px; }
  .overview-stats { gap: 13px; }
  .stat-card { padding: 19px; }
  .stat-footer { align-items: flex-start; flex-direction: column; gap: 5px; }
  .role-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workflow-panel { grid-template-columns: 1fr; gap: 25px; }
  .permission-group > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .account-name { max-width: 130px; }
}
@media (max-width: 1050px) {
  .admin-sidebar { width: 226px; padding-inline: 14px; }
  .admin-sidebar > .admin-brand { margin-inline: 10px; }
  .admin-workspace-main { margin-left: 226px; }
  .admin-topbar { gap: 10px; padding-inline: 22px; }
  .admin-content { padding-inline: 22px; }
  .breadcrumb { font-size: 14px; }
  .breadcrumb > span { margin-inline: 8px; }
  .environment-badge { display: none; }
  .overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
  .stat-footer { align-items: center; flex-direction: row; }
  .overview-grid { grid-template-columns: 1fr; gap: 20px; }
  .role-card { padding-inline: 19px; }
  .role-permissions { grid-template-columns: 1fr; }
  .admin-login-intro { padding-inline: 42px; }
  .admin-login-panel { padding-inline: 35px; }
  .login-copy h1 { font-size: 40px; }
}
@media (max-width: 800px) {
  .admin-sidebar { z-index: 45; width: 260px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 8px 0 30px #173b5b17; }
  .menu-open .admin-sidebar { transform: translateX(0); }
  .menu-open { overflow: hidden; }
  .sidebar-shade:not([hidden]) { position: fixed; inset: 0; z-index: 40; display: block; width: 100%; height: 100dvh; padding: 0; border: 0; background: #15355166; }
  .admin-workspace-main { margin-left: 0; }
  .mobile-menu-toggle { display: inline-flex; width: 45px; min-height: 45px; border-color: #dbe6f1; }
  .admin-topbar { min-height: 74px; padding: 12px 20px; }
  .topbar-leading { gap: 13px; }
  .topbar-account { gap: 9px; }
  .admin-content { padding: 22px 22px 30px; }
  .admin-page-footer { padding-inline: 22px; }
  .environment-note { gap: 13px; margin-bottom: 25px; }
  .role-permissions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-login-shell { grid-template-columns: minmax(0,1fr); }
  .admin-login-intro { min-height: 280px; padding: 25px 35px; }
  .login-copy { padding: 22px 0 10px; }
  .login-copy .eyebrow { display: none; }
  .login-copy h1 { margin: 0; font-size: 31px; line-height: 1.4; }
  .login-copy h1 br { display: none; }
  .login-copy > p { margin-top: 12px; font-size: 16px; }
  .login-copy > p br { display: none; }
  .login-feature-list { flex-direction: row; flex-wrap: wrap; gap: 12px 20px; margin-top: 18px; font-size: 14px; }
  .login-feature-list .admin-icon { width: 18px; height: 18px; }
  .admin-login-intro > footer { display: none; }
  .admin-login-panel { padding: 33px 30px 25px; }
  .login-card { max-width: 480px; }
  .admin-login-panel > footer { padding-top: 25px; }
}
@media (max-width: 560px) {
  h1 { font-size: 27px; }
  h2 { font-size: 20px; }
  .admin-topbar { min-height: 72px; padding: 10px 15px; }
  .breadcrumb { font-size: 15px; }
  .breadcrumb > span { display: none; }
  .breadcrumb strong { font-size: 15px; }
  .admin-avatar { width: 32px; height: 32px; }
  .account-name { display: none; }
  .logout-button { padding-inline: 5px; min-height: 48px; }
  .logout-button .admin-icon { width: 18px; height: 18px; }
  .topbar-account { gap: 6px; }
  .admin-content { padding: 18px 16px 27px; }
  .environment-note { align-items: flex-start; flex-direction: column; gap: 6px; padding: 12px 14px; margin-bottom: 23px; }
  .environment-note > p { line-height: 1.75; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 23px; }
  .page-heading .eyebrow { font-size: 14px; letter-spacing: .5px; }
  .page-heading p { margin-top: 10px; font-size: 15px; line-height: 1.85; }
  .heading-actions, .heading-actions .button { width: 100%; }
  .panel-heading { padding: 19px 18px 17px; }
  .panel-heading p { line-height: 1.85; }
  .filter-bar { align-items: stretch; flex-direction: column; gap: 15px; padding: 18px; }
  .search-field, .customer-id-field { flex: 1 1 auto; }
  .filter-actions > .button { flex: 1; }
  .filter-actions { gap: 12px; }
  .field label, .field-label { font-size: 15px; }
  .pagination { align-items: flex-start; flex-direction: column; gap: 15px; padding: 18px; }
  .pagination > div { width: 100%; gap: 12px; }
  .pagination .button { flex: 1; min-height: 48px; font-size: 15px; }
  .table-note { padding-inline: 18px; }
  .table-scroll table { font-size: 15px; }
  th { padding: 14px 17px; }
  td { padding: 16px 17px; }
  .overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
  .stat-card { padding: 17px 15px; }
  .stat-label { font-size: 14px; gap: 7px; }
  .stat-label .admin-icon { width: 21px; height: 21px; }
  .stat-card > strong { margin-top: 11px; font-size: 29px; }
  .stat-footer { align-items: flex-start; flex-direction: column; gap: 5px; margin-top: 11px; padding-top: 11px; }
  .stat-footer > a { min-height: 32px; display: inline-flex; align-items: center; }
  .overview-grid { gap: 18px; margin-bottom: 18px; }
  .balance-panel { padding: 25px 23px 0; }
  .balance-panel > strong { margin-top: 17px; font-size: 31px; }
  .balance-panel > strong small { font-size: 22px; }
  .balance-bottom { margin-inline: -23px; padding: 14px 23px; line-height: 1.8; }
  .permission-summary { padding: 24px 23px 18px; }
  .permission-summary > p { line-height: 1.85; }
  .card-symbol { top: 22px; right: 23px; }
  .workflow-panel { gap: 21px; padding: 23px; }
  .workflow-panel ol { grid-template-columns: 1fr; gap: 21px; }
  .workflow-panel li { position: relative; padding-left: 42px; }
  .workflow-panel li > span { position: absolute; top: -3px; left: 0; margin: 0; }
  .workflow-panel li > p { margin-top: 5px; }
  .editor-panel { padding: 21px 18px; margin-bottom: 22px; }
  .editor-panel > header { gap: 13px; margin-bottom: 23px; }
  .editor-panel > header .icon-button { width: 43px; min-height: 43px; }
  .editor-fields { grid-template-columns: 1fr; gap: 21px; }
  .editor-notice { align-items: flex-start; gap: 8px; padding: 12px; font-size: 14px; line-height: 1.8; }
  .editor-notice .admin-icon { margin-top: 3px; }
  .editor-panel form > footer { gap: 10px; }
  .editor-panel form > footer .button:first-child { flex: 1; }
  .permission-editor-title { align-items: flex-start; flex-direction: column; gap: 6px; }
  .permission-group { padding: 15px 14px 16px; }
  .permission-group > div { grid-template-columns: 1fr; gap: 17px; }
  .permission-choice { gap: 11px; }
  .permission-choice strong { font-size: 16px; }
  .roles-summary { align-items: flex-start; flex-direction: column; gap: 5px; margin-bottom: 18px; }
  .role-grid { grid-template-columns: 1fr; gap: 18px; }
  .role-card { padding: 23px 23px 0; }
  .role-card > header h2 { font-size: 20px; }
  .role-card > header { gap: 11px; }
  .role-permissions { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 24px; }
  .admin-page-footer { align-items: flex-start; flex-direction: column; gap: 6px; padding-inline: 16px; font-size: 14px; }
  .admin-login-intro { min-height: 239px; padding: 23px 25px; }
  .admin-login-intro .admin-brand > span:last-child { font-size: 23px; }
  .admin-login-intro .admin-brand small { font-size: 14px; }
  .admin-login-intro .brand-symbol { width: 32px; font-size: 39px; }
  .login-copy { padding: 22px 0 0; }
  .login-copy h1 { font-size: 28px; }
  .login-copy > p { font-size: 15px; margin-top: 10px; }
  .login-feature-list { display: none; }
  .admin-login-panel { padding: 30px 25px 24px; }
  .login-card h2 { font-size: 27px; }
  .login-badge { margin-bottom: 18px; font-size: 14px; }
  .login-card > p { font-size: 15px; line-height: 1.85; }
  .login-card form { margin-top: 25px; }
  .login-card form > button { font-size: 16px; }
  .login-account-note { padding: 16px; }
}
@media (max-width: 370px) {
  .admin-topbar { padding-inline: 11px; }
  .topbar-leading { gap: 9px; }
  .admin-content { padding-inline: 13px; }
  .overview-stats { gap: 10px; }
  .stat-card { padding-inline: 12px; }
  .stat-label { font-size: 14px; }
  .stat-label .admin-icon { width: 18px; height: 18px; }
  .stat-card > strong { font-size: 27px; }
  .role-card { padding-inline: 19px; }
  .role-permissions { gap: 12px 8px; }
  .role-permissions li { gap: 6px; }
  .role-card > header { gap: 9px; }
  .role-card > header > .badge { font-size: 14px; padding-inline: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Credential changes are explicit; passwords are never stored as browser drafts. */
.admin-password-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 9px 10px; color: #58728c; border: 0; border-radius: 5px; background: transparent; font-size: 14px; white-space: nowrap; }
.admin-password-button .admin-icon { width: 18px; height: 18px; }
.admin-password-button:hover { color: var(--blue); background: var(--blue-light); }
.admin-nav-group { margin-top: 7px; }
.admin-nav-group > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 11px 14px; color: #496781; border-radius: 6px; font-size: 16px; line-height: 1.6; list-style: none; cursor: pointer; user-select: none; }
.admin-nav-group > summary::-webkit-details-marker { display: none; }
.admin-nav-group > summary::marker { content: ""; }
.admin-nav-group > summary > .admin-icon { width: 22px; height: 22px; color: #607d97; }
.admin-nav-group > summary:hover { color: #0066cc; background: #f1f6fd; }
.admin-nav-group.has-active-page > summary { color: #2d628e; font-weight: 600; }
.admin-group-chevron { width: 7px; height: 7px; margin-left: auto; margin-right: 2px; border-right: 1.5px solid #7893aa; border-bottom: 1.5px solid #7893aa; transform: rotate(-45deg); }
.admin-nav-group[open] > summary > .admin-group-chevron { transform: rotate(45deg); }
.admin-nav-children { padding: 5px 0 1px 15px; margin-left: 23px; border-left: 1px solid #e0e9f3; }
.admin-nav-children .admin-nav-item { gap: 9px; min-height: 46px; padding: 10px 9px; margin-bottom: 4px; font-size: 15px; }
.admin-nav-children .admin-nav-item > .admin-icon { width: 18px; height: 18px; }
.admin-nav-children .active-dot { width: 5px; height: 5px; }
.admin-password-dialog { width: min(530px,calc(100vw - 36px)); max-height: calc(100dvh - 42px); padding: 27px 29px; overflow-y: auto; color: var(--ink); border: 1px solid #cadbec; border-radius: 10px; background: #fff; box-shadow: 0 20px 80px #14395930; }
.admin-password-dialog::backdrop { background: #18334f66; backdrop-filter: blur(2px); }
.admin-password-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.admin-password-dialog > header .eyebrow { font-size: 14px; }
.admin-password-dialog > header h2 { font-size: 22px; }
.admin-password-dialog > header .icon-button { width: 43px; min-height: 43px; }
.password-dialog-note { margin-top: 15px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.admin-password-dialog form { margin-top: 24px; }
.admin-password-dialog .field + .field { margin-top: 21px; }
.admin-password-dialog form > footer { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 24px; }
.credential-reset-panel { margin-top: 28px; padding: 24px 0 0; border-top: 1px solid #e1e9f2; }
.credential-reset-panel > header { display: flex; align-items: flex-start; gap: 12px; }
.credential-reset-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 39px; height: 41px; color: #6086a9; border-radius: 6px; background: #f0f6fd; }
.credential-reset-panel h3 { font-size: 18px; color: #3e607f; }
.credential-reset-panel header p { margin-top: 6px; color: #7890a5; font-size: 14px; line-height: 1.85; }
.credential-reset-panel form { margin-top: 23px; }
.credential-reset-panel form > footer { display: flex; align-items: center; flex-wrap: wrap; gap: 13px 18px; margin-top: 21px; }
.credential-reset-panel form > footer > span { color: #8397a9; font-size: 14px; }
@media (max-width: 1050px) {
  .admin-password-button { padding-inline: 7px; }
  .admin-password-button > span { display: none; }
}
@media (max-width: 560px) {
  .admin-password-button { width: 38px; min-height: 48px; padding: 8px; }
  .admin-password-dialog { width: calc(100vw - 30px); max-height: calc(100dvh - 30px); padding: 23px 20px; }
  .admin-password-dialog > header { gap: 12px; }
  .admin-password-dialog > header h2 { font-size: 20px; }
  .admin-password-dialog > header .icon-button { width: 40px; min-height: 40px; }
  .admin-password-dialog form > footer .button:first-child { width: 100%; }
  .admin-password-dialog form > footer .button:last-child { width: 100%; }
  .credential-reset-panel { margin-top: 24px; padding-top: 21px; }
  .credential-reset-panel form > footer .button { width: 100%; }
}

.asset-review-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0;
  background: transparent; color: var(--blue-dark); font: inherit; font-weight: 600; cursor: pointer;
}
.asset-review-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.asset-review-dialog {
  box-sizing: border-box; width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 36px);
  padding: 0; overflow: auto; overscroll-behavior: contain; color: var(--ink); background: #fff;
  border: 1px solid #cbdceb; border-radius: 14px; box-shadow: 0 20px 80px #14395930;
  font-size: 16px; line-height: 1.65;
}
.asset-review-dialog::backdrop { background: #18334f66; }
.asset-review-dialog > header {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; padding: 18px 26px; border-bottom: 1px solid #d6e3ed; background: #fff;
}
.asset-review-dialog h2 { font-size: 23px; line-height: 1.35; margin: 0; }
.asset-review-dialog header p, .asset-review-note { margin: 4px 0 0; color: #45617b; font-size: 15px; }
.asset-review-dialog .button { min-height: 44px; flex: 0 0 auto; }
.asset-review-body { padding: 22px 26px 26px; }
.asset-review-body h3 { font-size: 19px; margin: 0 0 11px; }
.asset-review-body > * + *, .asset-review-original > * + * { margin-top: 24px; }
.asset-review-facts, .asset-review-periods { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; }
.asset-review-facts { gap: 13px 20px; }
.asset-review-dialog dt { color: #4e6981; font-size: 15px; }
.asset-review-dialog dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.asset-archive { padding: 9px 13px; margin: 16px 0 0; background: #edf5fb; border-radius: 6px; }
.asset-archive.overlap, .asset-review-findings { background: #fff6e6; color: #764916; }
.asset-review-findings { padding: 15px 18px; border-left: 3px solid #cd8c38; border-radius: 4px; }
.asset-review-findings ul { margin: 0; padding-left: 20px; }
.asset-review-findings li + li { margin-top: 4px; }
.asset-review-periods { margin-top: 13px; column-gap: 24px; }
.asset-review-periods > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e1e9f0; }
.asset-review-periods dd { text-align: right; color: #4d6276; }
.asset-review-periods dd.asset-reference-price { color: var(--blue-dark); font-weight: 650; }
.asset-review-error { color: #873b26; }
.handover-lookup { margin: 0 20px 18px; color: #315774; }
.handover-lookup summary,.handover-history summary { cursor:pointer; font-weight:650; }
.handover-lookup form,.handover-actions,.handover-heading { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.handover-lookup form { margin-top:14px; align-items:flex-end; }
.handover-lookup label,.handover-form label { display:grid; gap:5px; font-weight:600; font-size:15px; }
.handover-lookup input,.handover-form input { width:100%; box-sizing:border-box; font:inherit; font-weight:400; padding:8px 10px; border:1px solid #b5cbdc; border-radius:6px; min-height:44px; }
.handover-panel { padding:19px; border:1px solid #c6dced; border-radius:10px; background:#f8fbfe; }
.handover-heading { justify-content:space-between; align-items:flex-start; }
.handover-panel h3,.handover-panel h4 { margin:0 0 4px; }
.handover-panel .handover-scope { margin:16px 0; }
.handover-blockers,.handover-notice { margin:12px 0; background:#fff4de; color:#73501d; border-radius:6px; }
.handover-blockers { padding:10px 14px 10px 30px; }
.handover-notice { padding:9px 12px; }
.handover-actions,.handover-form { margin:14px 0 0; }
.handover-form label { margin-top:12px; }
.handover-refresh { min-height:42px; border:0; padding:0; background:transparent; font:inherit; font-weight:600; color:var(--blue-dark); cursor:pointer; }
.handover-history { margin-top:6px; border-top:1px solid #d4e3ee; padding-top:12px; }
.handover-history ol { margin:8px 0 0; padding-left:20px; }
.handover-history li { margin-top:12px; overflow-wrap:anywhere; }
.handover-history small { display:block; color:#4e6981; }
.handover-history dl { margin:6px 0 0; }
.handover-history dl>div { display:flex; align-items:baseline; gap:10px; }
.handover-source summary { cursor:pointer; color:#315774; font-size:15px; }
.handover-source dl { margin:8px 0; }
.handover-source dd,.handover-notice code { overflow-wrap:anywhere; font-family:ui-monospace,monospace; font-size:14px; }
.handover-history dt { flex:0 0 auto; }
.handover-form-message { color:#873b26; }
.handover-form-message:empty { display:none; }
@media (max-width: 560px) {
  .asset-review-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .asset-review-dialog > header, .asset-review-body { padding: 16px 18px; }
  .asset-review-dialog h2 { font-size: 21px; }
  .asset-review-facts, .asset-review-periods { grid-template-columns: 1fr; }
  .handover-panel { padding:13px; }
  .handover-lookup form { display:grid; }
  .handover-history dl>div { display:block; }
}
.legacy-case-list table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.legacy-case-list th, .legacy-case-list td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #dce7f1; }
.legacy-case-detail { margin-top: 20px; }
.legacy-case-detail dl { display: grid; grid-template-columns: minmax(7em,auto) 1fr; gap: 14px 20px; padding: 0 20px 20px; }
.legacy-case-detail dd { margin: 0; overflow-wrap: anywhere; }
.legacy-case-detail dt { color: #405876; }
@media (max-width: 640px) { .legacy-case-detail dl { grid-template-columns: 1fr; gap: 6px; } .legacy-case-detail dd { margin-bottom: 12px; } }
