@import url("/uyfont.css?v=20260819-uyfont-global-v1");

:root {
  color-scheme: light;
  --app-font-family: "UKIJ", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg: #f7fbfa;
  --surface: #ffffff;
  --surface-soft: #f4faf8;
  --text: #1d2534;
  --muted: #97a4b4;
  --border: #edf1f4;
  --primary: #42d6ad;
  --primary-strong: #22b992;
  --primary-soft: #e9fbf6;
  --rail: #070d2b;
  --rail-soft: #121a3e;
  --blue: #2563eb;
  --green: #32c59b;
  --red: #dc2626;
  --orange: #f59e0b;
  --yellow: #ffd65b;
  --rose: #ff756f;
  --shadow: 0 14px 34px rgba(24, 48, 72, .05);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--app-font-family);
  font-size: 14px;
  line-height: 1.5;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
}

.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 460px);
  align-items: stretch;
}

.login-brand {
  min-width: 0;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 44px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 36, 71, .96), rgba(15, 36, 71, .82)),
    radial-gradient(circle at 16% 18%, rgba(198, 138, 22, .28), transparent 30%),
    #0f2447;
}

.login-brand-top {
  display: grid;
  gap: 28px;
  align-content: start;
  max-width: 700px;
}

.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .26);
}

.brand-eyebrow {
  color: rgba(255, 255, 255, .64);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.brand-title h1 {
  margin: 18px 0 14px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-title p {
  color: rgba(255, 255, 255, .72);
}

.brand-title p {
  margin: 0;
  max-width: 560px;
  line-height: 1.8;
}

.login-showcase {
  display: grid;
  gap: 12px;
  max-width: 720px;
}

.showcase-card {
  min-height: 116px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px);
}

.showcase-card strong,
.showcase-card span,
.showcase-card p {
  display: block;
  overflow-wrap: anywhere;
}

.showcase-card strong {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.2;
}

.showcase-card span,
.showcase-card p {
  color: rgba(255, 255, 255, .72);
}

.showcase-card p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.7;
}

.showcase-card.is-active {
  border-color: rgba(247, 195, 74, .44);
  background: rgba(247, 195, 74, .14);
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--surface);
}

.login-card {
  width: 100%;
  max-width: 360px;
}

.login-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark,
.avatar {
  display: grid;
  place-content: center;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
}

.login-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(15, 35, 70, .1);
}

.login-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.subtitle,
.hint {
  color: var(--muted);
}

.subtitle {
  margin: 6px 0 0;
}

.hint {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.65;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.field-help {
  margin: -2px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #7c8ba1;
  font-size: 12px;
  line-height: 1.55;
}

.field-help i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #8fa0af;
  font-size: 14px;
}

.field input,
.field select,
.field textarea,
.filters input,
.filters select,
.top-search input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.dashboard-shell {
  min-height: 100vh;
}

.sidebar-left {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 16rem;
  min-width: 16rem;
  max-width: 16rem;
  padding: 28px 14px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  color: #3c4656;
  background: #fff;
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 16px rgba(15, 35, 70, .03);
  transition: width .24s ease, min-width .24s ease, max-width .24s ease;
}

.sidebar-header {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 38px;
  text-align: center;
}

.sidebar-logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 8px 18px rgba(15, 35, 70, .08);
}

.sidebar-title strong,
.sidebar-title span {
  display: block;
}

.sidebar-title strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}

.sidebar-title span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.nav-heading {
  margin: 32px 0 14px;
  padding: 0 12px;
  color: #7b8797;
  font-size: 11px;
  font-weight: 760;
}

.nav-group {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
}

.nav-group-toggle,
.nav-item {
  width: 100%;
  min-height: 42px;
  display: grid;
  align-items: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #465264;
  font-weight: 700;
  text-align: left;
}

.nav-group-toggle {
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  gap: 12px;
  padding: 0 12px;
}

.nav-group.is-open {
  padding-bottom: 2px;
}

.nav-group.has-active-page .nav-group-toggle {
  color: var(--primary-strong);
}

.nav-chevron {
  color: #9aa6b7;
  transition: transform .2s ease;
}

.nav-group.is-open .nav-chevron {
  transform: rotate(180deg);
}

.nav-sublist {
  display: none;
  gap: 12px;
  padding: 10px 0 8px 30px;
}

.nav-sublist.is-open {
  display: grid;
}

.nav-item {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 12px;
  font-weight: 620;
}

.nav-item.nav-direct {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 0 12px;
  font-weight: 700;
}

.nav-group-toggle:hover,
.nav-item:hover,
.nav-item.is-active {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.nav-group-toggle:hover {
  background: rgba(198, 138, 22, .08);
}

.nav-item span,
.nav-group-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-count {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f4e2b7;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.main-content {
  min-width: 0;
  min-height: 100vh;
  margin-left: 16rem;
  padding: 0 28px 48px;
  transition: margin-left .24s ease;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin: 0 -28px 40px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
}

.page-titlebar {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 28px;
}

.page-titlebar h1 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
}

.page-titlebar p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.page-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #78879a;
}

.top-search input {
  min-height: 40px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 16px;
}

.top-search:focus-within {
  color: var(--primary-strong);
  background: rgba(66, 214, 173, .06);
}

.top-search input:focus,
.top-search input:focus-visible {
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  background: transparent !important;
}

.top-search input::placeholder {
  color: #8b98ab;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
  flex-wrap: nowrap;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-content: center;
  border: 0;
  border-radius: var(--radius);
  color: #728197;
  background: transparent;
  font-size: 20px;
}

.icon-button:hover {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.nav-toggle {
  display: inline-grid;
}

.nav-notif {
  position: relative;
}

.dot {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #e11d48;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.dot[hidden] {
  display: none;
}

#todo-badge {
  top: -6px;
  right: -6px;
  width: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 10px rgba(225, 29, 72, .2);
}

body.soft-dark #todo-badge {
  border-color: #172033;
  box-shadow: 0 4px 10px rgba(225, 29, 72, .28);
}

.user-menu {
  position: relative;
  min-width: 0;
}

.avatar,
.avatar-img {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
}

.avatar-img {
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 5px #f3f5f8;
}

.user-toggle {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary-strong);
}

.user-chevron {
  transition: transform .18s ease;
}

.user-menu.is-open .user-chevron,
.user-menu:hover .user-chevron,
.user-menu:focus-within .user-chevron {
  transform: rotate(180deg);
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  width: 294px;
  padding: 18px 18px 20px;
  border: 1px solid #dbe3ee;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
}

.user-dropdown::before {
  content: "";
  position: absolute;
  top: -12px;
  right: 0;
  left: 0;
  height: 12px;
}

.user-menu.is-open .user-dropdown,
.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
  display: block;
}

.user-dropdown-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 6px 20px;
  border-bottom: 1px solid var(--border);
}

.dropdown-logo {
  width: 58px;
  height: 58px;
  border-radius: 4px;
}

.account-avatar {
  display: inline-grid;
  place-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  color: #fff;
  background: var(--primary);
  font-weight: 850;
  line-height: 1;
  object-fit: cover;
}

.account-avatar-header {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  box-shadow: 0 0 0 5px #f3f5f8;
}

.account-avatar-dropdown,
.account-avatar-summary {
  width: 58px;
  height: 58px;
  border-radius: 4px;
}

.account-avatar-option {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 22px;
}

.account-avatar.is-system {
  background: transparent;
}

.account-avatar.is-amber { background: #c68a16; }
.account-avatar.is-indigo { background: #4f46e5; }
.account-avatar.is-emerald { background: #10a875; }
.account-avatar.is-rose { background: #e11d48; }
.account-avatar.is-slate { background: #475569; }

.user-dropdown-head strong,
.user-dropdown-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-head strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 850;
}

.user-dropdown-head span {
  margin-top: 6px;
  color: #66758a;
  font-size: 16px;
}

.dropdown-action {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius);
  color: var(--text);
  background: transparent;
  font-size: 17px;
  font-weight: 800;
  text-align: left;
}

.dropdown-action:hover {
  background: var(--surface-soft);
}

.dropdown-logout {
  justify-content: center;
  margin-top: 16px;
  color: #fff;
  background: #e2242a;
}

.dropdown-logout:hover {
  background: #c91d22;
}

.content {
  min-width: 0;
  padding: 0;
  position: relative;
  contain: layout;
}

.page-transition {
  animation: pageFadeIn .24s cubic-bezier(.2, .8, .2, 1) both;
}

.page-transition.is-loading {
  animation: pageSkeletonIn .12s ease both;
}

.content.is-route-pending > :not(.route-loading-overlay) {
  pointer-events: none;
}

@keyframes pageFadeIn {
  from {
    opacity: .92;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageSkeletonIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.route-loading-overlay {
  position: fixed;
  top: var(--route-loading-top, 76px);
  right: 0;
  bottom: 0;
  left: var(--shell-offset, 296px);
  z-index: 38;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 34px);
  border-radius: 0;
  background: rgba(247, 251, 250, .62);
  backdrop-filter: blur(5px);
  pointer-events: auto;
  transform: translateZ(0);
  animation: routeOverlayIn .18s cubic-bezier(.2, .8, .2, 1) both;
}

.route-loading-card {
  width: min(100%, 260px);
  min-height: 156px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px 26px;
  border: 1px solid rgba(226, 238, 235, .92);
  border-radius: 8px;
  color: var(--text);
  text-align: center;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 22px 54px rgba(15, 23, 42, .12);
}

.route-loading-card strong {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 860;
}

.route-loading-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.route-loader {
  width: 58px;
  height: 58px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--primary-soft);
}

.route-loader::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 3px solid rgba(66, 214, 173, .2);
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: routeSpin .84s linear infinite;
}

.route-loader i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--primary-strong);
  animation: routeDotPulse .9s ease-in-out infinite;
}

.route-loader i:nth-child(2) {
  animation-delay: .12s;
}

.route-loader i:nth-child(3) {
  animation-delay: .24s;
}

@keyframes routeOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes routeSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes routeDotPulse {
  0%, 100% {
    opacity: .28;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-5px);
  }
}

.route-skeleton-metrics,
.route-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.route-skeleton-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.skeleton-card,
.skeleton-block,
.route-skeleton-panel {
  position: relative;
  overflow: hidden;
  min-height: 124px;
}

.skeleton-card::after,
.skeleton-block::after,
.route-skeleton-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .78) 46%, transparent 70%);
  transform: translateX(-100%);
  animation: skeletonSweep 1.1s ease-in-out infinite;
}

.skeleton-card i,
.skeleton-card b,
.skeleton-card span,
.skeleton-block b,
.skeleton-block span,
.skeleton-block em,
.skeleton-head b,
.skeleton-head span,
.skeleton-table i {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #edf4f8, #f7fbfd);
}

.skeleton-card i {
  width: 48px;
  height: 48px;
  margin: 20px 0 16px 20px;
  border-radius: 14px;
}

.skeleton-card b {
  width: 42%;
  height: 20px;
  margin: 0 20px 12px;
}

.skeleton-card span {
  width: 68%;
  height: 12px;
  margin: 0 20px;
}

.skeleton-kpi {
  min-height: 152px;
}

.skeleton-block {
  min-height: 190px;
  padding: 22px;
}

.skeleton-block b {
  width: 45%;
  height: 18px;
}

.skeleton-block span {
  width: 80%;
  height: 13px;
  margin-top: 18px;
}

.skeleton-block em {
  width: 64%;
  height: 13px;
  margin-top: 12px;
}

.route-skeleton-panel {
  margin-top: 18px;
  padding: 22px;
}

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

.skeleton-head b {
  width: 180px;
  height: 20px;
}

.skeleton-head span {
  width: 260px;
  height: 36px;
}

.skeleton-table {
  display: grid;
  gap: 13px;
}

.skeleton-table i {
  height: 38px;
  border-radius: 8px;
}

@keyframes skeletonSweep {
  to {
    transform: translateX(100%);
  }
}

.container-fluid {
  width: 100%;
}

body.soft-dark .skeleton-card i,
body.soft-dark .skeleton-card b,
body.soft-dark .skeleton-card span,
body.soft-dark .skeleton-block b,
body.soft-dark .skeleton-block span,
body.soft-dark .skeleton-block em,
body.soft-dark .skeleton-head b,
body.soft-dark .skeleton-head span,
body.soft-dark .skeleton-table i {
  background: linear-gradient(90deg, #202b41, #26344d);
}

body.soft-dark .skeleton-card::after,
body.soft-dark .skeleton-block::after,
body.soft-dark .route-skeleton-panel::after {
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .08) 46%, transparent 70%);
}

body.soft-dark .route-loading-overlay {
  background: rgba(17, 24, 39, .62);
}

body.soft-dark .route-loading-card {
  color: var(--text);
  border-color: rgba(55, 68, 92, .9);
  background: rgba(24, 34, 53, .94);
  box-shadow: 0 24px 58px rgba(0, 0, 0, .34);
}

body.soft-dark .route-loading-card em {
  color: #aab5c5;
}

body.soft-dark .media-cell img {
  border-color: #38465f;
  background: #202b40;
}

body.soft-dark .media-cell span,
body.soft-dark .path-cell,
body.soft-dark .multi-lang-cell span {
  color: #aab5c5;
}

body.soft-dark .multi-lang-cell strong {
  color: #f3f7fb;
}

@media (min-width: 992px) {
  body.qg-template.vertical.collapsed .sidebar-left {
    width: 5rem;
    min-width: 5rem;
    max-width: 5rem;
    overflow: visible;
  }

  body.qg-template.vertical.collapsed .main-content {
    margin-left: 5rem;
  }

  body.qg-template.vertical.collapsed .sidebar-left {
    padding-right: 8px;
    padding-left: 8px;
  }

  body.qg-template.vertical.collapsed .nav-group {
    gap: 16px;
    margin-bottom: 22px;
  }

  body.qg-template.vertical.collapsed .sidebar-title,
  body.qg-template.vertical.collapsed .nav-heading,
  body.qg-template.vertical.collapsed .nav-group-toggle span,
  body.qg-template.vertical.collapsed .nav-item span:not(.nav-count),
  body.qg-template.vertical.collapsed .nav-chevron,
  body.qg-template.vertical.collapsed .nav-count {
    display: none !important;
  }

  body.qg-template.vertical.collapsed .sidebar-header {
    margin-bottom: 24px;
  }

  body.qg-template.vertical.collapsed .sidebar-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  body.qg-template.vertical.collapsed .nav-group-toggle,
  body.qg-template.vertical.collapsed .nav-item.nav-direct {
    width: 3.35rem;
    min-height: 3.35rem;
    grid-template-columns: 1fr;
    justify-items: center;
    margin: 0 auto;
    padding: 0;
  }

  body.qg-template.vertical.collapsed .nav-item:not(.nav-direct) {
    justify-content: flex-start;
  }

  body.qg-template.vertical.collapsed .nav-sublist {
    display: none !important;
    position: absolute;
    top: 0;
    left: 4.3rem;
    z-index: 90;
    width: 13.5rem;
    padding: 46px 12px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
  }

  body.qg-template.vertical.collapsed .nav-sublist::before {
    content: attr(data-group-label);
    position: absolute;
    top: 14px;
    left: 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  body.qg-template.vertical.collapsed .nav-group:hover .nav-sublist,
  body.qg-template.vertical.collapsed .nav-group:focus-within .nav-sublist {
    display: grid !important;
  }

  body.qg-template.vertical.collapsed .nav-group:hover .nav-sublist span,
  body.qg-template.vertical.collapsed .nav-group:focus-within .nav-sublist span {
    display: block !important;
  }
}

@media (max-width: 960px) {
  .route-skeleton-metrics,
  .route-skeleton-grid {
    grid-template-columns: 1fr;
  }

  .skeleton-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .skeleton-head span {
    width: min(100%, 260px);
  }
}

.grid {
  display: grid;
  gap: 24px;
  align-items: stretch;
}

.two-col {
  grid-template-columns: minmax(0, .95fr) minmax(420px, 1.15fr);
}

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

.settings-grid > .panel,
.two-col > .panel,
.dashboard-bottom > .panel {
  height: 100%;
}

.settings-grid .panel .form-grid,
.settings-grid .panel .setting-list,
.two-col .panel .integration-list,
.two-col .panel .setting-list,
.two-col .panel .quick-grid {
  flex: 1;
}

.panel-head > .btn,
.panel-head > .top-actions,
.panel-head > button,
.panel-head > .text-button {
  align-self: flex-start;
}

.panel,
.kpi {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  overflow: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.panel + .panel,
.grid + .panel {
  margin-top: 24px;
}

.panel-head {
  min-height: 96px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}

.panel-head > div:first-child {
  min-width: 0;
  display: grid;
  align-content: start;
}

.panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}

.panel-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.overview-hero {
  min-height: 520px;
  padding: 42px 28px 24px;
}

.overview-hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 1.25fr);
  gap: 42px;
}

.overview-hero-head span,
.overview-card span {
  color: var(--muted);
  font-size: 15px;
}

.overview-hero-head strong {
  display: inline-block;
  margin: 6px 8px 0 0;
  color: #001a4e;
  font-size: 34px;
  line-height: 1;
  font-weight: 850;
}

.overview-hero-head em,
.overview-card em {
  color: var(--green);
  font-style: normal;
}

.overview-hero-head p {
  margin: 14px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.hero-kpis div {
  min-width: 0;
}

.hero-kpis strong,
.hero-kpis span,
.hero-kpis em {
  display: block;
  text-align: center;
}

.hero-chart {
  margin-top: 52px;
  height: 260px;
}

.hero-chart svg {
  width: 100%;
  height: 100%;
}

.chart-grid line {
  stroke: #edf0f5;
  stroke-width: 1;
}

.overview-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.overview-card {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  grid-template-rows: minmax(150px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 30px 28px 24px;
}

.overview-card strong {
  display: block;
  margin-top: 6px;
  color: #001a4e;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 850;
}

.overview-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.donut {
  width: 158px;
  height: 158px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0 50%, #eef1f6 50% 100%);
}

.donut span {
  width: 110px;
  height: 110px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  color: var(--text);
  background: #fff;
  font-size: 24px;
  font-weight: 850;
}

.mini-bars {
  height: 158px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
}

.mini-bars i {
  width: 18px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--primary), rgba(198, 138, 22, .34));
}

.mini-bars i:nth-child(1) { height: 72px; }
.mini-bars i:nth-child(2) { height: 116px; }
.mini-bars i:nth-child(3) { height: 92px; }
.mini-bars i:nth-child(4) { height: 146px; }
.mini-bars i:nth-child(5) { height: 122px; }

