@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;800&display=swap");

:root {
  --page-green: #8dd06f;
  --page-green-deep: #6fbd57;
  --shell-white: rgba(255, 255, 255, 0.94);
  --shell-soft: rgba(255, 255, 255, 0.72);
  --line: rgba(50, 68, 67, 0.08);
  --ink: #2f3542;
  --muted: #8e97a8;
  --blue: #7096f0;
  --coral: #ff8b8b;
  --lime: #9ce06a;
  --shadow-xl: 0 32px 80px rgba(70, 116, 46, 0.22);
  --shadow-lg: 0 20px 48px rgba(117, 149, 104, 0.18);
  --radius-shell: 42px;
  --radius-card: 26px;
  --radius-soft: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.18), transparent 22%),
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.15), transparent 18%),
    linear-gradient(180deg, #90d56e 0%, #88cd67 100%);
}

.dashboard-shell {
  width: min(1780px, calc(100vw - 40px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  padding: 18px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  border-radius: calc(var(--radius-shell) + 12px);
  background: rgba(141, 208, 111, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.sidebar {
  padding: 18px 16px;
  border-radius: var(--radius-shell);
  background: linear-gradient(180deg, rgba(239, 242, 248, 0.96), rgba(243, 245, 248, 0.9));
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 14px;
  align-content: start;
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-soft);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.brand-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ff8f80, #8fd76e);
}

.brand-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #90a2a3;
}

.brand-card h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

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

.menu-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #95a0af;
  font-weight: 800;
}

.tool-group {
  display: grid;
  gap: 8px;
}

.tool-group.is-disabled {
  opacity: 0.45;
}

.tool-parent {
  border: 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.tool-group:first-child .tool-parent,
.tool-parent.is-active {
  box-shadow: 0 10px 24px rgba(209, 214, 223, 0.45);
}

.submenu-nav {
  display: grid;
  gap: 6px;
  padding-left: 12px;
}

.submenu-item {
  border: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: transparent;
  color: #67707f;
  text-align: left;
  font-weight: 700;
}

.submenu-item.is-active {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.nav-item {
  border: 0;
  text-align: left;
  padding: 14px 18px;
  border-radius: 18px;
  background: transparent;
  color: #67707f;
  font-weight: 700;
  cursor: default;
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(209, 214, 223, 0.45);
}

.sidebar-block {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
}

.compact-metrics {
  display: grid;
  gap: 10px;
}

.sidebar-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #95a0af;
}

.sidebar-metrics {
  display: grid;
  gap: 14px;
}

.compact-metrics div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.compact-metrics span {
  color: #7f8899;
  font-size: 14px;
}

.compact-metrics strong {
  font-size: 24px;
}

.sidebar-metrics div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-metrics span {
  color: #7f8899;
}

.sidebar-metrics strong {
  font-size: 24px;
}

.workspace {
  position: relative;
  padding: 18px;
  border-radius: var(--radius-shell);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9));
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.page-section {
  display: none;
}

.page-section.is-active {
  display: block;
}

.workspace::before {
  content: "";
  position: absolute;
  inset: auto auto -140px -110px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(173, 225, 124, 0.28), transparent 70%);
  pointer-events: none;
}

.workspace::after {
  content: "";
  position: absolute;
  inset: -120px -80px auto auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(148, 220, 111, 0.28), transparent 72%);
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 6px 20px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #9fb292;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
}

.hero-status {
  display: inline-flex;
  margin-top: 18px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(248, 251, 244, 0.95);
  border: 1px solid rgba(129, 182, 93, 0.2);
  color: #66755f;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(172, 212, 151, 0.16);
}

.hero-stats {
  display: flex;
  gap: 18px;
  margin: 0 0 18px;
}

.minimal-stats .stat-card {
  width: 150px;
  padding: 14px 16px;
}

.minimal-stats .stat-card span {
  font-size: 14px;
}

.minimal-stats .stat-card strong {
  font-size: 32px;
}

.stat-card {
  width: 180px;
  padding: 18px 20px;
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 22px 42px rgba(116, 149, 203, 0.22);
}

.stat-card span {
  display: block;
  font-size: 16px;
  opacity: 0.88;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 38px;
  line-height: 1;
}

.stat-card-blue {
  background: #7298ef;
}

.stat-card-coral {
  background: #ff8c8f;
}

.stat-card-lime {
  background: #9adf69;
}

