:root {
  --ink: #17201d;
  --muted: #68736e;
  --line: #dce2df;
  --paper: #ffffff;
  --ground: #f3f5f3;
  --green: #1f614b;
  --green-dark: #154636;
  --green-soft: #e8f2ed;
  --coral: #bd5746;
  --coral-soft: #f8ebe8;
  --gold: #ae7a2b;
  --shadow: 0 18px 50px rgba(17, 35, 29, 0.1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ground); }
body { margin: 0; color: var(--ink); font-family: "Microsoft YaHei UI", "PingFang SC", Arial, sans-serif; font-size: 14px; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
code { font-family: Consolas, monospace; color: #315348; font-size: 12px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: 0; }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: var(--ground); }
.auth-shell { width: min(980px, 100%); min-height: 620px; display: grid; grid-template-columns: 42% 58%; overflow: hidden; border: 1px solid #d8dedb; border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.login-shell { width: min(880px, 100%); min-height: 560px; grid-template-columns: 48% 52%; }
.brand-panel { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 64px 56px; color: #fff; background: #163f33; overflow: hidden; }
.brand-panel::after { content: ""; position: absolute; right: -70px; bottom: -100px; width: 260px; height: 260px; border: 52px solid rgba(255,255,255,.06); border-radius: 50%; }
.brand-panel img { width: 72px; height: 72px; object-fit: cover; margin-bottom: 38px; border-radius: 8px; box-shadow: 0 12px 28px rgba(0,0,0,.2); }
.brand-panel .eyebrow { color: #9fc8b8; }
.brand-panel h1 { margin: 0; font-size: 40px; line-height: 1.2; letter-spacing: 0; }
.brand-panel > p:not(.eyebrow) { max-width: 310px; margin: 18px 0 0; color: #c5d9d1; font-size: 16px; line-height: 1.8; }
.brand-proof { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 5px; margin-top: 52px; padding-left: 15px; border-left: 3px solid #d5a54e; }
.brand-proof strong { font-size: 14px; }.brand-proof span { color: #aac6bb; font-size: 12px; }
.agent-brand { background: #453b36; }.agent-brand .eyebrow { color: #efb6aa; }
.steps { position: relative; z-index: 1; display: grid; gap: 18px; margin: 50px 0 0; padding: 0; list-style: none; color: #8fb3a5; counter-reset: step; }
.steps li { display: flex; align-items: center; gap: 12px; }.steps li::before { counter-increment: step; content: counter(step); display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #6b9484; border-radius: 50%; font-size: 12px; }.steps li.active { color: #fff; }.steps li.active::before { color: #173f33; background: #fff; border-color: #fff; }
.auth-form-panel { display: flex; flex-direction: column; justify-content: center; padding: 56px 64px; }
.form-heading { margin-bottom: 30px; }.form-heading h2 { margin: 12px 0 8px; font-size: 28px; }.form-heading p { margin: 0; color: var(--muted); line-height: 1.6; }
.tag { display: inline-flex; padding: 5px 9px; color: var(--green); background: var(--green-soft); border-radius: 4px; font-size: 11px; font-weight: 800; }.tag.coral { color: var(--coral); background: var(--coral-soft); }
.form-grid { display: grid; gap: 17px; }.form-grid.two-col { grid-template-columns: 1fr 1fr; }.form-grid label { display: grid; gap: 7px; min-width: 0; }.form-grid label span { color: #47534e; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 42px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #cfd7d3; border-radius: 5px; outline: none; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; } input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,97,75,.1); }
.full, .section-label { grid-column: 1 / -1; }.section-label { padding-top: 6px; color: var(--green); font-weight: 800; border-top: 1px solid var(--line); }
.primary, .secondary { min-height: 43px; padding: 10px 17px; border: 0; border-radius: 5px; font-weight: 800; }.primary { color: #fff; background: var(--green); box-shadow: 0 8px 18px rgba(31,97,75,.18); }.primary:hover { background: var(--green-dark); }.secondary { color: var(--green); background: var(--green-soft); }.coral-button { background: var(--coral); box-shadow: 0 8px 18px rgba(189,87,70,.18); }.coral-button:hover { background: #9d4436; }
.agent-entry { align-self: center; margin-top: 24px; color: var(--muted); font-size: 12px; }.agent-entry:hover { color: var(--green); }
.alert { display: grid; gap: 10px; margin: 0 0 20px; padding: 13px 15px; border: 1px solid; border-radius: 6px; line-height: 1.5; }.alert.success { color: #245b46; background: #edf7f1; border-color: #b9ddcb; }.alert.error { color: #8b3d32; background: #fff1ee; border-color: #efc4bb; }
.secret-line { display: flex; align-items: center; gap: 10px; min-width: 0; }.secret-line code { flex: 1; overflow-wrap: anywhere; color: inherit; font-size: 13px; }.secret-line button { flex: none; padding: 7px 10px; color: #fff; background: var(--green); border: 0; border-radius: 4px; }

.app-body { min-height: 100vh; background: var(--ground); }.app-layout { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 20; display: flex; height: 100vh; flex-direction: column; color: #dce9e4; background: #142d26; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; height: 94px; padding: 0 24px; border-bottom: 1px solid rgba(255,255,255,.08); }.sidebar-brand img { width: 43px; height: 43px; object-fit: cover; border-radius: 6px; }.sidebar-brand span { display: grid; gap: 3px; }.sidebar-brand strong { color: #fff; font-size: 16px; }.sidebar-brand small { color: #89aa9d; font-size: 11px; }
.sidebar nav { display: grid; gap: 5px; padding: 24px 14px; }.sidebar nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px; color: #aac1b8; border-radius: 5px; font-weight: 700; }.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.05); }.sidebar nav a.active { color: #fff; background: #26624d; }.nav-icon { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid currentColor; border-radius: 4px; font-size: 11px; }
.sidebar-foot { display: grid; gap: 15px; margin-top: auto; padding: 22px 24px; color: #8ca69c; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }.sidebar-foot a:hover { color: #fff; }.status-dot { display: flex; align-items: center; gap: 8px; }.status-dot i { width: 7px; height: 7px; background: #62c594; border-radius: 50%; box-shadow: 0 0 0 4px rgba(98,197,148,.12); }
.main-area { min-width: 0; padding: 34px 38px 50px; }.topbar { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }.topbar > div:first-of-type { flex: 1; }.topbar h1 { margin: 0 0 5px; font-size: 26px; }.topbar p:not(.eyebrow) { margin: 0; color: var(--muted); }.admin-chip { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }.admin-chip > span { display: grid; width: 34px; height: 34px; place-items: center; color: #fff; background: var(--coral); border-radius: 4px; font-weight: 800; }.admin-chip div { display: grid; gap: 2px; }.admin-chip small { color: var(--muted); font-size: 10px; }.menu-button { display: none; width: 40px; height: 40px; color: var(--green); background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }.metric { display: grid; min-height: 140px; padding: 21px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 6px; }.metric:nth-child(2) { border-top-color: var(--coral); }.metric:nth-child(3) { border-top-color: var(--gold); }.metric:nth-child(4) { border-top-color: #446b8b; }.metric span { color: var(--muted); font-weight: 700; }.metric strong { align-self: center; font-size: 34px; }.metric small { color: var(--green); }
.panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 7px; }.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); }.panel-head h2 { margin: 0 0 5px; font-size: 16px; }.panel-head p { margin: 0; color: var(--muted); font-size: 12px; }.panel-head > a { color: var(--green); font-size: 12px; font-weight: 800; }
.split-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.work-grid { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); align-items: start; gap: 18px; }.form-panel form { padding: 22px; }.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.table-panel { overflow: hidden; }.table-wrap { width: 100%; overflow-x: auto; }table { width: 100%; border-collapse: collapse; white-space: nowrap; }th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #edf0ee; }th { color: #718079; background: #fafbfa; font-size: 11px; font-weight: 800; }td { font-size: 12px; }td strong, td small { display: block; }td small { margin-top: 4px; color: var(--muted); }.empty { height: 110px; color: var(--muted); text-align: center; }.status { display: inline-flex; align-items: center; padding: 4px 7px; color: var(--green); background: var(--green-soft); border-radius: 4px; font-size: 10px; font-weight: 800; }.status.disabled, .status.released { color: #8b4d42; background: var(--coral-soft); }
.copy-code { max-width: 260px; padding: 0; overflow: hidden; color: #315348; background: none; border: 0; font: 12px Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }.copy-code:hover { color: var(--coral); }.inline-form { display: inline-flex; margin: 0; }.text-button { padding: 4px 6px; color: var(--green); background: transparent; border: 0; font-size: 11px; font-weight: 800; }.text-button.danger { color: var(--coral); }
.search-form { display: flex; align-items: center; gap: 8px; }.search-form input { width: 210px; min-height: 35px; }.search-form button { min-height: 35px; padding: 7px 12px; }
.reset-box { position: relative; align-self: center; color: var(--green); font-size: 11px; font-weight: 800; }.reset-box summary { cursor: pointer; }.reset-box form { position: absolute; right: 0; z-index: 5; width: 240px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }.reset-box input { flex: 1; min-width: 0; }
.agent-list { display: grid; gap: 12px; }.agent-row { background: #fff; border: 1px solid var(--line); border-radius: 7px; }.agent-main { display: flex; align-items: center; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--line); }.agent-main > .status { margin-left: auto; }.agent-avatar { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; background: #446b8b; border-radius: 5px; font-weight: 800; }.agent-main h3 { margin: 0 0 4px; font-size: 15px; }.agent-main p { margin: 0; color: var(--muted); font-size: 11px; }.quota { display: grid; grid-template-columns: repeat(3, 1fr); padding: 16px 18px; }.quota div { display: grid; gap: 5px; }.quota span { color: var(--muted); font-size: 11px; }.quota strong { font-size: 20px; }.row-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; background: #fafbfa; border-top: 1px solid var(--line); }.row-actions form { display: flex; gap: 8px; }.row-actions input { width: 72px; min-height: 34px; }.row-actions button { min-height: 34px; padding: 6px 10px; }.empty-block { padding: 60px 20px; color: var(--muted); text-align: center; }
.settings-grid { display: grid; grid-template-columns: minmax(300px, 470px) minmax(300px, 1fr); gap: 18px; align-items: stretch; }.security-note { padding: 34px; color: #fff; background: #31483f; border-radius: 7px; }.security-note > span { color: #9fc8b8; font-size: 11px; font-weight: 800; }.security-note h2 { max-width: 420px; margin: 16px 0; font-size: 27px; }.security-note p { max-width: 520px; color: #cedbd6; line-height: 1.8; }.security-note ul { display: grid; gap: 10px; margin: 25px 0 0; padding-left: 18px; color: #b9ccc4; }

.partner-body { min-height: 100vh; background: var(--ground); }.partner-header { display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 max(24px, calc((100vw - 1180px)/2)); color: #fff; background: #283c35; }.partner-header > a { display: flex; align-items: center; gap: 10px; }.partner-header img { width: 38px; height: 38px; object-fit: cover; border-radius: 5px; }.partner-header span { display: grid; gap: 2px; }.partner-header small { color: #9db3aa; }.partner-header > div { display: flex; align-items: center; gap: 22px; }.partner-header > div > span { display: block; }.partner-header > div a { color: #b7cac2; font-size: 12px; }.partner-main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 60px; }.partner-welcome { display: flex; align-items: center; justify-content: space-between; min-height: 180px; margin-bottom: 20px; padding: 32px 38px; color: #fff; background: #31483f; border-left: 5px solid var(--coral); border-radius: 7px; }.partner-welcome .eyebrow { color: #efb6aa; }.partner-welcome h1 { margin: 0 0 10px; font-size: 28px; }.partner-welcome p:not(.eyebrow) { margin: 0; color: #c5d3ce; }.quota-hero { display: grid; min-width: 180px; padding-left: 35px; border-left: 1px solid rgba(255,255,255,.16); }.quota-hero span, .quota-hero small { color: #afc3bb; }.quota-hero strong { margin: 5px 0; font-size: 44px; }.partner-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .split-panels, .partner-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 320px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; }.sidebar { position: fixed; left: -250px; width: 238px; transition: left .2s; box-shadow: 12px 0 30px rgba(0,0,0,.18); }.sidebar.open { left: 0; }.menu-button { display: grid; place-items: center; }.main-area { padding: 24px; }.work-grid, .settings-grid { grid-template-columns: 1fr; }
  .auth-shell, .login-shell { grid-template-columns: 1fr; }.brand-panel { min-height: 260px; padding: 38px 44px; }.brand-panel img { width: 56px; height: 56px; margin-bottom: 20px; }.brand-panel h1 { font-size: 31px; }.brand-panel > p:not(.eyebrow) { font-size: 14px; }.brand-proof, .steps { display: none; }.auth-form-panel { padding: 44px; }
}

@media (max-width: 620px) {
  .auth-body { padding: 0; background: #fff; }.auth-shell, .login-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }.brand-panel { min-height: 215px; padding: 28px 25px; }.brand-panel img { width: 48px; height: 48px; margin-bottom: 14px; }.brand-panel h1 { font-size: 27px; }.brand-panel > p:not(.eyebrow) { margin-top: 10px; line-height: 1.6; }.auth-form-panel { justify-content: start; padding: 32px 24px; }.form-grid.two-col, .inline-fields { grid-template-columns: 1fr; }.section-label, .full { grid-column: auto; }
  .main-area { padding: 18px 14px 35px; }.topbar { align-items: flex-start; }.topbar h1 { font-size: 22px; }.topbar p:not(.eyebrow), .admin-chip div { display: none; }.admin-chip { padding: 5px; }.metric-grid { gap: 9px; }.metric { min-height: 118px; padding: 15px; }.metric strong { font-size: 29px; }.metric small { font-size: 10px; }.panel-head { align-items: flex-start; flex-direction: column; padding: 17px; }.search-form { width: 100%; }.search-form input { width: auto; flex: 1; }.split-panels { grid-template-columns: 1fr; gap: 12px; }.row-actions { flex-wrap: wrap; }.settings-grid { grid-template-columns: minmax(0, 1fr); }
  .partner-header { padding: 0 17px; }.partner-header > div > span { display: none; }.partner-main { width: calc(100% - 28px); padding-top: 18px; }.partner-welcome { display: grid; gap: 24px; padding: 25px; }.partner-welcome h1 { font-size: 24px; }.quota-hero { padding: 18px 0 0; border-top: 1px solid rgba(255,255,255,.16); border-left: 0; }.secret-line { align-items: stretch; flex-direction: column; }
}
