:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #eef3ef;
  --ink: #17211c;
  --muted: #607067;
  --line: #d9e0da;
  --accent: #08756b;
  --accent-deep: #065f57;
  --accent-2: #c8502f;
  --accent-3: #365fa7;
  --accent-4: #d4a029;
  --danger: #b83535;
  --ok: #218052;
  --shadow: 0 18px 52px rgba(28, 40, 35, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.login-mode {
  background:
    radial-gradient(circle at 15% 20%, rgba(51, 227, 206, 0.2), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(200, 80, 47, 0.15), transparent 28%),
    linear-gradient(135deg, #06090d 0%, #101923 44%, #0b0f15 100%);
}

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

button {
  cursor: pointer;
}

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

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  width: min(1180px, 100%);
  min-height: min(720px, calc(100vh - 64px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(202, 236, 230, 0.22);
  border-radius: 18px;
  background: rgba(11, 17, 24, 0.72);
  box-shadow: 0 28px 110px rgba(0, 0, 0, 0.48);
}

.login-visual {
  position: relative;
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  background:
    linear-gradient(90deg, rgba(5, 9, 14, 0.2), rgba(5, 9, 14, 0.75)),
    #0b1118;
  color: #fff;
}

.login-visual::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 13, 0.72) 0%, rgba(5, 8, 13, 0.34) 42%, rgba(5, 8, 13, 0.08) 70%),
    linear-gradient(0deg, rgba(5, 8, 13, 0.82), transparent 45%);
  content: "";
  pointer-events: none;
}

.login-map-stage,
.login-grid-floor,
.login-city-plane {
  position: absolute;
  inset: 0;
}

.login-map-stage {
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 18%, rgba(81, 214, 231, 0.22), transparent 22%),
    radial-gradient(circle at 18% 75%, rgba(96, 237, 205, 0.16), transparent 26%),
    linear-gradient(140deg, #070a10, #111925 55%, #05080c);
  perspective: 900px;
}

.login-map-stage::before {
  position: absolute;
  inset: -18%;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.18) 49%, transparent 52%),
    radial-gradient(circle at 50% 48%, rgba(93, 241, 218, 0.12), transparent 42%);
  content: "";
  filter: blur(16px);
  opacity: 0.55;
  transform: translateX(-12%);
  animation: loginLightSweep 8s ease-in-out infinite;
}

.login-grid-floor {
  left: -18%;
  top: -10%;
  width: 138%;
  height: 130%;
  background:
    linear-gradient(90deg, rgba(86, 247, 219, 0.1) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.34;
  transform: rotateX(62deg) rotateZ(-17deg) translate3d(-4%, 10%, -100px) scale(1.18);
  transform-origin: center;
  animation: loginGridFlow 9s linear infinite;
}

.login-city-plane {
  transform: rotateX(61deg) rotateZ(-17deg) translate3d(-5%, 6%, 0) scale(1.08);
  transform-origin: center;
  animation: loginCityDrift 15s ease-in-out infinite alternate;
}

.city-block {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--d);
  border: 1px solid rgba(199, 217, 226, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(49, 57, 72, 0.95), rgba(13, 18, 27, 0.98)),
    #151b25;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.38);
}

.city-block::before {
  position: absolute;
  right: -1px;
  bottom: 100%;
  left: -1px;
  height: var(--h);
  border: 1px solid rgba(203, 223, 231, 0.14);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 12px, rgba(116, 151, 169, 0.17) 12px 14px),
    linear-gradient(90deg, rgba(38, 47, 62, 0.96), rgba(7, 10, 16, 0.98));
  content: "";
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.b1 { --x: 4%; --y: 18%; --w: 84px; --d: 74px; --h: 118px; }
.b2 { --x: 18%; --y: 10%; --w: 92px; --d: 62px; --h: 172px; }
.b3 { --x: 34%; --y: 17%; --w: 70px; --d: 92px; --h: 126px; }
.b4 { --x: 52%; --y: 8%; --w: 118px; --d: 82px; --h: 156px; }
.b5 { --x: 73%; --y: 15%; --w: 86px; --d: 78px; --h: 132px; }
.b6 { --x: 86%; --y: 25%; --w: 128px; --d: 88px; --h: 194px; }
.b7 { --x: 8%; --y: 42%; --w: 134px; --d: 84px; --h: 88px; }
.b8 { --x: 27%; --y: 38%; --w: 96px; --d: 96px; --h: 210px; }
.b9 { --x: 43%; --y: 45%; --w: 120px; --d: 82px; --h: 132px; }
.b10 { --x: 64%; --y: 39%; --w: 86px; --d: 116px; --h: 176px; }
.b11 { --x: 81%; --y: 49%; --w: 126px; --d: 76px; --h: 102px; }
.b12 { --x: 15%; --y: 68%; --w: 156px; --d: 96px; --h: 78px; }
.b13 { --x: 38%; --y: 70%; --w: 92px; --d: 124px; --h: 154px; }
.b14 { --x: 56%; --y: 67%; --w: 148px; --d: 86px; --h: 112px; }
.b15 { --x: 76%; --y: 72%; --w: 106px; --d: 112px; --h: 150px; }
.b16 { --x: 91%; --y: 64%; --w: 96px; --d: 94px; --h: 114px; }

.map-node {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(236, 249, 255, 0.58);
  border-radius: 50%;
  color: #f8fbff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.8);
  animation: loginNodePulse 2.8s ease-in-out infinite;
}

.map-node::before {
  position: absolute;
  inset: 9px 4px auto;
  height: 92px;
  background: linear-gradient(180deg, rgba(104, 232, 241, 0.44), rgba(104, 232, 241, 0));
  content: "";
  filter: blur(10px);
  opacity: 0.75;
  transform: translateY(23px);
}

.map-node::after {
  position: relative;
  content: attr(data-label);
}

.node-a { left: 13%; top: 35%; animation-delay: -0.4s; }
.node-b { right: 18%; top: 24%; animation-delay: -1.2s; }
.node-c { right: 11%; bottom: 24%; animation-delay: -2s; }
.node-d { left: 48%; bottom: 31%; animation-delay: -1.7s; }

.scan-line {
  position: absolute;
  top: 8%;
  bottom: 6%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(221, 250, 255, 0.82), transparent);
  box-shadow: 0 0 18px rgba(134, 245, 255, 0.72);
  opacity: 0.72;
  animation: loginScan 6.5s ease-in-out infinite;
}

