:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #142033;
  --muted: #6f7b8d;
  --line: #e5e9ef;
  --nav: #101a2b;
  --nav-soft: #1a273c;
  --blue: #2864dc;
  --blue-dark: #1d4fb7;
  --green: #188663;
  --green-soft: #eaf7f1;
  --red: #c44248;
  --red-soft: #fff0f0;
  --amber: #b77717;
  --violet: #7357c7;
  --shadow: 0 10px 32px rgba(24, 39, 62, .07);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
code {
  padding: 2px 7px;
  border-radius: 6px;
  color: #33415a;
  background: #eef2f7;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: 250px;
  flex-direction: column;
  padding: 28px 18px 22px;
  color: #c9d2e1;
  background: var(--nav);
  border-right: 1px solid rgba(255,255,255,.05);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 30px; color: #fff; }
.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #4f82eb, #2456c7);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(45, 100, 220, .32);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
}
.brand strong { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.brand small, .admin-chip small { display: block; margin-top: 2px; color: #78869d; font-size: 9px; letter-spacing: .13em; }
.nav-list { display: grid; gap: 6px; }
.nav-list a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  border-radius: 10px;
  color: #9daabd;
  font-weight: 600;
  transition: .18s ease;
}
.nav-list a span { display: inline-grid; width: 22px; place-items: center; color: #7f8da4; font-size: 17px; }
.nav-list a:hover { color: #fff; background: rgba(255,255,255,.045); }
.nav-list a.active { color: #fff; background: var(--nav-soft); box-shadow: inset 3px 0 0 #5b8af0; }
.nav-list a.active span { color: #78a0f4; }
.sidebar-footer { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid rgba(255,255,255,.08); }
.admin-chip { display: flex; align-items: center; gap: 10px; }
.admin-chip b { display: block; color: #dce3ee; font-size: 12px; }
.avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: #34445f;
  border-radius: 50%;
  font-weight: 700;
}
.link-button { padding: 9px 0 0 46px; color: #78869d; background: none; border: 0; font-size: 12px; }
.link-button:hover { color: #fff; }

.main { width: calc(100% - 250px); min-width: 0; margin-left: 250px; }
.topbar {
  display: flex;
  height: 92px;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background: rgba(255,255,255,.91);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar h1 { margin: 2px 0 0; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.eyebrow { margin: 0; color: #8490a3; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.health-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: #516077; background: #f6f8fb; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; }
.health-pill span { width: 7px; height: 7px; background: #25a779; border-radius: 50%; box-shadow: 0 0 0 4px #dff4ec; }
.menu-button { display: none; background: transparent; border: 0; font-size: 22px; }
.content { max-width: 1500px; margin: auto; padding: 30px 36px 50px; }

.flash { margin-bottom: 20px; padding: 12px 15px; border: 1px solid; border-radius: 10px; font-weight: 600; }
.flash-success { color: #176b52; background: #ebf8f2; border-color: #ccecdf; }
.flash-error { color: #a63b40; background: #fff1f1; border-color: #f3d2d3; }
.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 19px 22px;
  color: #225f50;
  background: linear-gradient(100deg, #eaf7f2, #f4fbf8);
  border: 1px solid #cee9de;
  border-radius: var(--radius);
}
.status-banner > div { display: flex; align-items: center; gap: 14px; }
.status-banner h2 { margin: 0; font-size: 14px; }
.status-banner p { margin: 2px 0 0; color: #5f7c74; font-size: 12px; }
.status-icon { display: inline-grid; width: 34px; height: 34px; place-items: center; color: #fff; background: var(--green); border-radius: 50%; font-weight: 800; }
.status-banner.status-down { color: #8d3c41; background: var(--red-soft); border-color: #f0d2d4; }
.status-down .status-icon { background: var(--red); }
.status-down p { color: #8b6568; }

.button {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  color: #3c4b61;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 700;
  transition: .15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 5px 15px rgba(25, 44, 73, .08); }
.button.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button.primary:hover { background: var(--blue-dark); }
.button.subtle { background: rgba(255,255,255,.72); }
.button.danger { color: #fff; background: var(--red); border-color: var(--red); }
.button.wide { width: 100%; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
  display: flex;
  min-height: 130px;
  align-items: center;
  gap: 16px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat-symbol { display: inline-grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; font-size: 20px; }
.stat-symbol.blue { color: var(--blue); background: #edf3ff; }
.stat-symbol.green { color: var(--green); background: #eaf8f2; }
.stat-symbol.amber { color: var(--amber); background: #fff7e9; }
.stat-symbol.violet { color: var(--violet); background: #f2effc; }
.stat-card p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-card strong { display: block; margin: 1px 0 -1px; font-size: 29px; letter-spacing: -.04em; }
.stat-card small { color: #a0a8b5; font-size: 10px; }

.two-column { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; min-height: 77px; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2, .section-head h2 { margin: 2px 0 0; font-size: 16px; letter-spacing: -.015em; }
.panel-head > a { color: var(--blue); font-size: 12px; font-weight: 700; }
.panel-head.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 12px; }

.user-list { padding: 6px 10px 12px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid #eef1f5; border-radius: 9px; transition: .15s; }
.user-row:last-child { border-bottom: 0; }
.user-row:hover { background: #f7f9fc; }
.avatar-soft { color: #45639a; background: #edf2fb; }
.user-main { min-width: 0; flex: 1; }
.user-main b, .table-user b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.user-main small, .table-user small { display: block; color: var(--muted); font-size: 11px; }
.user-meta { text-align: right; }
.user-meta b { display: block; font-size: 12px; }
.user-meta small { color: #9ca5b2; font-size: 9px; }
.status-dot { width: 8px; height: 8px; margin-left: 4px; background: #2cab80; border-radius: 50%; }
.status-dot.blocked { background: #d65b60; }
.audit-list { padding: 11px 22px 14px; }
.audit-row { position: relative; display: flex; min-height: 67px; gap: 13px; }
.audit-line { position: relative; width: 9px; flex: 0 0 auto; }
.audit-line::before { position: absolute; z-index: 1; top: 7px; left: 1px; width: 7px; height: 7px; content: ""; background: #7094df; border: 2px solid #e5ecfa; border-radius: 50%; }
.audit-line::after { position: absolute; top: 17px; bottom: -4px; left: 4px; width: 1px; content: ""; background: #e5e9ef; }
.audit-row:last-child .audit-line::after { display: none; }
.audit-row b { font-size: 12px; }
.audit-row p { margin: 0; color: var(--muted); font-size: 10px; }
.audit-row small { color: #9da6b3; font-size: 9px; }
.empty { display: grid; min-height: 220px; place-items: center; align-content: center; color: #9ca7b5; }
.empty span { font-size: 30px; }
.empty p { margin: 6px 0 0; }

.filter-form { display: flex; align-items: center; gap: 8px; }
input, textarea, select {
  width: 100%;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  outline: none;
  transition: .15s;
}
input:focus, textarea:focus, select:focus { border-color: #7ba0ea; box-shadow: 0 0 0 3px #edf3ff; }
textarea { resize: vertical; }
.filter-form input { width: min(330px, 42vw); }
.filter-form select { width: 120px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 12px 17px; color: #8490a0; background: #f8fafc; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 17px; border-bottom: 1px solid #edf0f4; color: #4e5b6d; font-size: 12px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
.table-user { display: flex; min-width: 180px; align-items: center; gap: 10px; color: var(--ink); }
.table-user .avatar { width: 34px; height: 34px; }
.clip { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-link { color: var(--blue); font-weight: 700; white-space: nowrap; }
.badge { display: inline-flex; padding: 4px 8px; color: #526177; background: #eff2f6; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge-success { color: #187359; background: var(--green-soft); }
.badge-danger { color: #ad4247; background: var(--red-soft); }
.detail-cell { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.back-link { display: inline-block; margin: -5px 0 15px; color: var(--blue); font-size: 12px; font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-card { padding-bottom: 20px; }
.profile-top { position: relative; padding: 25px 22px 21px; text-align: center; border-bottom: 1px solid var(--line); }
.profile-top .badge { position: absolute; top: 18px; right: 18px; }
.avatar-xl { width: 64px; height: 64px; margin-bottom: 10px; color: #fff; background: linear-gradient(145deg, #668ddd, #365fad); font-size: 22px; box-shadow: 0 8px 20px rgba(51, 91, 170, .2); }
.profile-top h2 { margin: 0; font-size: 18px; }
.profile-top p { margin: 2px 0 0; color: var(--muted); }
.data-list { margin: 0; padding: 8px 22px; }
.data-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #eff2f5; }
.data-list > div:last-child { border-bottom: 0; }
.data-list dt { color: var(--muted); font-size: 11px; }
.data-list dd { margin: 0; text-align: right; font-size: 12px; font-weight: 700; }
.stack-form { display: grid; gap: 14px; }
.stack-form.compact { gap: 11px; padding: 18px 22px 2px; }
.stack-form label { display: grid; gap: 6px; color: #526074; font-size: 11px; font-weight: 700; }
.danger-zone { padding: 14px 22px 0; }
.danger-zone .button { width: 100%; }
.timeline-panel { min-width: 0; }
.message-timeline { padding: 20px 23px 25px; }
.message-item { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding-bottom: 18px; }
.message-item::after { position: absolute; top: 32px; bottom: -3px; left: 16px; width: 1px; content: ""; background: #e1e6ed; }
.message-item:last-child::after { display: none; }
.message-mark { z-index: 1; display: grid; width: 34px; height: 34px; place-items: center; color: var(--green); background: #e9f7f1; border: 4px solid #fff; border-radius: 50%; font-weight: 800; }
.message-item.outbound .message-mark { color: var(--blue); background: #eaf1ff; }
.message-card { padding: 13px 15px; background: #f8fafc; border: 1px solid #e9edf2; border-radius: 10px; }
.message-card > div { display: flex; align-items: center; gap: 9px; }
.message-card small { color: #8e98a8; font-size: 9px; }
.message-card p { margin: 10px 0 7px; color: #334157; white-space: pre-wrap; word-break: break-word; }
.message-card time { color: #99a2ae; font-size: 9px; }

.quick-grid { display: grid; grid-template-columns: minmax(300px, .68fr) minmax(420px, 1.32fr); gap: 22px; align-items: start; }
.quick-grid > .panel .stack-form { padding: 22px; }
.reply-column { display: grid; gap: 12px; }
.section-head { display: flex; align-items: end; justify-content: space-between; padding: 2px 2px 4px; }
.section-head > span { color: var(--muted); font-size: 11px; }
.reply-card { position: relative; padding: 18px 54px 18px 18px; }
.reply-card .stack-form { gap: 10px; }
.reply-title { display: flex; align-items: center; gap: 10px; }
.reply-title input { color: var(--ink); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 14px; font-weight: 800; }
.reply-title span { color: #a0a9b5; font-size: 10px; }
.reply-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inline-label { display: flex !important; width: 130px; grid-template-columns: auto 70px; align-items: center; gap: 8px; }
.inline-label input { width: 70px; }
.delete-form { position: absolute; top: 18px; right: 16px; }
.text-danger { color: var(--red); background: transparent; border: 0; font-size: 11px; }

.system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.wide-list { padding-top: 14px; padding-bottom: 14px; }
.wide-list > div { padding: 13px 0; }
.error-box, .info-box { margin: 4px 22px 22px; padding: 13px 15px; border-radius: 9px; }
.error-box { color: #973c41; background: var(--red-soft); border: 1px solid #f0d0d2; }
.info-box { color: #365d7f; background: #eff6fb; border: 1px solid #d9e9f5; }
.error-box b, .info-box b { font-size: 11px; }
.error-box p, .info-box p { margin: 3px 0 0; font-size: 11px; word-break: break-word; }

.login-body { min-height: 100vh; background: var(--nav); }
.login-wrap { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 1fr) minmax(460px, .8fr); }
.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 9vw;
  color: #fff;
  background:
    radial-gradient(circle at 82% 28%, rgba(63,112,214,.38), transparent 26%),
    radial-gradient(circle at 18% 85%, rgba(35,94,178,.27), transparent 28%),
    #101a2b;
}
.login-intro::after { position: absolute; width: 520px; height: 520px; right: -260px; bottom: -270px; content: ""; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.018), 0 0 0 140px rgba(255,255,255,.012); }
.login-brand { position: absolute; top: 45px; left: 9vw; display: flex; align-items: center; gap: 12px; }
.login-intro > .eyebrow { color: #7697d2; }
.login-intro h1 { margin: 14px 0 20px; font-family: Georgia, "Songti SC", serif; font-size: clamp(38px, 4.2vw, 67px); font-weight: 500; line-height: 1.18; letter-spacing: -.035em; }
.login-intro > p:not(.eyebrow) { max-width: 490px; color: #9eacc1; font-size: 15px; line-height: 1.8; }
.privacy-note { margin-top: 28px; color: #7f91aa; font-size: 11px; }
.privacy-note span { color: #69c9a6; }
.login-panel { display: grid; place-items: center; padding: 45px; background: #f4f6f9; }
.login-card { width: min(390px, 100%); padding: 38px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 65px rgba(17, 30, 50, .12); }
.login-card h2 { margin: 6px 0 4px; font-size: 24px; }
.login-card > .muted { margin: 0 0 24px; }
.login-card .stack-form { margin-top: 18px; }
.login-card input { padding: 12px; }
.login-card .button { margin-top: 5px; min-height: 45px; }
.login-foot { margin: 18px 0 0; color: #9aa3b0; font-size: 10px; text-align: center; }

.scrim { display: none; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 300px minmax(0, 1fr); }
  .login-wrap { grid-template-columns: 1fr 1fr; }
  .login-intro { padding: 7vw; }
  .login-brand { left: 7vw; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; z-index: 15; inset: 0; background: rgba(7,13,24,.45); }
  .scrim.open { display: block; }
  .main { width: 100%; margin-left: 0; }
  .menu-button { display: block; }
  .topbar { height: 80px; padding: 0 22px; }
  .content { padding: 22px; }
  .two-column, .detail-grid, .system-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .profile-card { max-width: none; }
  .login-wrap { display: block; background: #f4f6f9; }
  .login-intro { min-height: 350px; padding: 120px 35px 55px; }
  .login-brand { top: 30px; left: 35px; }
  .login-panel { padding: 35px 22px 60px; }
  .login-card { margin-top: -60px; }
}

@media (max-width: 600px) {
  .topbar { padding: 0 15px; }
  .topbar h1 { font-size: 19px; }
  .health-pill { padding: 7px 9px; font-size: 10px; }
  .content { padding: 16px 13px 35px; }
  .status-banner { align-items: flex-start; padding: 16px; }
  .status-banner > .button { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 112px; gap: 10px; padding: 15px; }
  .stat-symbol { width: 37px; height: 37px; }
  .stat-card strong { font-size: 24px; }
  .panel-head { padding: 16px; }
  .filter-form { width: 100%; flex-wrap: wrap; }
  .filter-form input { width: 100%; }
  .filter-form select { flex: 1; }
  .quick-grid { grid-template-columns: minmax(0, 1fr); }
  .reply-card { padding-right: 18px; padding-top: 43px; }
  .delete-form { top: 13px; }
  .login-intro { min-height: 320px; padding: 105px 25px 70px; }
  .login-intro h1 { font-size: 38px; }
  .login-intro > p:not(.eyebrow) { font-size: 13px; }
  .login-brand { left: 25px; }
  .login-card { padding: 28px 22px; }
}

/* Version 1.1 visual refinements */
body {
  background:
    radial-gradient(circle at 92% 3%, rgba(74, 123, 230, .08), transparent 24rem),
    linear-gradient(180deg, #f7f9fc 0, var(--bg) 32rem);
}
.sidebar {
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 4%, rgba(76, 126, 233, .24), transparent 15rem),
    linear-gradient(180deg, #101a2d 0%, #0b1424 100%);
}
.sidebar::after {
  position: absolute;
  right: -95px;
  bottom: 90px;
  width: 190px;
  height: 190px;
  content: "";
  border: 1px solid rgba(255, 255, 255, .035);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(255, 255, 255, .014), 0 0 0 84px rgba(255, 255, 255, .009);
  pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }
.brand-mark {
  background: linear-gradient(145deg, #69a1ff, #315ed3 66%, #634ad3);
  box-shadow: 0 10px 28px rgba(40, 91, 211, .38);
}
.nav-list a { border: 1px solid transparent; }
.nav-list a.active {
  background: linear-gradient(90deg, rgba(78, 127, 231, .22), rgba(78, 127, 231, .08));
  border-color: rgba(120, 160, 245, .12);
  box-shadow: inset 3px 0 0 #75a0ff, 0 8px 24px rgba(3, 10, 22, .15);
}
.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  height: 84px;
  box-shadow: 0 8px 30px rgba(25, 40, 65, .035);
}
.health-pill { box-shadow: 0 4px 12px rgba(28, 48, 75, .04); }
.health-pill.offline { color: #8b5b38; background: #fff8ee; border-color: #f0dfc6; }
.health-pill.offline span { background: #d28a30; box-shadow: 0 0 0 4px #faead3; }

.dashboard-hero {
  position: relative;
  display: flex;
  min-height: 210px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 34px 38px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 32%, rgba(121, 165, 255, .36), transparent 18rem),
    radial-gradient(circle at 22% 115%, rgba(85, 198, 169, .16), transparent 20rem),
    linear-gradient(125deg, #13223b, #1d3767 64%, #294d8f);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  box-shadow: 0 22px 50px rgba(22, 45, 88, .16);
}
.dashboard-hero::after {
  position: absolute;
  top: -120px;
  right: -65px;
  width: 330px;
  height: 330px;
  content: "";
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(255, 255, 255, .025), 0 0 0 104px rgba(255, 255, 255, .014);
}
.dashboard-hero > * { position: relative; z-index: 1; }
.hero-kicker { margin: 0 0 10px; color: #91b5ff; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.dashboard-hero h2 { max-width: 700px; margin: 0; font-size: clamp(23px, 2.2vw, 34px); line-height: 1.3; letter-spacing: -.035em; }
.dashboard-hero p:not(.hero-kicker) { max-width: 690px; margin: 13px 0 0; color: #b8c7df; font-size: 13px; }
.hero-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.button.glass { color: #fff; background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .18); }
.button.glass:hover { background: rgba(255, 255, 255, .15); }

.status-banner { box-shadow: 0 8px 26px rgba(24, 100, 78, .055); }
.stat-card {
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.stat-card::after {
  position: absolute;
  top: -45px;
  right: -45px;
  width: 100px;
  height: 100px;
  content: "";
  background: radial-gradient(circle, rgba(62, 105, 200, .07), transparent 68%);
  border-radius: 50%;
}
.stat-card:hover { transform: translateY(-3px); border-color: #d6deeb; box-shadow: 0 16px 38px rgba(24, 39, 62, .1); }
.panel { overflow: hidden; transition: border-color .18s ease, box-shadow .18s ease; }
.panel:hover { border-color: #dde3ec; box-shadow: 0 14px 38px rgba(24, 39, 62, .085); }
.panel-head { background: linear-gradient(180deg, #fff, #fcfdff); }
.avatar-soft { box-shadow: inset 0 0 0 1px rgba(62, 99, 170, .06); }
.user-row { margin-top: 2px; border-bottom-color: #f0f2f6; }
.user-row:hover { transform: translateX(2px); }
.empty { background: radial-gradient(circle at 50% 45%, #f6f8fb, transparent 11rem); }

@media (max-width: 860px) {
  .dashboard-hero { min-height: 240px; align-items: flex-start; flex-direction: column; padding: 28px; }
  .hero-actions { width: 100%; }
  .hero-actions .button { flex: 1; }
}

@media (max-width: 600px) {
  .dashboard-hero { min-height: 260px; padding: 24px 20px; border-radius: 17px; }
  .dashboard-hero h2 { font-size: 23px; }
  .hero-actions { flex-direction: column; }
  .stat-card { min-height: 122px; flex-direction: column; align-items: flex-start; }
}
/* Version 1.2 — bot experience studio */
.settings-hero {
  position: relative;
  display: flex;
  min-height: 185px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
  padding: 34px 38px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 78% 25%, rgba(86, 214, 169, .2), transparent 24%),
    linear-gradient(125deg, #0c1930 0%, #173a62 55%, #276780 100%);
  border: 1px solid rgba(89, 132, 190, .28);
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(16, 39, 70, .18);
}
.settings-hero::after {
  position: absolute;
  width: 270px;
  height: 270px;
  right: -45px;
  bottom: -165px;
  content: "";
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255,255,255,.025), 0 0 0 76px rgba(255,255,255,.018);
}
.settings-hero > * { position: relative; z-index: 1; }
.settings-hero h2 { max-width: 720px; margin: 0; font-size: clamp(24px, 2.3vw, 35px); line-height: 1.3; letter-spacing: -.04em; }
.settings-hero p:not(.hero-kicker) { max-width: 700px; margin: 12px 0 0; color: #b9cce0; font-size: 13px; line-height: 1.8; }
.settings-orb { display: grid; width: 84px; height: 84px; flex: 0 0 auto; place-items: center; color: #d7fff0; background: rgba(72, 193, 151, .15); border: 1px solid rgba(169, 239, 215, .24); border-radius: 26px; font-size: 34px; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.status-overview { margin-bottom: 20px; }
.status-panel, .security-panel { min-height: 286px; }
.shield-mark { display: grid; width: 31px; height: 31px; place-items: center; color: #fff; background: linear-gradient(145deg, #31b78a, #188263); border-radius: 10px; box-shadow: 0 7px 16px rgba(30, 145, 107, .2); }
.automation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; align-items: start; }
.automation-panel { overflow: visible; }
.settings-form { display: grid; }
.setting-section { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 25px 27px; border-bottom: 1px solid #edf0f5; }
.setting-section:hover { background: linear-gradient(90deg, #fbfcff, #fff); }
.setting-index { display: grid; width: 42px; height: 42px; place-items: center; color: #5680ce; background: #eef4ff; border: 1px solid #dfe9fb; border-radius: 13px; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.setting-fields { min-width: 0; }
.setting-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.setting-title h3 { margin: 0; color: #202d42; font-size: 14px; }
.setting-title p { margin: 4px 0 0; color: #8994a5; font-size: 11px; }
.setting-title > span { font-size: 23px; }
.setting-fields textarea { min-height: 86px; line-height: 1.7; resize: vertical; }
.setting-fields > input[type="url"] { width: 100%; }
.setting-split { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; }
.setting-split label { display: grid; align-content: start; gap: 7px; color: #526074; font-size: 11px; font-weight: 700; }
.setting-help { padding: 13px 15px; color: #627087; background: #f7f9fd; border: 1px solid #e5eaf2; border-radius: 11px; }
.setting-help b { color: #25334a; font-size: 12px; }
.setting-help p { margin: 5px 0 0; font-size: 11px; line-height: 1.65; }
.switch-control { display: flex; cursor: pointer; align-items: center; gap: 8px; color: #6f7d91; font-size: 10px; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-control span { position: relative; width: 38px; height: 21px; background: #d8dee8; border-radius: 999px; transition: .2s; }
.switch-control span::after { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; content: ""; background: #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(30, 44, 65, .2); transition: .2s; }
.switch-control input:checked + span { background: #28a67c; }
.switch-control input:checked + span::after { transform: translateX(17px); }
.settings-submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 27px; background: #f8fafc; border-radius: 0 0 var(--radius) var(--radius); }
.settings-submit b { color: #2c3a50; font-size: 12px; }
.settings-submit p { margin: 3px 0 0; color: #8c97a7; font-size: 10px; }
.settings-submit .button { min-width: 166px; min-height: 43px; }
.chat-registry { position: sticky; top: 104px; }
.managed-chat-list { display: grid; padding: 9px 13px 15px; }
.managed-chat-row { display: flex; align-items: center; gap: 11px; padding: 12px 9px; border-bottom: 1px solid #eef1f5; }
.managed-chat-row:last-child { border-bottom: 0; }
.chat-type-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; background: #eef4fb; border-radius: 10px; }
.managed-chat-row b { display: block; overflow: hidden; color: #2d3b50; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.managed-chat-row small { display: block; margin-top: 2px; color: #98a2af; font-size: 9px; }
.compact-empty { min-height: 190px; padding: 25px; text-align: center; }
.compact-empty small { max-width: 230px; margin-top: 8px; color: #a0a9b6; font-size: 10px; line-height: 1.6; }
.registry-tip { margin-top: 0; }

@media (max-width: 1180px) {
  .automation-layout { grid-template-columns: 1fr; }
  .chat-registry { position: static; }
}
@media (max-width: 720px) {
  .settings-hero { min-height: 220px; align-items: flex-start; padding: 27px 22px; }
  .settings-orb { width: 54px; height: 54px; border-radius: 17px; font-size: 24px; }
  .setting-section { grid-template-columns: 1fr; padding: 21px 18px; }
  .setting-index { width: 35px; height: 35px; }
  .setting-split { grid-template-columns: 1fr; }
  .settings-submit { align-items: stretch; flex-direction: column; padding: 20px 18px; }
  .settings-submit .button { width: 100%; }
}