:root {
  --bg: #f5f7fc;
  --bg-accent:
    radial-gradient(circle at top left, rgba(126, 151, 244, 0.14), transparent 34%),
    radial-gradient(circle at top right, rgba(171, 207, 245, 0.12), transparent 32%),
    radial-gradient(circle at bottom center, rgba(189, 231, 229, 0.10), transparent 34%),
    linear-gradient(180deg, #fcfdff 0%, #f6f8fc 52%, #eff3f9 100%);
  --surface: rgba(255, 255, 255, 0.88);
  --surface-muted: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(245, 248, 253, 0.98) 100%);
  --line: rgba(182, 194, 217, 0.34);
  --line-strong: rgba(146, 162, 197, 0.44);
  --text: #1f2d4d;
  --muted: #71809a;
  --muted-soft: #95a4bf;
  --primary: #7b89f7;
  --primary-strong: #5d6ced;
  --primary-soft: rgba(123, 137, 247, 0.12);
  --primary-gradient: linear-gradient(135deg, #8b97ff 0%, #707cf3 55%, #5d6ced 100%);
  --success-bg: #eefaf5;
  --success-text: #24b67d;
  --warning-bg: #fff7e9;
  --warning-text: #eea11a;
  --danger-bg: #fff1f1;
  --danger-text: #ef5a5a;
  --neutral-bg: #f3f6fb;
  --neutral-text: #7c8ca8;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(103, 123, 174, 0.10);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-accent);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; }
code {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--neutral-bg);
  border: 1px solid var(--line);
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 22px 20px;
  border-right: 1px solid rgba(102, 137, 160, 0.12);
  background:
    linear-gradient(180deg, rgba(244, 249, 252, 0.98) 0%, rgba(237, 243, 247, 0.98) 100%),
    radial-gradient(circle at top, rgba(150, 177, 196, 0.18), transparent 42%);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.main-shell {
  padding: 24px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel-soft {
  background: var(--surface-muted);
}

.panel-dark {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
}

.brand-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 24px 18px 22px;
  margin-bottom: 10px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(241, 247, 251, 0.97) 52%, rgba(231, 239, 245, 0.98) 100%);
}

.brand-mark-wrap {
  width: 100%;
  display: grid;
  place-items: center;
}

.brand-mark {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(231, 239, 245, 0.98) 100%);
  border: 1px solid rgba(102, 137, 160, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 0 16px 34px rgba(70, 97, 120, 0.09);
}

.brand-mark svg {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 14px 26px rgba(70, 97, 120, 0.12));
}

.brand-copy {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.brand-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1.2;
  text-align: center;
}

.brand-subtitle {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-card p,
.sidebar-help p,
.topbar p,
.metric-card small,
.entity-card p,
.mini-row p,
.inline-tip,
.empty-state,
.log-meta,
.log-card time,
.guide-item p,
.notice-banner span,
.alert-banner,
.search-pill,
.info-card span {
  color: var(--muted);
}

.overline {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #6689a0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.overline-dark {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.82);
}

.sidebar-label {
  margin: 22px 6px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8fa4b3;
  font-weight: 700;
}

.sidebar-label.muted { margin-top: 0; }

.sidebar-block,
.sidebar-help {
  padding: 18px;
}

.sidebar-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sidebar-meta-grid span,
.detail-grid span,
.metric-label,
.form-grid label span {
  display: block;
  color: var(--muted-soft);
  font-size: 12px;
  margin-bottom: 8px;
}

.sidebar-meta-grid strong,
.detail-grid strong,
.metric-card strong {
  font-size: 18px;
  color: var(--text);
}

.nav-list {
  display: grid;
  gap: 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(102, 137, 160, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(241, 247, 251, 0.92) 100%);
  transition: 180ms ease;
  box-shadow: 0 10px 24px rgba(70, 97, 120, 0.05);
}

.nav-link:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 30px rgba(70, 97, 120, 0.08);
}

.nav-link.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(70, 97, 120, 0.16);
}

.nav-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  background: rgba(231, 239, 245, 0.96);
  color: #6689a0;
  font-size: 16px;
  font-weight: 700;
}

.nav-link.active .nav-icon {
  background: rgba(255,255,255,0.18);
  color: #ffffff;
}

