:root {
  --bg: #eef2e8;
  --panel: rgba(255, 255, 248, 0.92);
  --ink: #101510;
  --muted: #6f766c;
  --line: rgba(16, 21, 16, 0.12);
  --green: #1aad19;
  --lime: #b8ff3d;
  --orange: #ff7a1a;
  --danger: #c62828;
  font-family: "Trebuchet MS", "Noto Sans SC", Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html.admin-page-loading body,
html.admin-page-leaving body {
  opacity: 0;
  transform: translateY(8px) scale(0.995);
}

html.admin-page-ready body {
  opacity: 1;
  transform: translateY(0) scale(1);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 170ms;
  animation-timing-function: ease;
}

::view-transition-old(root) {
  animation-name: admin-fade-out;
}

::view-transition-new(root) {
  animation-name: admin-fade-in;
}

@keyframes admin-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(7px);
  }
}

@keyframes admin-fade-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(184, 255, 61, 0.72), transparent 28rem),
    radial-gradient(circle at 92% 8%, rgba(255, 122, 26, 0.22), transparent 24rem),
    linear-gradient(135deg, #f8faef, var(--bg));
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

.admin-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px;
}

body.is-authenticated .admin-shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto auto 1fr;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

body.is-authenticated .admin-hero {
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

body.is-authenticated h1 {
  font-size: clamp(1.8rem, 3vw, 3.2rem);
}

body.is-authenticated .admin-hero span {
  display: none;
}

.admin-hero span,
small {
  color: var(--muted);
}

.front-link,
button {
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  font-weight: 900;
  text-decoration: none;
}

.login-card,
.admin-loading-card {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(26, 40, 20, 0.14);
  padding: 22px;
  backdrop-filter: blur(14px);
}

body.auth-checking .login-card,
body.auth-checking .admin-tabs,
body.auth-checking .admin-grid,
body.is-authenticated .login-card,
body.is-authenticated .admin-loading-card,
body.login-required .admin-loading-card,
body.login-required .admin-tabs,
body.login-required .admin-grid {
  display: none;
}

body.login-required .login-card {
  display: grid;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 248, 0.66);
  padding: 7px;
  width: fit-content;
  box-shadow: 0 14px 40px rgba(26, 40, 20, 0.08);
  backdrop-filter: blur(14px);
}

body.is-authenticated .admin-tabs {
  margin-bottom: 16px;
}

.admin-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--ink);
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.admin-tab:hover {
  background: rgba(26, 173, 25, 0.1);
  transform: translateY(-1px);
}

.admin-tab.active {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(26, 173, 25, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  body,
  .admin-tab {
    transition: none;
  }

  html.admin-page-loading body,
  html.admin-page-leaving body,
  html.admin-page-ready body {
    opacity: 1;
    transform: none;
  }
}

.admin-page {
  min-width: 0;
}

.usage-page-card {
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(26, 40, 20, 0.12);
}

.usage-page-card .usage-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.usage-page {
  display: grid;
  gap: 16px;
}

.visitor-card {
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(26, 40, 20, 0.1);
}

.visitor-list {
  display: grid;
  gap: 8px;
}

.visitor-item {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
}

.visitor-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.visitor-main h4 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.visitor-main code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: 999px;
  background: rgba(16, 21, 16, 0.06);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.visitor-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.visitor-table-head,
.visitor-row-main {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(300px, 1.45fr) 110px minmax(150px, 0.9fr) 72px;
  gap: 12px;
  align-items: center;
}

.visitor-table-head {
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  color: var(--muted);
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 900;
}

.visitor-row {
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.visitor-row:last-child {
  border-bottom: 0;
}

.visitor-row-main {
  min-width: 0;
  padding: 11px 14px;
  list-style: none;
}

.visitor-row-main::-webkit-details-marker {
  display: none;
}

.visitor-row-main:hover {
  background: #f8fbff;
}

.visitor-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.visitor-identity b {
  font-size: 0.92rem;
}

.visitor-identity code {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-compact-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.visitor-compact-metrics .visitor-metric {
  border-radius: 4px;
  background: #f4f7fb;
  color: var(--muted);
  padding: 4px 7px;
  font-size: 0.76rem;
  font-weight: 900;
}

.visitor-compact-metrics .visitor-metric b {
  color: var(--ink);
  font-size: 0.9rem;
}

.visitor-time {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.visitor-toggle {
  justify-self: end;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--green);
  padding: 5px 8px;
  font-size: 0.74rem;
  font-weight: 900;
}

.visitor-toggle::after {
  content: " 展开";
}

.visitor-row[open] .visitor-toggle::after {
  content: " 收起";
}

.visitor-detail-body {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
  padding: 12px 14px 14px;
}

.visitor-meta {
  margin-bottom: 2px;
}

.visitor-page {
  display: grid;
  gap: 12px;
}

.visitor-head {
  align-items: flex-start;
}

.visitor-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 0.34fr) minmax(160px, 0.32fr);
  gap: 12px;
  align-items: end;
}

.visitor-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr));
  gap: 8px;
}