.scan-a { left: 37%; }
.scan-b { left: 76%; animation-delay: -3.1s; }

.login-stat-card {
  position: absolute;
  top: 18%;
  right: 8%;
  z-index: 2;
  display: grid;
  width: min(460px, 55%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 26px;
  padding: 24px 28px;
  border: 1px solid rgba(225, 242, 249, 0.16);
  border-radius: 18px;
  background: rgba(31, 39, 52, 0.58);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  animation: loginPanelFloat 6.2s ease-in-out infinite;
}

.login-stat-card small {
  display: block;
  color: rgba(233, 243, 247, 0.58);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.login-stat-card strong {
  display: block;
  margin-top: 6px;
  color: #f8fbff;
  font-size: clamp(18px, 2.6vw, 26px);
  line-height: 1;
}

.login-brand {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 14px;
  align-items: center;
}

.login-brand .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.login-brand h1 {
  margin: 3px 0 0;
  font-size: 20px;
}

.login-command {
  position: relative;
  z-index: 3;
  display: grid;
  max-width: 560px;
  gap: 14px;
  padding-bottom: 18px;
}

.login-command span {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(107, 248, 219, 0.32);
  border-radius: 999px;
  background: rgba(8, 117, 107, 0.15);
  color: rgba(188, 255, 242, 0.9);
  font-size: 12px;
  font-weight: 850;
}

.login-command strong {
  max-width: 720px;
  color: #f8fbff;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
  text-shadow: 0 0 32px rgba(255, 255, 255, 0.22);
}

.login-command p {
  max-width: 560px;
  margin: 0;
  color: rgba(232, 240, 244, 0.78);
  font-size: 15px;
  line-height: 1.7;
}

.login-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-action-row span:first-child {
  border-color: rgba(101, 244, 214, 0.62);
  background: linear-gradient(135deg, #55e8de, #5ee29d);
  color: #06120f;
  box-shadow: 0 0 24px rgba(82, 232, 211, 0.25);
}

.login-action-row span:last-child {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 248, 250, 0.84);
}

.login-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
  border-left: 1px solid rgba(218, 240, 236, 0.13);
  background:
    linear-gradient(180deg, rgba(19, 29, 40, 0.88), rgba(11, 16, 23, 0.92)),
    #101820;
  color: #f7fbf8;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.04);
}

.login-card h2 {
  margin: 6px 0 10px;
  color: #f7fbf8;
  font-size: 34px;
}

.login-card p {
  margin: 0;
  color: rgba(226, 238, 234, 0.68);
  line-height: 1.65;
}

.login-card .eyebrow {
  color: rgba(109, 244, 218, 0.82);
}

.login-card .field span {
  color: rgba(224, 238, 234, 0.7);
  font-size: 12px;
  font-weight: 850;
}

.login-card input {
  border-color: rgba(225, 241, 237, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
  outline: none;
}

.login-card input::placeholder {
  color: rgba(225, 239, 235, 0.38);
}

.login-card input:focus {
  border-color: rgba(97, 237, 211, 0.7);
  box-shadow: 0 0 0 3px rgba(82, 232, 211, 0.12);
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  box-shadow: 0 14px 32px rgba(8, 117, 107, 0.28);
}

.login-error {
  padding: 10px 12px;
  border: 1px solid rgba(255, 119, 119, 0.28);
  border-radius: var(--radius);
  background: rgba(184, 53, 53, 0.18);
  color: #ffb7b7 !important;
  font-weight: 800;
}

.login-hint {
  display: grid;
  gap: 4px;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid rgba(225, 241, 237, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.login-hint span {
  color: rgba(109, 244, 218, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.login-hint strong {
  color: rgba(246, 251, 248, 0.82);
}

@keyframes loginCityDrift {
  0% {
    transform: rotateX(61deg) rotateZ(-17deg) translate3d(-7%, 8%, 0) scale(1.08);
  }

  100% {
    transform: rotateX(61deg) rotateZ(-17deg) translate3d(4%, -2%, 0) scale(1.16);
  }
}

@keyframes loginGridFlow {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 72px 72px;
  }
}

@keyframes loginLightSweep {
  0%,
  100% {
    opacity: 0.36;
    transform: translateX(-28%);
  }

  50% {
    opacity: 0.72;
    transform: translateX(22%);
  }
}

@keyframes loginNodePulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(91, 235, 220, 0.35),
      0 0 24px rgba(222, 248, 255, 0.54);
    transform: translateY(0);
  }

  50% {
    box-shadow:
      0 0 0 12px rgba(91, 235, 220, 0),
      0 0 34px rgba(222, 248, 255, 0.82);
    transform: translateY(-6px);
  }
}

@keyframes loginPanelFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(14px, -12px, 0);
  }
}

@keyframes loginScan {
  0%,
  100% {
    opacity: 0.18;
    transform: translateX(-18px);
  }

  50% {
    opacity: 0.76;
    transform: translateX(18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-map-stage::before,
  .login-grid-floor,
  .login-city-plane,
  .map-node,
  .scan-line,
  .login-stat-card {
    animation: none;
  }
}

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

.rail {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 12px;
  color: #f6fbf8;
  background:
    linear-gradient(135deg, rgba(8, 117, 107, 0.98), rgba(30, 65, 74, 0.99)),
    #17494b;
}

.brand-block {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
}

.brand-name {
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.eyebrow,
.panel-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rail .eyebrow {
  color: rgba(255, 255, 255, 0.65);
}

.rail .brand-mark {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  font-size: 19px;
}

.brand-block h1,
.topbar h2 {
  margin: 3px 0 0;
}

.brand-block h1 {
  color: #fff;
  font-size: 18px;
}

.workspace-heading .rail-toggle,
.brand-block .rail-close,
.rail-backdrop,
.workspace-mobile-name {
  display: none;
}

.step-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.step-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.76);
  text-align: left;
}

.step-button:hover,
.step-button.active {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.step-button.complete .step-index {
  background: #e9b64a;
  color: #26312d;
}

.step-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 800;
}

.step-index svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.step-title {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 800;
}

.step-desc {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.3;
}

.workspace {
  min-width: 0;
  padding: 20px 22px 28px;
}

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

.workspace-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.account-welcome {
  min-width: 0;
  max-width: min(100%, 270px);
}

.account-welcome > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-welcome svg { flex: none; }

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

select {
  min-height: 32px;
  padding: 5px 34px 5px 10px;
}

.ghost-button,
.primary-button,
.secondary-button,
.danger-button,
.icon-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 7px;
  font-weight: 800;
}

.ghost-button,
.secondary-button,
.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.danger-button {
  border: 1px solid #ffd7d7;
  background: #fff0f0;
  color: var(--danger);
}

.ghost-button,
.primary-button,
.secondary-button,
.danger-button {
  padding: 0 14px;
}

.icon-button {
  width: 40px;
  padding: 0;
}

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

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

.main-panel {
  min-width: 0;
  min-height: calc(100vh - 188px);
  padding: 22px;
}

.side-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  position: static;
}