.floating-ring,
.floating-summary {
  display: none;
}

.content-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 0;
}

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

.account-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(248, 249, 251, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.account-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-card-head h4 {
  margin: 0;
  font-size: 18px;
}

.account-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.account-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  color: #7f8899;
  font-size: 13px;
}

.account-note {
  margin: 12px 0 0;
  color: #566172;
}

.account-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-active {
  background: rgba(127, 202, 97, 0.18);
  color: #5a9f3a;
}

.status-paused {
  background: rgba(255, 140, 143, 0.16);
  color: #d86f6f;
}

.status-disabled {
  background: rgba(116, 161, 233, 0.14);
  color: #6289c8;
}

.small-btn {
  padding: 10px 14px;
  font-size: 13px;
}

.permission-grid {
  display: grid;
  gap: 10px;
}

.permission-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  color: #556171;
}

.permission-grid input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.danger-btn {
  background: linear-gradient(135deg, #ef8b8b, #e06d6d);
}

.panel {
  padding: 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 22px 44px rgba(198, 212, 202, 0.22);
  backdrop-filter: blur(12px);
}

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

.panel-header {
  margin-bottom: 12px;
}

.panel-header h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.panel-header p,
.meta,
.origin,
.desc,
.empty {
  color: var(--muted);
}

.panel-header p {
  display: none;
}

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

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

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

.backend-grid > .panel:nth-child(2),
.backend-grid > .panel:nth-child(3),
.backend-grid > .panel:nth-child(4) {
  align-self: start;
}

.compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.soft-card {
  padding: 14px;
  border-radius: 20px;
  background: rgba(248, 249, 251, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.soft-card.compact {
  padding: 12px;
}

.soft-card h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #667182;
  font-weight: 700;
  font-size: 13px;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(160, 170, 182, 0.14);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(133, 198, 97, 0.44);
  box-shadow: 0 0 0 4px rgba(146, 212, 117, 0.14);
}

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

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #8fd46f, #79c65b);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(126, 179, 89, 0.26);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 32px rgba(126, 179, 89, 0.3);
}

button:disabled {
  cursor: wait;
  opacity: 0.75;
}

button.primary {
  margin-top: 18px;
  background: linear-gradient(135deg, #84d468, #6fc95a);
}

button.large {
  padding-inline: 28px;
}

.inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mini-tip {
  display: none;
}

.top-gap {
  margin-top: 16px;
}

.reference-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.reference-card {
  margin: 0;
  display: grid;
  gap: 8px;
}

.reference-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.reference-card figcaption {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.results,
.generated {
  display: grid;
  gap: 12px;
}

.result-card,
.generated-card {
  padding: 14px;
  border-radius: 22px;
  background: rgba(250, 251, 252, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.result-card {
  display: grid;
  grid-template-columns: auto 120px 1fr;
  gap: 12px;
  align-items: start;
}

.pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 700;
  color: #707b8d;
}

.result-media img,
.asset-list img {
  width: 100%;
  border-radius: 16px;
  display: block;
  object-fit: cover;
}

.result-media img {
  aspect-ratio: 1 / 1;
}

.image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ecf0f7, #f8fafc);
  color: #9aa2b3;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.result-body h4,
.generated-card h3,
.generated-card h4 {
  margin: 0 0 8px;
}

.result-body a,
.asset-list a {
  color: #74a1e9;
  text-decoration: none;
  font-weight: 700;
}

.generated-card pre {
  white-space: pre-wrap;
  padding: 12px;
  border-radius: 18px;
  background: #f3f7fb;
  color: #455063;
  overflow: auto;
}

.highlights,
.asset-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

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

.asset-list li {
  list-style: none;
  display: grid;
  gap: 8px;
}

.empty {
  padding: 18px;
  border-radius: 20px;
  background: rgba(246, 248, 248, 0.88);
  border: 1px dashed rgba(145, 167, 140, 0.24);
}

.error {
  color: #c75959;
}

@media (max-width: 1500px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    order: 2;
  }

  .workspace {
    order: 1;
  }

  .content-grid,
  .two-cols,
  .four-cols {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    flex-wrap: wrap;
  }
}

@media (max-width: 860px) {
  .dashboard-shell {
    width: min(100vw - 20px, 1780px);
    margin: 10px auto;
    padding: 10px;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .panel,
  .workspace,
  .sidebar {
    border-radius: 24px;
  }
}