.visitor-summary span {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fbff;
  color: var(--muted);
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.visitor-summary strong {
  display: block;
  color: var(--ink);
  font-size: 1.06rem;
}

.visitor-agent {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: 4px;
  background: #f5f7fa;
  color: var(--ink);
  padding: 8px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.cost-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.cost-hint.warn {
  color: var(--orange);
}

.billing-panel,
.billing-item,
.client-log-panel,
.client-log-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.client-log-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 10px;
}

.client-log-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.client-log-item summary::-webkit-details-marker {
  display: none;
}

.client-log-item summary b,
.client-log-item summary small {
  display: block;
}

.client-log-item summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.billing-daily {
  grid-template-columns: repeat(7, minmax(90px, 1fr));
}

.billing-daily div {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fbff;
  padding: 8px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

body.is-authenticated .admin-grid {
  align-items: start;
  overflow: visible;
}

.bot-sidebar,
.bot-editor {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(26, 40, 20, 0.12);
  backdrop-filter: blur(14px);
}

.bot-sidebar {
  position: sticky;
  top: 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
}

body.is-authenticated .bot-sidebar {
  position: sticky;
  top: 16px;
}

.sidebar-head,
.editor-head,
.sticky-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-bot-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding-right: 2px;
}

body.is-authenticated .admin-bot-list {
  max-height: calc(100vh - 150px);
}

.admin-bot-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 14px;
  text-align: left;
}

.admin-bot-item.active {
  border-color: rgba(26, 173, 25, 0.7);
  background: linear-gradient(135deg, rgba(184, 255, 61, 0.5), rgba(255, 255, 255, 0.9));
  box-shadow: inset 0 0 0 1px rgba(26, 173, 25, 0.16);
}

.admin-bot-name {
  font-weight: 900;
}

.admin-bot-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.bot-editor {
  display: grid;
  grid-template-rows: none;
  gap: 16px;
  padding: 18px;
}

body.is-authenticated .bot-editor {
  max-height: none;
  overflow: visible;
  padding-bottom: 18px;
}

.form-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  padding: 16px;
}

.usage-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(184, 255, 61, 0.34), transparent 18rem),
    rgba(255, 255, 255, 0.78);
}