.side-panel.locate-side-panel {
  grid-template-columns: minmax(0, 1fr);
}

.context-card {
  padding: 12px;
}

.context-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.context-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.context-row dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.context-row dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 800;
}

.activity-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.activity-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
}

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

.section-head h3 {
  margin: 4px 0 6px;
  font-size: 24px;
}

.section-head p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.selector-block {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.selector-block h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.option-grid {
  display: grid;
  gap: 7px;
}

.option-button {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.option-button:hover,
.option-button.selected {
  border-color: color-mix(in srgb, var(--accent), white 25%);
  background: #ecf8f5;
}

.option-main {
  min-width: 0;
}

.option-title {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 800;
}

.option-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.option-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.summary-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-item strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.product-space-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(160px, 0.28fr);
  gap: 10px;
  margin-bottom: 12px;
}

.product-space-toolbar input,
.product-space-toolbar select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
}

.product-space-waterfall {
  display: grid;
  gap: 12px;
}

.product-space-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(280px, 1.2fr) minmax(220px, 0.7fr);
  gap: 14px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 26px rgba(28, 40, 35, 0.05);
}

.product-space-card.selected {
  border-color: var(--accent);
  background: #f2fbf8;
  box-shadow: 0 0 0 3px rgba(8, 117, 107, 0.1);
}

.product-space-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.product-space-card h4 {
  margin: 12px 0 6px;
  font-size: 18px;
}

.product-space-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.product-space-meta,
.product-space-proof,
.product-detail-chip-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.product-space-meta span,
.product-space-proof,
.product-detail-chip-grid span {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.product-space-proof strong,
.product-detail-chip-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 12px;
}

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

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

.product-space-main,
.product-space-content,
.product-space-team {
  min-width: 0;
}

.attachment-panel {
  display: grid;
  gap: 10px;
}

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

.attachment-row {
  display: grid;
  grid-template-columns: auto 52px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.attachment-row img,
.attachment-file-icon {
  width: 52px;
  height: 40px;
  border-radius: 7px;
  object-fit: cover;
  background: #e8f0ec;
}

.attachment-file-icon {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.attachment-row strong,
.attachment-row small {
  display: block;
  overflow-wrap: anywhere;
}

.attachment-row small,
.attachment-upload small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.attachment-upload {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed #b8cbc5;
  border-radius: var(--radius);
  background: #f7fbf9;
}

.attachment-link-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.4fr);
  gap: 10px;
}

.form-note {
  padding: 10px 12px;
  border: 1px solid #c8ddd6;
  border-radius: var(--radius);
  background: #effaf7;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.action-row.no-margin {
  margin-top: 0;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) repeat(4, minmax(120px, 0.7fr));
  gap: 10px;
  margin-bottom: 16px;
}

.library-toolbar input,
.library-toolbar select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
}

.creative-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metric-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.creative-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
  max-height: 650px;
  overflow: auto;
  padding-right: 5px;
}

.creative-card {
  display: grid;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.creative-card:hover,
.creative-card:focus-visible,
.creative-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 117, 107, 0.14);
}

.creative-card.candidate:not(.selected) {
  border-color: rgba(8, 117, 107, 0.28);
}

.candidate-pill {
  border: 1px solid rgba(8, 117, 107, 0.18);
  background: #e9f7f4;
  color: var(--accent);
}

.project-source-pill {
  border: 1px solid rgba(56, 95, 167, 0.18);
  background: #edf4fb;
  color: #365fa7;
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  background: #dae8e2;
}

.creative-thumb {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
}

.thumb.has-video {
  display: grid;
  background: #091714;
}

.thumb.has-video::before,
.thumb.has-video::after {
  display: none;
}

.thumb.interactive {
  cursor: zoom-in;
}

.thumb.interactive:focus-visible {
  outline: 3px solid rgba(8, 117, 107, 0.72);
  outline-offset: -3px;
}

.creative-preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #091714;
  object-fit: cover;
}

.thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.28), transparent 34%),
    var(--thumb-bg);
}

.thumb::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 32px;
  height: 32px;
  clip-path: polygon(28% 18%, 28% 82%, 84% 50%);
  background: rgba(255, 255, 255, 0.88);
}

.video-asset-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(6, 18, 15, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.creative-thumb .video-asset-badge {
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb-lines {
  position: absolute;
  left: 12px;
  right: 54px;
  bottom: 12px;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.thumb-lines span {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

.thumb-lines span:nth-child(2) {
  width: 68%;
}

.creative-body {
  display: grid;
  gap: 6px;
  padding: 7px;
}

.creative-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
}

.creative-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.creative-card .tag-pill {
  min-width: 0;
  padding: 2px 5px;
  overflow-wrap: anywhere;
}

.creative-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.creative-footer span:first-child {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.score {
  color: var(--accent);
  font-weight: 900;
}

.creative-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.creative-primary-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 66px), 1fr));
  gap: 6px;
}

.creative-candidate-button,
.creative-link-button,
.creative-breakdown-button,
.creative-delete-button {
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
  font-weight: 850;
  text-align: center;
}

.creative-candidate-button {
  min-height: 32px;
  padding: 5px 8px;
  border-color: rgba(8, 117, 107, 0.4);
  background: #effaf7;
  color: var(--accent);
  font-size: 12px;
}

.creative-candidate-button.added {
  border-color: rgba(8, 117, 107, 0.2);
  background: #e7f4ef;
}

.creative-link-button {
  color: #335a67;
}

.creative-breakdown-button {
  min-height: 32px;
  padding: 5px 8px;
  border-color: rgba(54, 95, 167, 0.28);
  background: #f3f8fd;
  color: #365fa7;
  font-size: 12px;
}

