:root { color-scheme: light; font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: #172033; background: #f4f6f8; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; background: #f4f6f8; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.hidden { display: none !important; }
.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; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: #eef2f4; }
.login-panel { width: min(420px, 100%); padding: 40px; border: 1px solid #dce2e6; background: #fff; border-radius: 8px; box-shadow: 0 16px 48px rgba(22, 34, 48, .08); }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 6px; background: #0a7654; color: #fff; font-weight: 800; }
.brand-mark.small { width: 36px; height: 36px; font-size: 13px; flex: 0 0 auto; }
.eyebrow { margin: 24px 0 6px; color: #0a7654; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.login-panel h1 { margin: 0; font-size: 27px; line-height: 1.35; }
.login-copy { margin: 12px 0 28px; color: #657184; font-size: 14px; line-height: 1.7; }
.login-form { display: grid; gap: 10px; }
.login-form label { font-size: 13px; font-weight: 700; }
input, select, textarea { min-height: 40px; border: 1px solid #ccd4da; border-radius: 6px; background: #fff; color: #172033; outline: none; }
input { padding: 0 12px; }
select { padding: 0 34px 0 12px; }
input:focus, select:focus, textarea:focus { border-color: #0a7654; box-shadow: 0 0 0 3px rgba(10, 118, 84, .11); }
.primary-button, .secondary-button, .danger-button { min-height: 40px; padding: 0 18px; border-radius: 6px; font-weight: 700; }
.primary-button { margin-top: 6px; border: 1px solid #0a7654; background: #0a7654; color: #fff; }
.primary-button:hover { background: #075f44; }
.primary-button:disabled { opacity: .6; cursor: wait; }
.secondary-button { border: 1px solid #cbd3d9; background: #fff; color: #334155; }
.danger-button { border: 1px solid #b42318; background: #b42318; color: #fff; }
.form-error { min-height: 20px; margin: 12px 0 0; color: #b42318; font-size: 13px; }
.filing-footer { color: #8792a1; font-size: 12px; text-align: center; }
.filing-footer a { color: inherit; text-decoration: none; }
.filing-footer a:hover { color: #0a7654; text-decoration: underline; }
.login-filing { position: fixed; right: 0; bottom: 20px; left: 0; }
.workspace-filing { padding: 4px 20px 24px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px; border-right: 1px solid #dfe4e8; background: #fff; z-index: 20; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px 18px; border-bottom: 1px solid #edf0f2; }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { font-size: 14px; }
.sidebar-brand span { margin-top: 3px; color: #7b8794; font-size: 11px; }
.nav-list { display: grid; gap: 4px; margin-top: 18px; }
.nav-item { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: #526071; font-size: 14px; text-align: left; }
.nav-item:hover { background: #f2f5f4; color: #172033; }
.nav-item.active { background: #e9f4f0; color: #076747; font-weight: 700; }
.nav-icon { width: 18px; color: currentColor; font-size: 17px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid #edf0f2; }
.sidebar-footer > span { display: block; margin-bottom: 8px; color: #687485; font-size: 12px; }
.text-button { padding: 0; border: 0; background: transparent; color: #0a7654; font-size: 13px; font-weight: 700; }
.danger-text { color: #b42318; }
.workspace { min-width: 0; }
.topbar { height: 76px; display: flex; align-items: center; gap: 14px; padding: 0 28px; border-bottom: 1px solid #dde3e7; background: rgba(255, 255, 255, .94); position: sticky; top: 0; z-index: 10; }
.topbar h1 { margin: 0; font-size: 19px; }
.topbar p { margin: 4px 0 0; color: #768292; font-size: 12px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid #d1d8dd; border-radius: 6px; background: #fff; color: #344054; font-size: 19px; }
.icon-button:hover { border-color: #96a1aa; background: #f8fafb; }
.refresh-button { margin-left: auto; }
.menu-button { display: none; }
.content { max-width: 1480px; margin: 0 auto; padding: 26px 28px 48px; }
.page-section { display: none; }
.page-section.active { display: block; }
.metrics-grid { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 12px; }
.metrics-grid.compact { grid-template-columns: repeat(2, minmax(200px, 280px)); margin: 18px 0; }
.metric-card { min-height: 126px; padding: 18px; border: 1px solid #dfe4e8; border-radius: 7px; background: #fff; }
.metric-card span, .metric-card small { display: block; color: #718092; }
.metric-card span { font-size: 12px; font-weight: 700; }
.metric-card strong { display: block; margin: 13px 0 8px; font-size: 28px; line-height: 1; }
.metric-card small { font-size: 11px; }
.charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.panel { border: 1px solid #dfe4e8; border-radius: 7px; background: #fff; }
.chart-panel { min-width: 0; padding: 20px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-head h2, .section-head h3 { margin: 0; }
.section-head h2 { font-size: 20px; }
.section-head h3 { font-size: 15px; }
.section-head p { margin: 5px 0 0; color: #7a8696; font-size: 12px; }
.chart-frame { height: 250px; margin-top: 18px; }
.chart-frame canvas { width: 100%; height: 100%; display: block; }
.chart-legend { display: flex; gap: 14px; }
.legend-dot { display: inline-flex; align-items: center; gap: 6px; color: #6b7788; font-size: 11px; white-space: nowrap; }
.legend-dot::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #0a7654; }
.legend-dot.green::before { background: #0a7654; }
.legend-dot.blue::before { background: #2f6fed; }
.legend-dot.red::before { background: #d04438; }
.status-band { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 0 20px; }
.status-band > div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.status-pulse { width: 9px; height: 9px; border-radius: 50%; background: #98a2b3; }
.status-pulse.ok { background: #12a06a; box-shadow: 0 0 0 4px rgba(18, 160, 106, .12); }
.status-pulse.warning { background: #e29a22; box-shadow: 0 0 0 4px rgba(226, 154, 34, .12); }
.status-pulse.error { background: #d04438; box-shadow: 0 0 0 4px rgba(208, 68, 56, .12); }
.page-head { align-items: flex-end; margin-bottom: 16px; }
.filters { display: flex; gap: 8px; }
.filters input { width: 300px; }
.filters select { width: 130px; }
.table-panel { overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { height: 44px; padding: 0 16px; border-bottom: 1px solid #dfe4e8; background: #f8f9fa; color: #687485; font-size: 11px; font-weight: 800; text-align: left; white-space: nowrap; }
td { min-height: 58px; padding: 12px 16px; border-bottom: 1px solid #edf0f2; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfc; }
.empty { height: 120px; color: #8a96a4; text-align: center; }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.avatar-wrap { width: 34px; height: 34px; position: relative; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: #e7efec; color: #0a7654; font-size: 12px; font-weight: 800; }
.avatar-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #e7efec; }
.user-name, .user-meta { display: block; }
.user-name { max-width: 180px; overflow: hidden; color: #172033; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.user-meta { margin-top: 4px; color: #83909e; font-size: 11px; }
.badge, .summary-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge.active, .summary-badge.ok { background: #e5f5ef; color: #08734f; }
.badge.expired, .badge.suspended, .summary-badge.error { background: #fdecea; color: #b42318; }
.badge.not_started, .summary-badge.warning { background: #fff3db; color: #9a6000; }
.summary-badge.neutral { background: #edf1f3; color: #66727f; }
.table-action { min-height: 30px; padding: 0 10px; border: 1px solid #cfd6dc; border-radius: 5px; background: #fff; color: #344054; font-size: 12px; font-weight: 700; }
.table-action:hover { border-color: #0a7654; color: #0a7654; }
.table-footer { min-height: 46px; display: flex; align-items: center; padding: 0 16px; border-top: 1px solid #edf0f2; color: #768292; font-size: 12px; }
.bulk-toolbar { min-height: 58px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 8px 12px; border: 1px solid #bad8ce; border-radius: 7px; background: #eef8f4; }
.bulk-toolbar strong { margin-right: auto; color: #086647; font-size: 13px; }
.bulk-toolbar select { min-width: 150px; }
.row-checkbox { width: 16px; min-height: 16px; accent-color: #0a7654; }
.operation-form { margin-bottom: 16px; padding: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; }
.form-grid.admin-form-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.form-grid label { display: grid; gap: 7px; color: #596678; font-size: 11px; font-weight: 800; }
.form-grid input, .form-grid select { width: 100%; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.form-actions small { color: #788596; line-height: 1.5; }
.export-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 14px; }
.export-card { padding: 20px; }
.export-card h3 { margin: 0; font-size: 15px; }
.export-card p { min-height: 42px; margin: 8px 0 18px; color: #768292; font-size: 12px; line-height: 1.6; }
.export-card .secondary-button { width: 100%; }
.source-link { color: #0a7654; text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.action-group { display: flex; flex-wrap: wrap; gap: 6px; }
.diagnostic-list { display: grid; grid-template-columns: repeat(5, minmax(160px, 1fr)); gap: 10px; }
.diagnostic-item { min-height: 108px; padding: 16px; border: 1px solid #dfe4e8; border-left: 4px solid #98a2b3; border-radius: 6px; background: #fff; }
.diagnostic-item.ok { border-left-color: #0a7654; }
.diagnostic-item.warning { border-left-color: #d28a16; }
.diagnostic-item.error { border-left-color: #c9362b; }
.diagnostic-item strong { display: block; font-size: 13px; }
.diagnostic-item p { margin: 9px 0 0; color: #718092; font-size: 11px; line-height: 1.5; }
.table-title { padding: 18px 18px 14px; border-bottom: 1px solid #edf0f2; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(19, 29, 43, .26); }
.drawer { position: fixed; top: 0; right: 0; z-index: 50; width: min(620px, 100%); height: 100vh; display: flex; flex-direction: column; border-left: 1px solid #d9dfe3; background: #fff; box-shadow: -18px 0 50px rgba(24, 34, 45, .14); transform: translateX(102%); transition: transform .22s ease; }
.drawer.open { transform: translateX(0); }
.drawer-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 22px; border-bottom: 1px solid #e2e6e9; }
.drawer-header .eyebrow { margin: 0 0 3px; }
.drawer-header h2 { margin: 0; font-size: 18px; }
.drawer-content { min-height: 0; overflow-y: auto; padding: 22px; }
.profile-summary { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid #e5e9ec; }
.profile-summary h3 { margin: 0; font-size: 18px; }
.profile-summary p { margin: 6px 0 0; color: #748192; font-size: 12px; }
.profile-actions { display: flex; gap: 8px; align-items: flex-start; }
.trial-editor { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 18px 0; }
.detail-tabs { display: flex; gap: 4px; padding: 4px; background: #f0f3f4; border-radius: 6px; }
.detail-tab { flex: 1; min-height: 34px; border: 0; border-radius: 4px; background: transparent; color: #667386; font-size: 12px; font-weight: 700; }
.detail-tab.active { background: #fff; color: #0a7654; box-shadow: 0 1px 3px rgba(20, 30, 40, .1); }
.detail-list { display: grid; gap: 0; margin-top: 14px; border-top: 1px solid #e5e9ec; }
.detail-row { padding: 15px 2px; border-bottom: 1px solid #e9edef; }
.detail-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.detail-row h4 { margin: 0; font-size: 13px; }
.detail-row p { margin: 6px 0 0; color: #758294; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.detail-row button { flex: 0 0 auto; }
.message-list { display: grid; gap: 12px; }
.message { max-width: 88%; padding: 12px 14px; border-radius: 7px; background: #f0f3f4; }
.message.assistant { margin-right: auto; border-left: 3px solid #0a7654; }
.message.user { margin-left: auto; background: #e9f4f0; }
.message span { display: block; margin-bottom: 6px; color: #738092; font-size: 10px; font-weight: 800; }
.message p { margin: 0; font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.back-button { margin-bottom: 16px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(18, 27, 39, .42); }
.confirm-dialog { width: min(410px, 100%); padding: 24px; border-radius: 8px; background: #fff; box-shadow: 0 20px 60px rgba(20, 28, 40, .2); }
.confirm-dialog h2 { margin: 0; font-size: 18px; }
.confirm-dialog p { margin: 12px 0 24px; color: #657184; font-size: 13px; line-height: 1.65; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; max-width: min(480px, calc(100vw - 32px)); padding: 11px 16px; border-radius: 6px; background: #172033; color: #fff; font-size: 13px; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1180px) { .metrics-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); } .diagnostic-list { grid-template-columns: repeat(3, minmax(180px, 1fr)); } .form-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); } }
@media (max-width: 820px) { .app-shell { display: block; } .sidebar { position: fixed; left: 0; transform: translateX(-102%); width: 224px; box-shadow: 12px 0 35px rgba(20, 30, 40, .14); transition: transform .2s ease; } .sidebar.open { transform: translateX(0); } .menu-button { display: grid; } .topbar { padding: 0 16px; } .content { padding: 18px 16px 38px; } .charts-grid { grid-template-columns: 1fr; } .diagnostic-list { grid-template-columns: repeat(2, minmax(150px, 1fr)); } .page-head { align-items: stretch; flex-direction: column; } .filters { width: 100%; } .filters input { width: auto; flex: 1; min-width: 0; } .form-grid, .form-grid.admin-form-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); } .export-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); } .bulk-toolbar { align-items: stretch; flex-direction: column; } .bulk-toolbar strong { margin-right: 0; } }
@media (max-width: 560px) { .login-panel { padding: 28px 22px; } .metrics-grid, .metrics-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } .metric-card { min-height: 116px; padding: 15px; } .diagnostic-list { grid-template-columns: 1fr; } .filters { flex-direction: column; } .filters select { width: 100%; } .status-band { align-items: flex-start; flex-direction: column; padding: 16px; } .drawer-content { padding: 18px 15px; } .profile-summary { grid-template-columns: 1fr; } .profile-actions { justify-content: flex-start; } .form-grid, .form-grid.admin-form-grid, .export-grid { grid-template-columns: 1fr; } .form-actions { align-items: stretch; flex-direction: column; } .form-actions .primary-button { width: 100%; } }