.usage-head,
.usage-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.usage-head button {
  background: var(--green);
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.usage-item {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.usage-item h4 {
  margin: 0;
  font-size: 1rem;
}

.status-pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.ok {
  background: rgba(26, 173, 25, 0.16);
  color: var(--green);
}

.status-pill.warn {
  background: rgba(255, 122, 26, 0.16);
  color: var(--orange);
}

.usage-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.visitor-item .usage-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.usage-metrics span,
.usage-mini span {
  border-radius: 14px;
  background: rgba(238, 242, 232, 0.92);
  color: var(--muted);
  padding: 9px 10px;
  font-size: 0.86rem;
  font-weight: 900;
}

.visitor-item .usage-metrics span {
  padding: 6px 9px;
  font-size: 0.8rem;
}

.visitor-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.visitor-metric b {
  color: var(--ink);
  font-size: 1rem;
}

.usage-metrics strong {
  display: block;
  color: var(--ink);
  font-size: 1.2rem;
}

.usage-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visitor-item .usage-mini {
  gap: 6px;
}

.visitor-item .usage-mini span {
  padding: 5px 8px;
  font-size: 0.76rem;
}

.usage-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.usage-block b {
  font-size: 0.9rem;
}

.usage-details {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.usage-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 14px;
  background: rgba(16, 21, 16, 0.06);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 0.84rem;
  font-weight: 900;
  list-style: none;
}

.usage-details summary::-webkit-details-marker {
  display: none;
}

.usage-details summary::after {
  content: "展开";
  border-radius: 999px;
  background: rgba(26, 173, 25, 0.14);
  color: var(--green);
  padding: 4px 8px;
  font-size: 0.74rem;
}

.usage-details[open] summary::after {
  content: "收起";
}

.usage-details summary small {
  margin-left: auto;
  color: var(--muted);
}

.usage-details .usage-block {
  padding-top: 8px;
}

.usage-kv {
  display: grid;
  gap: 6px;
  margin: 0;
}

.usage-kv div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.usage-kv dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.usage-kv dd {
  min-width: 0;
  margin: 0;
}

.usage-kv code,
.usage-link {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: 12px;
  background: rgba(16, 21, 16, 0.06);
  color: var(--ink);
  padding: 8px 9px;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.usage-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.usage-empty.error {
  color: var(--danger);
}

.field-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 13px 14px;
  font-weight: 700;
}

textarea {
  resize: vertical;
  line-height: 1.6;
  min-height: 110px;
}

textarea[readonly] {
  background: rgba(238, 242, 232, 0.92);
  color: rgba(16, 21, 16, 0.82);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(26, 173, 25, 0.12);
}

.voice-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.voice-picker select {
  min-width: 0;
}

.preview-btn {
  align-self: stretch;
  min-width: 74px;
  padding-inline: 14px;
  background: var(--green);
  color: #fff;
  white-space: nowrap;
}

.preview-btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

.preview-status {
  min-height: 1.2em;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.voice-provider-field[hidden] {
  display: none;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(184, 255, 61, 0.35);
  padding: 9px 12px;
  color: var(--ink);
}

.switch-row input {
  width: auto;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 248, 0.74), rgba(255, 255, 248, 0.96));
  margin: 0 -18px;
  padding: 14px 18px;
  backdrop-filter: blur(12px);
  z-index: 2;
}

.ghost-danger {
  background: rgba(198, 40, 40, 0.1);
  color: var(--danger);
}

body.baidu-analytics-style {
  --bg: #f3f6fb;
  --panel: #fff;
  --ink: #1f2d3d;
  --muted: #6b778c;
  --line: #e5e9f0;
  --green: #2f8cff;
  --lime: #d9ebff;
  --orange: #ff8f1f;
  --danger: #d93026;
  background: var(--bg);
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", sans-serif;
}

body.baidu-analytics-style .admin-shell {
  width: min(1280px, 100%);
  padding: 16px 20px 24px;
}

body.baidu-analytics-style .admin-hero {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  margin-bottom: 10px;
  padding: 14px 18px;
  box-shadow: none;
}

body.baidu-analytics-style .eyebrow {
  margin-bottom: 4px;
  color: var(--green);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

body.baidu-analytics-style h1 {
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.2;
  letter-spacing: 0;
}

body.baidu-analytics-style h2 {
  font-size: 1.06rem;
}

body.baidu-analytics-style h3 {
  font-size: 0.98rem;
}

body.baidu-analytics-style .admin-hero span,
body.baidu-analytics-style small {
  color: var(--muted);
  font-size: 0.82rem;
}

body.baidu-analytics-style .front-link,
body.baidu-analytics-style button {
  border-radius: 4px;
  background: var(--green);
  padding: 9px 14px;
  box-shadow: none;
  font-size: 0.88rem;
  font-weight: 800;
}

body.baidu-analytics-style .login-card,
body.baidu-analytics-style .admin-loading-card,
body.baidu-analytics-style .bot-sidebar,
body.baidu-analytics-style .bot-editor,
body.baidu-analytics-style .form-card {
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

body.baidu-analytics-style .login-card,
body.baidu-analytics-style .admin-loading-card {
  margin-top: 12px;
  padding: 20px;
}

body.baidu-analytics-style .admin-tabs {
  align-items: stretch;
  align-self: start;
  width: 100%;
  border-radius: 4px;
  background: #fff;
  gap: 0;
  margin-bottom: 12px;
  min-height: 0;
  padding: 0 12px;
  box-shadow: none;
  backdrop-filter: none;
}

body.baidu-analytics-style .admin-tab {
  flex: 0 0 auto;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  min-height: 42px;
}

body.baidu-analytics-style .admin-tab:hover {
  background: #f4f8ff;
  transform: none;
}

body.baidu-analytics-style .admin-tab.active {
  background: transparent;
  color: var(--green);
  border-bottom-color: var(--green);
  box-shadow: none;
}

body.baidu-analytics-style .admin-grid {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
}

body.baidu-analytics-style .bot-sidebar,
body.baidu-analytics-style .bot-editor {
  padding: 14px;
}

body.baidu-analytics-style .admin-bot-list {
  gap: 6px;
}

body.baidu-analytics-style .admin-bot-item {
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
}

body.baidu-analytics-style .admin-bot-item.active {
  border-color: var(--green);
  background: #f4f8ff;
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--green);
}

body.baidu-analytics-style .form-card {
  gap: 12px;
  padding: 14px;
}

body.baidu-analytics-style .usage-page {
  gap: 12px;
}

body.baidu-analytics-style .usage-page-card,
body.baidu-analytics-style .visitor-card {
  border-radius: 4px;
  box-shadow: none;
}

body.baidu-analytics-style .usage-card {
  background: #fff;
}

body.baidu-analytics-style .usage-head {
  border-bottom: 1px solid var(--line);
  margin: -14px -14px 0;
  padding: 13px 14px;
}

body.baidu-analytics-style .usage-grid {
  gap: 10px;
}

body.baidu-analytics-style .visitor-toolbar {
  border-bottom: 1px solid var(--line);
  margin: 0 -14px;
  padding: 0 14px 14px;
}

body.baidu-analytics-style .visitor-summary {
  margin-top: -2px;
}

body.baidu-analytics-style .usage-item {
  border-radius: 4px;
  background: #fff;
  padding: 12px;
}

body.baidu-analytics-style .status-pill {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.74rem;
}

body.baidu-analytics-style .status-pill.ok {
  background: #eef5ff;
  color: var(--green);
}

body.baidu-analytics-style .status-pill.warn {
  background: #fff5e8;
  color: var(--orange);
}

body.baidu-analytics-style .usage-metrics span,
body.baidu-analytics-style .usage-mini span {
  border-radius: 4px;
  background: #f5f7fa;
  padding: 7px 9px;
}

body.baidu-analytics-style input,
body.baidu-analytics-style select,
body.baidu-analytics-style textarea {
  border-radius: 4px;
  padding: 10px 12px;
}

body.baidu-analytics-style input:focus,
body.baidu-analytics-style select:focus,
body.baidu-analytics-style textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 140, 255, 0.12);
}