.creative-delete-button {
  border-color: #edc0bd;
  background: #fff4f3;
  color: #a63e37;
}

.project-source-button {
  border-color: rgba(54, 95, 167, 0.28);
  background: #f3f8fd;
  color: #365fa7;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: start;
}

.workbench-build-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.product-pick-panel,
.reference-panel,
.content-preview-block {
  min-width: 0;
}

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

.product-choice-button,
.workbench-creative-button {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.product-choice-button:hover,
.product-choice-button.selected,
.workbench-creative-button:hover,
.workbench-creative-button.selected {
  border-color: var(--accent);
  background: #ecf8f5;
  box-shadow: 0 0 0 3px rgba(8, 117, 107, 0.1);
}

.product-choice-button strong,
.product-choice-button span,
.product-choice-button small,
.workbench-creative-button strong,
.workbench-creative-button span,
.workbench-creative-button small {
  display: block;
  overflow-wrap: anywhere;
}

.product-choice-button span,
.product-choice-button small,
.workbench-creative-button span,
.workbench-creative-button small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workbench-creative-button .creative-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.workbench-creative-button .creative-chip-row .tag-pill,
.workbench-creative-button .creative-chip-row .selection-mark {
  display: inline-flex;
}

.workbench-creative-button .selection-mark {
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

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

.reference-column {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.mini-section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.mini-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-creative-list {
  display: grid;
  gap: 8px;
  max-height: 390px;
  overflow: auto;
  padding-right: 4px;
}

.revision-field {
  margin-top: 12px;
}

.revision-field textarea {
  min-height: 86px;
}

.content-preview-block {
  position: static;
}

.preview-mode-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.preview-mode-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
}

.preview-mode-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.generation-control-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr));
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.generation-control-panel .field, .generation-control-panel select { min-width: 0; width: 100%; }
.generation-control-panel select { min-height: 36px; }

.preview-dialog {
  display: grid;
  gap: 12px;
  min-height: 420px;
  align-content: start;
  padding: 14px;
  border: 1px solid #c7d8d1;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #f6faf8);
}

.preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: flex-start;
}

.preview-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid #d6e2dc;
  border-radius: 6px;
  background: #fff;
  color: #4d625a;
  font-size: 12px;
  font-weight: 850;
}

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

.shot-preview-list article,
.copy-preview-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.shot-preview-list p,
.copy-preview-card p,
.copy-preview-card small {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.workbench-side {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.generation-status {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #c7d8d1;
  border-radius: var(--radius);
  background: #fff;
}

.generation-status span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf8f5;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.generation-status span.done {
  background: #f6eed6;
  color: #8a6714;
}

.generation-status small {
  color: var(--muted);
  line-height: 1.45;
}

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

.responsible-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.responsible-item.selected {
  border-color: var(--accent);
  background: #ecf8f5;
}

.responsible-item strong,
.responsible-item span,
.responsible-item small {
  display: block;
  overflow-wrap: anywhere;
}

.responsible-item span,
.responsible-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.editor-block,
.preview-block,
.task-board,
.data-table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.editor-block,
.preview-block {
  padding: 16px;
}

.editor-block h4,
.preview-block h4,
.task-board h4,
.data-table-card h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.field textarea,
.field input,
.field select {
  width: 100%;
  padding: 10px 11px;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.6;
}

.script-output {
  width: 100%;
  min-height: 260px;
  padding: 14px;
  border: 1px dashed #b9c9c0;
  border-radius: var(--radius);
  background: #fff;
  color: #26342f;
  line-height: 1.65;
  white-space: pre-line;
  resize: vertical;
}

.script-editor {
  font-family: inherit;
}

.preview-frame {
  position: relative;
  display: grid;
  min-height: 420px;
  overflow: hidden;
  align-content: end;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--preview-bg);
}

.preview-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 7px;
}

.phone-safe {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.caption-chip {
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  color: #15231e;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.caption-large {
  max-width: 95%;
  margin: 0;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.36);
}

.caption-sub {
  max-width: 96%;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.review-layout,
.production-layout,
.data-layout {
  display: grid;
  gap: 16px;
}

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

.review-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.review-card h4 {
  margin: 0 0 8px;
}

.review-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  margin-bottom: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #edf5f2;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.comment-box {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.comment-box textarea {
  min-height: 96px;
  padding: 10px;
  resize: vertical;
}

.task-board {
  padding: 16px;
}

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

.task-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.task-card strong {
  display: block;
  overflow-wrap: anywhere;
}

.task-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.permission-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.permission-card strong {
  display: block;
}

.permission-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.data-kpi {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.data-kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.data-kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.data-table-card {
  padding: 16px;
}

.data-table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

td {
  font-size: 14px;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 28px;
  border: 1px dashed #b8c8bf;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.creative-grid .empty-state {
  grid-column: 1 / -1;
}

.empty-state strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
}

.role-card-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.role-card-body strong {
  display: block;
  font-size: 15px;
}

.role-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.block-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.block-title-row h4 {
  margin: 0;
}

.option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: stretch;
}

.remove-option,
.menu-option {
  color: var(--danger);
}

.menu-option {
  color: var(--accent);
}

.category-filter {
  width: 100%;
  min-height: 38px;
  margin-bottom: 10px;
  padding: 7px 10px;
}

.inline-add-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
  margin-top: 12px;
}

.inline-add-grid input {
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
}

.product-detail-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.compact-head {
  margin-bottom: 14px;
}

.product-detail-grid,
.metric-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.product-detail-grid .field:nth-child(n + 5) {
  grid-column: span 2;
}

.custom-field-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

.custom-field-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
}

.custom-field-row input {
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
}

.empty-mini {
  padding: 12px;
  border: 1px dashed #c5d1ca;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}

.home-dashboard {
  display: grid;
  gap: 16px;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 22px;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(8, 117, 107, 0.92), rgba(31, 45, 70, 0.94)),
    #17283a;
  color: #fff;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.38;
}

.home-hero > * {
  position: relative;
  z-index: 1;
}

.home-hero .eyebrow,
.home-hero p {
  color: rgba(255, 255, 255, 0.72);
}

.home-hero h3 {
  margin: 8px 0;
  font-size: 30px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.home-hero p {
  max-width: 680px;
  margin: 0;
  line-height: 1.65;
}

.home-hero-simple {
  grid-template-columns: minmax(0, 1fr);
}

.home-progress-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 14px;
}

