:root {
  --navy: #101c35;
  --navy-2: #17294c;
  --brand: #2f6bff;
  --brand-soft: #eef4ff;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #70809b;
  --border: #e5eaf3;
  --green: #119b64;
  --amber: #b76e00;
  --red: #c83434;
  --shadow: 0 12px 34px rgba(28, 44, 79, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 8px; color: #6581bb; font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; color: #fff; font-size: 24px; font-weight: 800; border-radius: 15px; background: linear-gradient(145deg, #6c91ff, #2f6bff); box-shadow: 0 10px 24px rgba(47, 107, 255, .28); }
.brand-mark.small { width: 31px; height: 31px; border-radius: 9px; font-size: 16px; box-shadow: none; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 15% 10%, #e5edff 0, transparent 34%), linear-gradient(135deg, #f8faff, #eef2f9); }
.login-card { width: min(440px, 100%); padding: 42px; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: rgba(255,255,255,.9); box-shadow: 0 24px 70px rgba(36, 61, 110, .13); }
.login-card h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.login-lede { margin: 12px 0 28px; color: var(--muted); line-height: 1.7; }
.stack-form { display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: #43516c; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 0 12px; color: var(--text); border: 1px solid var(--border); border-radius: 9px; outline: none; background: #fff; transition: border-color .18s, box-shadow .18s; }
input, select { height: 42px; }
textarea { min-height: 100px; padding-top: 10px; padding-bottom: 10px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: #7ea0ff; box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.primary-button, .secondary-button, .ghost-button, .text-button, .danger-button { border-radius: 9px; border: 0; transition: transform .15s, box-shadow .15s, background .15s; }
.primary-button { min-height: 42px; padding: 0 18px; color: #fff; background: linear-gradient(135deg, #2f6bff, #5b84ff); box-shadow: 0 8px 18px rgba(47,107,255,.2); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(47,107,255,.26); }
.secondary-button { min-height: 36px; padding: 0 14px; color: #305ac8; border: 1px solid #cbd9ff; background: var(--brand-soft); }
.ghost-button { padding: 7px 10px; color: rgba(255,255,255,.82); background: transparent; }
.ghost-button:hover { color: #fff; background: rgba(255,255,255,.1); }
.text-button { padding: 0; color: var(--brand); background: transparent; font-size: 13px; }
.danger-button { padding: 6px 9px; color: var(--red); background: #fff1f1; font-size: 12px; }
.form-message { min-height: 18px; margin: 0; color: var(--red); font-size: 13px; }
.login-note { margin: 22px 0 0; color: #8995a9; font-size: 12px; line-height: 1.7; }
.app-shell { min-height: 100vh; }
.topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; color: #fff; background: linear-gradient(100deg, var(--navy), var(--navy-2)); }
.topbar-brand, .topbar-actions { display: flex; align-items: center; gap: 11px; }
.topbar-brand { font-weight: 700; letter-spacing: .02em; }
.operator-name { color: rgba(255,255,255,.75); font-size: 13px; }
.workspace { display: flex; min-height: calc(100vh - 62px); }
.sidebar { width: 242px; flex: 0 0 242px; padding: 26px 16px; border-right: 1px solid var(--border); background: #fff; }
.sidebar-label { margin: 0 10px 8px; color: #97a3b8; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.tenant-select { margin-bottom: 8px; background: #f8faff; }
.tenant-role { min-height: 24px; margin: 0 10px 22px; color: var(--muted); font-size: 12px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { width: 100%; padding: 11px 12px; text-align: left; color: #5e6c84; border: 0; border-radius: 9px; background: transparent; }
.nav-item:hover { color: var(--brand); background: #f4f7ff; }
.nav-item.active { color: #2458d2; font-weight: 700; background: var(--brand-soft); }
.sidebar-foot { margin: 36px 10px 0; color: #a4aec0; font-size: 11px; line-height: 1.7; }
.content { position: relative; width: min(1320px, 100%); margin: 0 auto; padding: 36px clamp(20px, 4vw, 56px) 60px; }
.page-section { display: none; }
.page-section.active { display: block; }
.page-loading { position: fixed; top: 72px; right: 28px; z-index: 5; padding: 9px 14px; color: #315bc5; border: 1px solid #cddaff; border-radius: 10px; background: #f4f7ff; box-shadow: var(--shadow); font-size: 12px; }
.section-heading, .panel-heading, .table-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-heading { margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: 27px; letter-spacing: -.03em; }
.section-heading .muted { margin: 8px 0 0; font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.stat-card, .panel { border: 1px solid var(--border); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.stat-card { padding: 20px; }
.stat-card .stat-label { color: var(--muted); font-size: 12px; }
.stat-card .stat-value { margin-top: 10px; font-size: 27px; font-weight: 750; }
.stat-card .stat-hint { margin-top: 5px; color: #96a1b4; font-size: 11px; }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel { padding: 22px; }
.panel h3 { margin: 0; font-size: 16px; }
.panel-heading { align-items: center; margin-bottom: 16px; }
.detail-list { display: grid; gap: 12px; }
.detail-row { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 11px; border-bottom: 1px solid #eef1f6; font-size: 13px; }
.detail-row:last-child { padding-bottom: 0; border-bottom: 0; }
.detail-row span:first-child { color: var(--muted); }
.detail-row span:last-child { max-width: 65%; text-align: right; word-break: break-word; }
.channel-summary { display: grid; gap: 12px; }
.channel-status-row { display: flex; align-items: center; justify-content: space-between; padding: 13px; border-radius: 10px; background: #f8faff; }
.channel-status-row strong { display: block; font-size: 13px; }
.channel-status-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.status-active { color: var(--green); background: #e8f8f0; }
.status-pending { color: var(--amber); background: #fff5df; }
.status-disabled, .status-unknown { color: #7b879a; background: #edf0f4; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.notice { margin-bottom: 18px; padding: 13px 15px; color: #5a6880; border: 1px solid #dbe5ff; border-radius: 10px; background: #f4f7ff; font-size: 13px; line-height: 1.6; }
.channel-card { min-height: 390px; }
.channel-card h3 { margin-bottom: 6px; }
.channel-card .card-subtitle { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.channel-form { display: grid; gap: 14px; }
.channel-form .inline { display: grid; grid-template-columns: 1fr 150px; gap: 10px; }
.channel-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.industry-app-card { min-height: 180px; }
.industry-app-card .industry-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.industry-app-card .industry-status h3 { margin: 0 0 6px; }
.industry-app-card .industry-status p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 13px; }
.industry-app-card .industry-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.industry-app-card .industry-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 17px; }
.industry-app-card .industry-meta div { background: #f6f8fb; border-radius: 10px; padding: 12px; }
.industry-app-card .industry-meta strong, .industry-app-card .industry-meta span { display: block; }
.industry-app-card .industry-meta strong { font-size: 18px; color: var(--text); }
.industry-app-card .industry-meta span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.industry-help { margin-top: 16px; }
.industry-help h3 { margin: 0 0 15px; }
.industry-entry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.industry-entry-grid div { border: 1px solid var(--border); border-radius: 11px; padding: 14px; }
.industry-entry-grid strong, .industry-entry-grid span { display: block; }
.industry-entry-grid strong { margin-bottom: 7px; }
.industry-entry-grid span { color: var(--muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 720px) { .industry-app-card .industry-status { display: block; } .industry-app-card .industry-status .status-pill { display: inline-block; margin-top: 12px; } .industry-app-card .industry-meta, .industry-entry-grid { grid-template-columns: 1fr; } }
.callback-box { margin-top: 14px; padding: 12px; color: #4f6280; border-radius: 9px; background: #f7f9fd; font-size: 12px; line-height: 1.6; word-break: break-all; }
.callback-box code { color: #2e5cc8; }
.one-time { margin-top: 12px; padding: 12px; color: #795b00; border: 1px solid #ffe3a0; border-radius: 9px; background: #fff9e9; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.domain-verification { margin-top: 6px; padding: 14px; border: 1px solid #e1e8f5; border-radius: 10px; background: #fafcff; }
.domain-verification > strong { display: block; color: #43516c; font-size: 13px; }
.domain-verification > p { margin: 6px 0 11px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.domain-verification code { color: #2e5cc8; }
.verification-upload { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.verification-upload input { height: auto; padding: 8px; font-size: 12px; background: #fff; }
.verification-list { display: grid; gap: 8px; margin-top: 10px; }
.verification-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; background: #f1f5fc; }
.verification-item strong, .verification-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verification-item strong { color: #40506a; font-size: 12px; }
.verification-item small { max-width: 360px; margin-top: 3px; color: #7b8ba5; font-size: 10px; }
.verification-empty { color: #98a3b5; font-size: 11px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #edf0f5; white-space: nowrap; }
th { color: #7a879c; font-size: 11px; font-weight: 700; letter-spacing: .05em; }
td { color: #40506a; }
td .subline { display: block; margin-top: 4px; color: #98a3b5; font-size: 11px; }
.row-actions { display: flex; gap: 6px; }
.empty-row { padding: 32px 10px; color: #9aa5b7; text-align: center; }
.invite-result { margin: -6px 0 18px; padding: 14px 16px; color: #244eac; border: 1px solid #cbd9ff; border-radius: 10px; background: #f2f6ff; font-size: 13px; }
.invite-code { margin-left: 8px; color: #163e9e; font-size: 18px; font-weight: 800; letter-spacing: .12em; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(420px, calc(100vw - 48px)); padding: 12px 16px; color: #fff; border-radius: 10px; background: #18263f; box-shadow: 0 14px 30px rgba(14,25,48,.22); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #a52c36; }
@media (max-width: 900px) {
  .workspace { display: block; }
  .sidebar { width: 100%; padding: 15px 18px; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav-list { display: flex; overflow-x: auto; }
  .nav-item { width: auto; white-space: nowrap; }
  .sidebar-foot { display: none; }
  .content { padding: 28px 18px 44px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .topbar { padding: 0 16px; }
  .operator-name { display: none; }
  .login-card { padding: 30px 24px; }
  .two-column, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full, .form-actions { grid-column: auto; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 23px; }
  .channel-form .inline { grid-template-columns: 1fr; }
}