body.baidu-analytics-style .switch-row {
  border-radius: 4px;
  background: #eef5ff;
}

body.baidu-analytics-style .sticky-actions {
  background: #fff;
  margin: 0 -14px;
  padding: 12px 14px;
  backdrop-filter: none;
}

body.baidu-analytics-style .ghost-danger {
  background: #fff1f0;
  color: var(--danger);
}

@media (max-width: 820px) {
  .admin-shell {
    padding: 16px;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-tabs {
    width: 100%;
  }

  .admin-tab {
    flex: 1 1 130px;
    text-align: center;
  }

  .admin-grid,
  .field-grid.two,
  .usage-grid,
  .usage-metrics {
    grid-template-columns: 1fr;
  }

  .visitor-table {
    border-radius: 8px;
  }

  .visitor-table-head {
    display: none;
  }

  .visitor-row-main {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .visitor-toolbar,
  .visitor-summary {
    grid-template-columns: 1fr;
  }

  .visitor-toggle {
    justify-self: start;
  }

  body.baidu-analytics-style .admin-shell {
    padding: 12px;
  }

  body.baidu-analytics-style .admin-grid {
    grid-template-columns: 1fr;
  }

  body.baidu-analytics-style .admin-tabs {
    padding: 0;
  }

  body.baidu-analytics-style .admin-tab {
    flex: 1 1 50%;
  }

  .voice-picker {
    grid-template-columns: 1fr;
  }

  .bot-sidebar {
    position: static;
  }

  body.is-authenticated .admin-shell {
    height: auto;
  }

  body.is-authenticated .admin-grid {
    overflow: visible;
  }
}