.home-progress-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 68px), 1fr));
  gap: 10px 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  color: #edf5f1;
  font-size: 12px;
}

.home-progress-stages li span {
  display: block;
  height: 5px;
  margin-bottom: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.home-progress-stages .is-complete span {
  background: #b8ebbc;
}

.asset-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.home-task-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 100px), 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.home-task-stats div {
  padding: 9px 10px;
  border-inline-start: 2px solid #a3ccb9;
  background: rgba(255, 255, 255, 0.09);
}

.home-task-stats dt {
  color: #d5e6df;
  font-size: 12px;
}

.home-task-stats dd {
  margin: 3px 0 0;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.home-grid-single {
  grid-template-columns: 1fr;
}

.dark-board {
  background:
    linear-gradient(135deg, rgba(24, 35, 48, 0.96), rgba(28, 68, 70, 0.94)),
    #1b2835;
  color: #fff;
}

.dark-board h4 {
  color: #fff;
}

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

.home-task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.home-task-card strong,
.home-task-card span {
  display: block;
  overflow-wrap: anywhere;
}

.home-task-card span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 13px;
  line-height: 1.45;
}

.pipeline-meter {
  display: grid;
  gap: 8px;
}

.pipeline-dot {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.pipeline-dot span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-2);
  font-weight: 900;
}

.pipeline-dot.on span {
  background: var(--accent);
  color: #fff;
}

.pipeline-dot strong {
  overflow-wrap: anywhere;
}

.creative-library-layout {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.filter-rail {
  display: grid;
  gap: 10px;
  max-height: 650px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

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

.filter-group strong {
  color: var(--muted);
  font-size: 12px;
}

.filter-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.filter-chip.active {
  border-color: var(--accent);
  background: #e9f7f4;
  color: var(--accent);
}

.check-card {
  display: grid;
  gap: 10px;
}

.check-card.yes {
  border-color: #b9d8c8;
  background: #f5fbf7;
}

.check-card.no {
  border-color: #f0c6bd;
  background: #fff8f5;
}

.check-card .secondary-button {
  width: fit-content;
}

.production-task {
  display: grid;
  gap: 12px;
}

.production-task.done {
  border-color: #b9d8c8;
  background: #f5fbf7;
}

.metric-edit-grid {
  margin-bottom: 14px;
}

.asset-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(140px, 0.3fr) minmax(150px, 0.35fr);
  gap: 10px;
  margin-bottom: 14px;
}

.asset-toolbar input,
.asset-toolbar select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
}

.asset-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.6fr);
  gap: 16px;
  align-items: start;
}

.asset-list-panel,
.asset-detail-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.asset-list {
  display: grid;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.asset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.asset-row.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 117, 107, 0.12);
}