.nav-title {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.nav-link.active .nav-sub { color: rgba(255,255,255,0.8); }
.nav-sub { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }

.sidebar-help { margin-top: 18px; }
.sidebar-help h3 { font-size: 18px; margin: 8px 0 10px; }
.sidebar-help p { line-height: 1.7; font-size: 14px; }

.topbar {
  padding: 24px 26px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.topbar h2 {
  margin-top: 10px;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.topbar p {
  margin-top: 12px;
  max-width: 720px;
  line-height: 1.7;
}

.topbar-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.search-pill {
  min-width: 240px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.alert-banner,
.notice-banner {
  margin-top: 0;
  margin-bottom: 16px;
  padding: 16px 20px;
  line-height: 1.7;
}

.notice-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-card,
.metric-card,
.alert-banner,
.notice-banner {
  background-clip: padding-box;
}

.metrics-grid {
  display: grid;
  gap: 16px;
  margin-top: 0;
}

.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-up { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.metric-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(244, 248, 255, 0.95) 48%, rgba(240, 251, 246, 0.95) 100%);
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-size: 38px;
  letter-spacing: -0.04em;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  line-height: 1.6;
}

.split-layout {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.account-page-grid { grid-template-columns: 0.94fr 1.06fr; }
.task-page-grid { grid-template-columns: 0.95fr 1.25fr; }
.task-layout-grid { align-items: start; }
.test-page-grid { grid-template-columns: 1fr 1fr; }

.section-card {
  padding: 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-head-wrap {
  flex-wrap: wrap;
}

.section-head h3 {
  margin-top: 10px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

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

.two-col-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-span { grid-column: 1 / -1; }
.hidden-field { display: none !important; }

label { display: block; }
input:not([type="hidden"]),
select,
textarea,
.input {
  width: 100%;
  max-width: none;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(111, 120, 134, 0.14);
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0 0 20px -18px rgba(86, 94, 108, 0.18);
  background: rgba(242, 248, 252, 0.94);
  color: var(--text);
}

input:not([type="hidden"]),
select {
  min-height: 46px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:not([type="hidden"]):hover,
select:hover,
textarea:hover,
.input:hover {
  border-color: rgba(111, 120, 134, 0.24);
  box-shadow: 0 0 20px -17px rgba(86, 94, 108, 0.22);
}

input:not([type="hidden"]):active,
select:active,
textarea:active,
.input:active {
  transform: scale(0.995);
}

input:not([type="hidden"]):focus,
select:focus,
textarea:focus,
.input:focus {
  border-color: rgba(111, 120, 134, 0.44);
  box-shadow: 0 0 0 4px rgba(111, 120, 134, 0.12);
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: var(--primary-gradient);
  color: #ffffff;
  cursor: pointer;
  transition: 180ms ease;
  box-shadow: 0 14px 28px rgba(69, 75, 85, 0.14);
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(69, 75, 85, 0.18);
}

button.secondary,
.secondary-link {
  background: rgba(239, 245, 249, 0.96);
  color: var(--text);
  border-color: rgba(111, 120, 134, 0.12);
  box-shadow: none;
}

button.danger {
  background: linear-gradient(135deg, #cfa7b0 0%, #b7838e 100%);
  color: #ffffff;
  border-color: transparent;
}

.inline-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-actions-stack {
  align-items: flex-start;
}

.inline-tip { font-size: 14px; line-height: 1.6; max-width: 560px; }

.chip,
.close-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

.chip-soft { background: rgba(243, 248, 255, 0.95); color: var(--neutral-text); border-color: rgba(111, 120, 134, 0.14); }
.chip-good { background: var(--success-bg); color: var(--success-text); border-color: #d4eee0; }
.chip-warn { background: var(--warning-bg); color: var(--warning-text); border-color: #f3dfba; }
.chip-bad { background: var(--danger-bg); color: var(--danger-text); border-color: #f7d5df; }
.chip-neutral { background: var(--neutral-bg); color: var(--neutral-text); border-color: rgba(111, 120, 134, 0.14); }

.stack-list,
.card-list,
.log-list,
.guide-list { display: grid; gap: 14px; }
.compact-list { gap: 12px; }

.mini-row,
.entity-card,
.info-card,
.guide-item,
.log-card {
  border: 1px solid var(--line);
  background: var(--surface-muted);
  border-radius: 20px;
}

.mini-row,
.guide-item,
.log-card,
.entity-card,
.info-card {
  padding: 16px;
}

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

.entity-top,
.log-top-row,
.action-row,
.chip-group {
  display: flex;
  gap: 10px;
}

.entity-top,
.log-top-row {
  justify-content: space-between;
  align-items: flex-start;
}

.entity-top-wrap { flex-wrap: wrap; }
.wrap-right { justify-content: flex-end; flex-wrap: wrap; }

.entity-card h4,
.guide-item strong,
.log-message {
  font-size: 18px;
}

.entity-card p,
.log-message,
.guide-item p {
  margin-top: 8px;
  line-height: 1.7;
}

.action-row {
  margin-top: 16px;
  flex-wrap: wrap;
}

.centered-submit-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.verify-action-row {
  justify-content: center;
}

.inline-form {
  margin: 0;
}

.account-list-stack {
  gap: 12px;
}

.account-card-row {
  background: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(240,247,252,0.94) 50%, rgba(231,239,245,0.94) 100%);
}

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

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

.detail-grid > div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.94);
  border: 1px solid var(--line);
}

.message-stack {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.message-line {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.94);
  border: 1px solid var(--line);
  line-height: 1.6;
}

.job-card {
  overflow: hidden;
}

.job-card h4,
.job-target,
.job-detail-grid strong,
.message-line {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.job-target {
  display: block;
}

.job-chip-group .chip {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.job-detail-grid > div {
  min-width: 0;
}

.error-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid #e3d8d4;
  line-height: 1.6;
}

.log-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(245, 249, 255, 0.96) 100%);
}

.log-meta {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

.level-error { border-left: 4px solid #b7838e; }
.level-warning { border-left: 4px solid #a88965; }
.level-success { border-left: 4px solid #6f8b7a; }
.level-info { border-left: 4px solid #7f8997; }

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-card { padding: 18px; }
.compact-card .chip { margin-top: 14px; }

.info-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.info-card strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.empty-state {
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(246, 248, 255, 0.92) 0%, rgba(240, 243, 255, 0.92) 100%);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(39, 64, 90, 0.2);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-panel {
  width: min(560px, calc(100vw - 40px));
  padding: 22px;
}

.modal-head { margin-bottom: 16px; }
.close-link {
  background: #ffffff;
  color: var(--text);
}

.narrow-card {
  max-width: 760px;
}

.sticky-card {
  position: sticky;
  top: 24px;
  align-self: start;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .three-up,
  .four-up,
  .account-page-grid,
  .task-page-grid,
  .test-page-grid,
  .compact-grid,
  .account-overview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sticky-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .main-shell,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .section-card,
  .metric-card,
  .brand-card,
  .sidebar-block,
  .sidebar-help {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar h2 {
    font-size: 30px;
  }

  .topbar-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .search-pill {
    width: 100%;
    min-width: 0;
  }

  .three-up,
  .four-up,
  .account-page-grid,
  .task-page-grid,
  .test-page-grid,
  .compact-grid,
  .account-overview-grid,
  .form-grid,
  .sidebar-meta-grid,
  .info-card,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .mini-row,
  .section-head,
  .entity-top,
  .entity-top-wrap,
  .log-top-row,
  .nav-link {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-card {
    padding-bottom: 12px;
  }
}

/* v7 overrides */
body {
  background:
    radial-gradient(circle at top left, rgba(205, 211, 220, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(219, 213, 206, 0.16), transparent 32%),
    radial-gradient(circle at bottom center, rgba(191, 201, 214, 0.16), transparent 30%),
    linear-gradient(180deg, #f8fbfd 0%, #eef4f7 52%, #e8f0f5 100%);
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 16px;
}

.sidebar-main,
.sidebar-footer {
  display: grid;
  gap: 14px;
}

.brand-card {
  gap: 10px;
  padding: 18px 16px 16px;
  min-height: auto;
}

.brand-mark {
  width: 86px;
  height: 86px;
  border-radius: 26px;
}

.brand-mark svg {
  width: 64px;
  height: 64px;
}

.brand-title {
  font-size: 20px;
}

.sidebar-label {
  margin: 10px 6px 8px;
}

.nav-list {
  gap: 8px;
}

.nav-link {
  padding: 12px 14px;
  border-radius: 18px;
  gap: 10px;
}

.nav-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 12px;
  font-size: 14px;
}

.nav-title {
  margin-bottom: 2px;
}

.nav-sub {
  font-size: 12px;
  line-height: 1.35;
}

.sidebar-user {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-user strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.logout-button {
  min-height: 42px;
  padding: 0 14px;
}

.metrics-grid {
  gap: 12px;
}

.compact-metrics-grid {
  margin-bottom: 4px;
}

.compact-metric-card,
.metric-card {
  padding: 16px 18px;
  border-radius: 22px;
}

.compact-metric-card strong,
.metric-card strong {
  margin-top: 2px;
  font-size: 31px;
}

.compact-metric-card small,
.metric-card small {
  margin-top: 4px;
  line-height: 1.5;
}

.section-card {
  padding: 20px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h3 {
  margin-top: 8px;
}

.section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.icon-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 16px;
  font-size: 24px;
  line-height: 1;
}

.add-account-button {
  margin-left: 6px;
}

.account-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: stretch;
  align-items: stretch;
  gap: 14px;
}

.account-card-tile {
  background: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(241,247,251,0.95) 50%, rgba(233,242,248,0.96) 100%);
}

.account-meta-row {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.account-card-tile .action-row {
  margin-top: 14px;
}

.account-card-tile .action-row form {
  flex: 1 1 140px;
}

.account-card-tile .action-row button {
  width: 100%;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(39, 64, 90, 0.26);
  z-index: 50;
}

.modal-backdrop.open {
  display: grid;
}

.modal-panel {
  width: min(560px, calc(100vw - 40px));
  padding: 22px;
}

.close-link {
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
}

.toast-stack {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 10px;
  z-index: 120;
  width: min(92vw, 520px);
}

.toast {
  padding: 14px 18px;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(71, 97, 146, 0.18);
  border: 1px solid rgba(126, 153, 214, 0.16);
  backdrop-filter: blur(16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-success {
  background: rgba(237, 249, 242, 0.96);
  color: #1f7d58;
}

.toast-error {
  background: rgba(255, 240, 245, 0.97);
  color: #bd4777;
}

.toast-warning {
  background: rgba(255, 247, 230, 0.97);
  color: #a56d14;
}

.toast-info {
  background: rgba(239, 244, 255, 0.97);
  color: #4a6898;
}

.toast-hide {
  opacity: 0;
  transform: translateY(-6px);
}

.footer-link {
  margin-top: auto;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(100%, 920px);
}

.login-card {
  padding: 28px;
}

.login-brand {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.login-brand h1 {
  margin-top: 10px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.login-brand p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.login-form {
  max-width: 420px;
}

.full-width {
  width: 100%;
}

.login-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.6;
}

.security-card {
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .sidebar {
    display: grid;
    gap: 14px;
    justify-content: stretch;
  }

  .sidebar-user {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .section-actions,
  .account-meta-row,
  .sidebar-user {
    justify-content: flex-start;
  }

  .login-brand {
    grid-template-columns: 1fr;
  }

  .icon-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }
}


/* v10 login + footer refinements */
.login-shell {
  width: min(100%, 520px);
}

.login-card {
  padding: 38px 34px 34px;
}

.login-brand-simple {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 16px;
  margin-bottom: 28px;
}

.login-brand-mark {
  width: 104px;
  height: 104px;
  border-radius: 30px;
}

.login-brand-simple h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.centered-form {
  max-width: 100%;
}

.sidebar {
  overflow-y: auto;
}

.sidebar-main {
  min-height: 0;
}

.sidebar-footer {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding-top: 4px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0) 0%, rgba(242, 250, 250, 0.92) 18%, rgba(242, 250, 250, 0.98) 100%);
}

.footer-menu {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
}

.footer-user-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 2px;
}

.footer-user-meta strong {
  font-size: 15px;
}

.footer-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(102, 137, 160, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(245, 242, 238, 0.92) 100%);
  box-shadow: 0 8px 18px rgba(69, 75, 85, 0.04);
  transition: 180ms ease;
}

.footer-menu-item:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 24px rgba(69, 75, 85, 0.07);
}

.footer-menu-item.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
}

.footer-menu-item.active .nav-icon {
  background: rgba(255,255,255,0.18);
  color: #ffffff;
}

.footer-menu-form {
  margin: 0;
}

.footer-button {
  cursor: pointer;
  color: var(--text);
}

.footer-button .nav-sub,
.footer-button .nav-title {
  text-align: left;
}

.footer-button .nav-icon {
  border: none;
}

@media (max-width: 760px) {
  .login-card {
    padding: 30px 22px 24px;
  }

  .login-brand-simple h1 {
    font-size: 28px;
  }
}


/* v11 compact footer, mobile layout, centered login */
.nav-list {
  gap: 7px;
}

.nav-link {
  padding: 10px 12px;
  gap: 10px;
  border-radius: 16px;
}

.nav-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 10px;
  font-size: 13px;
}

.nav-title {
  font-size: 14px;
  margin-bottom: 1px;
}

.nav-sub {
  font-size: 11px;
  line-height: 1.28;
}

.sidebar-footer {
  position: relative;
  bottom: auto;
  margin-top: auto;
  padding-top: 8px;
  background: none;
}

.account-fab-wrap {
  position: relative;
}

.account-fab {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  font-size: 18px;
  box-shadow: 0 12px 28px rgba(70, 162, 176, 0.2);
}

.account-submenu {
  position: absolute;
  left: 0;
  bottom: 56px;
  display: none;
  min-width: 158px;
  padding: 8px;
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(69, 75, 85, 0.12);
  z-index: 40;
}

.account-fab-wrap.open .account-submenu {
  display: grid;
  gap: 6px;
}

.account-submenu-user {
  padding: 4px 6px 10px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid rgba(111, 120, 134, 0.12);
  margin-bottom: 2px;
}

.account-submenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text);
  transition: 160ms ease;
}

.account-submenu-item:hover {
  background: rgba(243, 248, 255, 0.95);
}

.account-submenu-item.active {
  background: var(--primary-gradient);
  color: #ffffff;
}

.account-submenu-form {
  margin: 0;
}

.account-submenu-button {
  justify-content: flex-start;
  min-height: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.account-submenu-button:hover {
  transform: none;
  box-shadow: none;
}

.mini-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(231, 239, 245, 0.96);
  color: #6689a0;
  font-size: 12px;
  font-weight: 700;
}

.account-submenu-item.active .mini-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.toast-stack {
  width: auto;
  max-width: calc(100vw - 24px);
  justify-items: center;
  padding: 0 12px;
}

.toast {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  max-width: min(88vw, 380px);
  padding: 9px 13px;
  border-radius: 12px;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
}

.login-shell {
  width: min(100%, 420px);
  display: grid;
  place-items: center;
}

.login-card {
  width: 100%;
}

.centered-form {
  justify-items: center;
}

.centered-form > label,
.centered-form > .login-actions {
  width: 100%;
}

.login-actions {
  display: flex;
  justify-content: center;
}

.login-submit {
  width: min(100%, 240px);
}

@media (max-width: 760px) {
  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    padding: 12px;
    gap: 12px;
  }

  .brand-card {
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: center;
    text-align: left;
    gap: 12px;
    padding: 14px;
  }

  .brand-mark-wrap {
    width: auto;
  }

  .brand-mark {
    width: 56px;
    height: 56px;
    padding: 8px;
    border-radius: 18px;
  }

  .brand-mark svg {
    width: 40px;
    height: 40px;
  }

  .brand-copy {
    justify-items: start;
    gap: 2px;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    display: none;
  }

  .sidebar-label {
    margin: 6px 4px 2px;
  }

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

  .nav-link {
    min-height: 74px;
    padding: 10px 12px;
    align-items: center;
  }

  .nav-sub {
    display: none;
  }

  .main-shell {
    padding: 12px;
  }

  .section-card,
  .metric-card,
  .topbar {
    padding: 16px;
    border-radius: 18px;
  }

  .compact-metric-card strong,
  .metric-card strong {
    font-size: 28px;
  }

  .section-head {
    gap: 12px;
  }

  .section-actions {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .account-card-grid,
  .card-list,
  .jobs-list,
  .log-list {
    grid-template-columns: 1fr;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .action-row form,
  .action-row button,
  .action-row a {
    width: 100%;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .chip-group {
    flex-wrap: wrap;
  }

  .job-chip-group {
    width: 100%;
    justify-content: flex-start;
  }

  .job-chip-group .chip {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .job-action-row button {
    white-space: normal;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 18px;
    border-radius: 20px;
  }

  .toast-stack {
    top: 12px;
  }

  .sidebar-footer {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 80;
    margin-top: 0;
    padding-top: 0;
  }

  .account-submenu {
    left: auto;
    right: 0;
    bottom: 56px;
  }

  .login-card {
    padding: 28px 20px 24px;
  }

  .login-submit {
    width: 100%;
  }
}


/* v12 refinements */
.sidebar {
  padding: 18px 18px 16px;
}

.brand-card {
  gap: 8px;
  padding: 14px 14px 12px;
  border-radius: 22px;
}

.brand-mark {
  width: 64px;
  height: 64px;
  padding: 7px;
  border-radius: 20px;
}

.brand-mark svg {
  width: 46px;
  height: 46px;
}

.brand-copy {
  gap: 3px;
}

.brand-title {
  font-size: 17px;
}

.brand-subtitle {
  font-size: 11px;
  letter-spacing: 0.12em;
}

.sidebar-label {
  margin: 10px 6px 10px;
}

.nav-list {
  gap: 10px;
}

.nav-link {
  padding: 16px;
  gap: 12px;
  border-radius: 20px;
}

.nav-icon {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 14px;
  font-size: 16px;
}

.nav-title {
  margin-bottom: 6px;
}

.nav-sub {
  font-size: 13px;
  line-height: 1.5;
}

.sidebar-footer {
  position: sticky;
  bottom: 0;
  justify-items: start;
  background: linear-gradient(180deg, rgba(246,250,255,0) 0%, rgba(242,249,251,0.88) 18%, rgba(242,249,251,0.96) 100%);
  padding-top: 8px;
}

.account-fab-wrap {
  position: relative;
}

.account-fab {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 999px;
  font-size: 18px;
  box-shadow: 0 10px 22px rgba(86, 166, 179, 0.22);
}

.account-submenu {
  min-width: 172px;
  right: auto;
  left: 0;
  bottom: calc(100% + 10px);
  padding: 10px;
  border-radius: 18px;
}

.account-submenu-user {
  font-size: 12px;
  padding: 0 4px 6px;
}

.account-submenu-item,
.account-submenu-button {
  min-height: 40px;
  border-radius: 12px;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 46px;
  background-image:
    linear-gradient(180deg, rgba(244, 249, 252, 0.98) 0%, rgba(237, 243, 247, 0.98) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5.25L7 9.25L11 5.25' stroke='%23687faa' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, calc(100% - 16px) 50%;
  background-size: 100% 100%, 14px 14px;
}

select:focus {
  background-image:
    linear-gradient(180deg, rgba(244, 249, 252, 1) 0%, rgba(237, 243, 247, 1) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5.25L7 9.25L11 5.25' stroke='%2354b7d7' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

select::-ms-expand {
  display: none;
}

select option {
  color: var(--text);
  background: #f3f8fb;
}

.modal-form > .modal-submit-row,
.modal-submit-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 4px;
}

.modal-submit-button {
  min-width: 160px;
}

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

.login-actions {
  width: 100%;
  display: flex;
  justify-content: center !important;
  align-items: center;
}

.login-submit {
  display: inline-flex;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .brand-card {
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
    text-align: left;
    padding: 12px;
    gap: 10px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .brand-mark svg {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    display: none;
  }

  .nav-link {
    padding: 12px;
    min-height: 74px;
  }

  .account-submenu {
    left: auto;
    right: 0;
    min-width: 164px;
  }

  .account-manage-grid {
    grid-template-columns: 1fr;
  }

  .align-left-on-mobile {
    justify-content: center;
  }
}


.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--primary-gradient);
  box-shadow: 0 4px 12px rgba(69, 75, 85, 0.18);
  z-index: 200;
  opacity: 0;
  transition: width 0.28s ease, opacity 0.2s ease;
}

.page-progress.active {
  width: 100%;
  opacity: 1;
}

.clear-log-button {
  min-height: 40px;
  padding: 0 16px;
}

.form-grid > button:last-child:not(.icon-button):not(.account-fab),
.form-grid > .centered-submit-row:last-child {
  justify-self: center;
}

/* v14 custom select + account scroll preserve support */
select.native-select {
  display: none;
}

.custom-select-shell {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 12px 48px 12px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(111, 120, 134, 0.14);
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0 0 20px -18px rgba(86, 94, 108, 0.18);
  background:
    linear-gradient(180deg, rgba(244, 249, 252, 0.98) 0%, rgba(237, 243, 247, 0.98) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5.25L7 9.25L11 5.25' stroke='%23687faa' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, calc(100% - 16px) 50%;
  background-size: 100% 100%, 14px 14px;
  color: var(--text);
  font: inherit;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.custom-select-trigger:hover {
  border-color: rgba(111, 120, 134, 0.24);
  box-shadow: 0 0 20px -17px rgba(86, 94, 108, 0.22);
  transform: translateY(-1px);
}

.custom-select-trigger:focus,
.custom-select-shell.open .custom-select-trigger {
  border-color: rgba(111, 120, 134, 0.44);
  box-shadow: 0 0 0 4px rgba(111, 120, 134, 0.12);
}

.custom-select-label {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.custom-select-shell.open .custom-select-trigger {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(111, 120, 134, 0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(240,247,252,0.98) 55%, rgba(235, 243, 248, 0.98) 100%);
  box-shadow: 0 20px 40px rgba(69, 75, 85, 0.12);
  backdrop-filter: blur(18px);
  z-index: 60;
}

.custom-select-shell.open .custom-select-menu {
  display: grid;
  gap: 6px;
}

.custom-select-option {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 500;
  text-align: center;
  box-shadow: none;
}

.custom-select-option:hover,
.custom-select-option:focus {
  background: rgba(102, 137, 160, 0.1);
  border-color: rgba(102, 137, 160, 0.18);
  box-shadow: none;
  transform: none;
}

.custom-select-option.selected {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #ffffff;
}

.custom-select-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.custom-select-shell.is-disabled .custom-select-trigger {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .custom-select-menu {
    max-height: 220px;
  }
}


/* v20 task creator redesign */
.task-workbench,
.task-list-panel {
  margin-top: 0;
}

.task-layout-grid .task-create-panel {
  position: sticky;
  top: 24px;
}

.task-layout-grid .task-list-panel {
  min-width: 0;
}

.task-create-panel {
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(242,247,252,0.97) 54%, rgba(235,240,246,0.98) 100%),
    radial-gradient(circle at top right, rgba(150, 177, 196, 0.14), transparent 28%);
}

.task-create-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.task-create-head h3 {
  margin-top: 10px;
  font-size: 34px;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.task-create-head p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.task-create-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.task-builder-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.task-field-card,
.task-message-card {
  display: block;
  padding: 16px 16px 14px;
  border-radius: 22px;
  border: 1px solid rgba(111, 120, 134, 0.14);
  background: linear-gradient(180deg, rgba(252,254,255,0.94) 0%, rgba(239, 245, 249, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.task-field-card.hidden-field {
  display: none !important;
}

.task-field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.task-builder-form .task-field-card input:not([type="hidden"]),
.task-builder-form .task-field-card .custom-select-trigger,
.task-builder-form .task-field-card .input,
.task-builder-form .task-field-card select {
  min-height: 54px;
  height: 54px;
  padding: 0 18px;
  border-radius: 18px;
  background: rgba(242, 248, 252, 0.96);
  border: 1.5px solid rgba(111, 120, 134, 0.14);
  box-shadow: none;
}

.task-builder-form .task-field-card input:not([type="hidden"]):focus,
.task-builder-form .task-field-card .custom-select-trigger:focus,
.task-builder-form .task-field-card .custom-select-shell.open .custom-select-trigger,
.task-builder-form .task-field-card textarea:focus {
  box-shadow: 0 0 0 4px rgba(111, 120, 134, 0.1);
}

.task-builder-form .task-field-card .custom-select-trigger {
  justify-content: flex-start;
  padding-right: 48px;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
}

.task-builder-form .task-field-card .custom-select-label {
  text-align: left;
}

.task-builder-form .task-field-card input:not([type="hidden"]),
.task-builder-form .task-field-card input[type="datetime-local"] {
  font-size: 16px;
  font-weight: 600;
}

.task-builder-form .task-message-card {
  padding: 18px;
}

.task-builder-form .task-message-card textarea {
  min-height: 180px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(242, 248, 252, 0.96);
  border: 1.5px solid rgba(111, 120, 134, 0.14);
  box-shadow: none;
}

.task-builder-actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.task-builder-actions button {
  min-width: 180px;
}

@media (max-width: 980px) {
  .task-layout-grid {
    grid-template-columns: 1fr;
  }

  .task-layout-grid .task-create-panel {
    position: static;
  }

  .task-create-head {
    flex-direction: column;
  }

  .task-create-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .task-create-panel {
    padding: 20px;
  }

  .task-create-head h3 {
    font-size: 28px;
  }

  .task-builder-form {
    grid-template-columns: 1fr;
  }
}


/* v21 elegant neutral refinement */
.overline {
  color: var(--primary-strong);
}

.panel-dark {
  box-shadow: 0 18px 36px rgba(69, 75, 85, 0.14);
}

.custom-select-trigger,
.task-builder-form .task-field-card .custom-select-trigger,
.task-builder-form .task-field-card input:not([type="hidden"]),
.task-builder-form .task-field-card select,
.task-builder-form .task-message-card textarea,
input:not([type="hidden"]),
select,
textarea,
.input {
  background-image: none;
}

.test-send-form .task-field-card,
.test-send-form .task-message-card {
  background: linear-gradient(180deg, rgba(248, 252, 254, 0.96) 0%, rgba(239, 245, 249, 0.98) 100%);
}

.task-create-head-simple {
  margin-bottom: 18px;
}

.task-create-head-simple h3 {
  margin-top: 0;
}

.task-create-head-simple::after {
  content: none;
}

button.secondary,
.secondary-link {
  background: linear-gradient(180deg, rgba(244, 249, 252, 0.96) 0%, rgba(237, 243, 247, 0.98) 100%);
}

.chip-good { border-color: rgba(127, 145, 134, 0.16); }
.chip-warn { border-color: rgba(159, 117, 80, 0.18); }
.chip-bad { border-color: rgba(184, 106, 121, 0.16); }

.nav-link.active,
.panel-dark,
button,
.button-link,
.custom-select-option.selected,
.login-submit,
.account-fab,
.account-submenu-item.active {
  background: var(--primary-gradient);
}


/* v22 haze blue theme refresh */
body {
  background: var(--bg-accent);
}

.sidebar {
  border-right: 1px solid rgba(123, 137, 247, 0.08);
  background:
    linear-gradient(180deg, rgba(252, 253, 255, 0.98) 0%, rgba(245, 248, 253, 0.98) 100%),
    radial-gradient(circle at top, rgba(140, 170, 244, 0.10), transparent 42%);
}

.panel {
  box-shadow: 0 18px 40px rgba(106, 125, 168, 0.08);
}

.panel-dark {
  background: linear-gradient(135deg, rgba(141, 154, 255, 0.94) 0%, rgba(108, 120, 242, 0.96) 55%, rgba(89, 106, 235, 0.98) 100%);
}

.brand-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 249, 254, 0.98) 100%);
}

.brand-mark {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 246, 253, 1) 100%);
  border: 1px solid rgba(123, 137, 247, 0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.84), 0 18px 36px rgba(98, 116, 168, 0.10);
}

.nav-link {
  border-color: rgba(183, 194, 219, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.90) 0%, rgba(247, 249, 253, 0.96) 100%);
  box-shadow: 0 10px 24px rgba(106, 125, 168, 0.05);
}

.nav-link.active,
.footer-menu-item.active,
.account-submenu-item.active {
  background: linear-gradient(180deg, rgba(240, 241, 255, 0.98) 0%, rgba(234, 239, 252, 0.98) 100%);
  color: var(--primary-strong);
  border-color: rgba(123, 137, 247, 0.14);
  box-shadow: 0 14px 30px rgba(112, 129, 174, 0.10);
}

.nav-link.active .nav-sub,
.footer-menu-item.active .nav-sub {
  color: rgba(93, 108, 237, 0.78);
}

.nav-link.active .nav-icon,
.footer-menu-item.active .nav-icon,
.account-submenu-item.active .mini-icon {
  background: var(--primary-gradient);
  color: #ffffff;
}

.nav-icon,
.mini-icon,
.icon-button {
  background: rgba(244, 247, 253, 0.98);
  color: var(--primary-strong);
}

.search-pill,
.metric-card,
.test-send-form .task-field-card,
.test-send-form .task-message-card,
.task-builder-form .task-field-card,
.task-builder-form .task-message-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 248, 253, 0.98) 100%);
}

input:not([type="hidden"]),
select,
textarea,
.input,
.custom-select-trigger {
  border-color: rgba(183, 194, 219, 0.58);
  box-shadow: 0 0 20px -18px rgba(103, 123, 174, 0.18);
  background: rgba(255, 255, 255, 0.97);
}

input:not([type="hidden"]):hover,
select:hover,
textarea:hover,
.input:hover,
.custom-select-trigger:hover {
  border-color: rgba(123, 137, 247, 0.24);
  box-shadow: 0 8px 20px -18px rgba(93, 108, 237, 0.26);
}

input:not([type="hidden"]):focus,
select:focus,
textarea:focus,
.input:focus,
.custom-select-trigger:focus,
.custom-select-shell.open .custom-select-trigger {
  border-color: rgba(123, 137, 247, 0.40);
  box-shadow: 0 0 0 4px rgba(123, 137, 247, 0.12);
}

.custom-select-trigger {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 248, 253, 0.98) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5.25L7 9.25L11 5.25' stroke='%236473ee' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, calc(100% - 16px) 50%;
  background-size: 100% 100%, 14px 14px;
}

.custom-select-menu {
  border-color: rgba(183, 194, 219, 0.56);
  background: linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(246,248,253,0.99) 100%);
  box-shadow: 0 18px 38px rgba(103, 123, 174, 0.12);
}

.custom-select-option:hover,
.custom-select-option:focus {
  background: rgba(123, 137, 247, 0.09);
  border-color: rgba(123, 137, 247, 0.16);
}

.custom-select-option.selected,
button,
.button-link,
.login-submit,
.account-fab,
.page-progress.active,
button.danger {
  background: var(--primary-gradient);
  color: #ffffff;
}

button,
.button-link,
.login-submit {
  box-shadow: 0 16px 32px rgba(95, 108, 237, 0.22);
}

button.secondary,
.secondary-link,
.clear-log-button,
.icon-button {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 248, 253, 0.98) 100%);
  color: var(--text);
  border-color: rgba(183, 194, 219, 0.42);
  box-shadow: none;
}

button.danger {
  background: linear-gradient(135deg, #ff7c7c 0%, #ef5a5a 100%);
}

.chip,
.close-link {
  border-color: rgba(183, 194, 219, 0.36);
  background: rgba(255, 255, 255, 0.9);
}

.chip-soft,
.chip-neutral {
  background: rgba(245, 248, 253, 0.98);
  color: var(--neutral-text);
  border-color: rgba(183, 194, 219, 0.40);
}

.chip-good {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: rgba(36, 182, 125, 0.16);
}

.chip-warn {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-color: rgba(238, 161, 26, 0.18);
}

.chip-bad {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: rgba(239, 90, 90, 0.16);
}

.login-card,
.notice-banner,
.alert-banner,
.log-card,
.entity-card,
.compact-card,
.section-card,
.metric-card {
  background-clip: padding-box;
}

/* v12 streamlined account/task layout */
.section-card {
  border-radius: 20px;
}

.account-list-section {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 250, 255, 0.94) 100%);
}

.account-card-grid {
  gap: 14px;
}

.account-card-tile {
  border-radius: 16px;
  border: 1px solid rgba(146, 162, 197, 0.24);
  background: rgba(255, 255, 255, 0.94);
}

.refined-task-layout {
  gap: 18px;
  align-items: start;
}

.task-layout-grid .task-create-panel,
.task-layout-grid .task-list-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 248, 253, 0.94) 100%);
}

.task-builder-form {
  gap: 14px;
}

.task-field-card,
.task-message-card {
  border-color: rgba(146, 162, 197, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.task-builder-form .task-field-card input:not([type="hidden"]),
.task-builder-form .task-field-card .custom-select-trigger,
.task-builder-form .task-field-card select,
.task-builder-form .task-message-card textarea {
  background: #f9fbff;
}

.modal-panel {
  max-width: 520px;
}

@media (max-width: 900px) {
  .account-list-section,
  .task-layout-grid .task-create-panel,
  .task-layout-grid .task-list-panel {
    padding: 16px;
  }
}
