    :root {
      color-scheme: light;
      font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
      color: #172033;
      background: #f5f7fb;
      font-synthesis: none;
      --blue: #315efb;
      --ink: #172033;
      --muted: #788298;
      --line: #e8ebf2;
      --green: #14865d;
      --red: #b42332;
    }
    * { box-sizing: border-box; }
    body { margin: 0; min-height: 100vh; }
    body.dialog-open { overflow: hidden; }
    .card-dialog { width: min(600px, calc(100% - 24px)); max-height: 90dvh; overflow: auto; border: 1px solid var(--line); border-radius: 18px; padding: 26px; color: var(--ink); box-shadow: 0 24px 80px #17203340; }
    .card-dialog::backdrop { background: #17203388; backdrop-filter: blur(3px); }
    .card-dialog h2 { margin: 0; font-size: 19px; }
    .card-dialog p { white-space: pre-wrap; overflow-wrap: anywhere; }
    .card-dialog .modal-actions { position: sticky; bottom: -26px; padding: 16px 0; background: white; }
    .modal-card { border: 1px solid var(--line); box-shadow: 0 24px 80px #17203340; }
    [hidden] { display: none !important; }
    button, input, textarea, select { font: inherit; }
    button { cursor: pointer; }
    button:focus-visible, a:focus-visible {
      outline: 3px solid #315efb80; outline-offset: 2px;
    }
    button:disabled { cursor: not-allowed; opacity: .58; }
    .hidden { display: none !important; }
    .login-wrap { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
    .login-card, .panel {
      background: #fff; border: 1px solid var(--line); border-radius: 15px;
      box-shadow: 0 12px 40px #1c2a4610;
    }
    .login-card { width: min(100%, 430px); padding: 38px; }
    .brand { display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 750; letter-spacing: .3px; }
    .brand-mark {
      display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px;
      color: #fff; background: var(--blue); font-size: 20px;
    }
    h1 { margin: 28px 0 8px; font-size: 25px; letter-spacing: -.5px; }
    .muted { color: var(--muted); line-height: 1.65; }
    label { display: block; margin: 15px 0 7px; font-size: 12px; font-weight: 650; }
    input, textarea, select {
      width: 100%; padding: 10px 12px; border: 1px solid #dfe4ee; border-radius: 8px;
      outline: none; background: #fff; color: var(--ink);
    }
    input:focus, textarea:focus, select:focus { border-color: #5276ff; box-shadow: 0 0 0 3px #315efb18; }
    .primary, .secondary, .danger, .quiet {
      border: 1px solid transparent; border-radius: 8px; padding: 9px 13px;
      font-size: 13px; font-weight: 650; transition: background-color .15s, border-color .15s, color .15s;
    }
    .primary { border-color: #244de0; color: #fff; background: var(--blue); box-shadow: 0 1px 3px #17203330; }
    .primary:hover { border-color: #1c3fbf; background: #244de0; box-shadow: 0 2px 5px #17203338; }
    .primary:active { border-color: #1939aa; background: #1e43c9; box-shadow: inset 0 1px 2px #17203330; }
    .secondary { border-color: #d5dce8; color: #283650; background: #e9edf5; }
    .secondary:hover { border-color: #b9c4d5; background: #dfe5ef; }
    .danger { border-color: #f0c5cb; color: #9f1d2b; background: #fff0f1; }
    .danger:hover { border-color: #e6a3ac; background: #ffe2e5; }
    .quiet { padding: 6px 9px; border-color: #d5dce8; color: #34415b; background: #edf0f6; }
    .quiet:hover { border-color: #b9c4d5; background: #e2e7f0; }
    .full { width: 100%; margin-top: 20px; }
    .error { min-height: 19px; margin: 11px 0 0; color: var(--red); font-size: 12px; }
    .app { --sidebar-width: 244px; display: flex; min-height: 100vh; }
    .sidebar {
      position: sticky; top: 0; z-index: 3; display: flex; flex: 0 0 var(--sidebar-width);
      width: var(--sidebar-width); height: 100vh; flex-direction: column; overflow-x: hidden; overflow-y: auto;
      padding: 21px 14px; border-right: 1px solid var(--line); background: #fff;
    }
    .nav-group { margin: 15px 10px 7px; color: #a0a8b8; font-size: 10px; font-weight: 750; letter-spacing: 1px; }
    .nav { display: grid; gap: 3px; }
    .nav button {
      display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px;
      border: 1px solid #edf0f5; border-radius: 8px; color: #4f5c74; background: #f7f8fb; text-align: left;
      font-size: 13px;
    }
    .nav button:hover { border-color: #dce3f0; color: #243452; background: #eef1f7; }
    .nav button.active { border-color: #cbd7ff; color: #244de0; background: #e8edff; font-weight: 700; }
    .nav-icon { display: inline-grid; width: 19px; place-items: center; font-size: 15px; }
    .sidebar-resizer {
      z-index: 4; flex: 0 0 6px; width: 6px; height: 100vh; padding: 0;
      border: 0; border-radius: 0; background: #e8ebf2; cursor: col-resize; touch-action: none;
    }
    .sidebar-resizer:hover, .sidebar-resizer:focus-visible { background: #91a8ff; outline-offset: -2px; }
    .sidebar-collapsed .sidebar, .sidebar-collapsed .sidebar-resizer { display: none; }
    .content { flex: 1; width: auto; min-width: 0; margin: 0; }
    .site-header {
      position: sticky; top: 0; z-index: 5; display: flex; min-height: 68px; align-items: center; gap: 14px;
      padding: 10px 24px; border-bottom: 1px solid var(--line); background: #ffffffed; backdrop-filter: blur(12px);
    }
    .header-brand { flex: 0 0 auto; color: var(--ink); text-decoration: none; }
    .header-brand .brand-mark { width: 34px; height: 34px; font-size: 18px; }
    .menu-toggle { flex: 0 0 auto; white-space: nowrap; }
    .header-search { flex: 1; min-width: 120px; max-width: 420px; margin: 0 auto; }
    .header-search input { padding: 9px 12px; background: #f8f9fc; }
    .header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
    .header-actions .health { white-space: nowrap; }
    .breadcrumb-bar { padding: 9px 34px; border-bottom: 1px solid var(--line); background: #fff; }
    .crumb { color: var(--muted); font-size: 12px; }
    .health { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
    .dot { width: 7px; height: 7px; border-radius: 50%; background: #98a2b3; }
    .dot.ok { background: #18a66a; }
    .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    main { width: min(1220px, 100%); margin: 0 auto; padding: 32px 34px 56px; }
    .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
    .page-heading h1 { margin: 0 0 5px; font-size: 24px; }
    .page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
    .panel { padding: 20px; }
    .panel-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
    .panel-title h2 { margin: 0; font-size: 14px; }
    .cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
    .stat { padding: 17px 19px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
    .stat-label { color: var(--muted); font-size: 11px; }
    .stat-value { margin-top: 8px; font-size: 25px; font-weight: 750; }
    .stat-note { margin-top: 4px; color: #a0a8b8; font-size: 10px; }
    .table-wrap { width: 100%; overflow: auto; }
    table { width: 100%; border-collapse: collapse; font-size: 12px; }
    th { padding: 10px 11px; border-bottom: 1px solid var(--line); color: #8b94a7; text-align: left; font-size: 10px; font-weight: 700; white-space: nowrap; }
    td { padding: 12px 11px; border-bottom: 1px solid #f0f2f6; color: #34415b; vertical-align: middle; }
    tbody tr:last-child td { border-bottom: 0; }
    .empty { padding: 30px 12px; color: #9aa2b2; text-align: center; }
    .status { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 99px; background: #f0f2f6; color: #667085; font-size: 10px; white-space: nowrap; }
    .status-active, .status-paid { background: #e8f7f0; color: #138557; }
    .status-pending, .status-trialing { background: #fff5df; color: #9c6911; }
    .status-revoked, .status-disabled, .status-failed, .status-canceled, .status-suspended { background: #fff0f1; color: #b42332; }
    .row-actions { display: flex; flex-wrap: wrap; gap: 5px; }
    .toolbar { display: flex; align-items: end; gap: 10px; margin-bottom: 15px; }
    .toolbar > div { min-width: 150px; }
    .toolbar label { margin-top: 0; }
    .toolbar .grow { flex: 1; }
    .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 13px; }
    .form-grid .wide { grid-column: 1 / -1; }
    .coupon-code-generate { margin-top: 8px; }
    .form-hint { display: block; margin-top: 6px; color: #64718a; font-size: 11px; line-height: 1.6; }
    .notice { padding: 14px; border-radius: 9px; background: #f5f7fb; color: #667085; font-size: 12px; line-height: 1.65; }
    .notice.warning { background: #fff7e7; color: #85621c; }
    .notice pre { margin: 8px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; font: 11px/1.6 ui-monospace, monospace; }
    .modal {
      position: fixed; inset: 0; z-index: 8; display: grid; place-items: center; padding: 18px;
      background: #11182766;
    }
    .modal-card { width: min(600px, 100%); max-height: 90vh; overflow: auto; padding: 22px; border-radius: 13px; background: #fff; }
    .modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
    .modal-head h2 { margin: 0; font-size: 17px; }
    .modal-actions {
      position: sticky; bottom: -22px; z-index: 1; display: flex; justify-content: end; gap: 8px;
      margin: 20px -1px -1px; padding: 12px 1px 1px; background: #fff;
    }
    .page-heading > button, .toolbar > button, .panel-title > button { flex: 0 0 auto; white-space: nowrap; }
    .row-actions button { flex: 0 0 auto; white-space: nowrap; }
    .toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(420px, 90vw); padding: 12px 16px; border-radius: 9px; color: #fff; background: #253047; box-shadow: 0 10px 30px #1720332a; font-size: 12px; }
    .toast.error { background: #b42332; }
    .toast.success { background: #138557; }
    .customer-site-header { justify-content: space-between; }
    .customer-site-header .header-search { margin: 0 auto; }
    .customer-site-header #portalIdentity { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .login-wrap { min-height: calc(100vh - 68px); }
    .portal-shell { display: flex; min-height: calc(100vh - 68px); }
    .portal-sidebar {
      position: sticky; top: 68px; flex: 0 0 232px; width: 232px; height: calc(100vh - 68px);
      overflow-y: auto; padding: 20px 14px; border-right: 1px solid var(--line); background: #fff;
    }
    .portal-nav-group { margin: 0 10px 10px; color: #8b94a7; font-size: 11px; font-weight: 750; letter-spacing: .5px; }
    .portal-nav { display: grid; gap: 5px; }
    .portal-nav button {
      width: 100%; padding: 10px 12px; border: 1px solid #edf0f5; border-radius: 8px;
      color: #4f5c74; background: #f7f8fb; text-align: left; font-size: 13px;
    }
    .portal-nav button:hover { border-color: #dce3f0; color: #243452; background: #eef1f7; }
    .portal-nav button.active { border-color: #cbd7ff; color: #244de0; background: #e8edff; font-weight: 700; }
    .portal-main { flex: 1; min-width: 0; height: calc(100vh - 68px); overflow-y: auto; overscroll-behavior: contain; padding: 26px clamp(16px, 3vw, 40px) 50px; }
    .portal-shell.sidebar-collapsed .portal-sidebar { display: none; }
    .portal-section { margin: 15px 0; }
    /* Expandable per-license device groups in "我的设备". */
    .device-license-row td { background: #fbfcfe; }
    .device-license-row button[data-toggle-license-devices] { min-width: 28px; font-size: 13px; }
    tr.device-detail > td { padding: 10px 14px 16px; background: #f7f9fd; border-top: 1px solid var(--line); }
    table.device-detail-table { width: 100%; border-collapse: collapse; font-size: 12px; }
    table.device-detail-table th, table.device-detail-table td {
      padding: 7px 9px; text-align: left; border-bottom: 1px solid #e6ebf4; white-space: nowrap;
    }
    table.device-detail-table th { color: var(--muted); font-weight: 600; background: transparent; }
    table.device-detail-table tbody tr:last-child td { border-bottom: none; }
    tr.device-detail-row .row-actions { flex-wrap: wrap; gap: 6px; }
    .portal-section h2, #passwordPanel h2 { margin: 0; font-size: 15px; }
    .portal-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
    .plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 13px; margin-top: 16px; }
    .plan-card { display: flex; flex-direction: column; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
    .plan-card h3 { margin: 8px 0; font-size: 15px; }
    .plan-card strong { display: block; margin: 10px 0; font-size: 24px; }
    .plan-detail { min-height: 40px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
    .plan-discount { color: var(--green); font-size: 11px; }
    .plan-submit { width: 100%; margin-top: auto; padding-top: 12px; }
    .sdk-download { display: inline-flex; align-items: center; text-decoration: none; }
    .docs-heading { margin: 22px 0 10px; font-size: 14px; }
    .api-doc-list { display: grid; gap: 9px; margin-top: 14px; }
    .api-doc { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
    .api-doc strong { color: #244de0; font-size: 12px; }
    .api-doc p, .docs-note { margin: 6px 0 0; color: #59667d; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
    .sdk-config-result { display: grid; gap: 12px; margin-top: 12px; }
    .sdk-config-field { display: grid; gap: 6px; }
    .sdk-config-field textarea { width: 100%; min-height: 44px; resize: vertical; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
    .code-sample { margin: 10px 0; padding: 15px; overflow-x: auto; border-radius: 9px; color: #e8edf7; background: #172033; font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; }
    .portal-form { display: flex; align-items: end; gap: 12px; }
    .portal-form label { flex: 1; }
    .inline-remove { margin-left: 5px; border: 0; color: inherit; background: transparent; }
    .status-tabs { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; padding: 2px 2px 7px; }
    .status-tab { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #d5dce8; border-radius: 99px; color: #34415b; background: #edf0f6; white-space: nowrap; }
    .status-tab span { color: #788298; font-size: 11px; }
    .status-tab.active { border-color: #315efb; color: #244de0; background: #e8edff; font-weight: 700; }
    .pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px 0 2px; }
    .action-cell { min-width: 130px; }
    .mobile-brand { display: none; }
    @media (max-width: 900px) {
      .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .site-header { padding-right: 16px; padding-left: 16px; }
      .header-actions { gap: 6px; }
    }
    @media (max-width: 680px) {
      .site-header { min-height: 60px; flex-wrap: wrap; gap: 8px; padding: 9px 12px; }
      .header-brand { font-size: 12px; }
      .header-brand .brand-mark { width: 30px; height: 30px; }
      .header-search { order: 4; flex: 1 0 100%; max-width: none; }
      .header-actions { margin-left: auto; }
      .header-actions .health, .customer-site-header #portalIdentity { display: none; }
      .breadcrumb-bar { padding: 8px 16px; }
      .login-wrap { min-height: calc(100vh - 60px); padding: 18px 12px; }
      .portal-shell { display: block; min-height: calc(100vh - 60px); }
      .portal-sidebar { position: static; width: 100%; height: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
      .portal-nav-group { display: none; }
      .portal-nav { display: flex; gap: 5px; overflow-x: auto; }
      .portal-nav button { flex: 0 0 auto; width: auto; padding: 8px 10px; white-space: nowrap; }
      .portal-main { height: auto; overflow: visible; padding: 18px 12px 36px; }
      .portal-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .portal-form { align-items: stretch; flex-direction: column; }
      .app { display: block; }
      .sidebar { position: static; width: 100%; height: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
      .sidebar-resizer { display: none; }
      .sidebar-collapsed .sidebar { display: none; }
      .nav { display: flex; gap: 4px; overflow-x: auto; }
      .nav button { width: auto; flex: 0 0 auto; padding: 8px 10px; white-space: nowrap; }
      .nav-icon { display: none; }
      .cards { gap: 9px; }
      .stat { padding: 13px; }
      .stat-value { font-size: 21px; }
      .page-heading { align-items: start; flex-direction: column; }
      .page-heading > button { width: 100%; }
      .toolbar { flex-wrap: wrap; }
      .toolbar > div { flex: 1; min-width: 120px; }
      .modal { padding: 10px; }
      .modal-card { max-height: 94vh; padding: 17px; }
    }