.asset-row h4,
.version-card h4 {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.asset-row p,
.version-card p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.asset-row-actions {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.version-stack {
  display: grid;
  gap: 10px;
}

.version-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.version-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.version-metrics span {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.role-manager {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.role-manager-embedded {
  padding: 0;
  border: 0;
  background: transparent;
}

.role-manager-embedded .block-title-row {
  align-items: start;
}

.role-manager-embedded .block-title-row p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.role-manager-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

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

.role-editor-item {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 60px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.role-editor-item.active {
  border-color: var(--accent);
  background: #eaf8f5;
  box-shadow: 0 0 0 3px rgba(8, 117, 107, 0.11);
}

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

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

.role-editor-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

.role-task-field {
  grid-column: 1 / -1;
}

.permission-grid-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.permission-toggle {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.permission-toggle.checked {
  border-color: #aed7ca;
  background: #ecf8f5;
}

.permission-toggle input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.permission-toggle strong,
.permission-toggle small {
  display: block;
  overflow-wrap: anywhere;
}

.permission-toggle strong {
  font-size: 13px;
}

.permission-toggle small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.account-settings {
  display: grid;
  gap: 16px;
}

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

.account-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.account-card h4 {
  margin: 0 0 12px;
}

.account-login-grid,
.subaccount-form {
  display: grid;
  gap: 10px;
}

.account-login-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
}

.account-login-card {
  background:
    linear-gradient(135deg, rgba(8, 117, 107, 0.08), rgba(54, 95, 167, 0.06)),
    #fbfcfb;
}

.subaccount-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.module-access-fieldset {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.module-access-fieldset legend {
  padding: 0 5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.module-access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.module-access-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  cursor: pointer;
}

.module-access-option:has(input:checked) {
  border-color: #9ccfc2;
  background: #ecf8f5;
}

.module-access-option input {
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.module-access-option strong,
.module-access-option small {
  display: block;
  overflow-wrap: anywhere;
}

.module-access-option strong {
  font-size: 13px;
}

.module-access-option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.module-access-fieldset:disabled {
  opacity: 0.64;
}

.module-access-fieldset:disabled .module-access-option {
  cursor: not-allowed;
}

.account-current {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.account-current span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.account-list-card {
  background: #fff;
}

.account-list {
  display: grid;
  gap: 9px;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.22fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.account-row.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 117, 107, 0.12);
}

.account-row strong,
.account-row span {
  display: block;
  overflow-wrap: anywhere;
}

.account-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.account-role-badge {
  display: inline-flex !important;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  margin-top: 0 !important;
  padding: 5px 9px;
  border: 1px solid rgba(8, 117, 107, 0.18);
  border-radius: 999px;
  background: rgba(8, 117, 107, 0.08);
  color: var(--accent) !important;
  font-size: 12px !important;
  font-weight: 850;
  white-space: nowrap;
}

.account-edit-panel {
  display: grid;
  gap: 12px;
  margin-top: -2px;
  padding: 14px;
  border: 1px solid rgba(8, 117, 107, 0.22);
  border-radius: var(--radius);
  background: #f8fbfa;
  box-shadow: 0 10px 28px rgba(28, 40, 35, 0.06);
}

.account-edit-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.account-edit-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(18, 28, 25, 0.52);
}

.modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(720px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 28px 90px rgba(18, 28, 25, 0.28);
}

.wide-modal {
  width: min(920px, 100%);
}

.extra-wide-modal {
  width: min(1120px, 100%);
}

.medium-video-modal {
  width: min(760px, 100%);
}

.modal-head,
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-head h3 {
  margin: 4px 0 0;
  font-size: 22px;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.modal-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

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

.span-all {
  grid-column: 1 / -1;
}

.field-note {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-upload-field {
  padding: 12px;
  border: 1px dashed #b9cbc4;
  border-radius: var(--radius);
  background: #f8fbfa;
}

.video-upload-field input {
  min-height: 40px;
  padding: 8px;
  background: #fff;
}

.creative-breakdown-section {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #c9ddd7;
  border-radius: var(--radius);
  background: #f8fbfa;
}

.creative-breakdown-head,
.creative-breakdown-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.creative-breakdown-head strong,
.creative-breakdown-detail-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.creative-breakdown-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.owner-only-badge,
.creative-breakdown-detail-head span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: var(--radius);
  background: #e6f4ef;
  color: #167166;
  font-size: 12px;
  font-weight: 800;
}

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

.creative-breakdown-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.creative-breakdown-remove-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 1px solid #e7b8b4;
  border-radius: 50%;
  background: #fff7f6;
  color: #a63e37;
  font-size: 15px;
  line-height: 1;
}

.creative-breakdown-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed #b9cbc4;
}

.creative-breakdown-add input {
  min-width: 0;
}

.creative-breakdown-detail {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.creative-breakdown-detail-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .creative-breakdown-grid,
  .creative-breakdown-detail-list,
  .creative-breakdown-add {
    grid-template-columns: 1fr;
  }

  .creative-breakdown-head,
  .creative-breakdown-detail-head {
    flex-direction: column;
  }
}

.upload-video-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.video-upload-field .upload-video-button {
  color: #fff;
}

.upload-video-button:hover {
  background: var(--accent-deep);
}

.upload-video-button.disabled {
  cursor: not-allowed;
  opacity: 0.56;
  pointer-events: none;
}

.video-upload-field small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.upload-preview {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6faf8;
}

.upload-preview video {
  display: block;
  max-width: 100%;
  max-height: min(52vh, 480px);
  border-radius: var(--radius);
  background: #091714;
  object-fit: contain;
}

.upload-preview span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.vod-upload-status {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.vod-upload-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.vod-upload-file {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.vod-upload-file-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #e7f3ef;
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
}

.vod-upload-file-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.vod-upload-file-copy strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}

.vod-upload-file-copy span {
  color: var(--muted);
  font-size: 12px;
}

.vod-upload-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.vod-upload-state-icon {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 11px;
  line-height: 1;
}

.vod-upload-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8e3;
}

.vod-upload-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 160ms ease;
}

.vod-upload-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.vod-upload-meta strong {
  color: var(--ink);
}

.vod-upload-message {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.vod-upload-status[data-tone="uploading"] .vod-upload-badge {
  border-color: #bad4c8;
  background: #edf7f1;
  color: #176347;
}

.vod-upload-status[data-tone="complete"] {
  border-color: #b7d8c8;
  background: #f5fbf7;
}

.vod-upload-status[data-tone="complete"] .vod-upload-file-icon,
.vod-upload-status[data-tone="complete"] .vod-upload-state-icon,
.vod-upload-status[data-tone="complete"] .vod-upload-progress span {
  background: var(--ok);
  color: #fff;
}

.vod-upload-status[data-tone="complete"] .vod-upload-badge {
  border-color: #b7d8c8;
  background: #eaf7ef;
  color: var(--ok);
}

.vod-upload-status[data-tone="failed"] {
  border-color: #e2bcbc;
  background: #fff8f8;
}

.vod-upload-status[data-tone="failed"] .vod-upload-file-icon,
.vod-upload-status[data-tone="failed"] .vod-upload-state-icon,
.vod-upload-status[data-tone="failed"] .vod-upload-progress span {
  background: var(--danger);
  color: #fff;
}

.vod-upload-status[data-tone="failed"] .vod-upload-badge,
.vod-upload-status[data-tone="failed"] .vod-upload-message {
  border-color: #e2bcbc;
  color: var(--danger);
}

@media (max-width: 520px) {
  .vod-upload-head {
    grid-template-columns: 1fr;
  }

  .vod-upload-badge {
    justify-self: start;
  }

  .vod-upload-meta {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vod-upload-progress span {
    transition: none;
  }
}

.vod-status-pill.uploading {
  border-color: #bad4c8;
  background: #edf7f1;
  color: #176347;
}

.vod-status-pill.processing {
  border-color: #bdcdea;
  background: #eef4ff;
  color: #315b9f;
}

.vod-status-pill.ready {
  border-color: #bad4c8;
  background: #e7f7ee;
  color: #147345;
}

.vod-status-pill.failed {
  border-color: #edc0bd;
  background: #fff0ef;
  color: #a63e37;
}

.creative-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

.creative-detail-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.creative-detail-preview .creative-preview-video {
  object-fit: contain;
  background: #090b0a;
}

.creative-detail-preview .creative-preview-video:fullscreen {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.creative-breakdown-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  width: min(920px, calc(100% - 32px));
  max-height: min(860px, calc(100vh - 32px));
  max-height: min(860px, calc(100dvh - 32px));
}

.creative-breakdown-dialog:not([open]) {
  display: none;
}

.creative-breakdown-dialog::backdrop {
  background: rgba(18, 28, 25, 0.52);
}

@media (min-width: 721px) {
  .creative-breakdown-dialog {
    max-height: min(517.5px, calc((100vw - 32px) * 0.5625), calc(100dvh - 32px));
  }

  .creative-breakdown-layout .creative-detail-preview {
    position: sticky;
    top: 0;
  }
}

.creative-breakdown-modal-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.creative-breakdown-layout {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
}

.breakdown-save-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.creative-breakdown-detail summary {
  cursor: pointer;
  font-weight: 800;
}

.creative-breakdown-detail[open] summary {
  margin-bottom: 10px;
}

#creativeBreakdownContent textarea {
  min-height: 68px;
  resize: vertical;
}

.creative-breakdown-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed #b9cbc4;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}

.creative-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.creative-detail-list > div {
  display: grid;
  grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr);
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  background: #f7faf8;
}

.creative-detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.creative-detail-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .creative-detail-layout,
  .creative-breakdown-layout {
    grid-template-columns: 1fr;
  }
}

.tag-check-list {
  padding: 0;
}

.creative-tag-choice {
  position: relative;
  display: inline-flex;
  margin: 2px;
}

.creative-tag-choice:has(.creative-tag-remove) {
  margin: 6px 8px 2px 2px;
}

.creative-tag-choice .mini-check {
  cursor: pointer;
}

.creative-tag-choice .mini-check:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.creative-tag-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  padding: 0;
  border: 1px solid #dfb6b3;
  border-radius: 50%;
  background: #fff;
  color: #963b34;
  font-size: 16px;
  line-height: 1;
}

.creative-tag-remove:hover {
  border-color: #963b34;
  background: #fff0ee;
}

.creative-tag-confirm {
  width: min(420px, calc(100% - 24px));
  padding: 0;
  color: var(--ink);
}

.creative-tag-confirm:not([open]) {
  display: none;
}

.creative-tag-confirm::backdrop {
  background: rgba(18, 28, 25, 0.52);
}

.creative-tag-confirm p {
  margin: 0;
}

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

.creative-tag-group {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.creative-tag-group > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
}

.tag-group-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.tag-group-add-row input {
  min-width: 0;
  min-height: 34px;
  padding: 7px 9px;
}

.mini-check {
  display: inline-flex;
  position: relative;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mini-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.mini-check:has(input:checked) {
  border-color: var(--accent);
  background: #e9f7f4;
  color: var(--accent);
}

.mini-check span {
  display: block;
}

.board-toolbar,
.asset-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.32fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.board-toolbar input,
.board-toolbar select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
}

.column-config {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.compact-add {
  grid-template-columns: minmax(180px, 1fr) auto;
}

.video-board {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  background: #fbfcfb;
}

.video-board-table {
  min-width: 980px;
}

.board-row {
  display: grid;
  grid-template-columns: var(--board-cols);
  gap: 0;
  align-items: stretch;
  width: 100%;
  min-height: 58px;
  padding: 0;
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.board-row > span {
  display: flex;
  min-height: 58px;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 11px 10px;
  border-right: 1px solid var(--line);
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.45;
}

.board-row > span:last-child {
  align-items: flex-start;
  border-right: 0;
}

.board-head {
  background: #eef3ef;
  color: var(--muted);
  font-weight: 900;
}

.board-head > span {
  min-height: 42px;
}

.board-product {
  cursor: pointer;
  background: #ecf8f5;
}

.board-mother {
  background: #f8fbfa;
}

.board-product strong,
.board-mother strong,
.board-version strong {
  display: block;
}

.board-product small,
.board-mother small,
.board-version small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.board-product > span:first-child {
  border-left: 4px solid var(--accent);
}

.board-title-cell {
  display: flex;
  flex-direction: row;
  gap: 9px;
  align-items: center;
  justify-content: flex-start;
}

.board-title-stack {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 3px;
}

.board-title-stack small {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.inline-disclosure {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--accent);
  font-weight: 900;
}

.mother-name-input {
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  font-weight: 850;
}

.mother-name-input:hover,
.mother-name-input:focus {
  border-color: var(--line);
  background: #fff;
  outline: 0;
}

.mother-name-input:disabled {
  opacity: 1;
  color: var(--ink);
}

.video-title-input {
  width: 100%;
  min-height: 30px;
  margin-top: 4px;
  padding: 4px 6px;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.video-title-input:hover,
.video-title-input:focus {
  border-color: var(--line);
  background: #fff;
  outline: 0;
}

.video-title-input:disabled {
  opacity: 1;
  color: var(--ink);
}

.board-readonly-pill {
  font-style: normal;
  color: #2f4038;
}

.board-cell-input {
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 13px;
}

.board-cell-input:hover,
.board-cell-input:focus {
  border-color: var(--accent);
  background: #fff;
  outline: 0;
}

.board-cell-input:disabled {
  opacity: 1;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
}

.version-detail-link {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 900;
  text-align: left;
}

.version-detail-link:hover {
  text-decoration: underline;
}

.board-row .secondary-button {
  min-height: 32px;
  padding: 0 10px;
}

.board-preview-button {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(8, 117, 107, 0.28);
  border-radius: 7px;
  background: #effaf7;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.board-preview-button span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
}

.board-preview-button:disabled {
  opacity: 0.5;
}

.board-group .board-mother > span:first-child {
  padding-left: 22px;
}

.board-version {
  background: #fff;
}

.board-version > span:first-child {
  padding-left: 58px;
}

.board-empty-version > span:first-child {
  color: var(--muted);
  font-weight: 700;
}

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

.board-video-player {
  display: grid;
  gap: 12px;
}

.board-video-player video {
  width: 100%;
  max-height: 430px;
  border-radius: var(--radius);
  background: #081410;
  object-fit: contain;
}

.preview-source-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.preview-source-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.project-source-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #c8ddd6;
  border-radius: var(--radius);
  background: #f5fbf9;
}

.project-source-hero h4 {
  margin: 10px 0 6px;
  font-size: 20px;
}

.project-source-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.project-source-dl {
  align-content: start;
}

.project-source-chain {
  display: grid;
  gap: 10px;
}

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

.project-source-row {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.project-source-row.primary {
  border-color: rgba(8, 117, 107, 0.38);
  background: #effaf7;
}

.project-source-row > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-source-row p,
.project-source-row small {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.detail-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.detail-section h4 {
  margin: 0 0 12px;
}

.publish-return-section {
  background: #f8fbfa;
}

.publish-return-top {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.return-kpi-grid,
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.return-kpi,
.analysis-card {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.return-kpi span,
.analysis-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.return-kpi strong,
.analysis-card strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.return-kpi small,
.analysis-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.return-reminder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.return-reminder {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.return-reminder strong,
.return-reminder span,
.return-reminder em {
  display: block;
  overflow-wrap: anywhere;
}

.return-reminder strong {
  font-size: 13px;
}

.return-reminder span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.return-reminder em,
.return-status {
  margin-top: 6px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.return-reminder.done,
.return-status.done {
  color: var(--ok);
}

.return-reminder.due,
.return-status.due {
  color: var(--danger);
}

.return-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.return-snapshot-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.return-snapshot-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.return-snapshot-head h5 {
  margin: 0;
  font-size: 15px;
}

.return-snapshot-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.return-data-table {
  overflow: auto;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.return-data-row {
  display: grid;
  grid-template-columns: 76px 88px repeat(6, minmax(105px, 1fr)) 104px;
  min-width: 980px;
  border-bottom: 1px solid var(--line);
}

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

.return-data-row > span {
  min-width: 0;
  padding: 9px 8px;
  border-right: 1px solid var(--line);
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.35;
}

.return-data-row > span:last-child {
  border-right: 0;
}

.return-data-head {
  background: #eef3ef;
  color: var(--muted);
  font-weight: 900;
}

.return-data-row input {
  width: 100%;
  min-height: 32px;
  padding: 6px 7px;
  font-size: 12px;
}

.detail-board-field-table {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.detail-board-field-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.detail-board-field-row:last-child {
  border-bottom: 0;
}

.detail-board-field-row > span,
.detail-board-field-row > input {
  min-width: 0;
  padding: 9px 10px;
}

.detail-board-field-row > span {
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.detail-board-field-head {
  background: #eef3ef;
  color: var(--muted);
  font-weight: 900;
}

.detail-board-field-head > span:last-child {
  border-right: 0;
}

.detail-board-field-row > input {
  min-height: 38px;
  border: 0;
  background: transparent;
  font-size: 13px;
}

.detail-board-field-row > input:focus {
  outline: 2px solid rgba(8, 117, 107, 0.16);
  outline-offset: -2px;
}

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

.custom-return-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

.custom-return-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) repeat(3, minmax(88px, 1fr)) 40px;
  gap: 8px;
}

.custom-return-row input {
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
}

.muted-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.analysis-summary {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.project-info-section {
  background: #fff;
}

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

.project-positioning {
  grid-column: 1 / -1;
}

.project-positioning dd {
  white-space: pre-wrap;
}

.modal-danger-zone {
  margin-right: auto;
}

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

.boolean-toggle,
.production-detail-button {
  display: grid;
  gap: 5px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.boolean-toggle strong {
  font-size: 22px;
}

.boolean-toggle.yes,
.production-detail-button.done {
  border-color: #b9d8c8;
  background: #f2faf6;
}

.boolean-toggle.no {
  border-color: #efcbc2;
  background: #fff8f5;
}

.production-detail-button span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.detail-dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.detail-dl div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px;
}

.detail-dl dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.detail-dl dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

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

  .login-visual {
    min-height: 540px;
  }

  .login-stat-card {
    top: 16%;
    width: min(440px, 62%);
  }

  .content-grid,
  .workbench-grid,
  .home-grid,
  .asset-layout,
  .role-manager-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .responsible-list,
  .video-detail-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-preview-block {
    position: static;
  }

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

  .creative-library-layout {
    grid-template-columns: 1fr;
  }

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

  .filter-rail {
    max-height: none;
  }
}

@media (max-width: 860px) {
  .login-page {
    padding: 16px;
  }

  .login-shell {
    min-height: calc(100vh - 32px);
  }

  .login-visual,
  .login-card {
    padding: 24px;
  }

  .login-visual {
    min-height: 500px;
  }

  .login-command strong {
    font-size: clamp(31px, 11vw, 44px);
  }

  .login-stat-card {
    top: 18%;
    right: 18px;
    width: min(360px, calc(100% - 36px));
    gap: 12px;
    padding: 16px;
  }

  .map-node {
    width: 38px;
    height: 38px;
    font-size: 9px;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .side-panel,
  .product-space-card,
  .product-space-toolbar,
  .reference-layout,
  .project-source-hero,
  .workbench-product-grid,
  .attachment-link-grid,
  .locator-grid,
  .summary-strip,
  .library-toolbar,
  .creative-stats,
  .review-grid,
  .task-grid,
  .permission-grid,
  .data-grid,
  .asset-stats,
  .product-detail-grid,
  .metric-edit-grid,
  .publish-return-top,
  .return-kpi-grid,
  .return-reminder-grid,
  .return-snapshot-grid,
  .analysis-grid,
  .creative-tag-groups,
  .inline-add-grid,
  .asset-toolbar,
  .board-toolbar,
  .modal-form-grid,
  .home-hero {
    grid-template-columns: 1fr;
  }

  .product-detail-grid .field:nth-child(n + 5) {
    grid-column: span 1;
  }

  .custom-field-row,
  .asset-row,
  .home-task-card,
  .role-editor-fields,
  .permission-grid-editor,
  .account-login-grid,
  .subaccount-form,
	  .module-access-grid,
	  .account-row,
  .toggle-grid,
  .production-detail-grid,
  .custom-return-row,
  .tag-group-add-row,
	  .detail-dl div {
    grid-template-columns: 1fr;
  }

  .account-role-badge {
    width: fit-content;
  }

  .account-edit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-edit-actions span {
    margin-right: 0;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
  }

  .asset-row-actions {
    min-width: 0;
  }

  .creative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

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

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

  .rail {
    position: fixed;
    z-index: 22;
    inset: 0 auto 0 0;
    display: none;
    width: min(270px, calc(100% - 48px));
    padding: 16px 12px;
  }

  .app-shell.rail-open .rail {
    display: flex;
  }

  body:has(.app-shell.rail-open) {
    overflow: hidden;
  }

  .rail-backdrop {
    position: fixed;
    z-index: 21;
    inset: 0;
    display: block;
    background: rgba(18, 28, 25, 0.52);
  }

  .workspace-heading .rail-toggle,
  .brand-block .rail-close {
    display: inline-flex;
    flex: 0 0 40px;
  }

  .brand-block .rail-close {
    margin-left: auto;
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
    color: #fff;
  }

  .rail-toggle svg,
  .rail-close svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .workspace-kicker {
    display: none;
  }

  .workspace-mobile-name {
    display: block;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .home-hero h3 {
    font-size: 24px;
  }

  .login-page {
    padding: 10px;
  }

  .login-shell {
    min-height: calc(100vh - 20px);
    border-radius: 12px;
  }

  .login-visual {
    min-height: 460px;
    padding: 20px;
  }

  .login-card {
    padding: 22px 18px;
  }

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

  .login-command {
    gap: 11px;
  }

  .login-command strong {
    font-size: 30px;
  }

  .login-stat-card {
    grid-template-columns: 1fr 1fr;
    top: 92px;
    gap: 10px;
    padding: 13px;
  }

  .login-stat-card strong {
    font-size: 16px;
  }

  .login-action-row span {
    width: 100%;
    justify-content: center;
  }

  .workspace {
    padding: 12px;
  }

  .main-panel {
    padding: 15px;
  }

  .caption-large {
    font-size: 21px;
  }
}
