:root {
  font: 14px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text); background: var(--canvas);
  --text: #192d2b; --canvas: #f3f6f5; --surface: #fff; --accent: #087653;
  --accent-hover: #065c42; --accent-light: #e8f5ef; --muted: #5f716d; --line: #e1e9e5;
  --sidebar: #122c26; --sidebar-text: #b7cec5; --sidebar-selected: #24483c;
  --danger: #ae3434; --danger-light: #fff1f0; --warning: #825713; --warning-light: #fff7e5;
  --info: #315f9b; --info-light: #ecf3ff; --ring: #238961; --radius: 16px;
  --shadow: 0 4px 24px #163b2b05; --motion-fast: 150ms; --motion-page: 240ms;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: var(--surface); font-weight: 600; cursor: pointer; transition: background var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast); }
button:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 3px 10px #123f2b14; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, .table-wrap:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
button[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.secondary { background: var(--surface); color: var(--muted); border-color: var(--line); }
.secondary:hover:not(:disabled) { background: var(--accent-light); color: var(--accent); }
.danger { background: var(--danger-light); color: var(--danger); border-color: #edcccc; }
.danger:hover:not(:disabled) { background: #ffe2df; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.35; font-weight: 750; letter-spacing: -.8px; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14px; margin-bottom: 8px; }
p { margin: 8px 0; }
.muted { color: var(--muted); font-size: 13px; }
.eyebrow { display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; margin-bottom: 6px; }
.brand-mark { display: inline-flex; width: 40px; height: 40px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 12px; color: var(--surface); background: var(--accent); font-size: 23px; font-weight: 700; }
.card { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
label { display: block; margin-top: 18px; color: var(--text); font-size: 13px; font-weight: 550; }
input, select { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid #adbdb5; border-radius: 10px; margin: 7px 0 0; color: var(--text); background: var(--surface); transition: border-color var(--motion-fast), box-shadow var(--motion-fast); }
input::placeholder { color: #697c74; }
input:focus, select:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px #23896120; }
input[readonly] { background: var(--canvas); }
form > button { margin-top: 24px; }
.full-width { width: 100%; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.input-action { display: flex; align-items: stretch; gap: 9px; margin-top: 7px; }
.input-action input { margin: 0; min-width: 0; flex: 1; }
.input-action button { flex-shrink: 0; }
.pill, .badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 7px; font-size: 12px; line-height: 1.7; font-weight: 550; overflow-wrap: anywhere; }
.badge, .success { background: var(--accent-light); color: var(--accent); }
.neutral { background: #eef2f0; color: var(--muted); }
.info { background: var(--info-light); color: var(--info); }
.warning { background: var(--warning-light); color: var(--warning); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.console-shell { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex-shrink: 0; position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; padding: 32px 18px 24px; background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--surface); text-decoration: none; font-size: 17px; font-weight: 700; padding: 0 10px; }
.brand .brand-mark { background: #35cf8a; color: var(--sidebar); }
.brand small { display: block; font-size: 12px; font-weight: 400; color: var(--sidebar-text); letter-spacing: 1px; margin-top: 2px; }
.nav-label { color: var(--sidebar-text); font-size: 12px; margin: 45px 14px 12px; }
.sidebar nav { display: grid; gap: 8px; }
.nav-item { position: relative; justify-content: flex-start; width: 100%; padding: 13px 16px; background: transparent; color: var(--sidebar-text); border-radius: 10px; font-weight: 500; }
.nav-icon { width: 21px; height: 21px; flex-shrink: 0; margin-right: 5px; }
.nav-item:hover:not(:disabled) { color: var(--surface); background: var(--sidebar-selected); box-shadow: none; }
.nav-item.selected { background: var(--sidebar-selected); color: #71e8af; font-weight: 650; }
.nav-item.selected::after { content: ""; position: absolute; right: 14px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.sidebar-bottom { margin-top: auto; padding: 24px 12px 0; color: var(--sidebar-text); font-size: 12px; border-top: 1px solid #ffffff1a; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #71e8af; margin-right: 7px; }
.sidebar-logout { width: 100%; margin-top: 13px; background: var(--sidebar-selected); color: var(--sidebar-text); font-size: 13px; }
.sidebar-logout:hover:not(:disabled) { background: #315b4d; color: var(--surface); }
.workspace { min-width: 0; width: calc(100% - 236px); margin-left: 236px; padding: 32px 36px 16px; max-width: 1800px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.topbar .badge { padding: 6px 11px; }
.topbar .eyebrow { margin-bottom: 7px; }
.topbar p { margin: 8px 0 0; }
#pageTitle:focus { outline: none; }
#pageTitle:focus-visible { outline: 2px solid var(--ring); outline-offset: 5px; border-radius: 4px; }
.guide-list { padding-left: 20px; margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.guide-list li { padding: 7px 0; }
.accounts-grid { display: grid; grid-template-columns: minmax(260px, 370px) minmax(0, 1fr); gap: 24px; align-items: start; }
.account-list { margin-top: 8px; }
.account-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.account-item:last-child { border-bottom: 0; }
.account-heading { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.account-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--accent-light); color: var(--accent); width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
.account-item .row { margin-top: 14px; }
.account-item button { font-size: 12px; padding: 9px 12px; }
.verification-box { margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--canvas); }
.verification-box button { font-size: 12px; margin-top: 9px; }
#officialVerification { max-width: 100%; }
.filters { display: grid; grid-template-columns: minmax(180px, 1.6fr) minmax(170px, 1fr) minmax(120px, .7fr); gap: 16px; padding-bottom: 24px; }
.filters label { margin-top: 0; }
.filter-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.filter-summary button { font-size: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th { background: var(--canvas); color: var(--muted); padding: 14px; font-weight: 550; white-space: nowrap; }
td { padding: 18px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; min-width: 110px; }
tbody tr { transition: background var(--motion-fast); }
tbody tr:hover { background: #f7fbf8; }
tbody tr:last-child td { border-bottom: 0; }
td strong, td small { display: block; }
td button { font-size: 12px; padding: 8px 10px; margin: 3px 5px 3px 0; white-space: nowrap; }
td .pill { max-width: 170px; }
.record-id { font-size: 12px; color: var(--muted); margin-top: 5px; max-width: 150px; word-break: break-all; }
.create-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, .9fr); gap: 24px; align-items: start; }
.create-grid form > label:first-child { margin-top: 0; }
.created-link { margin-top: 24px; border-color: #a2ceb6; }
.created-link .input-action input { font-size: 13px; }
.empty { color: var(--muted); text-align: center; font-size: 13px; padding: 38px 12px; }
footer { color: var(--muted); font-size: 12px; text-align: center; padding: 28px 0 12px; }
.notice { position: fixed; display: flex; align-items: center; gap: 14px; right: 24px; bottom: 24px; max-width: min(520px, calc(100vw - 32px)); padding: 10px 12px 10px 18px; border: 1px solid #b6d7c4; border-radius: 12px; color: var(--accent); background: #f0fbf5; box-shadow: 0 8px 30px #172c4420; z-index: 1000; font-size: 14px; overflow-wrap: anywhere; animation: toast-in var(--motion-page) ease-out; }
.notice.error { color: var(--danger); background: var(--danger-light); border-color: #edcccc; }
#noticeClose { color: inherit; background: transparent; min-width: 44px; padding: 4px; font-size: 24px; flex-shrink: 0; }
.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; }
.skip-link { position: fixed; top: -70px; left: 16px; z-index: 2000; background: var(--surface); color: var(--accent); padding: 12px 18px; border-radius: 8px; }
.skip-link:focus { top: 16px; }
.login-screen { min-height: 100vh; max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 100px; align-items: center; padding: 60px 44px; }
body:has(.login-screen:not([hidden])) { background: radial-gradient(ellipse at 15% 40%, #d9eee2, transparent 60%), var(--canvas); }
.login-intro .brand-mark { width: 56px; height: 56px; border-radius: 17px; font-size: 30px; margin-bottom: 32px; box-shadow: 0 8px 24px #08765322; }
.login-intro .eyebrow { color: var(--accent); margin-bottom: 20px; font-size: 13px; }
.login-intro h1 { font-size: 46px; line-height: 1.35; color: #173e2e; letter-spacing: -1px; }
.login-intro p { margin: 22px 0; color: var(--muted); font-size: 15px; }
.login-assurance { margin-top: 48px; color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.login-card { padding: 38px; border-radius: 22px; box-shadow: 0 20px 70px #18372c0d; }
.login-card h2 { font-size: 25px; margin-bottom: 10px; }
.login-card .eyebrow { color: var(--accent); margin-bottom: 12px; }
.password-field { position: relative; }
.password-field input { padding-right: 65px; }
.password-toggle { position: absolute; right: 4px; top: 9px; color: var(--muted); background: transparent; min-height: 42px; padding: 8px 10px; font-size: 12px; }
.password-toggle:hover:not(:disabled) { background: var(--accent-light); color: var(--accent); box-shadow: none; }
[data-panel]:not([hidden]) { animation: page-in var(--motion-page) ease-out; }
[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes page-in { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1700px) { .workspace { padding: 40px 48px 20px; } }
@media (max-width: 1100px) {
  .sidebar { width: 208px; padding-left: 12px; padding-right: 12px; }
  .workspace { width: calc(100% - 208px); margin-left: 208px; padding: 25px 24px 16px; }
  .accounts-grid { grid-template-columns: minmax(250px, .85fr) minmax(0, 1fr); gap: 17px; }
  .card { padding: 22px; }
}
@media (max-width: 820px) {
  input, select { font-size: 16px; }
  .console-shell { display: block; }
  .sidebar { position: relative; width: 100%; padding: 16px 18px 12px; }
  .brand { font-size: 16px; padding: 0; }
  .brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 19px; }
  .brand small, .nav-label { display: none; }
  .sidebar nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 18px; }
  .nav-item { justify-content: center; padding: 10px 4px; font-size: 12px; }
  .nav-icon { width: 17px; height: 17px; margin-right: 0; }
  .nav-item.selected::after { display: none; }
  .sidebar-bottom { position: absolute; top: 12px; right: 18px; padding: 0; border: 0; font-size: 0; }
  .sidebar-bottom .status-dot { display: none; }
  .sidebar-logout { width: auto; margin: 0; padding: 8px 12px; font-size: 12px; }
  .workspace { width: 100%; margin-left: 0; padding: 24px 18px 16px; }
  .accounts-grid, .create-grid { grid-template-columns: 1fr; }
  .login-screen { gap: 36px; padding: 40px 25px; }
  .login-intro h1 { font-size: 36px; }
}
@media (max-width: 560px) {
  h1 { font-size: 23px; }
  .nav-item { gap: 4px; flex-direction: column; }
  .workspace { padding: 22px 14px 16px; }
  .topbar { margin-bottom: 22px; }
  .topbar .badge { display: none; }
  .topbar button { font-size: 12px; padding: 9px 12px; }
  .topbar p { max-width: 220px; }
  .card { padding: 20px 16px; border-radius: 14px; }
  .section-heading { align-items: flex-start; gap: 10px; }
  .section-heading > button { font-size: 12px; padding: 9px 12px; white-space: nowrap; }
  .filters { grid-template-columns: 1fr 1fr; gap: 12px; }
  .filters > label:first-child { grid-column: 1 / -1; }
  .table-wrap { overflow: visible; border: 0; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { padding: 16px 0; border-top: 1px solid var(--line); }
  td { display: grid; grid-template-columns: 78px minmax(0, 1fr); column-gap: 12px; border: 0; padding: 6px 0; min-width: 0; overflow-wrap: anywhere; }
  td::before { content: attr(data-label); color: var(--muted); font-weight: 400; }
  td > strong, td > small, td > .pill, td > button, td > span { grid-column: 2; }
  td .record-id { max-width: none; }
  td button { justify-self: start; }
  td .pill { justify-self: start; max-width: none; }
  .created-link .input-action { flex-direction: column; }
  .notice { right: 16px; bottom: 16px; }
  .login-screen { grid-template-columns: 1fr; gap: 28px; padding: 32px 20px 70px; }
  .login-intro .brand-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 23px; margin-bottom: 18px; }
  .login-intro h1 { font-size: 32px; }
  .login-intro p { margin: 12px 0 0; font-size: 14px; }
  .login-intro .eyebrow { margin-bottom: 12px; }
  .login-assurance { display: none; }
  .login-card { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.account-directory { padding: 0 26px; }
.directory-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 16px; padding: 4px 0 20px; }
.directory-toolbar label { margin-top: 0; }
.directory-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.account-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; padding: 18px 0; }
.account-item .account-heading, .account-item > p { grid-column: 1; }
.account-item .row { grid-column: 2; grid-row: 1 / span 3; justify-content: flex-end; }
.account-heading .pill { margin-left: 8px; }
.add-account-dialog { width: min(520px, calc(100vw - 32px)); padding: 26px; border: 1px solid var(--line); border-radius: 18px; color: var(--text); box-shadow: 0 24px 90px #122c2633; }
.add-account-dialog::backdrop { background: #122c2680; backdrop-filter: blur(3px); }
.add-account-dialog .section-heading { margin-bottom: 4px; }
.confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--line); border-radius: 20px; color: var(--text); box-shadow: 0 24px 90px #122c2633; }
.confirm-dialog::backdrop { background: #122c2680; backdrop-filter: blur(3px); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@media (max-width: 560px) { .directory-toolbar { grid-template-columns: 1fr; } .account-directory { padding: 0 16px; } .account-item { grid-template-columns: 1fr; } .account-item .row { grid-column: 1; grid-row: auto; justify-content: flex-start; } .directory-footer { align-items: flex-start; flex-direction: column; } }

@media (max-width: 560px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 14px; }
  .topbar > .row { position: absolute; right: 14px; top: 164px; }
  .topbar > .row .badge { display: none; }
  .topbar > .row #refresh { min-height: 40px; }
  .section-heading { display: block; }
  .section-heading > .row { display: grid; grid-template-columns: 1fr 1fr; margin-top: 16px; gap: 8px; }
  .section-heading > .row button { width: 100%; min-width: 0; padding-left: 8px; padding-right: 8px; }
  .directory-toolbar { padding-top: 0; }
  .directory-toolbar label + label { margin-top: 12px; }
  .account-heading { align-items: flex-start; flex-wrap: wrap; }
  .account-heading .pill { margin-left: 0; }
  .account-item .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .account-item .row button { width: 100%; min-width: 0; padding-left: 6px; padding-right: 6px; }
  .add-account-dialog { width: calc(100vw - 28px); max-height: calc(100dvh - 40px); padding: 22px 18px; overflow-y: auto; }
  .add-account-dialog .section-heading { display: flex; align-items: flex-start; }
  .add-account-dialog .section-heading button { width: 44px; flex-shrink: 0; }
  .add-account-dialog .input-action { gap: 8px; }
  .add-account-dialog .input-action button { padding-left: 9px; padding-right: 9px; }
  .directory-footer .row { width: 100%; justify-content: space-between; }
  .directory-footer .row button { flex: 1; }
}

.form-status { min-height: 22px; margin: 10px 0 0; color: var(--accent); font-size: 13px; }
.form-status:empty { min-height: 0; margin: 0; }
.permission-options { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-top: 18px; }
.permission-option { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; cursor: pointer; }
.permission-option input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; }
.filter-summary { flex-wrap: wrap; }
@media (max-width: 980px) {
 .sidebar nav { grid-template-columns: repeat(4,minmax(0,1fr)); }
 .sidebar-bottom { position: static; display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
 #workspaceIdentity { display: none; }
}
@media (max-width: 560px) {
 .topbar > .row { position: static; align-self: flex-end; }
 .filter-summary .row { width: 100%; justify-content: space-between; }
 .sidebar-logout { min-height: 44px; }
 .permission-option { font-size: 15px; }
}