.overview-card-foot {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.overview-card-foot strong {
  margin: 0;
  font-size: 22px;
}

.overview-card-foot span {
  display: block;
  margin-top: 3px;
}

.dashboard-bottom {
  margin-top: 36px;
}

.filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.filters input,
.filters select {
  width: auto;
  min-width: 128px;
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
}

.btn,
.text-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.btn {
  padding: 0 14px;
  color: #fff;
  border: 1px solid transparent;
  background: var(--primary);
}

.btn:hover {
  background: var(--primary-strong);
}

.btn.secondary {
  color: var(--text);
  border-color: var(--border);
  background: #fff;
}

.btn.secondary:hover {
  border-color: #cdd5df;
  background: var(--surface-soft);
}

.btn.soft {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.btn.danger {
  color: var(--red);
  background: #fee2e2;
}

.text-button {
  color: var(--blue);
  border: 0;
  background: transparent;
}

.btn:disabled,
.btn:disabled:hover {
  color: #94a3b8;
  border-color: #dbe3ee;
  background: #f1f5f9;
}

.mini {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.compact-table table {
  min-width: 620px;
}

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 760;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--blue);
  background: #eef6ff;
  font-size: 12px;
  font-weight: 720;
}

.status.green,
.tone-green {
  color: #16865f;
  background: #e8f7ee;
}

.status.red,
.tone-red {
  color: var(--red);
  background: #fee2e2;
}

.status.orange,
.tone-orange,
.status.gold,
.tone-gold {
  color: var(--orange);
  background: #fff3d7;
}

.status.blue,
.tone-blue {
  color: var(--blue);
  background: #eef6ff;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.media-cell {
  min-width: 0;
  max-width: 220px;
  display: inline-grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.media-cell img {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7fbfa;
  object-fit: cover;
}

.media-cell span,
.path-cell {
  display: block;
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  color: #667386;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.path-cell {
  max-width: 240px;
  color: #35506c;
  font-weight: 680;
}

.multi-lang-cell {
  display: grid;
  min-width: 0;
  max-width: 260px;
  gap: 4px;
}

.multi-lang-cell strong,
.multi-lang-cell span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-lang-cell strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.multi-lang-cell span {
  color: #667386;
  font-size: 12px;
  font-weight: 620;
  line-height: 1.45;
}

.activity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 60px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
}

.activity:last-child {
  border-bottom: 0;
}

.activity b,
.activity span {
  display: block;
}

.activity b {
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity span {
  color: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 28px 24px;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-cell .avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.user-cell b,
.user-cell span {
  display: block;
}

.user-cell span {
  color: var(--muted);
  font-size: 12px;
}

.permission-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
}

.role-list {
  align-self: start;
}

.role-item {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.role-item:hover,
.role-item.is-active {
  background: var(--primary-soft);
}

.role-item strong,
.role-item span {
  overflow-wrap: anywhere;
}

.role-item span {
  color: var(--muted);
  font-size: 12px;
}

.permission-matrix,
.permission-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 28px 28px;
}

.permission-toggle,
.permission-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.permission-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.permission-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.permission-toggle span,
.permission-toggle strong,
.permission-toggle em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.permission-toggle em,
.permission-card span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.permission-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.permission-card div {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.permission-card div span {
  grid-column: 2;
}

.permission-card i {
  color: var(--primary);
}

.permission-card p {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.setting-list {
  display: grid;
  gap: 0;
}

.setting-list div {
  display: grid;
  grid-template-columns: minmax(0, 170px) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
}

.setting-list div:last-child {
  border-bottom: 0;
}

.setting-list span {
  color: var(--muted);
}

.setting-list em {
  color: var(--green);
  font-style: normal;
  font-weight: 800;
}

.file-manager-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
}

.file-side {
  align-self: start;
}

.file-type-list {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.file-type-list button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  color: #475569;
  background: transparent;
  font-weight: 800;
}

.file-type-list button:hover,
.file-type-list button.is-active {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.file-upload-inline {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: center;
}

.file-upload-inline input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.file-picker {
  min-width: 0;
  min-height: 46px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid #dce3ed;
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.file-picker:focus-within,
.file-picker:hover {
  border-color: rgba(198, 138, 22, .62);
  box-shadow: 0 0 0 3px rgba(198, 138, 22, .1);
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  border-right: 1px solid #dce3ed;
  color: #0f172a;
  background: #f8fafc;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.file-picker-name {
  min-width: 0;
  padding: 0 16px;
  color: var(--text);
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
}

.file-manager-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.file-manager-actions .btn {
  min-height: 40px;
}

.file-group-filter {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 0 22px 18px;
  overflow-x: auto;
}

.file-group-filter button {
  min-width: 148px;
  min-height: 52px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon label count"
    "icon meta count";
  align-items: center;
  gap: 1px 8px;
  padding: 8px 12px;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  color: #475569;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .035);
}

.file-group-filter button:hover,
.file-group-filter button.is-active {
  color: #147f68;
  border-color: rgba(66, 214, 173, .45);
  background: #f2fcf9;
}

.file-group-filter i {
  grid-area: icon;
  color: currentColor;
}

.file-group-filter span,
.file-group-filter em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-group-filter span {
  grid-area: label;
  font-weight: 900;
}

.file-group-filter em {
  grid-area: meta;
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.file-group-filter strong {
  grid-area: count;
  justify-self: end;
  color: #94a3b8;
  font-size: 12px;
}

.file-card {
  min-width: 0;
  display: grid;
  grid-template-rows: 150px auto auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.file-preview {
  display: grid;
  place-content: center;
  background: #f8fafc;
}

.file-preview img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.file-preview-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-content: center;
  border-radius: 18px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-size: 28px;
}

.file-card-body {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.file-card-body strong,
.file-card-body span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card-body span {
  color: var(--muted);
  font-size: 12px;
}

.file-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 14px;
  flex-wrap: wrap;
}

.upload-field {
  min-width: 0;
}

.upload-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

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

.upload-gallery-field {
  display: flex;
  align-items: stretch;
  gap: 16px;
  min-width: 0;
  padding: 8px 2px 6px;
  overflow-x: auto;
}

.upload-field.is-multiple .upload-gallery-field {
  flex-wrap: wrap;
  overflow-x: visible;
  padding-top: 10px;
}

.upload-count-hint {
  margin-left: 8px;
  color: #7c8ba1;
  font-size: 12px;
  font-weight: 800;
}

.upload-field-help {
  margin-top: -3px;
}

.upload-asset-card,
.upload-add-card {
  position: relative;
  width: 148px;
  min-width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.upload-asset-card {
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: visible;
}

.upload-add-card {
  place-content: center;
  gap: 8px;
  padding: 14px;
  border-style: dashed;
  color: #147f68;
  background: linear-gradient(180deg, #ffffff, #f7fffc);
  cursor: pointer;
  text-align: center;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.upload-add-card:hover {
  border-color: #42d6ad;
  background: #f2fcf9;
  transform: translateY(-1px);
}

.upload-add-card.is-disabled {
  color: #94a3b8;
  border-style: solid;
  background: #f8fafc;
  box-shadow: none;
  cursor: not-allowed;
}

.upload-add-card.is-disabled:hover {
  border-color: #d8e2ef;
  background: #f8fafc;
  transform: none;
}

.upload-add-card.is-replace {
  border-style: solid;
  color: #2563eb;
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
}

.upload-add-card.is-replace:hover {
  border-color: #4096ff;
  background: #f3f8ff;
}

.upload-add-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 14px;
  color: #147f68;
  background: rgba(66, 214, 173, .14);
}

.upload-add-card.is-replace .upload-add-icon {
  color: #2563eb;
  background: rgba(64, 150, 255, .12);
}

.upload-add-card i {
  margin: 0;
  color: currentColor;
  font-size: 22px;
}

.upload-add-card strong,
.upload-add-card em {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-add-card strong {
  color: #203047;
  font-size: 15px;
  font-weight: 900;
}

.upload-add-card em {
  color: #7c8ba1;
  font-size: 12px;
  font-style: normal;
}

.upload-asset-thumb {
  position: relative;
  width: 100%;
  height: 104px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f8fafc;
}

.upload-asset-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.upload-asset-thumb.is-broken img {
  opacity: 0;
}

.upload-asset-thumb.is-broken::after {
  content: "图片加载失败";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #64748b;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.upload-asset-remove {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #ff6b6f;
  box-shadow: 0 12px 22px rgba(255, 107, 111, .28);
  cursor: pointer;
}

.upload-asset-meta {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-top: 1px solid #edf1f5;
}

.upload-asset-meta strong {
  min-width: 0;
  overflow: hidden;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-asset-meta a {
  flex: 0 0 auto;
  color: #4096ff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.upload-file-preview,
.upload-icon-preview {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #64748b;
  text-align: center;
}

.upload-file-preview i,
.upload-icon-preview i {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #4096ff;
  background: rgba(64, 150, 255, .1);
  font-size: 24px;
}

.upload-field-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.upload-image-preview {
  height: 188px;
  display: grid;
  place-content: center;
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px dashed #d8e5e2;
  border-radius: 8px;
  background: #f8fbfa;
}

.upload-image-preview img {
  width: 100%;
  height: 188px;
  display: block;
  object-fit: cover;
}

.upload-image-preview span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8b98a7;
  font-size: 13px;
  font-weight: 700;
}

.upload-image-preview i {
  color: #28b994;
  font-size: 18px;
}

.upload-image-preview .upload-icon-preview {
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.upload-image-preview .upload-icon-preview i {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #12a981;
  background: rgba(40, 185, 148, .12);
  font-size: 24px;
}

.settings-form-block {
  padding: 24px 28px 10px;
}

.settings-subsection {
  margin: 6px 28px 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfefd;
}

.settings-subsection-head {
  padding: 18px 20px 0;
}

.settings-subsection-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 840;
}

.settings-subsection-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.settings-subsection .settings-form-block {
  padding: 18px 20px 4px;
}

.wechat-config-card .settings-form-block {
  padding-bottom: 16px;
}

.app-force-update-field .inline-switch-card {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #e3ebee;
  border-radius: var(--radius);
  background: #fff;
}

.inline-switch-card div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.inline-switch-card strong,
.inline-switch-card span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inline-switch-card strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 840;
}

.inline-switch-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.wechat-pem-block {
  margin: 6px 28px 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfefd;
}

.wechat-pem-block.is-compact {
  margin: 0;
  border: 0;
  border-top: 1px dashed #dce9e6;
  border-radius: 0;
  background: transparent;
}

.wechat-pem-fields {
  display: grid;
  gap: 22px;
  padding: 18px 20px 22px;
}

.wechat-pem-block.is-compact .wechat-pem-fields {
  padding: 4px 20px 22px;
}

.wechat-pem-field {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.wechat-pem-field > span {
  padding-top: 13px;
  color: #475569;
  font-size: 15px;
  font-weight: 800;
}

.wechat-pem-field > div {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.wechat-pem-field textarea {
  min-height: 154px;
  width: 100%;
  padding: 14px 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(66, 214, 173, .72);
  border-radius: 0;
  color: var(--text);
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
  outline: 0;
}

.wechat-pem-field:nth-child(2) textarea {
  border-bottom-color: rgba(64, 150, 255, .86);
}

.wechat-pem-field textarea:focus {
  border-bottom-width: 2px;
  box-shadow: none;
}

.wechat-pem-field textarea::placeholder {
  color: #a1a8b2;
  font-family: inherit;
}

.wechat-pem-field em {
  color: #7b8da8;
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
}

.form-grid .field.wide {
  grid-column: 1 / -1;
}

.settings-meta {
  padding: 0 28px 24px;
  color: var(--muted);
  font-size: 13px;
}

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

.admin-brand-panel,
.brand-preview-stack,
.brand-preview-card {
  min-width: 0;
}

.brand-preview-stack {
  display: grid;
  gap: 18px;
}

.brand-logo-uploader {
  margin: 0 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfefd, #f7fbfa);
}

.brand-logo-preview {
  width: 92px;
  height: 92px;
  display: grid;
  place-content: center;
  border-radius: 8px;
  border: 1px solid #dde9e6;
  background: #fff;
  overflow: hidden;
}

.brand-logo-preview img,
.brand-preview-rail img,
.brand-login-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-logo-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.brand-logo-copy strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 820;
}

.brand-logo-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.brand-logo-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.brand-logo-actions input {
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.brand-preview-shell {
  margin: 0 20px 20px;
  min-height: 208px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.brand-preview-rail {
  padding: 16px 10px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  color: #fff;
  background: var(--rail);
}

.brand-preview-rail img {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.brand-preview-rail strong {
  max-width: 52px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.brand-preview-sidebar {
  padding: 20px 18px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: #f9fcfb;
}

.brand-preview-sidebar span,
.brand-preview-sidebar em,
.brand-login-preview span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.brand-preview-sidebar b {
  color: var(--text);
  font-size: 16px;
  font-weight: 840;
}

.brand-preview-sidebar i {
  width: 100%;
  height: 28px;
  display: block;
  margin-top: 8px;
  border-radius: 6px;
  background: #edf6f3;
}

.brand-preview-sidebar i:nth-of-type(2) {
  width: 78%;
  background: var(--primary);
}

.brand-preview-sidebar i:nth-of-type(3) {
  width: 66%;
}

.brand-login-preview {
  margin: 0 20px 20px;
  min-height: 230px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  background: linear-gradient(135deg, #f9fffd, #eef9f5);
}

.brand-login-preview img {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

.brand-login-preview h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 860;
}

.brand-login-preview p {
  margin: 0;
  max-width: 260px;
  color: #5e6b7b;
  font-size: 13px;
  line-height: 1.7;
}

.setting-list.compact {
  border-top: 1px solid var(--border);
}

.upload-preview-link {
  color: var(--blue);
  font-size: 12px;
  text-decoration: none;
}

.image-picker-mask {
  z-index: 92;
}

.media-group-dialog-mask {
  z-index: 96;
}

.image-picker-modal {
  width: min(1480px, calc(100vw - 28px));
  height: min(940px, calc(100vh - 24px));
  max-height: min(940px, calc(100vh - 24px));
  overflow: hidden;
}

.media-library-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.media-library-head {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 32px 20px;
  border-bottom: 1px solid var(--border);
}

.media-library-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
}

.media-library-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.media-library-close {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #98a2b3;
  background: transparent;
  cursor: pointer;
}

.media-library-close:hover {
  color: var(--text);
  background: var(--soft);
}

.media-library-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.media-library-side {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 18px;
  border-right: 1px solid var(--border);
  background: #fbfcfd;
}

.media-library-add-group {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  background: #4096ff;
  box-shadow: 0 10px 20px rgba(64, 150, 255, .18);
}

.media-library-type-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.media-library-type-tabs button {
  min-height: 44px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  color: #64748b;
  background: #fff;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.media-library-type-tabs button:hover,
.media-library-type-tabs button.is-active {
  color: #1677ff;
  border-color: rgba(64, 150, 255, .36);
  background: rgba(64, 150, 255, .08);
}

.media-library-type-tabs button.is-active {
  box-shadow: inset 3px 0 0 #4096ff;
}

.media-library-type-tabs span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-library-type-tabs strong {
  color: #98a2b3;
  font-size: 12px;
}

.media-library-side-search,
.media-library-search {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.media-library-side-search {
  min-height: 42px;
  padding: 0 12px;
}

.media-library-side-search input,
.media-library-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.media-library-side-search i,
.media-library-search i {
  color: #98a2b3;
}

.media-library-groups {
  min-height: 0;
  display: grid;
  gap: 6px;
  overflow: auto;
}

.media-library-groups button {
  min-height: 48px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #475569;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.media-library-groups button:hover,
.media-library-groups button.is-active {
  color: #1677ff;
  background: rgba(64, 150, 255, .09);
}

.media-library-groups span {
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-library-groups strong {
  color: #98a2b3;
  font-size: 12px;
}

.media-library-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff;
}

.media-library-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
}

.media-library-search {
  width: min(520px, 100%);
  min-height: 46px;
  padding: 0 14px;
}

.media-library-upload-tile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(64, 150, 255, .18);
  border-radius: 8px;
  color: #4096ff;
  background: rgba(64, 150, 255, .08);
  font-weight: 800;
  cursor: pointer;
}

.media-library-upload-tile:hover {
  border-color: rgba(64, 150, 255, .4);
  background: rgba(64, 150, 255, .13);
}

.media-library-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 22px;
  align-content: start;
  padding: 26px;
  overflow: auto;
}

.media-picker-upload-card {
  min-height: 172px;
  display: grid;
  place-content: center;
  gap: 10px;
  border: 1px dashed #b7c7d9;
  border-radius: 8px;
  color: #64748b;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.media-picker-upload-card:hover {
  border-color: #4096ff;
  color: #4096ff;
  background: #f3f8ff;
  transform: translateY(-1px);
}

.media-picker-upload-card i {
  color: currentColor;
  font-size: 32px;
  text-align: center;
}

.media-picker-upload-card span {
  font-size: 13px;
  font-weight: 800;
}

.image-picker-grid {
  max-height: min(620px, calc(100vh - 180px));
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  padding: 20px 24px 24px;
  overflow: auto;
}

.image-picker-card {
  min-width: 0;
  display: grid;
  grid-template-rows: 172px auto auto;
  gap: 7px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.image-picker-card:hover {
  border-color: rgba(64, 150, 255, .28);
  box-shadow: 0 12px 26px rgba(30, 80, 140, .12);
  transform: translateY(-1px);
}

.image-picker-card.is-selected {
  border-color: #4096ff;
  box-shadow: 0 0 0 3px rgba(64, 150, 255, .14);
}

.media-library-thumb {
  width: 100%;
  height: 172px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #f3f6f8;
}

.image-picker-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #f3f6f8;
}

.media-library-file-icon {
  width: 70px;
  height: 70px;
  display: inline-grid;
  place-items: center;
  border-radius: 20px;
  color: #4096ff;
  background: rgba(64, 150, 255, .1);
  font-size: 30px;
}

.image-picker-card span,
.image-picker-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-picker-card span {
  padding: 0 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.image-picker-card em {
  padding: 0 4px 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.media-library-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 26px 22px;
  border-top: 1px solid var(--border);
}

.media-library-pagination {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.media-library-pagination .page-btn,
.media-library-pagination .page-ellipsis {
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  color: #667085;
  background: #f3f5f8;
  font-weight: 800;
}

.media-library-pagination .page-btn {
  cursor: pointer;
}

.media-library-pagination .page-btn.is-active {
  color: #fff;
  background: #4096ff;
}

.media-library-pagination .page-btn:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.media-library-total {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.setting-list input {
  width: 110px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.settings-table input,
.settings-table select,
.integration-row input,
.integration-row select {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.settings-table {
  min-width: 520px;
}

.integration-list {
  display: grid;
  gap: 12px;
  padding: 20px 28px 24px;
}

.integration-row {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) minmax(110px, .45fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: center;
}

.switch {
  width: 46px;
  height: 26px;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  width: 46px;
  height: 26px;
  position: relative;
  border-radius: 999px;
  background: #dbe3ee;
  transition: background .18s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 35, 70, .2);
  transition: transform .18s ease;
}

.switch input:checked + span {
  background: var(--primary);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .46);
}

.modal {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.modal.edit-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal.edit-modal .edit-modal-head,
.modal.edit-modal .edit-modal-footer {
  position: sticky;
  z-index: 1;
  background: #fff;
}

.modal.edit-modal .edit-modal-head {
  top: 0;
  min-height: 84px;
  align-items: center;
}

.modal.edit-modal .edit-modal-footer {
  bottom: 0;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  border-bottom: 0;
  background: #fbfcff;
  box-shadow: 0 -12px 30px rgba(15, 23, 42, .06);
}

.modal.edit-modal .edit-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.modal.edit-modal .edit-modal-footer .btn {
  min-width: 112px;
}

.information-category-body {
  display: grid;
  gap: 14px;
}

.information-category-toolbar {
  display: flex;
  justify-content: flex-start;
}

.information-category-list {
  display: grid;
  gap: 12px;
}

.information-category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.information-category-row .field {
  margin: 0;
}

.information-category-row .field input {
  min-height: 48px;
}

.information-category-row .category-remove {
  min-width: 76px;
}

@media (max-width: 760px) {
  .modal.edit-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .modal.edit-modal .edit-modal-head,
  .modal.edit-modal .edit-modal-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .modal.edit-modal .edit-modal-footer .btn {
    min-width: 96px;
  }

  .information-category-row {
    grid-template-columns: 1fr;
  }

  .information-category-row .category-remove {
    width: 100%;
  }
}

.modal.image-picker-modal {
  width: min(1720px, calc(100vw - 28px));
  height: min(940px, calc(100vh - 24px));
  max-height: min(940px, calc(100vh - 24px));
  overflow: hidden;
}

.modal.image-picker-modal.media-library-modal {
  width: min(1780px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
}

.account-modal {
  width: min(1120px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 850;
}

.modal-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.modal-close {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #64748b;
  background: #fff;
  font-size: 22px;
}

.modal-close:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.account-modal-body {
  display: grid;
  gap: 22px;
  padding: 0 26px 26px;
  overflow: auto;
}

.account-hero {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 92px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfcff;
}

.account-hero .account-avatar-summary {
  width: 64px;
  height: 64px;
}

.account-hero-copy strong,
.account-hero-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-hero-copy strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 850;
}

.account-hero-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.modal-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 160px)) minmax(0, 1fr);
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
}

.modal-tab {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: #64748b;
  background: transparent;
  font-size: 15px;
  font-weight: 850;
}

.modal-tab.is-active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 14px 28px rgba(198, 138, 22, .2);
}

.account-pane {
  min-width: 0;
}

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

.account-grid .field {
  margin: 0;
}

.account-grid .field span,
.avatar-field-head strong {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.account-grid .field input[readonly] {
  color: #64748b;
  background: #f8fafc;
}

.wide {
  grid-column: 1 / -1;
}

.avatar-field {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.avatar-field-head {
  display: grid;
  gap: 5px;
}

.avatar-field-head span {
  color: var(--muted);
}

.avatar-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.avatar-option {
  position: relative;
  min-height: 116px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.avatar-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(198, 138, 22, .06);
  box-shadow: 0 14px 28px rgba(198, 138, 22, .12);
}

.avatar-option-label {
  color: #64748b;
  font-weight: 800;
}

.avatar-upload {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: start;
  padding: 0 16px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-weight: 800;
  cursor: pointer;
}

.avatar-upload input {
  display: none;
}

.account-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.modal-footer {
  justify-content: flex-end;
  margin-top: auto;
  border-top: 1px solid var(--border);
  border-bottom: 0;
  background: #f8fafc;
}

.modal-body {
  padding: 16px 18px;
}

.empty {
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

body.soft-dark {
  --bg: #111827;
  --surface: #172033;
  --surface-soft: #1f2a3d;
  --text: #f8fafc;
  --muted: #9ca8bb;
  --border: #2b374c;
}

body.soft-dark .sidebar-left,
body.soft-dark .topnav,
body.soft-dark .field input,
body.soft-dark .field select,
body.soft-dark .field textarea,
body.soft-dark .filters input,
body.soft-dark .filters select,
body.soft-dark .settings-table input,
body.soft-dark .settings-table select,
body.soft-dark .integration-row input,
body.soft-dark .integration-row select,
body.soft-dark .setting-list input,
body.soft-dark .file-upload-inline input,
body.soft-dark .file-picker,
body.soft-dark .account-grid .field input {
  background: var(--surface);
}

body.soft-dark .sidebar-title strong,
body.soft-dark .page-title h1,
body.soft-dark .panel-head h2,
body.soft-dark .overview-card strong,
body.soft-dark .overview-hero-head strong {
  color: var(--text);
}

body.soft-dark .btn.secondary {
  color: #e5edf8;
  border-color: #46556d;
  background: #243147;
}

body.soft-dark .btn.secondary:hover {
  color: #ffffff;
  border-color: #64748b;
  background: #2d3b53;
}

body.soft-dark .btn.soft {
  color: #f8d98a;
  background: rgba(198, 138, 22, .18);
}

body.soft-dark .btn.danger {
  color: #fecaca;
  background: rgba(220, 38, 38, .18);
}

body.soft-dark .btn:disabled,
body.soft-dark .btn:disabled:hover {
  color: #94a3b8;
  border-color: #334155;
  background: #1f2937;
  opacity: 1;
}

body.soft-dark .top-search:focus-within {
  color: #72e4c7;
  background: rgba(114, 228, 199, .08);
}

body.soft-dark .top-search input:focus,
body.soft-dark .top-search input:focus-visible {
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  background: transparent !important;
}

body.soft-dark .filters input,
body.soft-dark .filters select {
  color: #e5edf8;
  border-color: #46556d;
}

body.soft-dark .file-card,
body.soft-dark .avatar-option {
  background: var(--surface);
}

body.soft-dark .file-preview {
  background: #111827;
}

body.soft-dark .file-picker {
  border-color: #46556d;
}

body.soft-dark .file-picker-button {
  color: #f8fafc;
  border-color: #46556d;
  background: #243147;
}

body.soft-dark .file-picker-name,
body.soft-dark .file-upload-inline input,
body.soft-dark .settings-table input,
body.soft-dark .settings-table select,
body.soft-dark .integration-row input,
body.soft-dark .integration-row select,
body.soft-dark .setting-list input {
  color: #e5edf8;
}

body.soft-dark .settings-subsection,
body.soft-dark .wechat-pem-block {
  border-color: #273349;
  background: #172236;
}

body.soft-dark .settings-save-bar {
  border-color: rgba(73, 217, 180, .22);
  background: linear-gradient(135deg, rgba(24, 48, 45, .82), rgba(19, 28, 44, .92));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

body.soft-dark .settings-save-bar strong {
  color: #f1f7fb;
}

body.soft-dark .settings-save-bar span {
  color: #aab5c5;
}

body.soft-dark .settings-tabs {
  color: #edf3fb;
}

body.soft-dark .settings-tab {
  color: #aab5c5;
  border-color: #273349;
  background: #172236;
}

body.soft-dark .settings-tab:hover {
  border-color: rgba(73, 217, 180, .32);
  background: #1b2940;
}

body.soft-dark .settings-tab.is-active {
  color: #f8fafc;
  border-color: rgba(73, 217, 180, .38);
  background: linear-gradient(180deg, #1a3241, #162234);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}

body.soft-dark .settings-tab i,
body.soft-dark .settings-tab em {
  color: inherit;
}

body.soft-dark .settings-card,
body.soft-dark .settings-protocol-group,
body.soft-dark .settings-inline-number {
  border-color: #273349;
  background: #172236;
}

body.soft-dark .protocol-public-links a {
  border-color: rgba(114, 183, 255, .18);
  color: #9ec7ff;
  background: rgba(114, 183, 255, .08);
}

body.soft-dark .protocol-public-links a:hover {
  border-color: rgba(114, 183, 255, .32);
  background: rgba(114, 183, 255, .13);
}

body.soft-dark .protocol-editor {
  color: #edf3fb;
  border-color: #38465f;
  background: #202b40;
}

body.soft-dark .settings-card-head p,
body.soft-dark .settings-protocol-group span,
body.soft-dark .settings-inline-number span {
  color: #aab5c5;
}

body.soft-dark .settings-inline-number input {
  color: #eef4fb;
  border-color: #38465f;
  background: #202b40;
}

body.soft-dark .settings-compact-form .field input,
body.soft-dark .settings-compact-form .field select,
body.soft-dark .settings-compact-form .field textarea,
body.soft-dark .settings-compact-form .setting-list input,
body.soft-dark .settings-compact-form .integration-row input,
body.soft-dark .settings-compact-form .integration-row select {
  color: #edf3fb;
  border-color: #38465f;
  background: #202b40;
}

body.soft-dark .app-force-update-field .inline-switch-card {
  color: #edf3fb;
  border-color: #273349;
  background: #172236;
}

body.soft-dark .inline-switch-card strong {
  color: #edf3fb;
}

body.soft-dark .inline-switch-card span {
  color: #aab5c5;
}

body.soft-dark .wechat-pem-block.is-compact {
  border-top-color: #273349;
  background: transparent;
}

body.soft-dark .wechat-pem-field > span,
body.soft-dark .wechat-pem-field textarea {
  color: #edf3fb;
}

body.soft-dark .wechat-pem-field textarea {
  border-bottom-color: rgba(73, 217, 180, .55);
}

body.soft-dark .wechat-pem-field:nth-child(2) textarea {
  border-bottom-color: rgba(114, 183, 255, .68);
}

body.soft-dark .wechat-pem-field textarea::placeholder,
body.soft-dark .wechat-pem-field em {
  color: #8fa0b7;
}

@media (max-width: 1400px) {
  .main-content {
    padding-left: 36px;
    padding-right: 36px;
  }

  .topnav {
    margin-left: -36px;
    margin-right: -36px;
    padding-left: 36px;
    padding-right: 36px;
  }

  .overview-card-grid {
    gap: 24px;
  }
}

@media (max-width: 1180px) {
  .overview-hero-head,
  .overview-card-grid,
  .permission-layout,
  .file-manager-layout,
  .two-col,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .hero-kpis,
  .permission-matrix,
  .permission-menu-grid,
  .file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .login-brand {
    min-height: 46vh;
    padding: 34px;
  }

  .login-panel {
    padding: 32px;
  }

  .sidebar-left {
    width: min(16rem, 86vw);
    min-width: 0;
    max-width: min(16rem, 86vw);
    transform: translateX(-100%);
    transition: transform .24s ease;
  }

  body.sidebar-open .sidebar-left {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 0 18px 34px;
  }

  .topnav {
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin: 0 -18px 22px;
    padding: 0 18px;
  }
}

@media (max-width: 720px) {
  .login-showcase,
  .hero-kpis,
  .overview-card,
  .overview-card-grid,
  .form-grid,
  .permission-matrix,
  .permission-menu-grid,
  .avatar-options,
  .account-grid,
  .file-grid,
  .file-upload-inline {
    grid-template-columns: 1fr;
  }

  .topnav {
    min-height: 132px;
  }

  .top-search {
    grid-column: 2 / -1;
  }

  .page-titlebar {
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 8px;
  }

  .user-dropdown {
    right: -4px;
    width: min(294px, calc(100vw - 24px));
  }

  .overview-hero {
    min-height: auto;
    padding: 28px 20px 18px;
  }

  .hero-chart {
    height: 180px;
    margin-top: 28px;
  }

  .filters,
  .panel-head .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .filters input,
  .filters select,
  .filters .btn {
    flex: 1 1 150px;
  }

  .setting-list div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

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

  .account-modal {
    width: min(100%, calc(100vw - 20px));
  }

  .account-modal-body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .modal-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: var(--radius);
  }

  .account-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .login-brand {
    padding: 28px 22px;
  }

  .login-panel {
    padding: 24px 18px 34px;
  }

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

  .panel-head,
  .activity,
  .form-grid,
  .permission-matrix,
  .permission-menu-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

  .btn.soft span {
    display: none;
  }
}

/* Gulhan mint admin redesign */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.qg-login {
  background: #eef9f7;
}

.gulhan-login-layout {
  min-height: 100vh;
  grid-template-columns: minmax(520px, 1fr) minmax(420px, 700px);
  align-items: center;
  padding: clamp(36px, 6vw, 86px);
  background:
    linear-gradient(180deg, rgba(246, 255, 253, .78), rgba(236, 249, 247, .98)),
    #eef9f7;
}

.gulhan-login-layout .login-brand {
  min-height: min(720px, calc(100vh - 120px));
  justify-content: center;
  align-items: center;
  gap: 58px;
  padding: 40px;
  color: var(--text);
  background: transparent;
}

.login-brand-copy {
  text-align: center;
}

.login-brand-copy h1 {
  margin: 0;
  color: #1f2937;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 620;
  letter-spacing: .14em;
}

.login-brand-copy p {
  max-width: 560px;
  margin: 22px auto 0;
  color: #9aa7b2;
  font-size: 17px;
  line-height: 2;
  letter-spacing: .04em;
}

.login-illustration {
  position: relative;
  width: min(520px, 86%);
  height: 430px;
}

.illustration-board {
  position: absolute;
  right: 32px;
  bottom: 42px;
  width: 270px;
  height: 300px;
  border: 4px solid #286b62;
  border-radius: 8px;
  background: linear-gradient(145deg, #9ce8d5, #72d7bd);
  box-shadow: 10px 12px 0 rgba(22, 70, 62, .22);
}

.illustration-board::before {
  content: "";
  position: absolute;
  top: -3px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 0 6px 0 14px;
  background: #286b62;
}

.board-card {
  position: absolute;
  top: 42px;
  left: 20px;
  width: 110px;
  height: 70px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 18px rgba(20, 94, 80, .12);
}

.board-card::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #69d8bd;
}

.board-card i,
.board-lines i,
.board-checks i {
  display: block;
}

.board-card i {
  position: absolute;
  left: 50px;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #9fe6d4;
}

.board-card i:nth-child(1) { top: 16px; }
.board-card i:nth-child(2) { top: 31px; width: 52px; }
.board-card i:nth-child(3) { top: 46px; width: 34px; }

.board-lines {
  position: absolute;
  left: 52px;
  right: 24px;
  top: 132px;
  display: grid;
  gap: 13px;
}

.board-lines i {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
}

.board-lines i:nth-child(even) {
  width: 78%;
  justify-self: end;
}

.board-checks {
  position: absolute;
  right: 26px;
  top: 160px;
  display: grid;
  gap: 15px;
}

.board-checks i {
  width: 13px;
  height: 13px;
  border: 3px solid rgba(255, 255, 255, .8);
}

.board-dot {
  position: absolute;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
}

.dot-one { right: 52px; }
.dot-two { right: 36px; }
.dot-three { right: 20px; }

.illustration-person {
  position: absolute;
  left: 128px;
  bottom: 32px;
  width: 150px;
  height: 210px;
}

.person-head {
  position: absolute;
  left: 58px;
  top: 0;
  width: 62px;
  height: 72px;
  border-radius: 50% 50% 42% 42%;
  background: #854337;
}

.person-head::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: -18px;
  width: 58px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 -12px 0 #f0eee7;
}

.person-body {
  position: absolute;
  left: 22px;
  top: 76px;
  width: 118px;
  height: 122px;
  border-radius: 56px 56px 12px 12px;
  background: linear-gradient(90deg, #f6fff9 0 48%, #e9efe6 49% 52%, #fffdf5 53% 100%);
}

.person-body::before,
.person-body::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: #1f2937;
}

.person-body::before {
  left: 18px;
  top: 24px;
  width: 3px;
  height: 64px;
  transform: rotate(-18deg);
}

.person-body::after {
  right: 20px;
  top: 24px;
  width: 3px;
  height: 64px;
  transform: rotate(18deg);
}

.person-device {
  position: absolute;
  left: 10px;
  bottom: 0;
  width: 42px;
  height: 96px;
  border-radius: 8px;
  background: #6470f4;
  transform: rotate(-15deg);
  box-shadow: 0 10px 18px rgba(79, 70, 229, .2);
}

.person-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  border-radius: 999px;
  background: #35cfaa;
}

.illustration-plus {
  position: absolute;
  display: grid;
  place-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: #84e0c9;
  font-size: 19px;
  font-weight: 850;
}

.plus-one {
  left: 66px;
  bottom: 148px;
}

.plus-two {
  right: 166px;
  top: 82px;
}

.gulhan-login-layout .login-panel {
  min-height: min(720px, calc(100vh - 120px));
  padding: 0;
  background: transparent;
}

.gulhan-login-layout .login-card {
  position: relative;
  width: min(100%, 780px);
  max-width: 780px;
  min-height: 660px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px clamp(72px, 7vw, 108px);
  border: 1px solid rgba(226, 237, 235, .9);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 46px rgba(51, 93, 87, .08);
}

.gulhan-login-layout .login-card-head {
  display: grid;
  justify-items: center;
  gap: 26px;
  margin-bottom: 54px;
  text-align: center;
}

.gulhan-login-layout .login-logo {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(66, 214, 173, .25);
}

.gulhan-login-layout .login-card h2 {
  color: #303846;
  font-size: 34px;
  font-weight: 520;
  letter-spacing: .22em;
}

.login-field {
  position: relative;
  width: min(100%, 560px);
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 28px;
}

.login-field i {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: #b8c7c4;
  font-size: 18px;
}

.login-field input {
  width: 100%;
  height: 66px;
  padding: 0 22px 0 58px;
  border: 0;
  border-radius: 8px;
  color: #273344;
  background: #f2fbf9;
  font-size: 17px;
  outline: 0;
  transition: box-shadow .18s ease, background .18s ease;
}

.login-field input::placeholder {
  color: #c1cbc9;
}

.login-field input:focus {
  background: #effaf7;
  box-shadow: 0 0 0 3px rgba(66, 214, 173, .2);
}

.login-agree {
  width: min(100%, 560px);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px auto 28px;
  color: #b1bab8;
  font-size: 16px;
}

.login-agree input {
  width: 24px;
  height: 24px;
  accent-color: var(--primary);
}

.login-agree span {
  overflow-wrap: anywhere;
}

.login-submit {
  width: min(100%, 560px);
  height: 68px;
  margin: 0 auto;
  border: 0;
  border-radius: 8px;
  background: #3fd1aa;
  box-shadow: 0 14px 28px rgba(51, 207, 168, .22);
  font-size: 22px;
  font-weight: 620;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .18s ease, box-shadow .18s ease, opacity .18s ease, transform .18s ease;
}

.login-submit:hover {
  background: #27bf99;
}

.login-submit:disabled {
  opacity: .88;
  cursor: wait;
  transform: none;
}

.login-submit.is-loading {
  background: #2fc59d;
  box-shadow: 0 12px 30px rgba(47, 197, 157, .2);
}

.login-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, .44);
  border-top-color: #fff;
  border-radius: 999px;
  animation: routeSpin .78s linear infinite;
}

.login-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(5px);
  animation: routeOverlayIn .16s ease both;
}

.login-loading-overlay[hidden] {
  display: none;
}

.login-loading-card {
  width: min(100%, 232px);
  min-height: 138px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px 24px;
  border: 1px solid rgba(224, 239, 235, .92);
  border-radius: 8px;
  color: #243044;
  text-align: center;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 46px rgba(24, 48, 72, .12);
}

.login-loading-ring {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(66, 214, 173, .18);
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: routeSpin .82s linear infinite;
}

.login-loading-card strong {
  font-size: 15px;
  font-weight: 820;
}

.login-loading-card em {
  color: #92a09d;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.login-forgot {
  width: min(100%, 560px);
  margin: 26px auto 0;
  color: #c0c7c7;
  text-align: center;
  font-size: 15px;
}

.dashboard-shell {
  min-height: 100vh;
  background: var(--bg);
}

.icon-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 55;
  width: 76px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
  padding: 18px 10px;
  color: #fff;
  background: var(--rail);
  box-shadow: 8px 0 24px rgba(7, 13, 43, .08);
}

.rail-brand,
.rail-nav-item,
.rail-action {
  border: 0;
  background: transparent;
}

.rail-brand {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 820;
}

.rail-logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

.rail-nav {
  width: 100%;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 20px;
  margin-top: 46px;
}

.rail-nav-item,
.rail-action {
  width: 50px;
  height: 50px;
  display: grid;
  place-content: center;
  border-radius: 10px;
  color: rgba(255, 255, 255, .82);
  font-size: 24px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.rail-nav-item:hover,
.rail-nav-item.is-active,
.rail-action:hover {
  color: #fff;
  background: var(--primary);
  transform: translateY(-1px);
}

.rail-bottom {
  display: grid;
  gap: 12px;
}

.sidebar-left {
  left: 76px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  padding: 0 14px 24px;
  color: #596374;
  background: #fff;
  border-right: 1px solid #edf1f4;
  box-shadow: none;
}

.sidebar-left::-webkit-scrollbar {
  width: 5px;
}

.sidebar-left::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #dbe8e4;
}

.sidebar-header {
  height: 76px;
  display: grid;
  align-items: center;
  justify-items: start;
  gap: 2px;
  margin: 0 0 12px;
  padding: 0 16px;
  text-align: left;
  border-bottom: 1px solid #edf1f4;
}

.sidebar-title span {
  margin: 0;
  color: #9aa7b5;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-title strong {
  margin-top: 4px;
  color: #1f2937;
  font-size: 18px;
  font-weight: 780;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-title em {
  display: block;
  margin-top: 4px;
  max-width: 100%;
  overflow: hidden;
  color: #a6b0bd;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vertnav {
  display: grid;
  gap: 8px;
  padding: 8px 0 20px;
}

.nav-heading {
  margin: 22px 0 10px;
  padding: 0 16px;
  color: #9aa7b5;
  font-size: 12px;
  font-weight: 780;
}

.nav-heading:first-child {
  margin-top: 4px;
}

.nav-group {
  gap: 8px;
  margin-bottom: 10px;
}

.nav-group-toggle,
.nav-item {
  min-height: 44px;
  border-radius: 6px;
  color: #8b95a4;
  font-size: 14px;
  font-weight: 760;
}

.nav-group-toggle {
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  gap: 10px;
  padding: 0 14px;
}

.nav-sublist {
  gap: 8px;
  padding: 6px 0 4px;
}

.nav-item {
  min-height: 42px;
  padding: 0 14px 0 48px;
}

.nav-item.nav-direct {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  padding: 0 14px;
}

.nav-group-toggle:hover,
.nav-group.has-active-page .nav-group-toggle,
.nav-item:hover,
.nav-item.is-active {
  color: #fff;
  background: var(--primary);
}

.nav-group-toggle:hover .nav-chevron,
.nav-group.has-active-page .nav-chevron {
  color: #fff;
}

.nav-count {
  background: rgba(255, 255, 255, .24);
  color: inherit;
}

.main-content {
  margin-left: 296px;
  padding: 0 28px 40px;
}

.topnav {
  min-height: 76px;
  grid-template-columns: 44px minmax(260px, 1fr) auto;
  gap: 24px;
  margin: 0 -28px 28px;
  padding: 0 30px;
  border-bottom: 1px solid #edf1f4;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(18px);
}

.topnav .top-actions {
  gap: 16px;
}

.top-search {
  width: min(560px, 100%);
  height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  color: #a8b6b3;
  background: #fff;
}

.todo-drawer-open {
  overflow: hidden;
}

.todo-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 91;
  display: flex;
  justify-content: flex-end;
  padding: 18px;
  background: rgba(15, 23, 42, .34);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.todo-drawer-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.todo-drawer {
  width: min(620px, calc(100vw - 36px));
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: -22px 0 64px rgba(15, 23, 42, .18);
  transform: translateX(34px);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}

.todo-drawer-mask.is-open .todo-drawer {
  transform: translateX(0);
}

.todo-drawer-head,
.todo-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}

.todo-drawer-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  border-bottom: 0;
}

.todo-drawer-head h2 {
  margin: 0;
  color: #172033;
  font-size: 24px;
  font-weight: 900;
}

.todo-drawer-head p {
  margin: 6px 0 0;
  color: #71809a;
  font-size: 14px;
}

.todo-drawer-close {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  color: #64748b;
  background: #f8fbff;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.todo-drawer-close:hover {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, .28);
  background: #eef6ff;
  transform: translateY(-1px);
}

.todo-drawer-close i {
  font-size: 24px;
}

.todo-drawer-body {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px 22px 24px;
  overflow: auto;
}

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

.todo-summary-pill {
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #66758a;
  background: #f8fbff;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.todo-summary-pill:hover {
  border-color: rgba(37, 99, 235, .25);
  background: #eef6ff;
  transform: translateY(-1px);
}

.todo-summary-pill i {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #4096ff;
  font-size: 17px;
}

.todo-summary-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.todo-summary-pill b {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  color: #6b7280;
  background: #edf2f7;
  font-size: 12px;
}

.todo-summary-pill.has-count b {
  color: #fff;
  background: #ef4444;
}

.todo-group {
  display: grid;
  gap: 12px;
}

.todo-group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}

.todo-group-head h3 {
  margin: 0;
  color: #172033;
  font-size: 15px;
  font-weight: 900;
}

.todo-group-head h3 span {
  color: #ef4444;
}

.todo-group-head p {
  margin: 4px 0 0;
  color: #71809a;
  font-size: 12px;
}

.todo-list {
  display: grid;
  gap: 12px;
}

.todo-notice-card {
  width: 100%;
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  color: inherit;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.todo-notice-card:hover {
  border-color: rgba(64, 150, 255, .3);
  background: #fcfeff;
  box-shadow: 0 14px 30px rgba(25, 60, 100, .1);
  transform: translateY(-1px);
}

.todo-notice-icon {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #2563eb;
  background: #eaf2ff;
}

.todo-notice-icon i {
  font-size: 25px;
}

.todo-notice-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.todo-notice-main strong,
.todo-notice-main em,
.todo-notice-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-notice-main strong {
  color: #172033;
  font-size: 16px;
  font-weight: 900;
}

.todo-notice-main em {
  color: #6b7a93;
  font-size: 14px;
  font-style: normal;
}

.todo-notice-main small {
  color: #71809a;
  font-size: 13px;
}

.todo-status {
  justify-self: end;
  white-space: nowrap;
}

.todo-notice-card.tone-rose .todo-notice-icon,
.todo-summary-pill.tone-rose i {
  color: #dc2626;
  background: #fee2e2;
}

.todo-notice-card.tone-yellow .todo-notice-icon,
.todo-summary-pill.tone-yellow i {
  color: #d97706;
  background: #fff4df;
}

.todo-notice-card.tone-orange .todo-notice-icon,
.todo-summary-pill.tone-orange i {
  color: #ea580c;
  background: #ffedd5;
}

.todo-notice-card.tone-green .todo-notice-icon,
.todo-summary-pill.tone-green i {
  color: #047857;
  background: #dcfce7;
}

.todo-notice-card.tone-purple .todo-notice-icon,
.todo-summary-pill.tone-purple i {
  color: #7c3aed;
  background: #f3e8ff;
}

.todo-notice-card.tone-red .todo-notice-icon,
.todo-summary-pill.tone-red i {
  color: #dc2626;
  background: #fee2e2;
}

.todo-notice-card.tone-indigo .todo-notice-icon,
.todo-summary-pill.tone-indigo i {
  color: #4f46e5;
  background: #eef2ff;
}

.todo-notice-card.is-skeleton {
  cursor: default;
  pointer-events: none;
}

.todo-notice-card.is-skeleton i,
.todo-notice-card.is-skeleton b,
.todo-notice-card.is-skeleton span,
.todo-notice-card.is-skeleton em {
  min-height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #edf2f7, #f8fafc, #edf2f7);
  background-size: 240% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.todo-notice-card.is-skeleton i {
  width: 58px;
  height: 58px;
  border-radius: 16px;
}

.todo-notice-card.is-skeleton b {
  width: 160px;
}

.todo-notice-card.is-skeleton span {
  width: 210px;
}

.todo-notice-card.is-skeleton em {
  width: 128px;
}

.todo-drawer-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #71809a;
  text-align: center;
}

.todo-drawer-empty i {
  width: 68px;
  height: 68px;
  display: inline-grid;
  place-items: center;
  border-radius: 22px;
  color: #10a875;
  background: #e7fbf5;
  font-size: 30px;
}

.todo-drawer-empty strong {
  color: #172033;
  font-size: 18px;
}

@keyframes shimmer {
  0% {
    background-position: 140% 0;
  }
  100% {
    background-position: -140% 0;
  }
}

.top-search input {
  min-height: 44px;
  color: #4b5563;
  font-size: 16px;
}

.top-search input::placeholder {
  color: #c6cecc;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #1f2937;
  background: transparent;
}

.icon-button:hover {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.icon-button.tiny {
  width: 34px;
  height: 34px;
  font-size: 17px;
}

.dot {
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  background: #ff756f;
}

#todo-badge {
  top: -6px;
  right: -6px;
  width: auto;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
  text-align: center;
}

.user-toggle {
  min-height: 54px;
  gap: 10px;
  color: #1f2937;
  font-size: 18px;
  font-weight: 800;
}

.user-toggle-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar-header {
  width: 48px;
  height: 48px;
  box-shadow: 0 0 0 4px #f2f7f6;
}

.page-titlebar {
  margin-bottom: 22px;
}

.page-titlebar h1 {
  font-size: 22px;
  font-weight: 780;
}

.panel,
.kpi,
.dashboard-kpi-card {
  border: 1px solid #edf1f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(18, 37, 57, .035);
}

.panel-head {
  min-height: 66px;
  padding: 18px 24px;
}

.panel-head.compact {
  min-height: 56px;
  padding: 18px 24px 12px;
  border-bottom: 0;
}

.panel-head h2 {
  font-size: 18px;
  font-weight: 780;
}

.dashboard-welcome {
  margin: 8px 0 22px;
}

.dashboard-welcome h1 {
  margin: 0;
  color: #2c3442;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 760;
}

.dashboard-welcome h1 span {
  font-size: 26px;
}

.dashboard-welcome p {
  margin: 8px 0 0;
  color: #9aa7b5;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}

.dashboard-kpi-card {
  min-height: 150px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
  gap: 10px;
  padding: 22px 24px;
  overflow: hidden;
}

.kpi-copy span,
.kpi-copy strong,
.kpi-copy em {
  display: block;
}

.kpi-copy span {
  color: #a2adb9;
  font-size: 16px;
  font-weight: 650;
}

.kpi-copy strong {
  margin-top: 8px;
  color: #252b36;
  font-size: 42px;
  line-height: 1;
  font-weight: 820;
}

.kpi-copy em {
  width: fit-content;
  margin-top: 10px;
  padding: 4px 9px;
  border-radius: 6px;
  color: #42c5a3;
  background: #effaf7;
  font-size: 13px;
  font-style: normal;
  font-weight: 760;
}

.kpi-copy em i {
  margin-right: 5px;
}

.kpi-copy em.is-down {
  color: #ff756f;
  background: #fff0ef;
}

.kpi-sparkline {
  width: 150px;
  height: 74px;
  align-self: end;
}

.kpi-sparkline polyline {
  stroke: #42d6ad;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-sparkline polygon {
  fill: rgba(66, 214, 173, .18);
}

.kpi-sparkline.is-red polyline {
  stroke: #ff756f;
}

.kpi-sparkline.is-red polygon {
  fill: rgba(255, 117, 111, .18);
}

.kpi-bars {
  height: 92px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
}

.kpi-bars i {
  width: 18px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, #ffd65b, rgba(255, 214, 91, .24));
}

.kpi-bars.is-blue i {
  background: linear-gradient(180deg, #6576ef, rgba(101, 118, 239, .18));
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 22px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 18px;
  padding: 22px 24px 28px;
}

.quick-entry {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #495363;
  font-weight: 760;
}

.quick-entry span {
  width: 58px;
  height: 58px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  font-size: 25px;
}

.quick-entry.mint span { color: #22b992; background: #dcfaf2; }
.quick-entry.yellow span { color: #e8b300; background: #fff8dc; }
.quick-entry.rose span { color: #ef6d74; background: #fff0f1; }
.quick-entry.indigo span { color: #6672ee; background: #eef0ff; }
.quick-entry.blue span { color: #2f86ef; background: #eaf3ff; }

.quick-entry:hover b {
  color: var(--primary-strong);
}

.label-bars {
  display: grid;
  gap: 20px;
  padding: 18px 24px 28px;
}

.label-row {
  display: grid;
  grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) 42px;
  gap: 14px;
  align-items: center;
}

.label-row span {
  color: #9aa7b5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-row div {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #ddf5ef;
}

.label-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #42d6ad;
}

.label-row strong {
  color: #6b7280;
  text-align: right;
  font-weight: 760;
}

.business-pie-wrap {
  min-height: 282px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, .72fr);
  gap: 24px;
  align-items: center;
  padding: 10px 24px 28px;
}

.business-pie {
  width: min(220px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.pie-legend {
  display: grid;
  gap: 16px;
}

.pie-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: #6b7280;
}

.pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.pie-legend b {
  grid-column: 2;
  color: #8b95a4;
  font-weight: 720;
}

.trend-panel {
  margin-top: 22px;
}

.hero-chart {
  height: 260px;
  margin: 8px 24px 26px;
}

.chart-grid line {
  stroke: #edf2f4;
}

.overview-hero,
.overview-card-grid {
  display: none;
}

.btn,
.text-button {
  border-radius: 8px;
}

.btn {
  background: var(--primary);
}

.btn:hover {
  background: var(--primary-strong);
}

.btn.secondary {
  color: #3e4a5a;
  border-color: #e3ebee;
  background: #fff;
}

.btn.secondary:hover {
  color: var(--primary-strong);
  border-color: rgba(66, 214, 173, .48);
  background: #f2fbf9;
}

.btn.soft {
  color: #129c7a;
  background: #e8fbf5;
}

.btn.danger {
  color: #dc2626;
  background: #fff0ef;
}

th {
  color: #94a0ad;
  background: #f8fbfb;
}

td {
  color: #333c4b;
}

.status.green,
.tone-green {
  color: #129c7a;
  background: #e8fbf5;
}

.status.orange,
.tone-orange,
.status.gold,
.tone-gold {
  color: #cf9200;
  background: #fff8dd;
}

.status.red,
.tone-red {
  color: #e14f4a;
  background: #fff0ef;
}

.status.blue,
.tone-blue {
  color: #5367e8;
  background: #eef0ff;
}

.filters input,
.filters select,
.field input,
.field select,
.field textarea,
.settings-table input,
.settings-table select,
.integration-row input,
.integration-row select,
.setting-list input,
.file-upload-inline input {
  border-color: #e3ebee;
  background: #fff;
}

.filters input:focus,
.filters select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.settings-table input:focus,
.settings-table select:focus,
.integration-row input:focus,
.integration-row select:focus,
.setting-list input:focus,
.file-upload-inline input:focus {
  border-color: rgba(66, 214, 173, .72);
  box-shadow: 0 0 0 3px rgba(66, 214, 173, .14);
  outline: 0;
}

.top-search input:focus,
.top-search input:focus-visible {
  border-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  background: transparent !important;
}

.file-picker {
  min-height: 50px;
  border-color: #dce9e6;
  border-radius: 8px;
  background: #fff;
}

.file-picker:focus-within,
.file-picker:hover {
  border-color: rgba(66, 214, 173, .72);
  box-shadow: 0 0 0 3px rgba(66, 214, 173, .14);
}

.file-picker-button {
  min-height: 50px;
  color: #129c7a;
  border-right-color: #dce9e6;
  background: #effaf7;
}

.file-picker-name {
  color: #607080;
}

.file-card {
  border-color: #edf1f4;
  background: #fff;
}

.file-preview {
  background: #f2fbf9;
}

.file-preview-icon {
  color: #129c7a;
  background: #e8fbf5;
}

.permission-toggle,
.permission-card {
  border-color: #e3ebee;
  background: #f8fbfb;
}

.role-item {
  background: #fff;
}

.role-item:hover,
.role-item.is-active,
.avatar-option:has(input:checked) {
  background: #e8fbf5;
}

.modal {
  border-radius: 8px;
}

.modal-tabs {
  border-radius: 8px;
  background: #f4faf8;
}

.modal-tab {
  border-radius: 6px;
}

.modal-tab.is-active {
  background: var(--primary);
  box-shadow: 0 10px 20px rgba(66, 214, 173, .18);
}

body.soft-dark {
  color-scheme: dark;
  --bg: #111827;
  --surface: #182235;
  --surface-soft: #202b40;
  --text: #f8fafc;
  --muted: #a7b2c2;
  --border: #2f3a50;
  --rail: #070d2b;
  --primary-soft: rgba(66, 214, 173, .16);
}

body.soft-dark.qg-login {
  background: #0f172a;
}

body.soft-dark .gulhan-login-layout {
  background: linear-gradient(180deg, #0f172a, #111827);
}

body.soft-dark .gulhan-login-layout .login-brand,
body.soft-dark .login-brand-copy h1 {
  color: #f8fafc;
}

body.soft-dark .gulhan-login-layout .login-card,
body.soft-dark .sidebar-left,
body.soft-dark .topnav,
body.soft-dark .panel,
body.soft-dark .dashboard-kpi-card,
body.soft-dark .modal,
body.soft-dark .role-item,
body.soft-dark .file-card,
body.soft-dark .avatar-option {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}

body.soft-dark .login-loading-overlay {
  background: rgba(17, 24, 39, .66);
}

body.soft-dark .login-loading-card {
  color: #edf3fb;
  border-color: rgba(55, 68, 92, .9);
  background: rgba(24, 34, 53, .94);
  box-shadow: 0 24px 58px rgba(0, 0, 0, .34);
}

body.soft-dark .login-loading-card em {
  color: #aab5c5;
}

body.soft-dark .brand-logo-uploader,
body.soft-dark .brand-logo-preview,
body.soft-dark .brand-preview-shell,
body.soft-dark .brand-preview-sidebar,
body.soft-dark .brand-login-preview {
  color: var(--text);
  border-color: var(--border);
  background: #172134;
}

body.soft-dark .brand-logo-uploader {
  background: linear-gradient(180deg, #182337, #131d30);
}

body.soft-dark .brand-preview-sidebar i {
  background: #24324a;
}

body.soft-dark .brand-preview-sidebar i:nth-of-type(2) {
  background: #27bf99;
}

body.soft-dark .brand-logo-actions input {
  color: #edf3fb;
  border-color: #38465f;
  background: #202b40;
}

body.soft-dark .sidebar-header,
body.soft-dark .panel-head,
body.soft-dark th,
body.soft-dark td,
body.soft-dark .modal-header,
body.soft-dark .modal-footer {
  border-color: var(--border);
}

body.soft-dark .sidebar-title strong,
body.soft-dark .brand-logo-copy strong,
body.soft-dark .brand-preview-sidebar b,
body.soft-dark .brand-login-preview h3,
body.soft-dark .user-toggle,
body.soft-dark .dashboard-welcome h1,
body.soft-dark .kpi-copy strong,
body.soft-dark td,
body.soft-dark .panel-head h2,
body.soft-dark .page-titlebar h1,
body.soft-dark .account-hero-copy strong,
body.soft-dark .user-dropdown-head strong {
  color: var(--text);
}

body.soft-dark .brand-logo-copy span,
body.soft-dark .brand-preview-sidebar span,
body.soft-dark .brand-preview-sidebar em,
body.soft-dark .brand-login-preview p,
body.soft-dark .brand-login-preview span,
body.soft-dark .sidebar-title em {
  color: #aab5c5;
}

body.soft-dark .top-search,
body.soft-dark .login-field input,
body.soft-dark .field input,
body.soft-dark .field select,
body.soft-dark .field textarea,
body.soft-dark .filters input,
body.soft-dark .filters select,
body.soft-dark .settings-table input,
body.soft-dark .settings-table select,
body.soft-dark .integration-row input,
body.soft-dark .integration-row select,
body.soft-dark .setting-list input,
body.soft-dark .file-upload-inline input,
body.soft-dark .file-picker,
body.soft-dark .modal-tabs,
body.soft-dark .account-hero,
body.soft-dark th {
  color: #edf3fb;
  border-color: #38465f;
  background: #202b40;
}

body.soft-dark .icon-button {
  color: #e5edf8;
}

body.soft-dark .icon-button:hover {
  color: #fff;
  background: rgba(66, 214, 173, .14);
}

body.soft-dark .nav-group-toggle,
body.soft-dark .nav-item {
  color: #b4bdca;
}

body.soft-dark .nav-group-toggle:hover,
body.soft-dark .nav-group.has-active-page .nav-group-toggle,
body.soft-dark .nav-item:hover,
body.soft-dark .nav-item.is-active {
  color: #fff;
  background: #27bf99;
}

body.soft-dark .btn.secondary,
body.soft-dark .file-picker-button,
body.soft-dark .modal-close {
  color: #e8f5f2;
  border-color: #3b4a64;
  background: #253149;
}

body.soft-dark .btn.secondary:hover,
body.soft-dark .file-picker:hover .file-picker-button {
  color: #ffffff;
  border-color: rgba(66, 214, 173, .45);
  background: #2a3952;
}

body.soft-dark .btn.soft {
  color: #8af1d6;
  background: rgba(66, 214, 173, .16);
}

body.soft-dark .btn.danger {
  color: #fecaca;
  background: rgba(220, 38, 38, .18);
}

body.soft-dark .btn:disabled,
body.soft-dark .btn:disabled:hover {
  color: #94a3b8;
  border-color: #334155;
  background: #1f2937;
}

body.soft-dark .file-picker-name,
body.soft-dark .file-card-body span,
body.soft-dark .label-row strong,
body.soft-dark .pie-legend span,
body.soft-dark .pie-legend b,
body.soft-dark .activity span {
  color: #a7b2c2;
}

body.soft-dark .file-preview,
body.soft-dark .permission-toggle,
body.soft-dark .permission-card,
body.soft-dark .role-item:hover,
body.soft-dark .role-item.is-active,
body.soft-dark .avatar-option:has(input:checked) {
  background: #202b40;
}

@media (min-width: 992px) {
  body.qg-template.vertical.collapsed {
    --shell-offset: var(--rail-width);
  }

  body.qg-template.vertical.collapsed .sidebar-left {
    width: 0;
    min-width: 0;
    max-width: 0;
    padding-right: 0;
    padding-left: 0;
    opacity: 0;
    pointer-events: none;
    border-right: 0;
  }

  body.qg-template.vertical.collapsed .main-content {
    width: calc(100vw - var(--shell-offset));
    max-width: calc(100vw - var(--shell-offset));
    margin-left: var(--shell-offset);
  }

  body.qg-template.vertical.collapsed .nav-sublist {
    display: none !important;
  }
}

@media (max-width: 1440px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  }

  .pie-panel {
    grid-column: 1 / -1;
  }

  .business-pie-wrap {
    grid-template-columns: minmax(180px, .4fr) minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .gulhan-login-layout {
    grid-template-columns: 1fr;
  }

  .gulhan-login-layout .login-brand {
    min-height: auto;
  }

  .gulhan-login-layout .login-panel {
    min-height: auto;
  }
}

@media (max-width: 991px) {
  .icon-rail {
    width: 64px;
  }

  .rail-logo {
    width: 36px;
    height: 36px;
  }

  .rail-brand span {
    display: none;
  }

  .rail-nav {
    gap: 14px;
    margin-top: 34px;
  }

  .rail-nav-item,
  .rail-action {
    width: 44px;
    height: 44px;
    font-size: 21px;
  }

  .sidebar-left {
    left: 64px;
    width: min(220px, calc(100vw - 64px));
    min-width: 0;
    max-width: min(220px, calc(100vw - 64px));
    transform: translateX(-100%);
  }

  body.sidebar-open .sidebar-left {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 64px;
    padding: 0 18px 32px;
  }

  .topnav {
    margin: 0 -18px 22px;
    padding: 0 18px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .dashboard-main-grid,
  .dashboard-kpi-grid,
  .business-pie-wrap {
    grid-template-columns: 1fr;
  }

  .pie-panel {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .gulhan-login-layout {
    padding: 24px 16px;
  }

  .login-brand-copy h1 {
    font-size: 22px;
    letter-spacing: .08em;
  }

  .login-brand-copy p {
    font-size: 14px;
  }

  .login-illustration {
    height: 310px;
  }

  .illustration-board {
    right: 0;
    bottom: 30px;
    width: 210px;
    height: 235px;
  }

  .illustration-person {
    left: 32px;
    transform: scale(.78);
    transform-origin: left bottom;
  }

  .gulhan-login-layout .login-card {
    min-height: auto;
    padding: 42px 24px;
  }

  .gulhan-login-layout .login-card h2 {
    font-size: 28px;
  }

  .login-field input,
  .login-submit {
    height: 56px;
  }

  .topnav {
    min-height: auto;
    grid-template-columns: 42px minmax(0, 1fr);
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .topnav .top-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
  }

  .top-search {
    grid-column: auto;
  }

  .user-toggle-name {
    display: none;
  }

  .dashboard-kpi-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .kpi-sparkline,
  .kpi-bars {
    justify-self: start;
  }

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

  .label-row {
    grid-template-columns: minmax(80px, 1fr) minmax(0, 1.5fr) 34px;
  }
}

/* Project-wide adaptive containment */
html,
body,
page {
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--app-font-family);
}

:root {
  --rail-width: 76px;
  --menu-width: 220px;
  --shell-offset: calc(var(--rail-width) + var(--menu-width));
  --page-pad: 28px;
  --topnav-height: 76px;
  --topnav-gap: 28px;
  --route-loading-top: var(--topnav-height);
}

.dashboard-shell,
.main-content,
.content,
.container-fluid,
.topnav,
.page-titlebar,
.panel,
.dashboard-kpi-card,
.dashboard-main-grid,
.dashboard-kpi-grid,
.business-pie-wrap,
.quick-panel,
.label-panel,
.pie-panel,
.trend-panel,
.grid,
.table-wrap,
.modal,
.account-modal {
  min-width: 0;
  max-width: 100%;
}

.icon-rail {
  width: var(--rail-width);
}

.sidebar-left {
  left: var(--rail-width);
  width: var(--menu-width);
  min-width: var(--menu-width);
  max-width: var(--menu-width);
}

.main-content {
  width: calc(100vw - var(--shell-offset));
  max-width: calc(100vw - var(--shell-offset));
  margin-left: var(--shell-offset);
  padding-right: var(--page-pad);
  padding-left: var(--page-pad);
  overflow-x: clip;
}

.topnav {
  width: calc(100% + (var(--page-pad) * 2));
  max-width: none;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  margin-right: calc(var(--page-pad) * -1);
  margin-left: calc(var(--page-pad) * -1);
  padding-right: var(--page-pad);
  padding-left: var(--page-pad);
}

.top-search {
  width: min(100%, 620px);
}

.top-actions,
.panel-head .top-actions,
.page-tools,
.row-actions,
.file-card-actions {
  min-width: 0;
  max-width: 100%;
}

.topnav > .top-actions {
  max-width: min(100%, 360px);
  overflow: visible;
}

.user-toggle-name {
  max-width: clamp(72px, 9vw, 160px);
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.dashboard-kpi-card {
  grid-template-columns: minmax(0, 1fr) minmax(88px, 36%);
}

.kpi-copy,
.kpi-copy span,
.kpi-copy strong,
.kpi-copy em {
  min-width: 0;
}

.kpi-copy strong {
  font-size: clamp(30px, 2.25vw, 42px);
  overflow-wrap: anywhere;
}

.kpi-sparkline {
  width: min(100%, 150px);
}

.dashboard-main-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

.dashboard-main-grid > .panel {
  min-width: 0;
}

.quick-grid {
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
}

.business-pie-wrap {
  grid-template-columns: minmax(140px, .82fr) minmax(0, 1fr);
}

.business-pie {
  width: min(220px, 82%);
}

.pie-legend span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hero-chart {
  min-width: 0;
  max-width: calc(100% - 48px);
  overflow: hidden;
}

.hero-chart svg {
  display: block;
  min-width: 0;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr));
}

.settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

.permission-layout {
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
}

.permission-matrix,
.permission-menu-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.file-manager-layout {
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
}

.file-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.file-upload-inline {
  grid-template-columns: minmax(120px, .65fr) minmax(180px, 1fr) auto;
}

.form-grid,
.account-grid,
.avatar-options {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.integration-row {
  grid-template-columns: minmax(110px, .62fr) minmax(100px, .42fr) minmax(0, 1fr);
}

.setting-list div {
  grid-template-columns: minmax(0, 160px) minmax(0, 1fr) auto;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

table {
  max-width: none;
}

@media (max-width: 1540px) {
  :root {
    --menu-width: 204px;
    --page-pad: 24px;
  }

  .nav-item {
    padding-left: 42px;
  }

  .dashboard-main-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  }

  .business-pie-wrap {
    grid-template-columns: 1fr;
  }

  .pie-legend {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (max-width: 1180px) {
  :root {
    --menu-width: 196px;
    --page-pad: 20px;
  }

  .permission-layout,
  .file-manager-layout {
    grid-template-columns: 1fr;
  }

  .file-upload-inline,
  .integration-row,
  .setting-list div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  :root {
    --rail-width: 64px;
    --menu-width: 220px;
    --shell-offset: var(--rail-width);
    --page-pad: 18px;
  }

  .sidebar-left {
    width: min(var(--menu-width), calc(100vw - var(--rail-width)));
    min-width: 0;
    max-width: min(var(--menu-width), calc(100vw - var(--rail-width)));
  }

  .main-content {
    width: calc(100vw - var(--shell-offset));
    max-width: calc(100vw - var(--shell-offset));
    margin-left: var(--shell-offset);
  }
}

@media (max-width: 760px) {
  :root {
    --page-pad: 14px;
    --topnav-height: 132px;
    --topnav-gap: 22px;
  }

  .topnav {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .topnav .top-actions {
    grid-column: 1 / -1;
  }

  .dashboard-kpi-card {
    grid-template-columns: 1fr;
  }

  .kpi-sparkline,
  .kpi-bars {
    justify-self: start;
  }

  .hero-chart {
    max-width: calc(100% - 28px);
    margin-right: 14px;
    margin-left: 14px;
  }
}

/* Compact account menu */
.topnav .icon-button {
  width: 38px;
  height: 38px;
  font-size: 18px;
}

.topnav .user-toggle {
  min-height: 46px;
  gap: 8px;
  font-size: 16px;
}

.topnav .account-avatar-header {
  width: 42px;
  height: 42px;
  box-shadow: 0 0 0 3px #f2f7f6;
}

.user-dropdown {
  width: min(260px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 8px;
}

.user-dropdown-head {
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 6px 12px;
}

.user-dropdown .account-avatar-dropdown {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.user-dropdown-head strong {
  font-size: 15px;
  font-weight: 780;
}

.user-dropdown-head span {
  margin-top: 3px;
  font-size: 12px;
}

.dropdown-action {
  min-height: 38px;
  gap: 9px;
  margin-top: 8px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 760;
}

.dropdown-action i {
  font-size: 16px;
}

.dropdown-logout {
  min-height: 40px;
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: 0;
}

/* Fixed app header */
.main-content {
  padding-top: calc(var(--topnav-height) + var(--topnav-gap));
}

.topnav {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--shell-offset);
  z-index: 34;
  width: auto;
  max-width: none;
  min-height: var(--topnav-height);
  margin: 0;
  padding-right: var(--page-pad);
  padding-left: var(--page-pad);
  box-shadow: 0 10px 26px rgba(24, 48, 72, .045);
}

body.soft-dark .topnav .account-avatar-header {
  box-shadow: 0 0 0 3px #e8f1f0;
}

body.soft-dark .user-dropdown {
  color: #e8eef7;
  border-color: #334158;
  background: #182235;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

body.soft-dark .user-dropdown-head {
  border-bottom-color: #334158;
}

body.soft-dark .user-dropdown-head strong {
  color: #f8fafc;
}

body.soft-dark .user-dropdown-head span {
  color: #aab5c5;
}

body.soft-dark .dropdown-action {
  color: #e8eef7;
  background: transparent;
}

body.soft-dark .dropdown-action:hover {
  color: #ffffff;
  background: #253149;
}

body.soft-dark .dropdown-logout {
  color: #ffffff;
  background: #e2242a;
}

body.soft-dark .dropdown-logout:hover {
  background: #c91d22;
}

.dropdown-account {
  background: #f4f7fc;
  border: 1px solid #dfe7f1;
  color: var(--text);
}

.dropdown-account:hover {
  background: #ebf1f9;
}

body.soft-dark .dropdown-account {
  color: #eef4fb;
  background: #223044;
  border-color: #314156;
}

body.soft-dark .dropdown-account:hover {
  background: #2a3b53;
}

/* Smooth modal tab switching */
.modal-tabs {
  --tab-index: 0;
  position: relative;
  width: fit-content;
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(138px, 160px));
  gap: 8px;
  padding: 6px;
  overflow: hidden;
  isolation: isolate;
}

.modal-tabs::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 20px) / 2);
  border-radius: 6px;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(66, 214, 173, .22);
  transform: translateX(calc(var(--tab-index) * (100% + 8px)));
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), box-shadow .24s ease, background .24s ease;
}

.modal-tab {
  position: relative;
  z-index: 1;
  color: #64748b;
  background: transparent !important;
  box-shadow: none !important;
  transition: color .18s ease, transform .18s ease;
}

.modal-tab:hover {
  color: var(--primary-strong);
}

.modal-tab.is-active {
  color: #fff;
}

.account-pane.is-active {
  animation: accountPaneIn .22s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes accountPaneIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.soft-dark .modal-tabs::before {
  background: #27bf99;
  box-shadow: 0 10px 22px rgba(39, 191, 153, .18);
}

body.soft-dark .modal-tab {
  color: #aab5c5;
}

body.soft-dark .modal-tab:hover {
  color: #d8fff3;
}

body.soft-dark .modal-tab.is-active {
  color: #ffffff;
}

@media (max-width: 720px) {
  .modal-tabs {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-tabs::before,
  .modal-tab,
  .account-pane.is-active {
    transition: none;
    animation: none;
  }
}

/* Smooth sidebar navigation */
.sidebar-left {
  will-change: width, min-width, max-width, opacity, transform;
  transition:
    width .28s cubic-bezier(.2, .8, .2, 1),
    min-width .28s cubic-bezier(.2, .8, .2, 1),
    max-width .28s cubic-bezier(.2, .8, .2, 1),
    padding .28s cubic-bezier(.2, .8, .2, 1),
    opacity .2s ease,
    transform .28s cubic-bezier(.2, .8, .2, 1);
}

.main-content,
.topnav {
  transition:
    width .28s cubic-bezier(.2, .8, .2, 1),
    max-width .28s cubic-bezier(.2, .8, .2, 1),
    margin-left .28s cubic-bezier(.2, .8, .2, 1),
    padding .28s cubic-bezier(.2, .8, .2, 1);
}

.nav-heading,
.nav-group,
.nav-group-toggle,
.nav-item,
.nav-chevron {
  transition:
    color .18s ease,
    background-color .18s ease,
    opacity .22s ease,
    transform .22s cubic-bezier(.2, .8, .2, 1);
}

.nav-group {
  overflow: visible;
}

.nav-group-toggle,
.nav-item {
  will-change: transform, background-color;
}

.nav-group-toggle:hover,
.nav-item:hover {
  transform: translateX(2px);
}

.nav-sublist {
  display: grid !important;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    max-height .3s cubic-bezier(.2, .8, .2, 1),
    opacity .22s ease,
    transform .26s cubic-bezier(.2, .8, .2, 1),
    padding-top .26s cubic-bezier(.2, .8, .2, 1),
    padding-bottom .26s cubic-bezier(.2, .8, .2, 1);
}

.nav-sublist.is-open {
  max-height: 520px;
  padding-top: 6px;
  padding-bottom: 4px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-sublist .nav-item {
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity .2s ease,
    transform .24s cubic-bezier(.2, .8, .2, 1),
    color .18s ease,
    background-color .18s ease;
}

.nav-sublist.is-open .nav-item {
  opacity: 1;
  transform: translateX(0);
}

.nav-sublist.is-open .nav-item:nth-child(2) { transition-delay: .025s; }
.nav-sublist.is-open .nav-item:nth-child(3) { transition-delay: .05s; }
.nav-sublist.is-open .nav-item:nth-child(4) { transition-delay: .075s; }
.nav-sublist.is-open .nav-item:nth-child(5) { transition-delay: .1s; }
.nav-sublist.is-open .nav-item:nth-child(6) { transition-delay: .125s; }
.nav-sublist.is-open .nav-item:nth-child(7) { transition-delay: .15s; }
.nav-sublist.is-open .nav-item:nth-child(8) { transition-delay: .175s; }

body.qg-template.vertical.collapsed .sidebar-left {
  transform: translateX(-8px);
}

body.qg-template.vertical.collapsed .nav-sublist {
  display: none !important;
}

body.sidebar-open .sidebar-left {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-left,
  .main-content,
  .topnav,
  .nav-heading,
  .nav-group,
  .nav-group-toggle,
  .nav-item,
  .nav-chevron,
  .nav-sublist,
  .nav-sublist .nav-item {
    transition: none;
    animation: none;
  }

  .nav-group-toggle:hover,
  .nav-item:hover,
  .nav-sublist,
  .nav-sublist .nav-item,
  body.qg-template.vertical.collapsed .sidebar-left {
    transform: none;
  }
}

/* Account modal tabs visibility fix */
.account-modal .modal-tabs {
  --tab-index: 0;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: min(100%, 360px);
  min-height: 54px;
  padding: 6px;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
}

.account-modal .modal-tabs[data-active-tab="security"] {
  --tab-index: 1;
}

.account-modal .modal-tabs::before {
  z-index: 1;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 2);
  transform: translateX(calc(var(--tab-index) * 100%));
}

.account-modal .modal-tab {
  position: relative;
  z-index: 2;
  min-height: 42px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #64748b !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-indent: 0;
  line-height: 1;
  white-space: nowrap;
}

.account-modal .modal-tab.is-active {
  color: #ffffff !important;
}

body.soft-dark .account-modal .modal-tab {
  color: #aab5c5 !important;
}

body.soft-dark .account-modal .modal-tab.is-active {
  color: #ffffff !important;
}

/* Form polish and custom action dialogs */
.field input::placeholder,
.field textarea::placeholder,
.filters input::placeholder,
.settings-table input::placeholder,
.integration-row input::placeholder,
.setting-list input::placeholder {
  color: #b6c3cd;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8fa0af 50%),
    linear-gradient(135deg, #8fa0af 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.modal-body.form-grid .field label {
  color: #253044;
  font-size: 14px;
  font-weight: 820;
}

.modal-body.form-grid .field input,
.modal-body.form-grid .field select,
.modal-body.form-grid .field textarea {
  min-height: 50px;
  font-size: 15px;
}

.modal-body.form-grid .field textarea {
  min-height: 120px;
}

.action-modal-mask {
  z-index: 90;
  padding: 20px;
  animation: modalFadeIn .18s ease-out;
}

.action-modal {
  width: min(520px, 100%);
  display: grid;
  gap: 20px;
  padding: 24px;
  overflow: visible;
  border: 1px solid #e3ebee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
  animation: modalRiseIn .22s cubic-bezier(.2, .8, .2, 1);
}

.action-modal-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 34px;
  gap: 14px;
  align-items: start;
}

.action-modal-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-content: center;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  background: #f2f6f7;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.action-modal-close:hover {
  color: #162033;
  background: #e5eef1;
  transform: translateY(-1px);
}

.action-modal-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-content: center;
  border-radius: 8px;
  color: #129c7a;
  background: #e8fbf5;
  font-size: 22px;
}

.action-modal-icon.is-danger {
  color: #dc2626;
  background: #fff0ef;
}

.action-modal-icon.is-warning {
  color: #c87913;
  background: #fff7df;
}

.action-modal h2 {
  margin: 0;
  color: #1f2937;
  font-size: 20px;
  font-weight: 820;
}

.action-modal p {
  margin: 6px 0 0;
  color: #64748b;
  line-height: 1.7;
}

.action-modal-field {
  margin: 0;
}

.action-modal-field span {
  color: #253044;
  font-size: 14px;
  font-weight: 820;
}

.action-modal-field input,
.action-modal-field textarea {
  min-height: 48px;
  border-color: #dce6eb;
}

.action-modal-field textarea {
  min-height: 110px;
}

.action-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.action-modal-actions .btn {
  min-height: 38px;
  padding: 0 18px;
}

.btn.danger-solid {
  color: #fff;
  background: #e2242a;
}

.btn.danger-solid:hover {
  background: #c91d22;
}

.load-error-panel .empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 42px 18px;
  text-align: center;
}

.load-error-panel .empty i {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #dc2626;
  background: #fff0ef;
  font-size: 24px;
}

.load-error-panel .empty strong {
  color: var(--text);
  font-size: 18px;
}

.load-error-panel .empty span {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

body.soft-dark .field input::placeholder,
body.soft-dark .field textarea::placeholder,
body.soft-dark .filters input::placeholder,
body.soft-dark .settings-table input::placeholder,
body.soft-dark .integration-row input::placeholder,
body.soft-dark .setting-list input::placeholder {
  color: #77859a;
}

body.soft-dark .field select {
  background-image:
    linear-gradient(45deg, transparent 50%, #b6c3d1 50%),
    linear-gradient(135deg, #b6c3d1 50%, transparent 50%);
}

body.soft-dark .modal.edit-modal .edit-modal-head,
body.soft-dark .modal.edit-modal .edit-modal-footer {
  background: #172235;
}

body.soft-dark .modal.edit-modal .edit-modal-footer {
  border-top-color: #2f3a4f;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .26);
}

body.soft-dark .modal-body.form-grid .field label,
body.soft-dark .action-modal-field span,
body.soft-dark .action-modal h2 {
  color: #f8fafc;
}

body.soft-dark .action-modal {
  border-color: #334158;
  background: #182235;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

body.soft-dark .action-modal-close {
  color: #aab5c5;
  background: #223047;
}

body.soft-dark .action-modal-close:hover {
  color: #ffffff;
  background: #2c3d59;
}

body.soft-dark .action-modal p {
  color: #aab5c5;
}

body.soft-dark .action-modal-icon.is-warning {
  color: #f8d98a;
  background: rgba(198, 138, 22, .18);
}

body.soft-dark .action-modal-icon.is-danger,
body.soft-dark .load-error-panel .empty i {
  color: #fecaca;
  background: rgba(220, 38, 38, .18);
}

body.soft-dark .action-modal-field input,
body.soft-dark .action-modal-field textarea {
  color: #edf3fb;
  border-color: #38465f;
  background: #202b40;
}

body.soft-dark .load-error-panel .empty strong {
  color: #edf3fb;
}

body.soft-dark .load-error-panel .empty span {
  color: #aab5c5;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalRiseIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .action-modal-mask,
  .action-modal {
    animation: none;
  }
}

/* Semantic colors for table row actions */
.row-actions .action-btn {
  min-height: 30px;
  padding: 0 11px;
  border-width: 1px;
  border-style: solid;
  font-size: 11px;
  font-weight: 800;
  box-shadow: none;
  transition:
    color .18s ease,
    border-color .18s ease,
    background-color .18s ease,
    transform .18s ease;
}

.row-actions .action-btn:hover {
  transform: translateY(-1px);
}

.row-actions .action-success {
  color: #047857;
  border-color: #b7f0d4;
  background: #e9fbf3;
}

.row-actions .action-success:hover {
  color: #03664b;
  border-color: #7bddb2;
  background: #d8f8eb;
}

.row-actions .action-info {
  color: #2563eb;
  border-color: #c7dafe;
  background: #eff6ff;
}

.row-actions .action-info:hover {
  color: #1d4ed8;
  border-color: #9bbbf9;
  background: #e0edff;
}

.row-actions .action-warning {
  color: #a15c00;
  border-color: #f7d48b;
  background: #fff7df;
}

.row-actions .action-warning:hover {
  color: #864700;
  border-color: #edbb4e;
  background: #ffefc2;
}

.row-actions .action-danger {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff0ef;
}

.row-actions .action-danger:hover {
  color: #b91c1c;
  border-color: #fca5a5;
  background: #fee2e2;
}

.row-actions .action-neutral {
  color: #475569;
  border-color: #dbe3ee;
  background: #f8fafc;
}

.row-actions .action-neutral:hover {
  color: #263244;
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.row-actions .action-btn:disabled,
.row-actions .action-btn:disabled:hover {
  color: #94a3b8;
  border-color: #dbe3ee;
  background: #f1f5f9;
  transform: none;
}

body.soft-dark .row-actions .action-success {
  color: #8af1d6;
  border-color: rgba(74, 222, 128, .34);
  background: rgba(34, 197, 94, .16);
}

body.soft-dark .row-actions .action-success:hover {
  color: #bcf7e6;
  border-color: rgba(74, 222, 128, .48);
  background: rgba(34, 197, 94, .24);
}

body.soft-dark .row-actions .action-info {
  color: #a8c7ff;
  border-color: rgba(96, 165, 250, .34);
  background: rgba(37, 99, 235, .18);
}

body.soft-dark .row-actions .action-info:hover {
  color: #d5e5ff;
  border-color: rgba(147, 197, 253, .48);
  background: rgba(37, 99, 235, .26);
}

body.soft-dark .row-actions .action-warning {
  color: #f9d77e;
  border-color: rgba(245, 158, 11, .38);
  background: rgba(245, 158, 11, .16);
}

body.soft-dark .row-actions .action-warning:hover {
  color: #ffe7a8;
  border-color: rgba(251, 191, 36, .52);
  background: rgba(245, 158, 11, .24);
}

body.soft-dark .row-actions .action-danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, .38);
  background: rgba(220, 38, 38, .18);
}

body.soft-dark .row-actions .action-danger:hover {
  color: #ffe2e2;
  border-color: rgba(252, 165, 165, .52);
  background: rgba(220, 38, 38, .26);
}

body.soft-dark .row-actions .action-neutral {
  color: #cbd5e1;
  border-color: #3b4a64;
  background: #253149;
}

body.soft-dark .row-actions .action-neutral:hover {
  color: #ffffff;
  border-color: #64748b;
  background: #2a3952;
}

body.soft-dark .row-actions .action-btn:disabled,
body.soft-dark .row-actions .action-btn:disabled:hover {
  color: #94a3b8;
  border-color: #334155;
  background: #1f2937;
}

body.soft-dark .settings-subsection {
  border-color: #334158;
  background: #182235;
}

body.soft-dark .settings-subsection-head h3 {
  color: #f8fafc;
}

body.soft-dark .settings-subsection-head p {
  color: #aab5c5;
}

@media (max-width: 760px) {
  .admin-brand-layout {
    grid-template-columns: 1fr;
  }

  .brand-logo-uploader {
    margin-right: 16px;
    margin-left: 16px;
    grid-template-columns: 1fr;
  }

  .brand-logo-preview {
    width: 78px;
    height: 78px;
  }

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

  .settings-subsection {
    margin-right: 16px;
    margin-left: 16px;
  }

  .settings-subsection-head,
  .settings-subsection .settings-form-block {
    padding-right: 16px;
    padding-left: 16px;
  }
}

/* Custom select */
.native-select-hidden {
  display: none !important;
}

.custom-select {
  width: 100%;
  min-width: 0;
}

.custom-select-trigger {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: #ffffff;
  font-size: 14px;
  font-weight: 720;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .02);
  transition:
    color .18s ease,
    border-color .18s ease,
    background-color .18s ease,
    box-shadow .18s ease;
}

.custom-select-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-trigger i {
  color: #90a0ae;
  font-size: 16px;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), color .18s ease;
}

.custom-select-trigger:hover,
.custom-select.is-open .custom-select-trigger {
  border-color: rgba(66, 214, 173, .56);
  background: #f7fcfb;
  box-shadow: 0 0 0 4px rgba(66, 214, 173, .1);
}

.custom-select.is-open .custom-select-trigger i {
  color: var(--primary-strong);
  transform: rotate(180deg);
}

.custom-select-trigger:disabled {
  color: #94a3b8;
  border-color: #dbe3ee;
  background: #f1f5f9;
  box-shadow: none;
}

.filters .custom-select {
  width: auto;
  min-width: 128px;
}

.filters .custom-select-trigger {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
}

.settings-table .custom-select-trigger,
.integration-row .custom-select-trigger {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
}

.modal-body.form-grid .custom-select-trigger {
  min-height: 50px;
  font-size: 15px;
}

.custom-select-menu {
  position: fixed;
  z-index: 140;
  max-height: min(280px, calc(100vh - 24px));
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #d9e5ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
  backdrop-filter: blur(16px);
  animation: customSelectIn .16s cubic-bezier(.2, .8, .2, 1);
}

.custom-select-menu.opens-up {
  transform-origin: bottom;
}

.custom-select-option {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: #334155;
  background: transparent;
  font-size: 13px;
  font-weight: 760;
  text-align: left;
}

.custom-select-option i {
  color: #ffffff;
  font-size: 15px;
  opacity: 0;
}

.custom-select-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  color: #129c7a;
  background: #e8fbf5;
  outline: none;
}

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

.custom-select-option.is-selected i {
  opacity: 1;
}

.custom-select-option.is-selected:hover,
.custom-select-option.is-selected:focus-visible {
  color: #ffffff;
  background: var(--primary-strong);
}

body.soft-dark .custom-select-trigger {
  color: #edf3fb;
  border-color: #3b4a64;
  background: #202b40;
}

body.soft-dark .custom-select-trigger:hover,
body.soft-dark .custom-select.is-open .custom-select-trigger {
  border-color: rgba(66, 214, 173, .46);
  background: #253149;
  box-shadow: 0 0 0 4px rgba(66, 214, 173, .12);
}

body.soft-dark .custom-select-trigger i {
  color: #aab5c5;
}

body.soft-dark .custom-select-trigger:disabled {
  color: #94a3b8;
  border-color: #334155;
  background: #1f2937;
}

body.soft-dark .custom-select-menu {
  border-color: #334158;
  background: rgba(24, 34, 53, .98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

body.soft-dark .custom-select-option {
  color: #dbe6f3;
}

body.soft-dark .custom-select-option:hover,
body.soft-dark .custom-select-option:focus-visible {
  color: #d8fff3;
  background: #253149;
}

body.soft-dark .custom-select-option.is-selected,
body.soft-dark .custom-select-option.is-selected:hover,
body.soft-dark .custom-select-option.is-selected:focus-visible {
  color: #ffffff;
  background: #27bf99;
}

/* Searchable publisher selector */
.publisher-picker-field {
  position: relative;
}

.publisher-picker {
  position: relative;
  display: grid;
  gap: 10px;
}

.publisher-search-box {
  min-height: 50px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 14px;
  border: 1px solid #dfe8ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .02);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.publisher-picker.is-open .publisher-search-box,
.publisher-search-box:focus-within {
  border-color: rgba(66, 214, 173, .62);
  background: #f9fffd;
  box-shadow: 0 0 0 4px rgba(66, 214, 173, .1);
}

.publisher-search-box > i {
  color: #8ea1ad;
  font-size: 16px;
}

.publisher-search-box input {
  min-height: 46px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.publisher-clear {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #94a3b8;
  background: transparent;
}

.publisher-clear:hover {
  color: #ef4444;
  background: #fff0f0;
}

.publisher-selected {
  min-height: 62px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e6eef2;
  border-radius: 8px;
  background: #f8fbfc;
}

.publisher-selected-avatar,
.publisher-option-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #0f766e;
  background: linear-gradient(135deg, #d8fff2, #edf7ff);
  font-size: 15px;
  font-weight: 900;
}

.publisher-selected-avatar img,
.publisher-option-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.publisher-selected strong,
.publisher-option-main strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publisher-selected em,
.publisher-option-main em {
  display: block;
  min-width: 0;
  margin-top: 3px;
  overflow: hidden;
  color: #7b8da1;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publisher-options {
  position: absolute;
  z-index: 12;
  inset: 58px 0 auto;
  max-height: 286px;
  display: none;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #dbe8ed;
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
  backdrop-filter: blur(14px);
}

.publisher-picker.is-open .publisher-options {
  display: grid;
  gap: 6px;
}

.publisher-option {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.publisher-option:hover,
.publisher-option:focus-visible {
  background: #eefbf7;
  outline: none;
}

.publisher-option > i {
  color: #ffffff;
  opacity: 0;
}

.publisher-option.is-selected {
  background: #e8fbf5;
}

.publisher-option.is-selected > i {
  color: var(--primary-strong);
  opacity: 1;
}

.publisher-option-empty,
.publisher-picker.is-empty-result .publisher-options::after {
  padding: 18px 12px;
  color: #7b8da1;
  font-size: 13px;
  text-align: center;
}

.publisher-picker.is-empty-result .publisher-options::after {
  content: '没有匹配的用户';
}

body.soft-dark .publisher-search-box {
  border-color: #3b4a64;
  background: #202b40;
}

body.soft-dark .publisher-picker.is-open .publisher-search-box,
body.soft-dark .publisher-search-box:focus-within {
  border-color: rgba(66, 214, 173, .48);
  background: #253149;
  box-shadow: 0 0 0 4px rgba(66, 214, 173, .12);
}

body.soft-dark .publisher-search-box > i,
body.soft-dark .publisher-clear {
  color: #aab5c5;
}

body.soft-dark .publisher-selected {
  border-color: #334158;
  background: #1f293f;
}

body.soft-dark .publisher-selected em,
body.soft-dark .publisher-option-main em,
body.soft-dark .publisher-option-empty {
  color: #9fb0c5;
}

body.soft-dark .publisher-options {
  border-color: #334158;
  background: rgba(24, 34, 53, .98);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .34);
}

body.soft-dark .publisher-option:hover,
body.soft-dark .publisher-option:focus-visible,
body.soft-dark .publisher-option.is-selected {
  background: #253149;
}

body.soft-dark .publisher-option.is-selected > i {
  color: #42d6ad;
}

.api-docs-page {
  display: grid;
  gap: 20px;
}

.api-docs-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.api-docs-metrics article {
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.api-docs-metrics span,
.api-docs-metrics strong,
.api-docs-metrics em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.api-docs-metrics span {
  color: var(--muted);
  font-weight: 700;
}

.api-docs-metrics strong {
  margin-top: 10px;
  color: #001a4e;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 850;
}

.api-docs-metrics em {
  margin-top: 8px;
  color: #75859a;
  font-style: normal;
  font-weight: 700;
}

.api-docs-panel {
  padding: 24px;
}

.api-docs-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f9fbfe;
}

.api-docs-callout h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.3;
}

.api-docs-callout p {
  margin: 7px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.api-docs-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.api-docs-frame {
  display: block;
  width: 100%;
  min-height: 980px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f5f8fb;
}

body.soft-dark .api-docs-metrics article,
body.soft-dark .api-docs-callout,
body.soft-dark .api-docs-frame {
  border-color: var(--border);
  background: var(--surface);
}

body.soft-dark .api-docs-metrics strong {
  color: #edf3fb;
}

body.soft-dark .api-docs-metrics em,
body.soft-dark .api-docs-callout p {
  color: #aab5c5;
}

body.soft-dark .api-docs-callout h2 {
  color: #edf3fb;
}

/* Navigation level contrast */
.sidebar-left .nav-group-toggle,
.sidebar-left .nav-item.nav-direct {
  border: 1px solid #e6efec;
  background: #f6fbf9;
  color: #354256;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68);
}

.sidebar-left .nav-group-toggle i:first-child,
.sidebar-left .nav-item.nav-direct i {
  color: #21ad8b;
}

.sidebar-left .nav-group.has-active-page .nav-group-toggle,
.sidebar-left .nav-group-toggle:hover,
.sidebar-left .nav-item.nav-direct:hover,
.sidebar-left .nav-item.nav-direct.is-active {
  border-color: rgba(66, 214, 173, .42);
  color: #ffffff;
  background: linear-gradient(135deg, #35cfa5, #22b992);
  box-shadow: 0 10px 22px rgba(34, 185, 146, .16);
}

.sidebar-left .nav-group.has-active-page .nav-group-toggle i,
.sidebar-left .nav-group-toggle:hover i,
.sidebar-left .nav-item.nav-direct:hover i,
.sidebar-left .nav-item.nav-direct.is-active i {
  color: #ffffff;
}

.sidebar-left .nav-sublist {
  position: relative;
  margin: 4px 0 2px 10px;
  padding-left: 20px;
}

.sidebar-left .nav-sublist::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
  border-radius: 999px;
  background: #dcece8;
}

.sidebar-left .nav-sublist .nav-item {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  color: #657385;
  background: #fbfefd;
  font-size: 13px;
  font-weight: 680;
}

.sidebar-left .nav-sublist .nav-item:hover {
  border-color: #d7f2eb;
  color: #179d7d;
  background: #effbf7;
  transform: translateX(3px);
}

.sidebar-left .nav-sublist .nav-item.is-active {
  border-color: rgba(66, 214, 173, .34);
  color: #128469;
  background: #e7fbf5;
  box-shadow: inset 3px 0 0 #22b992;
}

body.soft-dark .sidebar-left .nav-group-toggle,
body.soft-dark .sidebar-left .nav-item.nav-direct {
  border-color: #273349;
  color: #d5deea;
  background: #1a2538;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

body.soft-dark .sidebar-left .nav-group-toggle i:first-child,
body.soft-dark .sidebar-left .nav-item.nav-direct i {
  color: #49d9b4;
}

body.soft-dark .sidebar-left .nav-sublist::before {
  background: #2e4058;
}

body.soft-dark .sidebar-left .nav-sublist .nav-item {
  border-color: transparent;
  color: #a9b6c7;
  background: #141e2f;
}

body.soft-dark .sidebar-left .nav-sublist .nav-item:hover {
  border-color: #2c514b;
  color: #c9fff0;
  background: #1a302f;
}

body.soft-dark .sidebar-left .nav-sublist .nav-item.is-active {
  border-color: rgba(73, 217, 180, .28);
  color: #ffffff;
  background: #193b35;
  box-shadow: inset 3px 0 0 #49d9b4;
}

body.soft-dark .dot {
  border-color: #172033;
}

body.soft-dark .todo-drawer-mask {
  background: rgba(3, 7, 18, .58);
}

body.soft-dark .todo-drawer {
  color: #e8eef7;
  border-color: #334158;
  background: #172033;
  box-shadow: -22px 0 64px rgba(0, 0, 0, .42);
}

body.soft-dark .todo-drawer-head,
body.soft-dark .todo-drawer-footer {
  border-color: #334158;
}

body.soft-dark .todo-drawer-head h2,
body.soft-dark .todo-group-head h3,
body.soft-dark .todo-notice-main strong,
body.soft-dark .todo-drawer-empty strong {
  color: #f8fafc;
}

body.soft-dark .todo-drawer-head p,
body.soft-dark .todo-group-head p,
body.soft-dark .todo-notice-main em,
body.soft-dark .todo-notice-main small,
body.soft-dark .todo-drawer-empty {
  color: #aab5c5;
}

body.soft-dark .todo-drawer-close,
body.soft-dark .todo-summary-pill,
body.soft-dark .todo-notice-card {
  border-color: #334158;
  background: #1d293d;
}

body.soft-dark .todo-drawer-close:hover,
body.soft-dark .todo-summary-pill:hover,
body.soft-dark .todo-notice-card:hover {
  border-color: #3b82f6;
  background: #22324a;
}

body.soft-dark .todo-summary-pill b {
  color: #cbd5e1;
  background: #273449;
}

body.soft-dark .todo-summary-pill.has-count b {
  color: #fff;
  background: #e11d48;
}

body.soft-dark .todo-notice-card.is-skeleton i,
body.soft-dark .todo-notice-card.is-skeleton b,
body.soft-dark .todo-notice-card.is-skeleton span,
body.soft-dark .todo-notice-card.is-skeleton em {
  background: linear-gradient(90deg, #253149, #334158, #253149);
  background-size: 240% 100%;
}

body.qg-template.vertical.collapsed .sidebar-left .nav-group-toggle,
body.qg-template.vertical.collapsed .sidebar-left .nav-item.nav-direct {
  justify-content: center;
  padding: 0;
}

body.qg-template.vertical.collapsed .sidebar-left .nav-sublist {
  margin: 0;
  padding: 14px;
}

body.qg-template.vertical.collapsed .sidebar-left .nav-sublist::before {
  display: none;
}

body.qg-template.vertical.collapsed .sidebar-left .nav-sublist .nav-item {
  min-height: 38px;
  background: transparent;
}

.settings-save-bar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 16px 20px;
  border: 1px solid #dff4ee;
  border-radius: 8px;
  background: linear-gradient(135deg, #f6fffc, #ffffff);
  box-shadow: 0 10px 28px rgba(25, 134, 111, .055);
}

.settings-save-bar div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.settings-save-bar strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.settings-save-bar span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.settings-save-bar .btn {
  min-height: 42px;
  flex: 0 0 auto;
}

.settings-center-panel {
  display: grid;
  gap: 0;
}

.settings-center-form {
  display: grid;
  gap: 18px;
}

.settings-compact-form .field {
  margin-bottom: 0;
}

.settings-compact-form .field input,
.settings-compact-form .field select,
.settings-compact-form .field textarea,
.settings-compact-form .setting-list input,
.settings-compact-form .integration-row input,
.settings-compact-form .integration-row select {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
}

.settings-compact-form .field textarea {
  min-height: 86px;
}

.settings-center-head {
  border-bottom: 1px solid var(--border);
}

.settings-tabs {
  --tab-index: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 28px;
}

.settings-tab {
  min-height: 72px;
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: start;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  text-align: left;
  transition: transform .18s ease, color .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.settings-tab i {
  font-size: 17px;
  color: var(--primary-strong);
}

.settings-tab span {
  font-size: 13px;
  font-weight: 820;
}

.settings-tab em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.settings-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(66, 214, 173, .48);
  background: #f7fcfb;
}

.settings-tab.is-active {
  color: var(--text);
  border-color: rgba(66, 214, 173, .56);
  background: linear-gradient(180deg, #f5fffc, #ffffff);
  box-shadow: 0 12px 26px rgba(66, 214, 173, .12);
}

.settings-tab.is-active i,
.settings-tab.is-active em {
  color: var(--text);
}

.settings-tab-panels {
  display: grid;
}

.settings-tab-panel {
  display: block;
}

.settings-tab-panel.is-active {
  animation: settingsTabIn .22s cubic-bezier(.2, .8, .2, 1);
}

.settings-tab-panel[hidden] {
  display: none !important;
}

.settings-panel-grid {
  display: block;
  columns: 2 340px;
  column-gap: 18px;
  padding: 0 28px 2px;
}

.settings-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
  overflow: hidden;
}

.settings-panel-grid > .settings-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.settings-card-new-user {
  break-inside: avoid;
}

.settings-card-new-user .settings-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}

.settings-card-head h3,
.settings-protocol-group strong {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 820;
  line-height: 1.35;
}

.settings-card-head p,
.settings-protocol-group span,
.settings-inline-number span {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.settings-form-grid,
.settings-protocol-fields {
  padding-top: 14px;
}

.settings-form-grid {
  padding: 16px 20px 12px;
}

.settings-tight-grid {
  gap: 12px;
}

.settings-mini-preview {
  margin: 14px 20px 0;
}

.settings-compact-form .settings-subsection {
  margin: 6px 20px 18px;
}

.settings-compact-form .settings-subsection-head {
  padding: 16px 18px 0;
}

.settings-compact-form .settings-subsection .settings-form-block {
  padding: 16px 18px 4px;
}

.settings-switch-list {
  padding: 16px 20px 20px;
  gap: 12px;
}

.settings-switch-list > div {
  min-height: 58px;
  padding: 12px 14px;
}

.settings-switch-list strong {
  font-size: 13px;
}

.settings-switch-list span {
  font-size: 12px;
}

.settings-protocol-grid {
  display: grid;
  gap: 18px;
  padding: 0 28px 2px;
}

.settings-protocol-subsection {
  margin: 0;
}

.settings-protocol-group {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.settings-protocol-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 0;
}

.settings-protocol-group-head > div,
.settings-card-head > div {
  min-width: 0;
}

.settings-protocol-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 20px 18px;
}

.settings-protocol-fields.protocol-editor-grid {
  align-items: stretch;
}

.settings-protocol-fields .field {
  margin: 0;
}

.settings-protocol-fields .field input {
  min-height: 36px;
  padding: 8px 10px;
}

.protocol-public-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.protocol-public-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(64, 150, 255, .18);
  border-radius: 999px;
  color: #2563eb;
  background: rgba(64, 150, 255, .08);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.protocol-public-links a:hover {
  border-color: rgba(64, 150, 255, .34);
  background: rgba(64, 150, 255, .14);
}

.protocol-editor-field {
  min-width: 0;
}

.protocol-editor-source {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

.protocol-rich-editor {
  display: grid;
  gap: 10px;
}

.protocol-rich-shell {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .02);
}

.protocol-rich-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid #e8eef2;
  background: linear-gradient(180deg, #fbfdff, #f5f9fb);
}

.protocol-rich-toolbar .ql-formats {
  display: contents;
}

.protocol-rich-toolbar button,
.protocol-rich-toolbar .ql-picker {
  min-width: 32px;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.protocol-rich-toolbar button:hover,
.protocol-rich-toolbar .ql-picker:hover {
  background: #eaf7f3;
  color: var(--primary);
}

.protocol-toolbar-divider {
  width: 1px;
  height: 20px;
  margin: 0 6px;
  background: #e0e7ed;
}

.protocol-rich-body {
  min-height: 240px;
  border: 0 !important;
}

.protocol-rich-body .ql-editor {
  min-height: 240px;
  padding: 18px 20px 22px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.85;
}

.protocol-rich-body .ql-editor.ql-blank::before {
  left: 20px;
  right: 20px;
  color: #9aa7b6;
  font-style: normal;
}

.protocol-rich-body .ql-editor p {
  margin: 0 0 12px;
}

.protocol-rich-body .ql-editor h3 {
  margin: 20px 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.protocol-rich-body .ql-editor blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 4px solid var(--primary);
  background: var(--surface-soft);
  color: var(--text);
}

.protocol-rich-body .ql-editor ul,
.protocol-rich-body .ql-editor ol {
  margin: 8px 0 14px;
  padding-left: 22px;
}

.protocol-rich-body.is-uyghur .ql-editor {
  text-align: right;
  direction: rtl;
}

.protocol-rich-body.ql-container {
  font-family: inherit;
  font-size: inherit;
}

.protocol-rich-body.ql-container.ql-snow {
  border: 0;
}

.protocol-rich-body.is-uyghur .ql-editor.ql-blank::before {
  left: 20px;
  right: 20px;
  text-align: right;
}

.protocol-rich-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #7b8da1;
  font-size: 12px;
}

.protocol-rich-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.protocol-rich-foot strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.protocol-field.is-fallback .protocol-rich-shell {
  min-height: 240px;
}

.protocol-field.is-ready .protocol-editor-source {
  display: none;
}

.protocol-field.is-fallback .protocol-rich-body {
  min-height: 220px;
  padding: 14px 16px;
  color: var(--text);
  background: #fff;
}

.protocol-field.is-fallback .protocol-editor-source {
  position: static;
  display: block;
  width: 100%;
  min-height: 240px;
  height: 240px;
  margin: 0;
  padding: 16px 18px;
  clip: auto;
  overflow: auto;
  resize: vertical;
}

body.soft-dark .protocol-rich-shell {
  border-color: #334158;
  background: #172236;
}

body.soft-dark .protocol-rich-toolbar {
  border-bottom-color: #334158;
  background: linear-gradient(180deg, #1b2940, #172236);
}

body.soft-dark .protocol-rich-toolbar button:hover,
body.soft-dark .protocol-rich-toolbar .ql-picker:hover {
  background: #253149;
  color: #8fd8bd;
}

body.soft-dark .protocol-toolbar-divider {
  background: #334158;
}

body.soft-dark .protocol-rich-body .ql-editor {
  color: #edf3fb;
}

body.soft-dark .protocol-rich-body .ql-editor.ql-blank::before {
  color: #8391a7;
}

body.soft-dark .protocol-rich-body .ql-editor blockquote {
  background: #1f2d44;
}

body.soft-dark .protocol-rich-foot {
  color: #9fb0c5;
}

body.soft-dark .protocol-rich-foot strong {
  color: #edf3fb;
}

.settings-inline-number {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.settings-inline-number strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.settings-inline-number input {
  width: 120px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.settings-quick-grid {
  padding: 0 20px 20px;
}

@keyframes settingsTabIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .settings-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-panel-grid {
    columns: 1;
  }

  .settings-protocol-fields {
    grid-template-columns: 1fr;
  }

  .settings-card-new-user .settings-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .settings-tabs {
    grid-template-columns: 1fr;
    margin-right: 16px;
    margin-left: 16px;
    padding-right: 0;
    padding-left: 0;
  }

  .settings-panel-grid,
  .settings-protocol-grid,
  .settings-quick-grid {
    padding-right: 16px;
    padding-left: 16px;
  }

  .settings-card-head,
  .settings-protocol-group-head,
  .settings-compact-form .settings-subsection-head,
  .settings-compact-form .settings-subsection .settings-form-block,
  .settings-compact-form .settings-subsection .settings-protocol-fields {
    padding-right: 16px;
    padding-left: 16px;
  }

  .protocol-public-links {
    justify-content: flex-start;
  }

  .settings-protocol-fields.protocol-editor-grid {
    grid-template-columns: 1fr;
  }

  .settings-panel-grid {
    columns: 1;
  }

  .settings-tab {
    min-height: 60px;
  }

  .settings-card-head {
    flex-direction: column;
  }

  .settings-protocol-group-head {
    flex-direction: column;
  }
}

.fee-policy-preview {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.fee-policy-preview strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.fee-policy-preview span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

body.soft-dark .settings-save-bar {
  border-color: rgba(73, 217, 180, .22);
  background: linear-gradient(135deg, rgba(24, 48, 45, .82), rgba(19, 28, 44, .92));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

body.soft-dark .settings-save-bar strong {
  color: #f1f7fb;
}

body.soft-dark .settings-save-bar span {
  color: #aab5c5;
}

body.soft-dark .fee-policy-preview {
  border-color: rgba(73, 217, 180, .16);
  background: rgba(17, 27, 43, .82);
}

body.soft-dark .fee-policy-preview strong {
  color: #f1f7fb;
}

body.soft-dark .fee-policy-preview span {
  color: #aab5c5;
}

body.soft-dark .upload-image-preview {
  border-color: #2c4054;
  background: #141e2f;
}

body.soft-dark .upload-asset-card,
body.soft-dark .upload-add-card,
body.soft-dark .media-library-main,
body.soft-dark .media-picker-upload-card {
  border-color: #273349;
  background: #172236;
}

body.soft-dark .upload-asset-thumb,
body.soft-dark .media-library-thumb {
  background: #101828;
}

body.soft-dark .upload-add-card,
body.soft-dark .upload-asset-meta a,
body.soft-dark .media-library-upload-tile {
  color: #72b7ff;
}

body.soft-dark .upload-add-card {
  background: #172236;
}

body.soft-dark .upload-add-card strong {
  color: #edf3fb;
}

body.soft-dark .upload-add-card em {
  color: #aab5c5;
}

body.soft-dark .upload-add-icon {
  color: #72b7ff;
  background: rgba(114, 183, 255, .13);
}

body.soft-dark .field-help {
  color: #92a0b3;
}

body.soft-dark .field-help i {
  color: #7f8ba0;
}

body.soft-dark .upload-asset-meta {
  border-top-color: #273349;
}

body.soft-dark .upload-asset-meta strong,
body.soft-dark .upload-file-preview,
body.soft-dark .upload-icon-preview,
body.soft-dark .media-library-head h2 {
  color: #edf3fb;
}

body.soft-dark .media-library-head,
body.soft-dark .media-library-toolbar,
body.soft-dark .media-library-footer {
  border-color: #273349;
}

body.soft-dark .media-library-side {
  border-color: #273349;
  background: #121b2c;
}

body.soft-dark .media-library-side-search,
body.soft-dark .media-library-search {
  border-color: #273349;
  background: #172236;
}

body.soft-dark .media-library-side-search input,
body.soft-dark .media-library-search input {
  color: #edf3fb;
}

body.soft-dark .media-library-groups button {
  color: #c8d3e0;
}

body.soft-dark .media-library-type-tabs button {
  color: #c8d3e0;
  border-color: #273349;
  background: #172236;
}

body.soft-dark .media-library-type-tabs button:hover,
body.soft-dark .media-library-type-tabs button.is-active {
  color: #72b7ff;
  border-color: rgba(114, 183, 255, .3);
  background: rgba(114, 183, 255, .11);
}

body.soft-dark .media-library-upload-tile {
  border-color: rgba(114, 183, 255, .24);
  background: rgba(114, 183, 255, .11);
}

body.soft-dark .file-group-filter button {
  color: #c8d3e0;
  border-color: #273349;
  background: #172236;
}

body.soft-dark .file-group-filter button:hover,
body.soft-dark .file-group-filter button.is-active {
  color: #72b7ff;
  border-color: rgba(114, 183, 255, .3);
  background: rgba(114, 183, 255, .11);
}

body.soft-dark .file-group-filter em,
body.soft-dark .file-group-filter strong {
  color: #8794a7;
}

body.soft-dark .media-library-type-tabs strong {
  color: #8794a7;
}

body.soft-dark .media-library-groups button:hover,
body.soft-dark .media-library-groups button.is-active {
  color: #72b7ff;
  background: rgba(114, 183, 255, .11);
}

body.soft-dark .media-library-pagination .page-btn,
body.soft-dark .media-library-pagination .page-ellipsis {
  color: #c8d3e0;
  background: #1d293d;
}

body.soft-dark .media-library-pagination .page-btn.is-active {
  color: #fff;
  background: #4096ff;
}

body.soft-dark .upload-image-preview span {
  color: #aab5c5;
}

body.soft-dark .image-picker-card {
  border-color: #273349;
  background: #172236;
}

body.soft-dark .image-picker-card:hover {
  border-color: rgba(73, 217, 180, .36);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .2);
}

body.soft-dark .image-picker-card img {
  background: #101828;
}

body.soft-dark .image-picker-card span {
  color: #edf3fb;
}

body.soft-dark .image-picker-card em {
  color: #aab5c5;
}

/* Keep repeated cards aligned inside grids; grid gap owns the spacing. */
.grid > .panel + .panel,
.dashboard-main-grid > .panel + .panel,
.dashboard-bottom > .panel + .panel,
.settings-grid > .panel + .panel,
.two-col > .panel + .panel,
.permission-menu-grid > .permission-card + .permission-card,
.file-grid > .file-card + .file-card {
  margin-top: 0;
}

.grid > .panel,
.dashboard-main-grid > .panel,
.dashboard-bottom > .panel,
.settings-grid > .panel,
.two-col > .panel {
  align-self: stretch;
}

.grid .panel-head,
.settings-grid .panel-head,
.two-col .panel-head,
.dashboard-bottom .panel-head {
  min-height: 88px;
}

.settings-grid .panel-head.compact,
.two-col .panel-head.compact,
.dashboard-bottom .panel-head.compact {
  min-height: 64px;
}

.grid .panel-head > div:first-child,
.settings-grid .panel-head > div:first-child,
.two-col .panel-head > div:first-child {
  flex: 1 1 220px;
}

.settings-grid .panel-head > .btn,
.settings-grid .panel-head > button,
.two-col .panel-head > .btn,
.two-col .panel-head > button {
  flex: 0 0 auto;
}

/* Data statistics dashboard */
.statistics-shell {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.statistics-shell > .panel,
.statistics-shell .statistics-kpi-card,
.statistics-shell .statistics-breakdown-card {
  min-height: 0;
}

.statistics-shell .panel-head.compact {
  min-height: 72px;
  flex: 0 0 auto;
  align-items: flex-start;
  padding: 22px 24px 10px;
}

.statistics-hero {
  min-height: 148px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 22px;
  align-items: center;
  padding: 26px 30px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(23, 184, 144, .12), rgba(83, 103, 232, .08)),
    var(--surface);
}

.statistics-hero-copy span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  color: #0f9b78;
  background: rgba(23, 184, 144, .12);
  font-size: 12px;
  font-weight: 820;
}

.statistics-hero-copy h2 {
  margin: 12px 0 8px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 850;
}

.statistics-hero-copy p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.statistics-hero-meta {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px 22px;
  border: 1px solid rgba(23, 184, 144, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.statistics-hero-meta strong {
  color: var(--text);
  font-size: 24px;
  font-weight: 850;
}

.statistics-hero-meta span {
  color: var(--muted);
  font-size: 13px;
}

.statistics-filter-card {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(160px, 190px) minmax(146px, 170px) minmax(146px, 170px) minmax(96px, 112px);
  gap: 14px;
  align-items: end;
  padding: 20px 22px;
}

.statistics-filter-card > * {
  min-width: 0;
}

.statistics-range-field {
  display: grid;
  gap: 8px;
  align-self: end;
}

.statistics-range-tabs {
  width: 100%;
  max-width: 780px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f6faf9;
}

.statistics-range-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.statistics-range-tabs button:hover {
  color: var(--primary-strong);
  transform: translateY(-1px);
}

.statistics-range-tabs button.is-active {
  color: #0f8d6f;
  background: #fff;
  box-shadow: 0 8px 18px rgba(18, 37, 57, .08);
}

.statistics-filter-card .field {
  margin: 0;
  align-self: end;
}

.statistics-range-field > span,
.statistics-filter-card .field > span,
.statistics-filter-card .field label {
  display: block;
  min-height: 18px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.statistics-filter-card .field select,
.statistics-filter-card .field input {
  min-height: 48px;
}

.statistics-filter-card .btn {
  min-height: 48px;
  align-self: end;
  white-space: nowrap;
}

.statistics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.statistics-kpi-card {
  min-width: 0;
  min-height: 164px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: minmax(88px, 1fr) 28px;
  column-gap: 16px;
  row-gap: 18px;
  align-content: stretch;
  align-items: start;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(18, 37, 57, .035);
}

.statistics-kpi-card > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-content: center;
  grid-column: 1;
  grid-row: 1;
  border-radius: 8px;
  font-size: 22px;
}

.statistics-kpi-copy {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  padding-top: 2px;
}

.statistics-kpi-card em,
.statistics-kpi-card small {
  display: block;
  font-style: normal;
}

.statistics-kpi-card em {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.statistics-kpi-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 32px;
  line-height: 1;
  font-weight: 850;
}

.statistics-kpi-card small {
  margin-top: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-kpi-card b {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 820;
}

.statistics-kpi-card.tone-blue > span,
.statistics-kpi-card.tone-blue b {
  color: #5367e8;
  background: #eef0ff;
}

.statistics-kpi-card.tone-green > span,
.statistics-kpi-card.tone-green b {
  color: #0f9b78;
  background: #e8fbf5;
}

.statistics-kpi-card.tone-orange > span,
.statistics-kpi-card.tone-orange b {
  color: #a15c00;
  background: #fff7df;
}

.statistics-kpi-card.tone-gold > span,
.statistics-kpi-card.tone-gold b {
  color: #b88600;
  background: #fff8dd;
}

.statistics-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.46fr) minmax(340px, .54fr);
  gap: 20px;
  align-items: stretch;
}

.statistics-main-grid > .panel + .panel,
.statistics-breakdown-grid > .panel + .panel,
.statistics-bottom-grid > .panel + .panel {
  margin-top: 0;
}

.statistics-chart-panel,
.statistics-side-panel {
  min-width: 0;
  align-self: stretch;
  min-height: 456px;
  margin-top: 0;
}

.statistics-chart-panel {
  display: flex;
  flex-direction: column;
}

.statistics-chart {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 26px 22px;
}

.statistics-chart svg {
  width: 100%;
  flex: 1 1 auto;
  min-height: 320px;
  height: 336px;
  overflow: visible;
}

.statistics-chart polyline,
.statistics-chart circle {
  filter: drop-shadow(0 6px 12px rgba(15, 23, 42, .10));
}

.statistics-axis-labels text {
  fill: #9aa7b5;
  font-size: 12px;
  font-weight: 700;
}

.statistics-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 4px 6px 0;
}

.statistics-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.statistics-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.statistics-empty-chart {
  min-height: 280px;
  display: grid;
  place-content: center;
  color: var(--muted);
}

.statistics-side-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.statistics-status-list {
  flex: 1 1 auto;
  display: grid;
  gap: 16px;
  padding: 16px 24px 24px;
  align-content: start;
}

.statistics-status-row {
  display: grid;
  gap: 10px;
}

.statistics-status-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.statistics-status-row strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.statistics-status-row > i,
.statistics-progress,
.statistics-ranking-row i {
  height: 8px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #edf4f5;
}

.statistics-status-row > i b,
.statistics-progress i,
.statistics-ranking-row i b {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #17b890, #5367e8);
}

.statistics-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.statistics-breakdown-card {
  min-height: 184px;
  display: grid;
  grid-template-rows: auto minmax(48px, 1fr) 8px auto;
  gap: 14px;
  padding: 18px;
  align-content: stretch;
}

.statistics-breakdown-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.statistics-breakdown-head > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-content: center;
  border-radius: 8px;
  color: var(--stat-color, #17b890);
  background: color-mix(in srgb, var(--stat-color, #17b890) 13%, white);
  font-size: 20px;
}

.statistics-breakdown-head strong,
.statistics-breakdown-head em {
  display: block;
}

.statistics-breakdown-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.statistics-breakdown-head em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.statistics-breakdown-value {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.statistics-breakdown-value b {
  color: var(--text);
  font-size: 32px;
  line-height: 1;
}

.statistics-breakdown-value small,
.statistics-breakdown-foot span {
  color: var(--muted);
  font-size: 12px;
}

.statistics-breakdown-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
  align-items: flex-end;
}

.statistics-breakdown-foot span {
  padding: 4px 8px;
  border-radius: 6px;
  background: #f7fafb;
}

.statistics-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.statistics-bottom-grid > .panel {
  min-width: 0;
  min-height: 292px;
  margin-top: 0;
}

.statistics-ranking,
.statistics-latest-list {
  display: grid;
  gap: 12px;
  padding: 8px 20px 22px;
}

.statistics-ranking-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
}

.statistics-ranking-row > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-content: center;
  border-radius: 8px;
  color: #0f9b78;
  background: #e8fbf5;
  font-size: 12px;
  font-weight: 850;
}

.statistics-ranking-row strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-ranking-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 820;
  text-align: right;
}

.statistics-latest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(120px, auto);
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.statistics-latest-row strong,
.statistics-latest-row span {
  min-width: 0;
}

.statistics-latest-row strong {
  display: block;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-latest-row div > span,
.statistics-latest-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

/* Refund dialog */
.refund-modal {
  width: min(640px, 100%);
}

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

.refund-summary-grid div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #edf2f4;
  border-radius: 8px;
  background: #f8fbfb;
}

.refund-summary-grid span,
.refund-summary-grid strong,
.refund-hint {
  display: block;
}

.refund-summary-grid span,
.refund-hint {
  color: var(--muted);
  font-size: 12px;
}

.refund-summary-grid strong {
  margin-top: 4px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refund-error {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #b91c1c;
  background: #fee2e2;
  font-size: 12px;
  font-weight: 760;
}

/* New user benefit settings */
.settings-bonus-preview {
  margin: 16px 20px 0;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--bonus-accent, #17b890) 28%, transparent);
  border-radius: 8px;
  color: var(--bonus-text, #163B33);
  background-color: var(--bonus-bg, #EAF7F3);
  background-size: cover;
  background-position: center;
}

.settings-bonus-preview span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 6px;
  color: #fff;
  background: var(--bonus-accent, #17b890);
  font-size: 12px;
  font-weight: 820;
}

.settings-bonus-preview strong {
  display: block;
  margin-top: 12px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 850;
}

.settings-bonus-preview p {
  max-width: 520px;
  margin: 8px 0 0;
  color: currentColor;
  opacity: .78;
  line-height: 1.7;
}

.settings-card-new-user input[type="color"] {
  min-height: 42px;
  padding: 4px;
  cursor: pointer;
}

.settings-card-new-user .field:has(.switch) {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.soft-dark .statistics-hero {
  background:
    linear-gradient(135deg, rgba(23, 184, 144, .18), rgba(83, 103, 232, .12)),
    var(--surface);
}

body.soft-dark .statistics-hero-copy span,
body.soft-dark .statistics-ranking-row > span {
  color: #8af1d6;
  background: rgba(23, 184, 144, .16);
}

body.soft-dark .statistics-hero-meta,
body.soft-dark .statistics-range-tabs,
body.soft-dark .refund-summary-grid div {
  border-color: rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .42);
}

body.soft-dark .statistics-range-tabs button {
  color: #9aa7b5;
}

body.soft-dark .statistics-range-tabs button:hover,
body.soft-dark .statistics-range-tabs button.is-active {
  color: #8af1d6;
}

body.soft-dark .statistics-range-tabs button.is-active {
  background: rgba(23, 184, 144, .14);
  box-shadow: none;
}

body.soft-dark .statistics-status-row > i,
body.soft-dark .statistics-progress,
body.soft-dark .statistics-ranking-row i {
  background: rgba(148, 163, 184, .16);
}

body.soft-dark .statistics-breakdown-head > span {
  background: rgba(148, 163, 184, .14);
}

body.soft-dark .statistics-breakdown-foot span {
  background: rgba(148, 163, 184, .12);
}

body.soft-dark .refund-error {
  color: #fecaca;
  background: rgba(239, 68, 68, .16);
}

@media (max-width: 1280px) {
  .statistics-filter-card {
    grid-template-columns: minmax(0, 1fr) minmax(190px, .34fr) minmax(160px, .26fr) minmax(160px, .26fr);
  }

  .statistics-filter-card .btn {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .statistics-kpi-grid,
  .statistics-breakdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .statistics-hero,
  .statistics-main-grid,
  .statistics-bottom-grid {
    grid-template-columns: 1fr;
  }

  .statistics-filter-card {
    grid-template-columns: 1fr 1fr;
  }

  .statistics-range-field,
  .statistics-filter-card .btn {
    grid-column: 1 / -1;
  }

  .statistics-chart svg {
    height: 280px;
  }
}

@media (max-width: 640px) {
  .statistics-hero,
  .statistics-filter-card,
  .statistics-kpi-card,
  .statistics-breakdown-card {
    padding-right: 16px;
    padding-left: 16px;
  }

  .statistics-filter-card,
  .statistics-kpi-grid,
  .statistics-breakdown-grid,
  .refund-summary-grid,
  .statistics-latest-row {
    grid-template-columns: 1fr;
  }

  .statistics-filter-card .btn {
    justify-self: stretch;
    width: 100%;
  }

  .statistics-hero-copy h2 {
    font-size: 24px;
  }

  .statistics-kpi-card strong,
  .statistics-breakdown-value b {
    font-size: 28px;
  }

  .statistics-chart {
    padding-inline: 14px;
  }

  .statistics-status-list,
  .statistics-ranking,
  .statistics-latest-list {
    padding-inline: 14px;
  }
}

@media (max-width: 1180px) {
  .api-docs-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .api-docs-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .api-docs-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .wechat-pem-field {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .wechat-pem-field > span {
    padding-top: 0;
  }

  .wechat-pem-block,
  .settings-subsection {
    margin-left: 14px;
    margin-right: 14px;
  }

  .wechat-pem-fields,
  .wechat-pem-block.is-compact .wechat-pem-fields {
    padding: 16px 14px 18px;
  }

  .upload-gallery-field {
    gap: 12px;
  }

  .upload-asset-card,
  .upload-add-card {
    width: 142px;
    min-width: 142px;
    height: 142px;
  }

  .upload-asset-thumb {
    height: 100px;
  }

  .upload-add-card strong {
    font-size: 14px;
  }

  .upload-control {
    grid-template-columns: 1fr;
  }

  .upload-control .btn {
    justify-content: center;
    width: 100%;
  }

  .image-picker-modal {
    width: min(100%, calc(100vw - 28px));
  }

  .media-library-modal {
    height: calc(100vh - 28px);
    max-height: calc(100vh - 28px);
  }

  .media-library-body {
    grid-template-columns: 1fr;
  }

  .media-library-side {
    display: none;
  }

  .media-library-toolbar,
  .media-library-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .media-library-search {
    width: 100%;
  }

  .media-library-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 16px;
    padding: 14px;
  }

  .file-manager-actions,
  .file-group-filter {
    width: 100%;
  }

  .file-group-filter {
    padding-left: 14px;
    padding-right: 14px;
  }

  .file-group-filter button {
    min-width: 136px;
  }

  .media-library-thumb,
  .image-picker-card {
    min-height: 128px;
  }

  .image-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    padding: 14px;
  }

  .settings-save-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-save-bar .btn {
    width: 100%;
  }

  .api-docs-metrics {
    grid-template-columns: 1fr;
  }

  .api-docs-panel {
    padding: 14px;
  }

  .api-docs-frame {
    min-height: 760px;
  }
}

@media (max-width: 760px) {
  .todo-drawer-mask {
    padding: 10px;
  }

  .todo-drawer {
    width: calc(100vw - 20px);
    border-radius: 14px;
  }

  .todo-drawer-head,
  .todo-drawer-footer {
    padding: 18px;
  }

  .todo-drawer-body {
    padding: 16px;
  }

  .todo-summary-grid {
    grid-template-columns: 1fr;
  }

  .todo-notice-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    min-height: 104px;
    padding: 15px;
  }

  .todo-notice-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .todo-status {
    grid-column: 2;
    justify-self: start;
  }
}

@keyframes customSelectIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .custom-select-trigger,
  .custom-select-trigger i,
  .custom-select-menu,
  .page-transition,
  .page-transition.is-loading,
  .route-loading-overlay,
  .route-loader::before,
  .route-loader i,
  .skeleton-card::after,
  .skeleton-block::after,
  .route-skeleton-panel::after,
  .todo-drawer-mask,
  .todo-drawer,
  .todo-notice-card,
  .todo-notice-card.is-skeleton i,
  .todo-notice-card.is-skeleton b,
  .todo-notice-card.is-skeleton span,
  .todo-notice-card.is-skeleton em {
    transition: none;
    animation: none;
  }

  .page-transition,
  .page-transition.is-loading {
    transform: none;
    opacity: 1;
  }
}
