:root {
  --ink: #172033;
  --muted: #6f788b;
  --line: #e6e9f0;
  --canvas: #f5f6fa;
  --panel: #ffffff;
  --primary: #5572f7;
  --primary-dark: #405bd9;
  --success: #1e9f72;
  --danger: #d84d62;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1.15fr) minmax(420px, .85fr); background: #0f1730; }
.auth-story { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 48px 7vw; color: white; background: radial-gradient(circle at 22% 28%, rgba(90, 121, 255, .34), transparent 34%), radial-gradient(circle at 76% 76%, rgba(66, 222, 173, .16), transparent 28%), linear-gradient(145deg, #111b38, #0b1024 74%); }
.auth-story::after { content: ""; position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, black, transparent 84%); }
.product-lockup, .auth-copy, .security-note { position: relative; z-index: 1; }
.product-lockup { display: flex; align-items: center; gap: 14px; font-size: 20px; }
.product-glyph, .sidebar-brand > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: white; background: linear-gradient(145deg, #6b86ff, #415de4); box-shadow: 0 10px 32px rgba(77, 103, 239, .4); }
.auth-copy { margin: auto 0; max-width: 720px; }
.eyebrow { display: block; margin-bottom: 14px; color: #6d83eb; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.auth-copy .eyebrow { color: #8ea3ff; }
.auth-copy h1 { margin: 0; font-size: clamp(44px, 5vw, 74px); line-height: 1.12; letter-spacing: -.045em; }
.auth-copy h1 em { color: #9eb0ff; font-style: normal; }
.auth-copy p { max-width: 640px; margin: 26px 0; color: #aeb8d1; font-size: 18px; line-height: 1.8; }
.auth-points { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-points span { padding: 9px 13px; border: 1px solid rgba(255,255,255,.13); border-radius: 99px; color: #dbe2f6; background: rgba(255,255,255,.05); font-size: 13px; }
.security-note { color: #7886a8; font-size: 12px; }
.auth-panel { display: grid; place-items: center; padding: 48px; background: #f7f8fc; }
.auth-card { width: min(430px, 100%); padding: 38px; border: 1px solid #e8ebf2; border-radius: 26px; background: white; box-shadow: 0 28px 70px rgba(20, 28, 55, .1); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 30px; padding: 4px; border-radius: 12px; background: #f1f3f8; }
.auth-tabs button { border: 0; padding: 10px; border-radius: 9px; color: #778094; background: transparent; }
.auth-tabs button.active { color: #25304a; background: white; box-shadow: 0 2px 8px rgba(30,40,70,.08); font-weight: 700; }
.auth-card h2 { margin: 0 0 7px; font-size: 28px; }
.auth-card > p { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.form-stack { display: grid; gap: 17px; }
.form-stack label, .large-field, .form-grid label { display: grid; gap: 8px; color: #3f495d; font-size: 13px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid #dfe3ec; border-radius: 11px; padding: 12px 14px; color: var(--ink); background: #fff; outline: none; transition: .18s ease; }
input:focus, textarea:focus, select:focus { border-color: #7f93f3; box-shadow: 0 0 0 4px rgba(85,114,247,.11); }
.renew-line { color: #7b8496 !important; font-weight: 500 !important; }
.primary-button, .secondary-button { border: 0; border-radius: 11px; padding: 13px 18px; font-weight: 750; transition: .18s ease; }
.primary-button { color: white; background: linear-gradient(135deg, #607cff, #4a64e8); box-shadow: 0 10px 24px rgba(72, 98, 228, .24); }
.primary-button:hover { transform: translateY(-1px); background: linear-gradient(135deg, #6984ff, #3f59db); }
.primary-button:disabled { cursor: wait; opacity: .58; transform: none; }
.primary-button.compact, .secondary-button { padding: 10px 15px; }
.secondary-button { border: 1px solid #dde2ed; color: #43506a; background: #fff; box-shadow: none; }
.secondary-button:hover { border-color: #bfc8dc; background: #f8f9fc; }
.secondary-button.full { width: 100%; margin-top: 10px; }
.legal-line { margin: 20px 0 0 !important; text-align: center; font-size: 11px !important; }
.legal-line a { color: #596fda; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 16px; color: #c7cee0; background: #11192c; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.sidebar-brand div { display: grid; }
.sidebar-brand strong { color: #f7f9ff; font-size: 17px; }
.sidebar-brand small { margin-top: 3px; color: #697692; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav button { display: flex; align-items: center; gap: 12px; border: 0; border-radius: 10px; padding: 11px 13px; color: #8f9ab4; background: transparent; text-align: left; }
.sidebar nav button i { width: 20px; font-style: normal; text-align: center; }
.sidebar nav button:hover { color: #dbe1ef; background: rgba(255,255,255,.05); }
.sidebar nav button.active { color: #fff; background: linear-gradient(90deg, rgba(91,115,240,.32), rgba(91,115,240,.08)); box-shadow: inset 3px 0 #7690ff; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.07); }
.account-chip { display: flex; gap: 10px; align-items: center; }
.account-chip > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: #435273; font-size: 12px; }
.account-chip div { min-width: 0; display: grid; }
.account-chip strong { overflow: hidden; color: #e7ebf4; font-size: 12px; text-overflow: ellipsis; }
.account-chip small { margin-top: 3px; color: #697692; font-size: 9px; }
.quiet-button { width: 100%; margin-top: 12px; border: 0; color: #74819c; background: transparent; font-size: 11px; text-align: left; }

.workspace { min-width: 0; }
.topbar { height: 54px; display: flex; justify-content: space-between; align-items: center; padding: 0 32px; border-bottom: 1px solid var(--line); color: #8790a2; background: rgba(255,255,255,.8); backdrop-filter: blur(16px); font-size: 11px; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #2bc58b; box-shadow: 0 0 0 4px rgba(43,197,139,.12); }
.workspace-content { max-width: 1500px; margin: 0 auto; padding: 36px 40px 60px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 28px; }
.page-heading h1 { margin: 0; font-size: 32px; letter-spacing: -.035em; }
.page-heading p { max-width: 760px; margin: 9px 0 0; color: var(--muted); line-height: 1.7; }
.panel { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--panel); box-shadow: 0 6px 20px rgba(27,39,68,.035); }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.panel-title h2 { margin: 0; font-size: 17px; }
.panel-title p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { position: relative; overflow: hidden; display: grid; gap: 9px; min-height: 132px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.stat-card::after { content: ""; position: absolute; right: -32px; bottom: -44px; width: 120px; height: 120px; border-radius: 50%; background: var(--wash); }
.stat-card span { color: var(--muted); font-size: 11px; font-weight: 700; }
.stat-card strong { font-size: 25px; letter-spacing: -.03em; }
.stat-card small { color: #9aa2b2; font-size: 10px; }
.stat-card.green { --wash: rgba(48,190,139,.11); }.stat-card.violet { --wash: rgba(137,103,239,.11); }.stat-card.orange { --wash: rgba(242,145,70,.11); }.stat-card.blue { --wash: rgba(85,114,247,.11); }
.two-column { display: grid; grid-template-columns: 1.3fr .9fr; gap: 18px; margin-bottom: 18px; }
.route-list { display: grid; gap: 13px; }
.route-list > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; font-size: 12px; }
.route-list i { height: 1px; background: repeating-linear-gradient(90deg, #dfe4ee 0 5px, transparent 5px 9px); }
.route-list strong { font-size: 10px; font-weight: 750; }
.route-local { color: #178961; }.route-customer-api { color: #4d66d7; }.route-vendor-4060 { color: #d0762f; }.route-blocked { color: var(--danger); }
.status-pill { display: inline-flex; padding: 5px 9px; border-radius: 99px; color: #566176; background: #eef1f6; font-size: 9px; font-weight: 750; }
.status-pill.success { color: #16815c; background: #e7f8f1; }.status-pill.danger { color: #b63e53; background: #fdecef; }
.check-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 23px; color: #566176; font-size: 12px; line-height: 1.6; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: #4f70ef; font-weight: 900; }
.recent-panel { margin-top: 18px; }
.text-button { border: 0; padding: 5px; color: #526de5; background: transparent; font-size: 10px; }
.task-table { display: grid; }
.task-row { display: grid; grid-template-columns: 40px minmax(180px, 1fr) 75px 90px 52px; align-items: center; gap: 13px; padding: 12px 0; border-top: 1px solid #edf0f5; }
.task-row:first-child { border-top: 0; }
.task-thumb { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: white; background: var(--task-color); font-size: 11px; }
.task-row > div:nth-child(2) { min-width: 0; display: grid; }
.task-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.task-row small, .task-row time { margin-top: 3px; color: #929aab; font-size: 9px; }
.task-status { justify-self: start; padding: 5px 8px; border-radius: 99px; color: #697389; background: #eef1f6; font-size: 9px; }
.task-status.running { color: #3860cf; background: #e9efff; }.task-status.succeeded, .task-status.preview { color: #17815c; background: #e7f8f1; }.task-status.failed { color: #ba4056; background: #fdecef; }
.empty-box { min-height: 130px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed #dce1eb; border-radius: 13px; color: #9aa2b2; text-align: center; }
.empty-box strong { color: #697389; font-size: 13px; }.empty-box span { font-size: 10px; }.empty-box.large { min-height: 300px; }

.creation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.editor-panel { padding: 26px; }
.step-heading { display: flex; align-items: center; gap: 12px; margin: 4px 0 17px; }
.step-heading:not(:first-child) { margin-top: 30px; padding-top: 26px; border-top: 1px solid #edf0f5; }
.step-heading > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #4f69db; background: #edf1ff; font-size: 10px; font-weight: 900; }
.step-heading h2 { margin: 0; font-size: 16px; }.step-heading p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 11px; background: #f1f3f7; }
.segmented button { border: 0; padding: 8px 14px; border-radius: 8px; color: #747d8f; background: transparent; font-size: 11px; }
.segmented button.active { color: #27324a; background: white; box-shadow: 0 2px 8px rgba(30,40,70,.07); font-weight: 750; }
.link-box { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 13px; }
.field-help { margin: 7px 0 0; color: #9aa2b2; font-size: 9px; }
.large-field { margin-top: 15px; }
.large-field > span { display: flex; justify-content: space-between; }.large-field small { color: #939bac; font-weight: 500; }
.large-field textarea { min-height: 190px; resize: vertical; line-height: 1.75; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compact-grid { max-width: 550px; }
.inline-callout { width: 100%; margin-top: 12px; border: 1px solid #dfe5ff; border-radius: 10px; padding: 11px; color: #526bd7; background: #f6f8ff; font-size: 10px; text-align: left; }
.style-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
.style-card { position: relative; overflow: hidden; display: grid; gap: 8px; min-height: 92px; border: 2px solid transparent; border-radius: 12px; padding: 10px; color: white; background: var(--background); text-align: left; }
.style-card::after { content: ""; position: absolute; right: -25px; bottom: -35px; width: 80px; height: 80px; border-radius: 50%; background: var(--accent); opacity: .16; }
.style-card > span { display: flex; align-items: end; gap: 3px; height: 35px; }
.style-card i { display: block; width: 8px; border-radius: 3px; background: var(--accent); }.style-card i:nth-child(1) { height: 19px; }.style-card i:nth-child(2) { height: 31px; }.style-card i:nth-child(3) { height: 25px; }
.style-card strong { position: relative; z-index: 1; font-size: 10px; }
.style-card.active { border-color: #6680f5; box-shadow: 0 0 0 3px rgba(85,114,247,.12); }
.rights-check { display: flex !important; align-items: start; gap: 10px !important; margin-top: 22px; color: #677185 !important; line-height: 1.6; font-size: 10px !important; font-weight: 500 !important; }
.rights-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.sticky-card { position: sticky; top: 75px; }
.compact-route > div { font-size: 10px; }.compact-route strong { font-size: 9px; }
.quality-note { display: grid; gap: 5px; margin: 22px 0 14px; padding: 13px; border-radius: 10px; color: #6e613f; background: #fff9e9; }
.quality-note strong { font-size: 10px; }.quality-note span { font-size: 9px; line-height: 1.6; }

.assets-columns { grid-template-columns: 1fr 1fr; }
.asset-list { display: grid; gap: 9px; }
.asset-item { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 10px; border: 1px solid #e9ecf2; border-radius: 11px; }
.avatar-placeholder, .voice-placeholder { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: white; background: linear-gradient(145deg, #607af0, #8499f5); font-size: 11px; }
.voice-placeholder { background: linear-gradient(145deg, #4db991, #6dd7b1); }
.asset-item > div:nth-child(2) { min-width: 0; display: grid; }.asset-item strong { font-size: 11px; }.asset-item small { overflow: hidden; margin-top: 4px; color: #9199aa; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { border: 0; color: #a0a7b7; background: transparent; font-size: 18px; }
.privacy-panel { margin-top: 18px; background: #f9fafc; }.privacy-panel strong { font-size: 12px; }.privacy-panel p { margin: 7px 0 0; color: #70798c; font-size: 10px; line-height: 1.7; }

.hardware-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hardware-strip div { display: grid; gap: 6px; padding: 14px; border-radius: 11px; background: #f7f8fb; }.hardware-strip span { color: #8992a5; font-size: 9px; }.hardware-strip strong { font-size: 11px; }
.provider-list { display: grid; gap: 10px; }
.provider-row { display: grid; grid-template-columns: 1.1fr .9fr 1.2fr; align-items: center; gap: 10px; padding: 11px; border: 1px solid #e8ebf1; border-radius: 12px; }
.provider-name { display: flex; align-items: center; gap: 10px; }.provider-name > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #526cdf; background: #edf1ff; font-weight: 800; }.provider-name div { display: grid; }.provider-name strong { font-size: 10px; }.provider-name small { margin-top: 3px; color: #8e97a8; font-size: 8px; }
.provider-row input { padding: 9px 11px; font-size: 10px; }
.settings-card { display: grid; padding: 0 22px 22px; }.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid #edf0f5; }.setting-row div { display: grid; gap: 5px; }.setting-row strong { font-size: 12px; }.setting-row span { color: #858ea1; font-size: 10px; }
.switch input { display: none; }.switch i { position: relative; display: block; width: 40px; height: 22px; border-radius: 99px; background: #ced4e0; }.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: .2s; }.switch input:checked + i { background: #5c76ed; }.switch input:checked + i::after { transform: translateX(18px); }

.admin-table { display: grid; }.admin-row { display: grid; grid-template-columns: 1.2fr .7fr .8fr 1fr .6fr; align-items: center; gap: 12px; padding: 13px 7px; border-top: 1px solid #edf0f5; font-size: 10px; }.admin-row.head { border-top: 0; color: #9098a8; font-size: 9px; }.admin-row strong { font-size: 11px; }
.code-form { display: grid; grid-template-columns: 120px 120px 120px auto; gap: 10px; align-items: end; margin-bottom: 20px; }.code-form label { display: grid; gap: 6px; color: #70798b; font-size: 9px; }.code-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }.code-grid div { display: grid; gap: 4px; padding: 11px; border-radius: 9px; background: #f6f8fb; }.code-grid strong { font-family: ui-monospace, monospace; font-size: 11px; }.code-grid span { color: #8e96a7; font-size: 8px; }

.toast { min-width: 250px; margin-top: 8px; border: 1px solid #dfe3ec; border-radius: 11px; padding: 12px 15px; color: #344058; background: white; box-shadow: 0 16px 40px rgba(18,28,54,.15); font-size: 11px; }
.toast.success { border-color: #bdebd9; color: #147a57; }.toast.error { border-color: #f1c2ca; color: #b4384e; }
.fatal-box { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 8px; background: #f6f7fa; }.fatal-box strong { font-size: 22px; }.fatal-box span { color: #747d8f; }

@media (max-width: 1100px) {
  .auth-shell { grid-template-columns: 1fr; }.auth-story { display: none; }.app-shell { grid-template-columns: 206px 1fr; }.stats-grid { grid-template-columns: repeat(2, 1fr); }.creation-layout { grid-template-columns: 1fr; }.sticky-card { position: static; }.style-grid { grid-template-columns: repeat(3, 1fr); }.provider-row { grid-template-columns: 1fr; }
}
