:root {
  --ink: #171314;
  --muted: #77686d;
  --paper: #fff7f8;
  --white: #ffffff;
  --rose: #f35f76;
  --rose-soft: #fff0f3;
  --jade: #ff90b0;
  --violet: #901080;
  --blush: #ffc0c8;
  --gold: #ffb0c0;
  --line: rgba(55, 30, 42, 0.11);
  --shadow: 0 20px 50px rgba(243, 95, 118, 0.15);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 247, 248, 0.98), rgba(255, 255, 255, 0.98) 46%, rgba(255, 240, 243, 0.96)),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(77, 48, 42, 0.08);
  box-shadow: 0 10px 34px rgba(243, 95, 118, 0.10);
  backdrop-filter: blur(18px);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  opacity: 0;
}

.brand,
.admin-logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-logo-img {
  width: clamp(176px, 17vw, 236px);
  height: auto;
  max-height: 54px;
  object-fit: contain;
}

.login-logo-img {
  width: min(260px, 84%);
  height: auto;
  margin-bottom: 4px;
}

.admin-logo-img {
  width: 178px;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  padding: 8px 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2vw, 30px);
  font-size: 16px;
  flex: 1;
}

.site-nav a {
  opacity: 0.78;
  font-weight: 700;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  opacity: 1;
  color: var(--rose);
}

.auth-actions {
  min-width: clamp(210px, 18vw, 260px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.auth-link {
  border: 0;
  padding: 8px 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.button.small {
  min-height: 36px;
  min-width: 78px;
  padding: 8px 18px;
  font-size: 15px;
}

.member-menu {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.member-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  min-width: 168px;
  height: 12px;
}

.member-trigger {
  position: relative;
  min-width: 148px;
  max-width: 176px;
  border: 1px solid rgba(243, 95, 118, 0.24);
  border-radius: 999px;
  padding: 9px 34px 9px 16px;
  color: var(--rose);
  background:
    linear-gradient(135deg, rgba(255, 192, 200, 0.22), rgba(255, 255, 255, 0.92));
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.16s ease;
}

.member-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  min-width: 168px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.member-dropdown-user {
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  padding: 6px 8px 8px;
}

.member-dropdown-user strong,
.member-dropdown-user span {
  display: block;
  line-height: 1.35;
}

.member-dropdown-user strong {
  font-size: 14px;
}

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

.member-menu:hover .member-dropdown,
.member-menu:focus-within .member-dropdown,
.member-menu.open .member-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.member-menu:hover .member-trigger::after,
.member-menu:focus-within .member-trigger::after,
.member-menu.open .member-trigger::after {
  transform: translateY(-35%) rotate(225deg);
}

.member-dropdown button,
.member-dropdown a {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.member-dropdown button:hover,
.member-dropdown a:hover {
  color: var(--rose);
  background: var(--rose-soft);
}

.hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}

.sub-hero {
  position: relative;
  min-height: 430px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.sub-hero::after {
  content: "";
  position: absolute;
  right: clamp(18px, 8vw, 120px);
  bottom: clamp(28px, 6vw, 70px);
  width: clamp(120px, 18vw, 260px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.26);
  pointer-events: none;
}

.sub-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(23, 19, 20, 0.78), rgba(86, 35, 63, 0.42), rgba(255, 144, 176, 0.18)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
}

.sub-hero-talents {
  background: #dceff0;
}

.sub-hero-talents .sub-hero-bg {
  background:
    radial-gradient(circle at 82% 22%, rgba(164, 226, 231, 0.34), transparent 24%),
    linear-gradient(120deg, rgba(35, 65, 78, 0.78), rgba(88, 148, 165, 0.44) 44%, rgba(255, 224, 174, 0.16)),
    url("/assets/banner-talents.png");
  background-size: cover;
  background-position: center;
}

.sub-hero-talents::after {
  border-radius: 50%;
  box-shadow: inset 0 0 0 28px rgba(255, 255, 255, 0.08);
}

.sub-hero-brands {
  background: #241b3b;
}

.sub-hero-brands .sub-hero-bg {
  background:
    linear-gradient(120deg, rgba(31, 22, 58, 0.9), rgba(80, 44, 106, 0.66), rgba(255, 181, 89, 0.34)),
    url("/assets/banner-brands.png");
  background-size: cover;
  background-position: center;
}

.sub-hero-brands::after {
  transform: rotate(12deg);
}

.sub-hero-news {
  background: #172338;
}

.sub-hero-news .sub-hero-bg {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 90px),
    linear-gradient(120deg, rgba(14, 32, 58, 0.9), rgba(57, 88, 132, 0.62), rgba(255, 122, 100, 0.26)),
    url("/assets/banner-news.png");
  background-size: auto, cover, cover;
  background-position: center;
}

.sub-hero-news::after {
  width: clamp(150px, 22vw, 320px);
  aspect-ratio: 16 / 9;
  border-radius: 18px;
}

.sub-hero-about {
  background: #eef0e8;
}

.sub-hero-about .sub-hero-bg {
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 228, 170, 0.28), transparent 26%),
    linear-gradient(120deg, rgba(62, 72, 78, 0.76), rgba(143, 160, 151, 0.42), rgba(255, 238, 201, 0.16)),
    url("/assets/banner-about.png");
  background-size: cover, cover, cover;
  background-position: center;
}

.sub-hero-about::after {
  border-radius: 28px 28px 120px 28px;
}

.sub-hero-contact {
  background: #243234;
}

.sub-hero-contact .sub-hero-bg {
  background:
    radial-gradient(circle at 76% 25%, rgba(96, 188, 214, 0.34), transparent 26%),
    linear-gradient(120deg, rgba(25, 42, 44, 0.92), rgba(42, 86, 92, 0.7), rgba(240, 188, 117, 0.28)),
    url("/assets/banner-contact.png");
  background-size: cover;
  background-position: center;
}

.sub-hero-contact::after {
  border-radius: 22px;
  transform: rotate(-8deg);
}

.sub-hero-content {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 136px 0 76px;
}

.sub-hero h1 {
  max-width: 780px;
  font-size: clamp(40px, 6vw, 72px);
}

.sub-hero p:not(.eyebrow) {
  width: min(640px, 100%);
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2vw, 21px);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  transform: scale(1.01);
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(20, 20, 22, 0.82), rgba(20, 20, 22, 0.46) 42%, rgba(20, 20, 22, 0.1) 72%, rgba(20, 20, 22, 0.02)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(20, 20, 22, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 8vw, 112px);
  padding-top: 80px;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-content > p:not(.eyebrow) {
  width: min(620px, 100%);
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  min-height: 18px;
  margin-top: 34px;
}

.hero-dots button {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 54px;
  background: linear-gradient(135deg, var(--blush), var(--rose));
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, #ffc0c8 0%, #ff90b0 34%, #f35f76 70%, var(--violet) 100%);
  box-shadow: 0 14px 34px rgba(243, 95, 118, 0.26);
}

.button.ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
}

.button.dark {
  color: var(--white);
  background: var(--ink);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(243, 95, 118, 0.14);
}

.metric {
  padding: 30px clamp(18px, 3vw, 40px);
  background: rgba(255, 255, 255, 0.92);
}

.metric strong {
  display: block;
  color: var(--rose);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.section {
  padding: clamp(70px, 9vw, 118px) clamp(18px, 5vw, 72px);
}

.hero + .section {
  padding-top: clamp(44px, 5.8vw, 68px);
}

#talents.section,
#cooperation.section,
#news.section {
  padding-top: clamp(46px, 5.8vw, 72px);
  padding-bottom: clamp(46px, 5.8vw, 72px);
}

#cooperation.section {
  padding-top: clamp(42px, 5vw, 64px);
  padding-bottom: clamp(42px, 5vw, 64px);
}

#news.section {
  padding-bottom: clamp(34px, 4.2vw, 52px);
}

.section-head {
  width: min(1120px, 100%);
  margin: 0 auto 26px;
}

.section-head.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.14;
}

.intro-band,
.contact-band {
  background: var(--white);
}

.warm-band {
  background:
    linear-gradient(135deg, rgba(255, 240, 243, 0.76), rgba(255, 255, 255, 0.94) 48%, rgba(255, 194, 202, 0.2));
}

.intro-layout,
.contact-layout {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(24px, 5vw, 68px);
  align-items: start;
}

#companyIntro {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
}

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

.service-item,
.talent-card,
.brand-card,
.news-item,
.contact-card,
.form-panel,
.register-grid {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
}

.service-item {
  padding: 22px;
}

.service-item h3,
.talent-card h3,
.brand-card h3,
.news-item h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.service-item p,
.talent-card p,
.brand-card p,
.news-item p {
  margin: 0;
  color: var(--muted);
}

.talent-grid,
.brand-grid {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.brand-logo-grid {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.full-grid {
  align-items: stretch;
}

.talent-card,
.brand-card,
.news-item {
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(243, 95, 118, 0.08);
}

.talent-portrait,
.brand-logo {
  display: grid;
  aspect-ratio: 1;
  min-height: 0;
  place-items: center;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(255, 192, 200, 0.92), rgba(255, 144, 176, 0.86) 36%, rgba(243, 95, 118, 0.88) 68%, rgba(144, 16, 128, 0.86)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  font-size: 42px;
  font-weight: 800;
}

.talent-portrait {
  background: #fff;
  color: var(--rose);
  overflow: hidden;
}

.talent-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.home-talent-card .talent-portrait {
  aspect-ratio: 1;
}

.talent-card .body,
.brand-card .body {
  padding: 22px;
}

.home-talent-card .body {
  position: relative;
  padding: 18px 20px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 249, 0.98)),
    var(--white);
}

.home-talent-card .body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 95, 118, 0.42), rgba(255, 176, 192, 0.2), transparent);
}

.talent-title-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  margin-bottom: 14px;
}

.home-talent-card h3 {
  min-width: 0;
  height: 32px;
  margin: 0;
  color: #24191d;
  font-size: 20px;
  line-height: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  min-height: 36px;
  border: 1px solid rgba(243, 95, 118, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  color: #d94560;
  background:
    linear-gradient(135deg, rgba(255, 240, 243, 0.96), rgba(255, 255, 255, 0.92));
  box-shadow: 0 8px 20px rgba(243, 95, 118, 0.08);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.talent-quick-row {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 42px;
}

.platform-logo-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 154px;
  min-width: 154px;
  overflow: hidden;
}

.platform-logo {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(55, 30, 42, 0.08);
  border-radius: 10px;
  color: #d94560;
  background: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.platform-logo img {
  display: block;
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.platform-fallback {
  background:
    linear-gradient(135deg, rgba(255, 240, 243, 0.96), rgba(255, 255, 255, 0.92));
}

.style-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(243, 95, 118, 0.14);
  border-radius: 999px;
  padding: 6px 12px;
  color: #3b2a30;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 249, 0.94));
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.tag {
  display: inline-flex;
  border: 1px solid rgba(243, 95, 118, 0.22);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--rose);
  background: rgba(255, 240, 243, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.brand-logo {
  aspect-ratio: 1.35;
  background: #fff;
  color: var(--ink);
}

.brand-logo img {
  display: block;
  width: min(88%, 178px);
  height: 78%;
  object-fit: contain;
}

.brand-logo span {
  display: grid;
  place-items: center;
  max-width: 88%;
  min-height: 44px;
  color: #261c21;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.brand-logo:has(img) span {
  display: none;
}

.brand-logo-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 34px rgba(243, 95, 118, 0.07);
}

.brand-logo-card .brand-logo {
  width: 100%;
  height: 100%;
  min-height: 124px;
  padding: 10px;
  font-size: clamp(18px, 1.6vw, 24px);
  text-align: center;
}

.brand-category-section {
  width: min(1120px, 100%);
  margin: 0 auto 42px;
}

.brand-category-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.brand-category-head .eyebrow {
  margin: 0;
  border: 1px solid rgba(243, 95, 118, 0.18);
  border-radius: 999px;
  padding: 9px 16px;
  color: #d94560;
  background: linear-gradient(135deg, rgba(255, 240, 243, 0.98), rgba(255, 255, 255, 0.96));
  box-shadow: 0 10px 28px rgba(243, 95, 118, 0.08);
  font-size: 18px;
  letter-spacing: 0;
}

.brand-category-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(243, 95, 118, 0.28), rgba(243, 95, 118, 0.02));
}

.full-grid .home-talent-card p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.brand-feature-card {
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 249, 0.98)),
    var(--white);
}

.brand-feature-card .brand-logo {
  aspect-ratio: 16 / 10;
  min-height: 0;
  border-bottom: 1px solid rgba(55, 30, 42, 0.08);
}

.brand-feature-card .body {
  display: grid;
  align-content: start;
  gap: 10px;
}

.brand-feature-card h3 {
  margin: 0;
}

.brand-feature-card .tag-row {
  margin: 0;
}

.brand-feature-card p {
  line-height: 1.75;
}

.about-company-panel {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}

.about-company-panel h2 {
  margin-top: 8px;
  font-size: clamp(34px, 4.2vw, 58px);
}

.about-company-copy {
  display: grid;
  gap: 18px;
  color: #4f4147;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.9;
}

.about-company-copy p {
  margin: 0;
}

.news-list {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.news-portal {
  display: grid;
  gap: 18px;
}

.news-category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 6px;
  border: 1px solid rgba(55, 30, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(26, 18, 21, 0.06);
}

.news-category-strip button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 13px;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.news-category-strip button:hover,
.news-category-strip button.active {
  border-color: rgba(243, 95, 118, 0.2);
  color: var(--rose);
  background: #fff;
  transform: translateY(-1px);
}

.news-category-strip em {
  min-width: 24px;
  border-radius: 999px;
  padding: 2px 7px;
  color: #866471;
  background: #fff2f4;
  font-size: 12px;
  font-style: normal;
}

.news-category-strip button.active em {
  color: #fff;
  background: var(--rose);
}

.news-filter-status {
  width: min(1120px, 100%);
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.home-news-grid {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.full-list {
  gap: 20px;
}

.news-item,
.news-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 176px;
}

.news-card {
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 34px rgba(243, 95, 118, 0.08);
}

.news-card .news-cover {
  aspect-ratio: 16 / 10;
  min-height: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}

.news-card .body {
  padding: 18px;
}

.news-cover {
  display: block;
  overflow: hidden;
  border-radius: var(--radius) 0 0 var(--radius);
  background: #fff7f8;
}

.news-cover img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.news-cover.image-error {
  background:
    linear-gradient(135deg, rgba(23, 19, 20, 0.12), rgba(255, 144, 176, 0.22), rgba(243, 95, 118, 0.2)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.news-item .body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 22px 24px;
}

.news-card h3 a,
.news-item h3 a {
  color: inherit;
  text-decoration: none;
}

.news-item h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.news-item p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.news-list-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.news-list-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(243, 95, 118, 0.1);
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 18px;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.news-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 16px;
  color: #fff;
  background: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease;
}

.read-more-link:hover {
  background: var(--rose);
  transform: translateY(-1px);
}

.home-final-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 6vw, 74px) clamp(18px, 5vw, 72px);
  color: var(--white);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(243, 95, 118, 0.18), transparent 30%),
    linear-gradient(135deg, #171314, #24131f 54%, #111111);
}

.home-final-cta::before,
.home-final-cta::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 144, 176, 0.16), transparent 68%);
  pointer-events: none;
}

.home-final-cta::before {
  top: -88px;
  left: 12%;
}

.home-final-cta::after {
  right: 10%;
  bottom: -116px;
}

.final-ornament {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 10px;
}

.final-ornament::before,
.final-ornament::after {
  content: "";
  width: 58px;
  height: 1px;
  background: rgba(255, 192, 200, 0.34);
}

.final-ornament span {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--blush), var(--rose));
  transform: rotate(45deg);
}

.final-eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin: 0 0 14px;
  border: 1px solid rgba(255, 192, 200, 0.26);
  border-radius: 999px;
  padding: 6px 22px;
  color: var(--blush);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.home-final-cta h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.12;
}

.home-final-cta > p:not(.final-eyebrow) {
  position: relative;
  z-index: 1;
  width: min(700px, 100%);
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(16px, 2vw, 21px);
}

.final-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin-top: 26px;
}

.final-actions .button {
  min-width: 156px;
  min-height: 48px;
  border-radius: 0;
}

.news-content {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.news-content p {
  margin: 0 0 12px;
  line-height: 1.85;
}

.news-content a,
.source-link {
  color: var(--rose);
  font-weight: 800;
}

.source-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: min(48%, 280px);
  min-height: 34px;
  overflow: hidden;
  border: 1px solid rgba(55, 30, 42, 0.1);
  border-radius: 999px;
  padding: 7px 12px;
  color: #6f5963;
  background: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.article-page {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 126px 0 78px;
}

.article-hero {
  max-width: 940px;
  margin: 0 0 36px;
  padding: 34px 0 10px;
}

.article-back {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  color: var(--rose);
  font-weight: 900;
  text-decoration: none;
}

.article-hero h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.14;
}

.article-hero-copy > p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.article-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.article-badges span {
  border: 1px solid rgba(243, 95, 118, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--rose);
  background: #fff7f8;
  font-size: 13px;
  font-weight: 800;
}

.article-cover {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 50px rgba(23, 19, 20, 0.12);
}

.article-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.article-cover figcaption {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
}

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

.article-content,
.article-side section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(243, 95, 118, 0.07);
}

.article-content {
  padding: clamp(24px, 4vw, 46px);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.95;
}

.article-content h2 {
  margin: 34px 0 12px;
  font-size: 28px;
}

.article-content h3 {
  margin: 26px 0 10px;
  font-size: 22px;
}

.article-content p {
  margin: 0 0 18px;
}

.article-content .article-lead {
  border-left: 4px solid var(--rose);
  padding: 12px 16px;
  color: #4d3340;
  background: #fff7f8;
  font-size: 19px;
  font-weight: 800;
}

.article-content blockquote {
  margin: 24px 0;
  border-left: 4px solid var(--gold);
  padding: 16px 20px;
  color: #5f4a2e;
  background: #fffaf1;
}

.article-content figure {
  max-width: 860px;
  margin: 28px auto;
}

.article-content figure img,
.article-content > img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 560px;
  margin: 0 auto;
  border-radius: var(--radius);
  object-fit: contain;
}

.article-content figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.article-attachment {
  margin: 24px 0;
}

.article-attachment a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(55, 30, 42, 0.1);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--ink);
  background: #fffaf1;
  text-decoration: none;
}

.article-attachment strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-attachment span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.article-content table {
  min-width: 0;
  margin: 22px 0;
  font-size: 15px;
}

.article-source-note {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.article-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.article-side section {
  padding: 18px;
}

.article-side h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.article-side dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.article-side dl div {
  display: grid;
  gap: 4px;
}

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

.article-side dd {
  margin: 0;
  font-size: 14px;
}

.related-news {
  display: grid;
  gap: 10px;
}

.related-news a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none;
}

.page-section {
  display: none;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding-inline: 0;
}

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

.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.page-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
}

.page-tabs button.active {
  color: var(--white);
  border-color: var(--rose);
  background: linear-gradient(135deg, var(--rose), var(--violet));
}

.rich-page {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.rich-page h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.contact-layout {
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
}

.contact-card,
.form-panel,
.register-grid {
  padding: 24px;
}

.contact-card strong {
  display: block;
  margin-bottom: 20px;
  color: var(--rose);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.2;
}

.contact-card dl {
  display: grid;
  gap: 18px;
  margin: 0;
}

.contact-card dl div {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid rgba(55, 30, 42, 0.08);
  padding-bottom: 16px;
}

.contact-card dl div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.contact-card dt {
  color: rgba(119, 104, 109, 0.9);
  font-size: 14px;
  font-weight: 900;
}

.contact-card dd {
  margin: 0;
  color: var(--ink);
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 800;
  line-height: 1.55;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
  outline: none;
}

textarea {
  resize: vertical;
}

input,
select {
  height: 52px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(243, 95, 118, 0.14);
}

.form-panel,
.register-grid {
  display: grid;
  gap: 16px;
}

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

.form-panel .full,
.form-panel .button,
.form-panel .form-message {
  grid-column: 1 / -1;
}

.register-grid {
  width: min(1120px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--rose);
  font-weight: 700;
}

.text-link {
  color: var(--rose);
  font-weight: 800;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.74);
  background:
    linear-gradient(135deg, #171314, #381427 54%, #901080);
}

.footer a:hover,
.footer a:focus-visible {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.auth-modal,
.profile-modal,
.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 19, 20, 0.52);
  backdrop-filter: blur(8px);
}

.auth-panel,
.profile-panel,
.crop-panel {
  position: relative;
  width: min(440px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.crop-panel {
  width: min(920px, 100%);
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 36px);
}

.crop-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: min(100%, 620px);
  max-height: min(52vh, 520px);
  margin: 4px auto;
  background: #fff;
}

.crop-stage img {
  position: absolute;
  display: block;
  max-width: none;
  max-height: none;
  user-select: none;
}

.crop-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 0 0 999px rgba(23, 19, 20, 0.06);
  pointer-events: none;
}

.crop-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.crop-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.crop-controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-panel dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.profile-panel dl div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.profile-panel dt {
  color: var(--muted);
  font-weight: 700;
}

.profile-panel dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.lead-detail-panel {
  width: min(620px, 100%);
}

.lead-message-row {
  align-items: start;
}

.lead-message-row dd {
  white-space: pre-wrap;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px 42px 22px 0;
}

.auth-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  font-weight: 800;
}

.auth-tabs button.active {
  border-color: var(--rose);
  color: var(--white);
  background: linear-gradient(135deg, var(--rose), var(--violet));
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.admin-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 240, 243, 0.62), rgba(255, 255, 255, 0.92) 38%, rgba(255, 247, 248, 0.96));
}

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

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  color: var(--ink);
  font-size: 34px;
}

.login-panel p {
  margin: 0;
  color: var(--muted);
}

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

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  color: var(--white);
  background:
    linear-gradient(180deg, #171314, #2d1226 48%, #901080);
}

.admin-mobile-menu-toggle {
  display: none;
}

.admin-logo {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

#adminNav {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

.admin-nav-group {
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.admin-nav-group summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 2px;
  color: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  list-style: none;
}

.admin-nav-group summary::-webkit-details-marker {
  display: none;
}

.admin-nav-group summary span {
  font-size: 14px;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0;
}

.admin-nav-items {
  display: grid;
  gap: 4px;
  padding: 2px 0 0;
}

#adminNav button,
.sidebar-logout {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px 10px 16px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

#adminNav button.active,
#adminNav button:hover,
.sidebar-logout:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

#adminNav button.active {
  background: rgba(255, 255, 255, 0.16);
  font-weight: 900;
}

.sidebar-logout {
  margin-top: auto;
}

.admin-main {
  min-width: 0;
  padding: 28px clamp(18px, 4vw, 44px);
}

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

.admin-topbar h1 {
  color: var(--ink);
  font-size: clamp(28px, 3vw, 42px);
}

.admin-user {
  display: grid;
  grid-template-columns: 34px minmax(96px, auto) auto;
  align-items: center;
  gap: 10px;
  max-width: min(100%, 560px);
  border: 1px solid rgba(55, 30, 42, 0.10);
  border-radius: 8px;
  padding: 7px 10px 7px 8px;
  background:
    linear-gradient(135deg, rgba(255, 240, 243, 0.92), rgba(255, 255, 255, 0.98));
  box-shadow: 0 10px 24px rgba(243, 95, 118, 0.08);
}

.admin-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose), var(--violet));
  font-size: 13px;
  font-weight: 900;
}

.admin-user-main {
  display: grid;
  min-width: 0;
  line-height: 1.18;
}

.admin-user-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.admin-user-meta em {
  max-width: 96px;
  overflow: hidden;
  border: 1px solid rgba(243, 95, 118, 0.16);
  border-radius: 999px;
  padding: 2px 8px;
  color: #7a2442;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.button.ghost.admin-home-link {
  min-height: 38px;
  border: 1px solid rgba(55, 30, 42, 0.12);
  color: var(--ink);
  padding: 8px 14px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(23, 19, 20, 0.06);
}

.button.ghost.admin-home-link:hover {
  color: var(--rose);
  background: #fff7f8;
}

.admin-toast {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 90;
  min-width: 180px;
  max-width: min(360px, calc(100vw - 48px));
  border: 1px solid rgba(55, 30, 42, 0.1);
  border-radius: var(--radius);
  padding: 13px 16px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 16px 42px rgba(23, 19, 20, 0.14);
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.success {
  border-color: rgba(28, 150, 94, 0.22);
  color: #13744a;
}

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

.admin-card,
.editor-card,
.table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(243, 95, 118, 0.07);
}

.admin-card {
  padding: 20px;
}

.admin-card strong {
  display: block;
  color: var(--rose);
  font-size: 30px;
}

.panel-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.order-system-actions {
  justify-content: space-between;
}

.order-system-entry {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  max-width: 860px;
}

.order-system-copy {
  min-width: 0;
}

.order-system-title-row,
.order-system-buttons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-system-entry strong {
  color: var(--ink);
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.order-system-entry p {
  margin: 0;
}

.order-system-detail {
  color: var(--muted);
  display: block;
  line-height: 1.55;
  margin-top: 6px;
}

.order-system-state {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
}

.order-system-state.checking {
  background: #fff4d6;
  color: #946200;
}

.order-system-state.ready {
  background: #e8f7ee;
  color: #167448;
}

.order-system-state.unavailable {
  background: #fff0f0;
  color: #b52d3a;
}

.order-system-buttons {
  flex: 0 0 auto;
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .order-system-entry {
    align-items: stretch;
    flex-direction: column;
  }

  .order-system-buttons {
    justify-content: flex-start;
  }
}

.editor-card {
  margin-bottom: 14px;
  padding: 18px;
}

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

.settings-editor-grid {
  align-items: start;
  gap: 16px 18px;
  max-width: 920px;
}

.settings-editor-grid .panel-actions {
  border-top: 1px solid var(--line);
  margin: 4px 0 0;
  padding-top: 16px;
}

.api-config-form {
  display: grid;
  gap: 16px;
  max-width: 1120px;
}

.api-config-hero,
.api-provider-card,
.custom-api-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(243, 95, 118, 0.07);
}

.api-config-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
}

.api-config-hero h3,
.api-provider-head h3 {
  margin: 0 0 6px;
}

.api-config-summary {
  min-width: 132px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  background: #fffafa;
}

.api-config-summary strong {
  display: block;
  color: var(--rose);
  font-size: 30px;
  line-height: 1.1;
}

.api-config-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.api-capability-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fffafa;
}

.api-capability-grid strong,
.api-capability-grid span {
  display: block;
}

.api-capability-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.api-provider-card {
  padding: 18px 20px 20px;
}

.api-provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}

.api-provider-grid .full {
  grid-column: 1 / -1;
}

.api-provider-grid label {
  min-width: 0;
}

.api-provider-grid input,
.api-provider-grid select {
  display: block;
}

.api-toggle-row,
.api-option-grid {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffafa;
}

.api-toggle-row {
  padding: 10px 12px;
}

.api-toggle-row .checkbox-row {
  min-height: 28px;
}

.api-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 12px;
  padding: 12px;
}

.api-option-grid .checkbox-row {
  align-items: flex-start;
  min-height: 0;
  margin: 0;
}

.api-provider-head,
.custom-api-card-head,
.api-config-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.api-status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  background: #fffafa;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.api-status-pill.enabled {
  border-color: rgba(16, 128, 96, 0.22);
  color: #087558;
  background: #effaf5;
}

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

.section-head-row h3 {
  margin: 0 0 4px;
}

.section-head-row .muted-text {
  margin: 0;
}

.ai-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(55, 30, 42, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 240, 243, 0.82)),
    #fff;
  box-shadow: 0 14px 34px rgba(55, 30, 42, 0.08);
}

.ai-hero.compact {
  align-items: flex-start;
}

.ai-hero h3 {
  margin: 4px 0 8px;
  font-size: 24px;
}

.ai-model-badge {
  min-width: 180px;
  padding: 16px;
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: var(--radius);
  background: #f0fdfa;
}

.ai-model-badge span,
.ai-model-badge small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.ai-model-badge strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.ai-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.ai-metric-grid article,
.ai-group-usage article,
.ai-library-grid article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.ai-metric-grid span,
.ai-group-usage span,
.ai-library-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.ai-metric-grid strong,
.ai-group-usage strong {
  display: block;
  margin: 6px 0;
  font-size: 26px;
  line-height: 1.1;
}

.ai-metric-grid small,
.ai-group-usage small,
.ai-library-grid small {
  color: var(--muted);
}

.ai-workspace-grid,
.ai-usage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 16px;
  margin-bottom: 18px;
}

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

.ai-quick-tool,
.ai-tool-card,
.ai-usage-table button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.ai-quick-tool {
  display: block;
  padding: 14px;
}

.ai-quick-tool strong,
.ai-tool-card strong,
.ai-log-list strong {
  display: block;
  margin-bottom: 4px;
}

.ai-quick-tool span,
.ai-tool-card span,
.ai-log-list span {
  color: var(--muted);
  font-size: 13px;
}

.ai-quick-tool:hover,
.ai-tool-card:hover,
.ai-tool-card.active,
.ai-usage-table button:hover,
.ai-usage-table button.active {
  border-color: rgba(243, 95, 118, 0.35);
  box-shadow: 0 12px 28px rgba(243, 95, 118, 0.1);
}

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

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

.ai-agent-card {
  min-width: 0;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 28px rgba(55, 30, 42, 0.06);
}

.ai-agent-card:hover {
  border-color: rgba(243, 95, 118, 0.35);
  box-shadow: 0 16px 34px rgba(243, 95, 118, 0.1);
}

.ai-agent-card.planned {
  opacity: 0.72;
}

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

.ai-agent-card-head h3 {
  margin: 4px 0 0;
  font-size: 19px;
}

.ai-agent-meta {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.ai-agent-meta span {
  min-width: 0;
  padding: 7px 9px;
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 247, 248, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.ai-agent-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ai-agent-card footer small {
  color: var(--muted);
}

.ai-tool-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.ai-tool-side-panel {
  position: sticky;
  top: 18px;
}

.ai-tool-side-panel h4 {
  margin: 18px 0 8px;
}

.ai-tool-history-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.ai-tool-history-item {
  position: relative;
  min-width: 0;
}

.ai-tool-history-main,
.ai-history-rename-form {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.ai-tool-history-main {
  padding-right: 84px;
}

.ai-tool-history-item:hover .ai-tool-history-main,
.ai-tool-history-item.active .ai-tool-history-main {
  border-color: rgba(243, 95, 118, 0.35);
  box-shadow: 0 12px 28px rgba(243, 95, 118, 0.1);
}

.ai-tool-history-main > strong,
.ai-tool-history-main > span,
.ai-tool-history-main > small {
  display: block;
}

.ai-tool-history-main > span,
.ai-tool-history-main > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ai-history-title-row {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 0 !important;
}

.ai-history-title-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.ai-history-status {
  flex: none;
  padding: 2px 6px;
  border-radius: 4px;
  color: #5f565a;
  background: #f0edef;
  font-size: 11px;
  line-height: 1.5;
}

.ai-history-status.status-success {
  color: #14633d;
  background: #e8f5ed;
}

.ai-history-status.status-needs_review {
  color: #8a5200;
  background: #fff3d8;
}

.ai-history-status.status-failed {
  color: #a42f45;
  background: #fdebed;
}

.ai-history-status.status-running,
.ai-history-status.status-queued {
  color: #245c91;
  background: #e8f2fb;
}

.ai-history-meta-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin-top: 10px !important;
}

.ai-history-meta-grid > span {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 6px;
  margin: 0;
}

.ai-history-meta-grid b,
.ai-history-meta-grid em {
  min-width: 0;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
}

.ai-history-meta-grid b {
  color: #82787d;
}

.ai-history-meta-grid em {
  overflow-wrap: anywhere;
  color: #40383c;
}

.ai-history-rename-button {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 68px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  place-items: center;
  grid-auto-flow: column;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
}

.ai-history-rename-button:hover,
.ai-history-rename-button:focus-visible {
  color: var(--ink);
  background: #f3f0f1;
}

.ai-history-rename-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  cursor: default;
}

.ai-history-rename-form input {
  min-width: 0;
}

.ai-history-rename-form small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.ai-history-rename-actions {
  display: flex;
  gap: 4px;
}

.ai-history-rename-actions button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.ai-history-rename-actions button:hover,
.ai-history-rename-actions button:focus-visible {
  border-color: rgba(243, 95, 118, 0.42);
  background: #fff7f8;
}

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

.ai-result-actions,
.ai-result-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ai-history-heading {
  display: grid;
  gap: 8px;
  margin: 18px 0 8px;
}

.ai-history-heading h4 {
  margin: 0;
}

.ai-history-heading input {
  width: 100%;
  min-width: 0;
}

.ai-result-actions {
  margin-top: 12px;
}

.ai-result-feedback {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ai-result-feedback span {
  margin-right: 4px;
  font-weight: 700;
}

.ai-result-feedback button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.ai-result-feedback button.active {
  border-color: #0f9f92;
  background: rgba(15, 159, 146, 0.1);
  color: #11675f;
}

.contract-review-shell {
  display: grid;
  grid-template-columns: minmax(220px, 248px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-height: min(760px, calc(100vh - 210px));
}

.contract-review-list,
.contract-review-panel {
  min-width: 0;
}

.contract-review-list {
  position: sticky;
  top: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: calc(100vh - 160px);
  margin-bottom: 0;
  overflow: auto;
}

.contract-history-head {
  display: grid;
  gap: 4px;
}

.contract-history-head h3,
.contract-history-head .muted-text {
  margin: 0;
}

.contract-history-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f4f4f5;
}

.contract-history-tabs button {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: #71717a;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.contract-history-tabs button.active {
  color: #18181b;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.contract-history-tabs button span {
  display: inline-flex;
  min-width: 18px;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  margin-left: 3px;
  border-radius: 999px;
  padding: 0 5px;
  color: #52525b;
  background: #e4e4e7;
  font-size: 10px;
}

.contract-new-button {
  width: 100%;
  min-height: 38px;
  padding: 8px 14px;
  font-size: 14px;
  white-space: nowrap;
}

.contract-review-records {
  display: grid;
  gap: 6px;
}

.contract-chat-list {
  display: grid;
  align-content: start;
  gap: 22px;
  min-height: 360px;
  height: min(58vh, 620px);
  overflow: auto;
  padding: 24px clamp(16px, 3vw, 34px);
  border: 1px solid #e7e7e9;
  border-radius: 14px;
  background: #fff;
  scroll-behavior: smooth;
  scrollbar-color: #d4d4d8 transparent;
}

.contract-history-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.contract-review-records .contract-history-open {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 0;
  color: inherit;
  background: transparent;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.contract-review-records .contract-history-open:hover {
  background: rgba(255, 247, 248, 0.72);
}

.contract-history-item.active {
  border-color: rgba(243, 95, 118, 0.45);
  background: #fff7f8;
}

.contract-history-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 5px;
}

.contract-history-rename,
.contract-history-delete {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.contract-history-rename:hover {
  color: var(--ink);
  border-color: rgba(243, 95, 118, 0.45);
}

.contract-history-delete {
  color: #be123c;
}

.contract-history-delete:hover {
  border-color: rgba(190, 18, 60, 0.35);
  color: #9f1239;
  background: #fff1f2;
}

.contract-delete-panel {
  width: min(460px, calc(100vw - 32px));
}

.contract-delete-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 50%;
  color: #fff;
  background: #be123c;
  font-size: 24px;
  font-weight: 900;
}

.contract-delete-panel h3,
.contract-delete-panel p {
  margin-top: 0;
}

.contract-delete-name {
  margin-bottom: 16px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.contract-delete-panel ul {
  margin: 10px 0 16px;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.8;
}

.contract-delete-irrevocable {
  display: block;
  margin-bottom: 18px;
  color: #be123c;
}

.contract-delete-confirm-button {
  border-color: #be123c;
  color: #fff;
  background: #be123c;
}

.contract-delete-confirm-button:hover {
  border-color: #9f1239;
  background: #9f1239;
}

.contract-history-title {
  display: block;
  min-width: 0;
  padding-right: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 24px;
}

.contract-history-summary,
.contract-history-meta {
  display: flex;
  min-width: 0;
  align-items: center;
}

.contract-history-summary {
  gap: 5px;
  margin-top: 2px;
}

.contract-history-purpose,
.contract-history-status {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.contract-history-purpose {
  color: #5b4551;
  background: #f5f1f3;
}

.contract-history-status {
  color: #765d00;
  background: #fffbeb;
}

.contract-history-status.done {
  color: #15803d;
  background: #f0fdf4;
}

.contract-history-status.review,
.contract-history-status.pending {
  color: #be123c;
  background: #fff1f2;
}

.contract-history-meta {
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.contract-history-owner {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-history-meta time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.contract-review-main {
  display: grid;
  gap: 0;
  min-width: 0;
}

.contract-chat-panel {
  display: grid;
  grid-template-rows: auto auto minmax(320px, 1fr) auto auto auto;
  min-height: 0;
  margin-bottom: 0;
}

.contract-chat-head {
  margin-bottom: 12px;
}

.contract-empty-panel {
  display: grid;
  align-content: center;
  min-height: 360px;
}

.contract-start-panel {
  width: min(900px, calc(100vw - 32px));
  max-height: min(86vh, 860px);
  overflow: auto;
}

.contract-start-form {
  gap: 12px;
}

.contract-start-primary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  align-items: start;
}

.contract-start-primary-row .field-hint {
  grid-column: 1 / -1;
  margin-top: 0;
}

.contract-upload-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #f8fafc;
}

.contract-upload-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.contract-upload-title strong,
.contract-upload-title small {
  display: block;
}

.contract-upload-title small {
  max-width: 520px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.contract-upload-box {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 154px;
  border: 1px dashed rgba(15, 118, 110, 0.35);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
}

.contract-upload-box:hover {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.08);
}

.contract-upload-box span {
  font-size: 14px;
  font-weight: 900;
}

.contract-upload-box small,
.contract-upload-box em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

.contract-upload-box input {
  width: 100%;
  min-width: 0;
  font-size: 12px;
}

.contract-start-form .panel-actions,
.contract-chat-form .panel-actions {
  margin-bottom: 0;
}

.contract-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.contract-status.review {
  background: rgba(225, 29, 72, 0.12);
  color: #be123c;
}

.contract-status.pending,
.contract-status.running {
  background: rgba(217, 119, 6, 0.13);
  color: #a16207;
}

.contract-status.done {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.contract-status.archived {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.contract-chat-message {
  position: relative;
  min-width: 0;
  width: min(100%, 820px);
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
}

.contract-chat-message p {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.72;
  white-space: pre-wrap;
}

.contract-chat-message.assistant {
  padding-left: 42px;
}

.contract-chat-message.user {
  justify-self: end;
  width: min(78%, 680px);
  border-radius: 18px 18px 5px 18px;
  padding: 10px 14px 11px;
  background: #f4f4f5;
}

.contract-chat-sections {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.contract-chat-sections section {
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(255, 247, 248, 0.74);
}

.contract-chat-sections section.risk {
  border-color: rgba(225, 29, 72, 0.22);
  background: #fff5f7;
}

.contract-chat-sections h4 {
  margin: 0 0 6px;
  font-size: 13px;
}

.contract-chat-sections ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.contract-chat-form {
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 20px 0 0;
}

.contract-chat-composer {
  border: 1px solid #d4d4d8;
  border-radius: 24px;
  padding: 6px 7px 7px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.contract-chat-composer:focus-within {
  border-color: #a1a1aa;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.11);
}

.contract-chat-composer textarea {
  display: block;
  min-height: 96px;
  max-height: 240px;
  border: 0;
  padding: 14px 16px 8px;
  background: transparent;
  font-size: 15px;
  line-height: 1.65;
  resize: none;
}

.contract-chat-composer textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

.contract-chat-composer textarea::placeholder {
  color: #a1a1aa;
}

.contract-chat-composer-footer {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 2px 16px;
}

.contract-chat-composer-footer > span {
  color: #a1a1aa;
  font-size: 11px;
}

.contract-chat-send {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #18181b;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.contract-chat-send:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #be123c;
}

.contract-chat-send:disabled {
  color: #a1a1aa;
  background: #e4e4e7;
  cursor: default;
}

.contract-chat-send svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.contract-chat-status {
  min-height: 18px;
  padding: 0 12px;
  font-size: 12px;
}

.contract-history-filters {
  display: grid;
  gap: 8px;
}

.contract-history-filters input,
.contract-history-filters select {
  width: 100%;
  min-width: 0;
}

.contract-draft-start {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 154px;
  border: 1px dashed rgba(37, 99, 235, 0.28);
  border-radius: 8px;
  padding: 14px;
  background: #f7faff;
}

.contract-draft-start small {
  color: var(--muted);
  line-height: 1.6;
}

.contract-files-panel {
  width: min(760px, calc(100vw - 32px));
}

.contract-files-panel form {
  display: grid;
  gap: 16px;
}

.contract-conversation-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.contract-conversation-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 56px;
  padding: 14px 18px;
  margin-bottom: 0;
}

.contract-conversation-head > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.contract-conversation-head h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-conversation-actions,
.contract-export-actions,
.contract-quick-actions,
.contract-risk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.contract-conversation-actions {
  justify-content: flex-end;
}

.contract-conversation-workspace .contract-chat-panel {
  grid-template-rows: auto auto minmax(360px, 1fr) auto auto auto;
}

.contract-conversation-workspace .contract-chat-list {
  height: min(64vh, 760px);
  padding: 24px clamp(16px, 3vw, 34px);
}

.contract-conversation-workspace .contract-chat-message.assistant {
  width: min(100%, 820px);
}

.contract-chat-message > header {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 9px;
}

.contract-message-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #e4e4e7;
  border-radius: 9px;
  color: #52525b;
  background: #fafafa;
}

.contract-chat-message.assistant .contract-message-avatar {
  position: absolute;
  top: 0;
  left: 0;
}

.contract-chat-message.user .contract-message-avatar {
  display: none;
}

.contract-message-avatar svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.contract-message-meta {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.contract-message-meta strong,
.contract-message-meta small,
.contract-message-model {
  margin: 0;
}

.contract-message-meta strong {
  color: #27272a;
  font-size: 13px;
  font-weight: 700;
}

.contract-message-meta small,
.contract-message-model {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 500;
}

.contract-message-model {
  margin-left: auto;
}

.contract-chat-message.user .contract-message-meta {
  width: 100%;
  justify-content: flex-end;
}

.contract-chat-message.pending .contract-message-meta strong {
  color: #52525b;
}

.contract-run-notice {
  margin-top: 10px;
  border-left: 3px solid #d97706;
  padding: 9px 11px;
  color: #7a5600;
  background: #fffbeb;
  font-size: 12px;
  line-height: 1.6;
}

.contract-run-notice.model {
  border-left-color: #0f766e;
  color: #155e58;
  background: #ecfdf5;
}

.contract-inline-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.contract-inline-results > h4 {
  margin: 0;
  font-size: 14px;
}

.contract-inline-risk,
.contract-inline-diff {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid #d97706;
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.contract-inline-risk.high {
  border-left-color: #e11d48;
  background: #fff8f9;
}

.contract-inline-risk.low {
  border-left-color: #2563eb;
  background: #f8faff;
}

.contract-inline-risk > header,
.contract-inline-diff > header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.contract-inline-risk > header > span,
.contract-inline-diff > header > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 50%;
  color: #fff;
  background: #4b5563;
  font-size: 11px;
  font-weight: 900;
}

.contract-inline-risk header small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.contract-inline-risk header em {
  border-radius: 999px;
  padding: 4px 8px;
  color: #7a5600;
  background: #fffbeb;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.contract-inline-risk header em.decision-accepted {
  color: #166534;
  background: #f0fdf4;
}

.contract-inline-risk header em.decision-ignored {
  color: #4b5563;
  background: #f3f4f6;
}

.contract-inline-risk blockquote,
.contract-inline-diff blockquote {
  display: grid;
  gap: 5px;
  margin: 0;
  border-left: 3px solid rgba(37, 99, 235, 0.25);
  padding: 9px 11px;
  color: #374151;
  background: #f8faff;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.contract-evidence-missing {
  border: 1px dashed rgba(190, 24, 93, 0.25);
  border-radius: 6px;
  padding: 9px 11px;
  color: #9f1239;
  background: #fff1f2;
  font-size: 12px;
}

.contract-risk-advice,
.contract-risk-replacement {
  display: grid;
  gap: 4px;
  border-radius: 6px;
  padding: 10px 11px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.65;
}

.contract-risk-replacement {
  color: #155e58;
  background: #ecfdf5;
}

.contract-law-basis {
  color: var(--muted);
  line-height: 1.6;
}

.contract-risk-actions button,
.contract-quick-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 10px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.contract-risk-actions button:hover,
.contract-quick-actions button:hover {
  border-color: rgba(15, 118, 110, 0.34);
  color: #0f625b;
  background: #f0fdfa;
}

.contract-quick-actions button:disabled {
  opacity: 0.52;
  cursor: wait;
}

.contract-draft-preview {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.contract-draft-preview summary {
  cursor: pointer;
  font-weight: 800;
}

.contract-draft-preview pre {
  max-height: 420px;
  overflow: auto;
  margin: 12px 0 0;
  white-space: pre-wrap;
  font: inherit;
  line-height: 1.75;
}

.contract-quick-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.contract-archive-readonly {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 12px 14px;
  color: #52525b;
  background: #fafafa;
  font-size: 12px;
}

.contract-archive-readonly strong {
  color: #27272a;
}

@media (max-width: 1180px) {
  .contract-conversation-head {
    grid-template-columns: 1fr;
  }

  .contract-conversation-actions,
  .contract-export-actions {
    justify-content: flex-start;
  }

  .contract-upload-grid {
    grid-template-columns: 1fr;
  }
}

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

  .contract-conversation-actions,
  .contract-export-actions {
    justify-content: flex-start;
  }

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

.ai-tool-sidebar {
  display: grid;
  gap: 10px;
}

.ai-tool-card {
  padding: 14px;
}

.ai-tool-card small,
.ai-tool-card em {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ai-tool-card em {
  margin-top: 8px;
  font-style: normal;
  font-weight: 800;
}

.ai-tool-card.planned {
  opacity: 0.72;
}

.ai-runner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.ai-runner-head h3 {
  margin: 0 0 6px;
}

.ai-planned-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed rgba(55, 30, 42, 0.18);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 247, 248, 0.68);
}

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

.ai-log-list article {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.ai-log-list article:first-child {
  border-top: 0;
}

.ai-log-list small {
  display: block;
  color: var(--muted);
}

.ai-agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.ai-management-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.ai-management-metrics article {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(55, 30, 42, 0.05);
}

.ai-management-metrics span,
.ai-management-metrics small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ai-management-metrics strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.ai-management-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.ai-agent-register,
.ai-workflow-board,
.ai-tool-config-groups {
  display: grid;
  gap: 12px;
}

.ai-management-agent,
.ai-workflow-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.ai-management-agent {
  display: grid;
  gap: 12px;
}

.ai-management-agent h4,
.ai-workflow-card h4 {
  margin: 4px 0;
  font-size: 17px;
}

.ai-management-agent > div:first-child span,
.ai-workflow-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-management-agent-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ai-management-agent-stats strong,
.ai-workflow-head > strong {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: var(--radius);
  color: #0f766e;
  background: #ecfdf5;
  font-size: 20px;
}

.ai-management-agent-stats small,
.ai-workflow-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

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

.ai-workflow-steps {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.ai-workflow-steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.ai-workflow-steps em {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  background: #0f766e;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.ai-workflow-steps span {
  min-width: 0;
  color: var(--text);
  line-height: 1.6;
}

.ai-agent-config-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.ai-agent-config-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.ai-agent-config-group summary strong,
.ai-agent-config-group summary small {
  display: block;
}

.ai-agent-config-group summary small,
.ai-agent-config-group summary em {
  color: var(--muted);
  font-size: 12px;
}

.ai-agent-config-group summary em {
  font-style: normal;
  font-weight: 800;
}

.ai-agent-config-group .ai-tool-config-table {
  padding: 0 14px 14px;
}

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

.ai-chip-list span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 240, 243, 0.9);
  font-size: 12px;
}

.ai-usage-table {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
}

.ai-usage-table button {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 0.7fr;
  gap: 8px;
  align-items: center;
  padding: 12px;
}

.ai-usage-table small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.ai-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.ai-detail-stats span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.1);
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.ai-json-box {
  max-height: 240px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #171314;
  color: #fff;
  white-space: pre-wrap;
}

.ai-log-detail h4 {
  margin: 16px 0 8px;
}

.ai-compare-row,
.ai-model-switches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.ai-talent-select select {
  margin-top: 8px;
}

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

.ai-asset-card,
.ai-comparison-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.ai-asset-card img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffafa;
}

.ai-asset-card pre {
  min-height: 120px;
  margin: 0 0 10px;
  padding: 12px;
  border-radius: var(--radius);
  color: #fff;
  background: #171314;
  white-space: pre-wrap;
}

.ai-asset-card strong,
.ai-comparison-grid strong {
  display: block;
  margin: 10px 0 8px;
}

.ai-comparison-grid span,
.ai-comparison-grid p {
  color: var(--muted);
}

.ai-knowledge-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 16px;
  margin-top: 16px;
}

.ai-talent-profile-form {
  box-shadow: none;
}

.ai-profile-list-card {
  margin-top: 16px;
}

.ai-profile-record-list {
  margin-top: 14px;
}

.ai-profile-row {
  grid-template-columns: minmax(190px, 1.1fr) minmax(150px, 0.8fr) minmax(150px, 0.7fr) auto;
  cursor: default;
}

.ai-profile-row:hover {
  background: var(--white);
}

.ai-profile-row-id {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-profile-platform-list,
.ai-profile-platform-box div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-profile-platform-list {
  margin-top: 4px;
  white-space: normal;
}

.ai-profile-platform-id,
.ai-profile-platform-empty {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  color: #5b6472;
  background: #f4f6f8;
  font-size: 12px;
  font-weight: 800;
}

.ai-profile-platform-id.primary {
  color: #0f766e;
  background: #ecfdf5;
}

.ai-profile-platform-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.ai-profile-platform-box > span {
  color: var(--text);
  font-weight: 800;
}

.ai-profile-row-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.ai-profile-row-meta em {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #8a4b12;
  background: #fff7ed;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.ai-profile-row-meta em.enabled {
  color: #0f766e;
  background: #ecfdf5;
}

.ai-profile-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ai-profile-editor-panel,
.ai-profile-preview-panel {
  width: min(920px, 100%);
}

.ai-profile-editor-panel {
  padding: 26px;
}

.ai-profile-section {
  display: grid;
  gap: 14px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
}

.ai-profile-section:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

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

.ai-profile-section-head h4 {
  margin: 0;
  font-size: 16px;
}

.ai-profile-section-head span {
  max-width: 460px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.ai-profile-section-grid {
  gap: 12px;
  align-items: start;
}

.ai-profile-bind-field {
  grid-template-rows: auto 44px minmax(38px, auto);
}

.ai-profile-bind-field select,
.ai-profile-bind-field input {
  height: 44px;
}

.ai-talent-profile-form textarea {
  min-height: 96px;
}

.ai-talent-profile-form select {
  min-height: 44px;
}

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

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #fff;
  font-size: 13px;
}

.ai-knowledge-item-list,
.ai-version-list,
.ai-tool-config-table {
  display: grid;
  gap: 12px;
}

.ai-knowledge-item-list article,
.ai-version-list article,
.ai-tool-config-table article {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.ai-knowledge-item-list strong,
.ai-version-list strong {
  display: block;
}

.ai-knowledge-item-list span,
.ai-version-list span,
.ai-knowledge-item-list p {
  display: block;
  margin: 6px 0;
  color: var(--muted);
}

.ai-knowledge-item-list article > div,
.ai-version-list article {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-tool-config-table article {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) repeat(4, minmax(136px, 0.9fr));
  gap: 10px;
  align-items: start;
}

.ai-tool-config-table strong,
.ai-tool-config-table span {
  min-width: 0;
}

.ai-tool-config-table span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.ai-tool-config-table label {
  min-width: 0;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.ai-tool-config-table input,
.ai-tool-config-table select {
  margin-top: 6px;
}

.ai-tool-config-table .ai-permission-select {
  grid-column: span 2;
}

.ai-tool-config-table select[multiple] {
  min-height: 112px;
}

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

.custom-api-card {
  padding: 16px;
  box-shadow: none;
}

.custom-api-card-head strong {
  font-size: 17px;
}

.empty-api-state {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #fffafa;
}

.api-config-actions {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0;
  padding: 14px 16px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(243, 95, 118, 0.07);
}

.api-config-form {
  gap: 14px;
  max-width: 1240px;
}

.api-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 0 4px;
}

.api-page-head h3,
.api-section-head h3 {
  margin: 0;
  letter-spacing: 0;
}

.api-page-head h3 {
  font-size: 24px;
  line-height: 1.35;
}

.api-page-head p,
.api-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.api-page-head .eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
}

.api-page-health {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(100%, 460px);
  padding: 11px 13px;
  border: 1px solid #d9e2e1;
  border-radius: var(--radius);
  background: #f7faf9;
}

.api-health-action {
  min-height: 36px;
  padding: 8px 12px;
  white-space: nowrap;
}

.api-health-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.api-runtime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.api-runtime-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e2dddf;
  border-radius: var(--radius);
  background: #fbfafb;
  overflow-wrap: anywhere;
}

.api-runtime-card .api-section-head {
  align-items: flex-start;
  gap: 12px;
}

.api-runtime-card h4,
.api-runtime-card p {
  margin: 0 0 8px;
}

.api-runtime-card .success { color: #0c6e5b; }
.api-runtime-card .warning { color: #925d15; }

.api-effective-parameters { margin: 12px 0 0; }
.api-effective-parameters > div {
  display: grid;
  grid-template-columns: minmax(80px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #ece8e9;
  font-size: 12px;
}
.api-effective-parameters dt { color: var(--muted); }
.api-effective-parameters dd { margin: 0; }
.api-effective-parameters small { display: block; margin-top: 3px; color: var(--muted); }

.api-page-health.warning {
  border-color: #ead9bc;
  background: #fffbf3;
}

.api-page-health strong,
.api-page-health small {
  display: block;
}

.api-page-health strong {
  font-size: 13px;
  line-height: 1.4;
}

.api-page-health small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.api-state-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b5abae;
  box-shadow: 0 0 0 3px rgba(119, 104, 109, 0.1);
}

.api-state-dot.success,
.api-page-health.success .api-state-dot {
  background: #0f8a72;
  box-shadow: 0 0 0 3px rgba(15, 138, 114, 0.12);
}

.api-state-dot.warning,
.api-page-health.warning .api-state-dot {
  background: #c17718;
  box-shadow: 0 0 0 3px rgba(193, 119, 24, 0.12);
}

.api-state-dot.danger {
  background: #c2413a;
  box-shadow: 0 0 0 3px rgba(194, 65, 58, 0.12);
}

.api-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #e2dddf;
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.api-metric-grid article {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid #ece8e9;
}

.api-metric-grid article:last-child {
  border-right: 0;
}

.api-metric-grid span,
.api-metric-grid strong,
.api-metric-grid small {
  display: block;
}

.api-metric-grid span {
  color: #5f5659;
  font-size: 12px;
  font-weight: 800;
}

.api-metric-grid strong {
  margin-top: 3px;
  font-size: 23px;
  line-height: 1.25;
}

.api-metric-grid small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.api-provider-badges span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #e4dfe0;
  border-radius: 999px;
  color: #665c5f;
  background: #f7f6f6;
  font-size: 11px;
  line-height: 1.2;
}

.api-config-panels,
.api-config-panel,
.api-provider-stack {
  display: grid;
  gap: 12px;
}

.api-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0 2px;
}

.api-section-head h3 {
  font-size: 17px;
}

.api-connection-card {
  border: 1px solid #e2dddf;
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.api-connection-card.dirty {
  border-color: #dfb66f;
  box-shadow: 0 0 0 2px rgba(193, 119, 24, 0.08);
}

.api-connection-card > summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 13px 42px 13px 16px;
  cursor: pointer;
  list-style: none;
}

.api-connection-card > summary::-webkit-details-marker {
  display: none;
}

.api-connection-card > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #857a7d;
  border-bottom: 2px solid #857a7d;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease;
}

.api-connection-card[open] > summary::after {
  transform: translateY(-35%) rotate(225deg);
}

.api-connection-card[open] > summary {
  border-bottom: 1px solid #ece8e9;
  background: #fbfafa;
}

.api-provider-summary-copy {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.api-provider-summary-copy strong,
.api-provider-summary-copy small {
  display: block;
}

.api-provider-summary-copy strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.api-provider-summary-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.api-provider-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.api-provider-badges span.success {
  border-color: #b7ddd4;
  color: #0c6e5b;
  background: #f0faf7;
}

.api-provider-badges span.warning {
  border-color: #ead8b9;
  color: #925d15;
  background: #fff9ef;
}

.api-provider-badges span.muted {
  color: #81777a;
}

.api-provider-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.api-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 46px;
  margin: 0;
}

.api-switch-row > span strong,
.api-switch-row > span small {
  display: block;
}

.api-switch-row > span strong {
  color: var(--ink);
  font-size: 13px;
}

.api-switch-row > span small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.api-switch-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.api-switch-row i {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 24px;
  border: 1px solid #cfc7c9;
  border-radius: 999px;
  background: #ddd8d9;
  transition: background 160ms ease, border-color 160ms ease;
}

.api-switch-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(23, 19, 20, 0.2);
  transition: transform 160ms ease;
}

.api-switch-row input:checked + i {
  border-color: #168172;
  background: #168172;
}

.api-switch-row input:checked + i::after {
  transform: translateX(18px);
}

.api-switch-row input:focus-visible + i,
.api-connection-card > summary:focus-visible {
  outline: 3px solid rgba(243, 95, 118, 0.24);
  outline-offset: 2px;
}

.api-switch-row.compact {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #e6e1e2;
  border-radius: var(--radius);
  background: #faf9f9;
}

.api-field-block {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #ece8e9;
}

.api-field-block h4 {
  margin: 0;
  font-size: 13px;
}

.api-provider-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  padding-top: 16px;
  border-top: 1px solid #ece8e9;
}

.api-provider-actions .panel-actions {
  margin: 0;
  justify-content: flex-end;
}

.api-card-save-status strong,
.api-card-save-status span {
  display: block;
}

.api-card-save-status strong {
  font-size: 13px;
}

.api-card-save-status span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.api-connection-card.dirty .api-card-save-status strong {
  color: #925d15;
}

.api-test-status {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
  font-size: 12px;
}

.api-empty-state {
  display: grid;
  gap: 3px;
  padding: 28px 18px;
  border: 1px dashed #d9d2d4;
  border-radius: var(--radius);
  color: var(--muted);
  background: #fbfafa;
  text-align: center;
}

.api-empty-state strong {
  color: var(--ink);
  font-size: 14px;
}

.api-empty-state span,
.api-credential-note {
  font-size: 12px;
}

.api-credential-note {
  margin: 0;
  padding: 9px 11px;
  border-left: 3px solid #c9c2c4;
  color: var(--muted);
  background: #faf9f9;
}

.api-credential-note code {
  color: #4d4447;
  overflow-wrap: anywhere;
}

.talent-editor-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.talent-editor-grid .option-field {
  grid-column: 1 / -1;
}

.talent-platform-account-field {
  display: grid;
  gap: 12px;
}

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

.platform-id-row {
  display: none;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.platform-id-row.active {
  display: grid;
}

.platform-id-row input {
  min-height: 42px;
}

.nav-editor {
  display: grid;
  gap: 12px;
}

.nav-editor-head,
.nav-editor-row {
  display: grid;
  grid-template-columns: 92px minmax(120px, 0.9fr) minmax(180px, 1.4fr) 90px;
  gap: 12px;
  align-items: center;
}

.nav-editor-head {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.nav-editor-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fffafa;
}

.checkbox-row.compact {
  margin: 0;
}

.editor-grid .full {
  grid-column: 1 / -1;
}

.record-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  margin-bottom: 12px;
  overflow: hidden;
}

.record-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 800;
}

.record-card form {
  border-top: 1px solid var(--line);
  padding: 16px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
}

.checkbox-row input {
  width: auto;
}

.field-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.image-preview {
  display: grid;
  place-items: center;
  min-height: 140px;
  border: 1px dashed rgba(55, 30, 42, 0.16);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
}

.image-preview img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.image-preview.empty {
  background: #fffafa;
}

.image-recrop {
  width: fit-content;
}

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

.record-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(243, 95, 118, 0.06);
}

.record-row:hover {
  border-color: rgba(243, 95, 118, 0.36);
  background: #fffafa;
}

.record-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.record-main strong,
.record-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-main small,
.record-meta,
.muted-text {
  color: var(--muted);
}

.record-meta {
  font-weight: 800;
}

.user-list-actions {
  justify-content: space-between;
}

.user-list-actions > div {
  display: grid;
  gap: 2px;
}

.user-table-card {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(243, 95, 118, 0.07);
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}

.user-table th,
.user-table td {
  border-bottom: 1px solid rgba(55, 30, 42, 0.08);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

.user-table th {
  color: var(--muted);
  background: #fffafa;
  font-size: 12px;
  font-weight: 900;
}

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

.user-table tr.is-disabled {
  color: var(--muted);
  background: rgba(248, 244, 245, 0.62);
}

.user-cell {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.user-cell strong,
.user-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose), var(--violet));
  font-size: 12px;
  font-weight: 900;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.enabled {
  color: #087558;
  background: #effaf5;
}

.status-pill.disabled {
  color: #8a4b11;
  background: #fff4df;
}

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

.icon-action {
  border: 1px solid rgba(55, 30, 42, 0.12);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.icon-action:hover {
  border-color: rgba(243, 95, 118, 0.34);
  color: var(--rose);
}

.icon-action.danger {
  color: #a23b1f;
}

.icon-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.user-editor-card {
  margin-bottom: 18px;
}

.user-member-auth {
  margin-top: 20px;
}

.member-auth-body {
  padding: 0 18px 18px;
}

.role-table {
  min-width: 1040px;
}

.role-cell {
  min-width: 170px;
}

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

.role-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto;
  align-items: end;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(243, 95, 118, 0.06);
}

.permission-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fffafa;
}

.permission-toolbar strong {
  margin-right: auto;
}

.permission-tree {
  display: grid;
  gap: 12px;
}

.permission-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(243, 95, 118, 0.05);
}

.permission-group > summary,
.permission-section > summary {
  cursor: pointer;
  list-style: none;
}

.permission-group > summary::-webkit-details-marker,
.permission-section > summary::-webkit-details-marker {
  display: none;
}

.permission-group > summary {
  padding: 14px 16px;
  background: #fffafa;
}

.permission-group-body {
  display: grid;
  gap: 10px;
  padding: 12px 16px 16px;
}

.permission-section {
  border-left: 2px solid rgba(243, 95, 118, 0.16);
  padding-left: 12px;
}

.permission-section > summary {
  padding: 8px 0;
}

.permission-check,
.permission-leaf {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 28px;
}

.permission-check input,
.permission-leaf input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--rose);
}

.permission-check span {
  color: var(--ink);
  font-weight: 900;
}

.permission-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  padding: 6px 0 8px 28px;
}

.permission-leaf {
  border: 1px solid rgba(55, 30, 42, 0.08);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.permission-leaf strong,
.permission-leaf small {
  display: block;
  line-height: 1.35;
}

.permission-leaf small {
  color: var(--muted);
  font-size: 12px;
}

.brand-admin-board {
  display: grid;
  gap: 18px;
}

.brand-category-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 16px;
  overflow-x: auto;
  padding: 4px 0 8px;
}

.brand-category-tabs button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(55, 30, 42, 0.12);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.brand-category-tabs button.active {
  border-color: rgba(243, 95, 118, 0.34);
  color: var(--rose);
  background: #fff1f4;
  box-shadow: 0 10px 24px rgba(243, 95, 118, 0.10);
}

.brand-category-tabs em {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  padding: 0 7px;
  color: var(--muted);
  background: rgba(55, 30, 42, 0.07);
  font-size: 12px;
  font-style: normal;
}

.brand-category-tabs button.active em {
  color: #fff;
  background: var(--rose);
}

.brand-admin-section {
  display: grid;
  gap: 12px;
}

.brand-admin-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
}

.brand-admin-section h3 small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.brand-admin-row {
  grid-template-columns: 92px minmax(0, 1fr) auto;
  padding: 10px 14px;
}

.brand-admin-logo {
  display: grid;
  place-items: center;
  width: 92px;
  min-height: 58px;
  border: 1px solid rgba(55, 30, 42, 0.08);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}

.brand-admin-logo img {
  display: block;
  width: 100%;
  height: 46px;
  object-fit: contain;
}

.brand-admin-logo em {
  color: var(--rose);
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
}

.brand-editor-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.brand-editor-grid .full {
  grid-column: 1 / -1;
}

.news-admin-row {
  grid-template-columns: 34px 132px minmax(0, 1fr) 184px;
  padding: 12px 14px;
}

.news-select {
  display: grid;
  place-items: center;
  width: 28px;
  height: 100%;
  min-height: 74px;
}

.news-select input {
  width: 18px;
  height: 18px;
}

.news-edit-main {
  display: grid;
  min-width: 0;
  gap: 6px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.news-edit-main:hover strong {
  color: var(--rose);
}

.news-admin-cover {
  display: grid;
  place-items: center;
  width: 132px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(55, 30, 42, 0.08);
  border-radius: 8px;
  overflow: hidden;
  color: var(--muted);
  background: #fffafa;
  font-size: 13px;
  font-weight: 800;
}

.news-admin-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-admin-cover em {
  font-style: normal;
}

.news-admin-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: var(--muted);
  text-align: right;
}

.news-admin-meta strong {
  color: var(--rose);
  font-size: 14px;
}

.news-admin-meta small {
  font-size: 12px;
}

.news-workbench {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.news-workbench section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(243, 95, 118, 0.06);
}

.news-workbench strong {
  display: block;
  color: var(--rose);
  font-size: 28px;
}

.news-workbench span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.news-admin-toolbar,
.news-bulkbar,
.news-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.news-admin-toolbar label {
  flex: 1 1 180px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.news-admin-toolbar button,
.news-bulkbar button,
.news-pagination button {
  min-height: 42px;
}

.news-bulkbar {
  justify-content: space-between;
}

.news-bulkbar span,
.news-pagination span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.news-select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.news-select-all input {
  width: 18px;
  height: 18px;
}

.news-bulkbar select {
  min-width: 150px;
}

.news-pagination {
  justify-content: center;
  margin-top: 14px;
}

.news-publish-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.news-publish-main,
.news-publish-side {
  display: grid;
  gap: 14px;
}

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

.news-side-card h3 {
  margin: 0;
  font-size: 18px;
}

.news-editor-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.news-editor-grid .full {
  grid-column: 1 / -1;
}

.rich-editor-block {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.rich-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.rich-editor-head span {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.rich-editor-head small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.news-rich-editor {
  min-height: 560px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
}

.news-rich-editor img {
  display: block;
  max-width: 100%;
  max-height: 460px;
  height: auto;
  margin: 14px auto;
  border-radius: 8px;
  object-fit: contain;
}

.news-rich-editor figure {
  max-width: 820px;
  margin: 18px auto;
}

.news-rich-editor figcaption {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.news-rich-editor table {
  width: 100%;
  min-width: 0;
  margin: 16px 0;
}

.cover-picker {
  display: grid;
  gap: 10px;
}

.cover-picker select {
  width: 100%;
}

.option-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-pill {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ink);
  background: #fffafa;
  cursor: pointer;
}

.option-pill input {
  width: auto;
  accent-color: var(--rose);
}

.suffix-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.suffix-input input {
  border: 0;
  border-radius: 0;
}

.suffix-input em {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--rose);
  background: #fff0f3;
  font-style: normal;
  font-weight: 800;
}

.table-card {
  overflow: auto;
}

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

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

th {
  color: var(--muted);
  background: #fff3e8;
}

.lead-detail-button {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.toolbar button,
.toolbar select,
.toolbar input[type="color"] {
  width: auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: var(--white);
  cursor: pointer;
}

.toolbar-file {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.toolbar-file input {
  display: none;
}

.toolbar.is-uploading {
  position: relative;
  opacity: 0.78;
  pointer-events: none;
}

.toolbar.is-uploading::after {
  content: attr(data-upload-status);
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border-radius: var(--radius);
  padding: 7px 12px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tool-tabs button {
  min-height: 40px;
  border: 1px solid rgba(243, 95, 118, 0.22);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  font-weight: 800;
}

.tool-tabs button.active,
.tool-tabs button:hover {
  color: var(--white);
  background: linear-gradient(135deg, var(--rose), var(--violet));
  border-color: transparent;
}

.generated-result {
  border: 1px solid rgba(243, 95, 118, 0.2);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #fff, #fff7f8);
  box-shadow: 0 12px 30px rgba(243, 95, 118, 0.07);
}

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

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

.result-head img {
  width: 160px;
  max-height: 110px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--line);
}

.result-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.result-section ul {
  margin: 8px 0 0;
}

.result-section h4 {
  margin: 0;
  font-size: 17px;
}

.result-section li {
  margin-bottom: 8px;
}

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

.history-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fffaf5;
}

.history-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item small,
.muted-text {
  color: var(--muted);
}

.page-editor {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--white);
  outline: none;
}

.page-editor:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(243, 95, 118, 0.14);
}

.danger {
  color: #a23b1f;
}

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

@media (max-width: 900px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-header::after {
    opacity: 1;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .auth-actions {
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
  }

  .member-menu {
    justify-content: flex-start;
  }

  .member-trigger {
    min-width: min(176px, calc(100vw - 36px));
  }

  .hero {
    min-height: 760px;
  }

  .metrics,
  .talent-grid,
  .brand-grid,
  .home-news-grid,
  .intro-layout,
  .contact-layout,
  .about-company-panel,
  .register-grid,
  .dashboard-grid,
  .admin-grid,
  .api-capability-grid,
  .api-provider-grid,
  .ai-agent-grid,
  .ai-metric-grid,
  .ai-workspace-grid,
  .ai-usage-layout,
  .ai-tool-layout,
  .ai-tool-catalog,
  .ai-tool-detail-layout,
  .contract-review-shell,
  .ai-knowledge-layout,
  .ai-asset-grid,
  .ai-comparison-grid,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .contract-start-primary-row {
    grid-template-columns: 1fr;
  }

  .api-option-grid {
    grid-template-columns: 1fr;
  }

  .ai-hero,
  .ai-runner-head,
  .ai-profile-section-head,
  .section-head-row {
    flex-direction: column;
  }

  .ai-model-badge {
    width: 100%;
  }

  .ai-tool-side-panel {
    position: static;
  }

  .contract-review-shell {
    min-height: 0;
  }

  .contract-review-list {
    position: static;
    max-height: none;
  }

  .contract-chat-panel {
    min-height: 0;
  }

  .contract-chat-list {
    min-height: 320px;
    height: auto;
    max-height: none;
  }

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

  .ai-profile-row-actions {
    justify-content: flex-start;
  }

  .ai-tool-config-table article {
    grid-template-columns: 1fr;
  }

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

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

  .news-item {
    grid-template-columns: 1fr;
  }

  .news-cover {
    min-height: 190px;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .news-card-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .source-link {
    max-width: 100%;
  }

  .article-hero,
  .article-layout,
  .news-publish-form,
  .news-workbench {
    grid-template-columns: 1fr;
  }

  .article-page {
    padding-top: 96px;
  }

  .article-side {
    position: static;
  }

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

  .sub-hero::after {
    opacity: 0.42;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: sticky;
    z-index: 60;
    top: 0;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #21151d;
    box-shadow: 0 10px 28px rgba(23, 19, 20, 0.16);
  }

  .admin-sidebar .admin-logo {
    min-width: 0;
    padding: 0;
    border: 0;
  }

  .admin-sidebar .admin-logo-img {
    width: 138px;
    max-height: 48px;
    padding: 5px 8px;
  }

  .admin-mobile-menu-toggle {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
  }

  .admin-sidebar #adminNav,
  .admin-sidebar .sidebar-logout {
    display: none;
    grid-column: 1 / -1;
  }

  .admin-sidebar.mobile-open #adminNav {
    display: grid;
    max-height: min(62vh, 520px);
    padding: 8px 2px 0;
  }

  .admin-sidebar.mobile-open .sidebar-logout {
    display: block;
    margin-top: 0;
  }

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

  .admin-top-actions,
  .admin-user {
    width: 100%;
  }

  .admin-user {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .admin-user-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .role-meta-grid,
  .permission-items {
    grid-template-columns: 1fr;
  }

  .nav-editor-head {
    display: none;
  }

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

  .crop-controls {
    grid-template-columns: 1fr;
  }
}

.contract-result-document-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: #1f3f72;
  background: #f7faff;
}

.contract-result-document-card:hover {
  border-color: rgba(37, 99, 235, 0.42);
  background: #eff6ff;
}

.contract-result-document-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 44px;
  border-radius: 10px;
  color: #2563eb;
  background: #eaf1ff;
}

.contract-result-document-icon svg,
.contract-message-file-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.contract-result-document-card strong,
.contract-result-document-card small {
  display: block;
}

.contract-result-document-card small {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.contract-result-document-card em {
  color: #1d4ed8;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.contract-message-attachments {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.contract-message-file {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(100%, 500px);
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fafafa;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.contract-message-file:hover {
  border-color: #c7c7cc;
  background: #fff;
  transform: translateY(-1px);
}

.contract-message-file-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  border-radius: 9px;
  color: #be123c;
  background: #fff1f2;
}

.contract-message-file-copy,
.contract-message-file-copy strong,
.contract-message-file-copy small {
  display: block;
  min-width: 0;
  margin: 0;
}

.contract-message-file-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-message-file-copy small {
  margin-top: 2px;
  color: #71717a;
  font-size: 11px;
}

.contract-message-file-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.contract-message-file-state svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.contract-chat-message.pending > p:empty {
  display: none;
}

.contract-agent-thinking {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  color: #71717a;
  font-size: 12px;
}

.contract-agent-thinking i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #71717a;
  animation: contract-thinking 1.1s ease-in-out infinite;
}

.contract-agent-thinking i:nth-child(2) { animation-delay: 0.14s; }
.contract-agent-thinking i:nth-child(3) { animation-delay: 0.28s; }

.contract-agent-thinking span {
  margin-left: 5px;
}

.contract-review-job-progress {
  display: grid;
  gap: 9px;
  margin: 4px 0 14px;
  padding: 13px 15px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 12px;
  background: rgba(240, 253, 250, 0.78);
}

.contract-review-job-progress > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.contract-review-job-progress strong {
  color: #115e59;
  font-size: 13px;
}

.contract-review-job-progress span {
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.contract-review-job-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
}

.contract-review-job-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #2dd4bf);
  transition: width 0.25s ease;
}

@keyframes contract-thinking {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.contract-editor-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.contract-editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 2px 2px 14px;
}

.contract-editor-head h2,
.contract-editor-head p {
  margin: 0;
}

.contract-editor-head h2 {
  margin-top: 3px;
  font-size: 22px;
}

.contract-editor-head > div > p:last-child {
  color: var(--muted);
  font-size: 12px;
}

.contract-editor-back {
  display: inline-flex;
  margin-bottom: 6px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
}

.contract-editor-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.contract-editor-action-stack {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.contract-editor-send-button {
  border-color: #0f766e;
  color: #fff;
  background: #0f766e;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.14);
}

.contract-editor-send-button:hover:not(:disabled) {
  border-color: #115e59;
  background: #115e59;
}

.contract-editor-workflow-note {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  color: #64748b;
  font-size: 11px;
}

.contract-editor-workflow-note button {
  border: 0;
  padding: 0;
  color: #0f766e;
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.contract-editor-workflow-note button:disabled {
  color: #94a3b8;
  cursor: default;
}

.contract-editor-risk-summary {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 9px;
  color: #6b7280;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.contract-editor-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(320px, 360px);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.contract-editor-document-panel,
.contract-editor-inspector {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contract-editor-document-panel {
  overflow: hidden;
}

.contract-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 50px;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  background: #f8fafc;
}

.contract-editor-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 8px;
  color: #243247;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.contract-editor-toolbar button:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.contract-editor-toolbar button.is-active,
.contract-editor-toolbar button[aria-pressed="true"] {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #dbeafe;
}

.contract-text-style-control,
.contract-color-style-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.contract-text-style-control select {
  width: 98px;
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 22px 3px 7px;
  color: #1e293b;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}

.contract-text-style-control.compact select {
  width: 80px;
}

.contract-color-style-control input[type="color"] {
  width: 30px;
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px;
  background: #fff;
  cursor: pointer;
}

.contract-text-style-control select.is-mixed,
.contract-color-style-control input.is-mixed {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.14);
}

.contract-toolbar-divider {
  width: 1px;
  height: 24px;
  margin: 0 3px;
  background: #d7dee8;
}

.contract-review-display-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin: 0 2px;
  border-left: 1px solid #d7dee8;
  padding-left: 10px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.contract-review-display-control select {
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 28px 3px 8px;
  color: #1e293b;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.contract-editor-paper-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: 760px;
  max-height: calc(100vh - 250px);
  overflow: auto;
  padding: 28px clamp(14px, 3vw, 40px) 60px;
  background: #edf1f5;
}

.contract-editor-paper-shell.has-revision-pane {
  grid-template-columns: minmax(230px, 270px) minmax(560px, 1fr);
  gap: 18px;
}

.contract-editor-paper-shell.has-revision-pane .contract-editor-paper-canvas {
  min-width: calc(var(--contract-page-width, 793.6px) + 2px);
}

.contract-editor-paper-canvas {
  min-width: calc(var(--contract-page-width, 793.6px) + 2px);
}

.contract-revision-pane {
  position: sticky;
  top: 0;
  max-height: calc(100vh - 285px);
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.08);
}

.contract-revision-pane[hidden] {
  display: none;
}

.contract-revision-pane-head {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px;
  background: #f8fafc;
}

.contract-revision-pane-head div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contract-revision-pane-head strong {
  color: #0f172a;
  font-size: 14px;
}

.contract-revision-pane-head span,
.contract-revision-pane-head p,
.contract-revision-record small {
  color: #64748b;
  font-size: 10px;
}

.contract-revision-pane-head p {
  margin: 5px 0 0;
  line-height: 1.5;
}

.contract-revision-pane-list {
  display: grid;
}

.contract-revision-record {
  display: grid;
  width: 100%;
  gap: 7px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-left: 4px solid #16a34a;
  padding: 10px 11px;
  color: inherit;
  background: #f0fdf4;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.contract-revision-record.deletion {
  border-left-color: #dc2626;
  background: #fef2f2;
}

.contract-revision-record:hover,
.contract-revision-record.active {
  position: relative;
  z-index: 1;
  outline: 2px solid #7c3aed;
  outline-offset: -2px;
  box-shadow: inset 4px 0 #7c3aed;
}

.contract-revision-record.active {
  background: #f5f3ff;
}

.contract-revision-record > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contract-revision-record b {
  color: #166534;
  font-size: 11px;
}

.contract-revision-record.deletion b {
  color: #991b1b;
}

.contract-revision-record span {
  overflow: hidden;
  color: #475569;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-revision-record p {
  margin: 0;
  color: #1f2937;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.contract-editor-loading {
  display: grid;
  place-items: center;
  min-height: 520px;
  color: var(--muted);
}

.contract-editor-loading[hidden] {
  display: none;
}

/* WPS keeps these document fonts in its private cache instead of registering them
   system-wide. Loading the same local faces keeps browser wrapping and pagination
   aligned with the original contract; the declared fallback chain still works on
   servers where WPS has not installed the matching font. */
@font-face {
  font-family: "宋体";
  src: url("/api/admin/contract-fonts/hy-shu-song-er") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "汉仪书宋二KW";
  src: url("/api/admin/contract-fonts/hy-shu-song-er") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "微软雅黑 Light";
  src: url("/api/admin/contract-fonts/hy-zhong-hei") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "汉仪中黑KW";
  src: url("/api/admin/contract-fonts/hy-zhong-hei") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "等线";
  src: url("/api/admin/contract-fonts/hy-zhong-deng-xian") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "汉仪中等线KW";
  src: url("/api/admin/contract-fonts/hy-zhong-deng-xian") format("truetype");
  font-display: swap;
}

#contractProseMirror {
  --contract-page-gap: 30px;
  position: relative;
  width: var(--contract-page-width, 793.6px);
  min-width: var(--contract-page-width, 793.6px);
  min-height: var(--contract-page-height, 1056px);
  margin: 0 auto;
  border: 1px solid #d8dee8;
  background: #fff;
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.09);
}

#contractProseMirror .ProseMirror {
  min-height: var(--contract-total-height, var(--contract-page-height, 1056px));
  padding: var(--contract-page-margin-top, 72px) var(--contract-page-margin-right, 72px) 0 var(--contract-page-margin-left, 72px);
  box-sizing: border-box;
  color: #111827;
  font-family: "Songti SC", "STSong", "Arial Unicode MS", serif;
  font-size: 10.5pt;
  line-height: 1.25;
  outline: 0;
  white-space: pre-wrap;
  tab-size: 4;
}

#contractProseMirror .ProseMirror > .contract-page-separator,
#contractProseMirror .ProseMirror > .contract-page-last-footer {
  position: relative;
  left: calc(0px - var(--contract-page-margin-left, 72px) - 1px);
  width: calc(var(--contract-page-width, 793.6px) + 2px);
  margin: 0;
  pointer-events: none;
  user-select: none;
}

#contractProseMirror .ProseMirror > .contract-page-separator::before {
  position: absolute;
  top: calc(var(--contract-page-blank-space, 0px) + var(--contract-page-margin-bottom, 72px));
  left: 0;
  width: 100%;
  height: var(--contract-page-gap, 30px);
  pointer-events: none;
  content: "";
  background: #edf1f5;
  box-shadow: inset 0 1px #d8dee8, inset 0 -1px #d8dee8;
}

#contractProseMirror .ProseMirror > .contract-page-separator::after {
  position: absolute;
  top: calc(var(--contract-page-blank-space, 0px) + var(--contract-page-margin-bottom, 72px) - 30px);
  left: 0;
  width: 100%;
  pointer-events: none;
  content: attr(data-page-label);
  color: #64748b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
}

#contractProseMirror .ProseMirror > .contract-page-last-footer::after {
  position: absolute;
  top: calc(var(--contract-page-blank-space, 0px) + var(--contract-page-margin-bottom, 72px) - 30px);
  left: 0;
  width: 100%;
  pointer-events: none;
  content: attr(data-page-label);
  color: #64748b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
}

#contractProseMirror .ProseMirror h1,
#contractProseMirror .ProseMirror h2,
#contractProseMirror .ProseMirror p,
#contractProseMirror .ProseMirror blockquote {
  margin: 0;
}

#contractProseMirror .ProseMirror h1 {
  font-size: inherit;
}

#contractProseMirror .ProseMirror h2 {
  font-size: inherit;
}

#contractProseMirror .ProseMirror blockquote {
  border-left: 0;
  padding-left: 0;
  color: inherit;
}

#contractProseMirror .ProseMirror ol,
#contractProseMirror .ProseMirror ul {
  margin: 0;
  padding-left: 2.15em;
}

#contractProseMirror .ProseMirror li {
  margin: 0;
  padding-left: 0;
}

#contractProseMirror .ProseMirror .contract-word-section {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  column-fill: balance;
}

#contractProseMirror .ProseMirror .contract-word-section > :first-child {
  margin-top: 0;
}

#contractProseMirror .ProseMirror .contract-word-section > :last-child {
  margin-bottom: 0;
}

#contractProseMirror .ProseMirror[data-review-display="final"] .contract-paragraph-mark-deletion-empty {
  display: none;
}

#contractProseMirror .ProseMirror table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  border-collapse: collapse;
  table-layout: fixed;
}

#contractProseMirror .ProseMirror .tableWrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

#contractProseMirror .ProseMirror td,
#contractProseMirror .ProseMirror th {
  position: relative;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #9ca3af;
  padding: 4px 5px;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}

#contractProseMirror .ProseMirror .selectedCell::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: rgba(37, 99, 235, 0.12);
}

.contract-risk-highlight {
  border-bottom: 2px solid #d97706;
  background: #fef3c7;
}

.contract-revision-linked-text {
  border-radius: 2px;
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
  background: #ede9fe !important;
  scroll-margin-block: 220px;
}

.contract-revision-insertion {
  color: #166534;
  background: #dcfce7;
  text-decoration: underline;
}

.contract-revision-deletion {
  color: #991b1b;
  background: #fee2e2;
  text-decoration: line-through;
}

#contractProseMirror .ProseMirror[data-review-display="final"] .contract-revision-deletion,
#contractProseMirror .ProseMirror[data-review-display="markup"] .contract-revision-deletion,
#contractProseMirror .ProseMirror[data-review-display="original"] .contract-revision-insertion {
  display: none;
}

#contractProseMirror .ProseMirror[data-review-display="final"] .contract-revision-insertion,
#contractProseMirror .ProseMirror[data-review-display="markup"] .contract-revision-insertion,
#contractProseMirror .ProseMirror[data-review-display="original"] .contract-revision-deletion {
  color: inherit;
  background: transparent;
  text-decoration: inherit;
}

.contract-editor-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  border-top: 1px solid var(--line);
  padding: 6px 12px;
  color: #64748b;
  background: #f8fafc;
  font-size: 11px;
}

[data-editor-save-status][data-tone="dirty"] {
  color: #a16207;
}

[data-editor-save-status][data-tone="error"] {
  color: #be123c;
}

[data-editor-save-status][data-tone="saved"] {
  color: #15803d;
}

.contract-editor-inspector {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 150px);
  overflow: hidden;
}

.contract-editor-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  padding: 8px;
}

.contract-editor-tabs button {
  min-height: 36px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #64748b;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.contract-editor-tabs button.active {
  border-bottom-color: #2563eb;
  color: #1d4ed8;
}

.contract-editor-sidebar-content {
  max-height: calc(100vh - 215px);
  overflow: auto;
  padding: 10px;
}

.contract-editor-risk-list,
.contract-editor-revision-list,
.contract-editor-version-list {
  display: grid;
  gap: 8px;
}

.contract-editor-risk,
.contract-editor-revision-card,
.contract-editor-version-list article {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 8px 14px;
}

.contract-editor-risk {
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  cursor: pointer;
}

.contract-editor-risk.high {
  border-left-color: #dc2626;
  background: #fff7f7;
}

.contract-editor-risk.medium {
  border-left-color: #d97706;
  background: #fffbeb;
}

.contract-editor-risk.low {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.contract-editor-risk:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.contract-editor-risk-actions {
  cursor: default;
}

.contract-editor-risk.active {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.contract-risk-locate,
.contract-editor-revision-locate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 7px;
  width: 100%;
  border: 0;
  padding: 0;
  text-align: left;
  color: #111827;
  background: transparent;
  cursor: pointer;
}

.contract-risk-locate span {
  color: #be123c;
  font-weight: 900;
}

.contract-risk-locate em {
  border-radius: 999px;
  padding: 2px 6px;
  color: #64748b;
  background: #e2e8f0;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.contract-editor-risk.high .contract-risk-locate span,
.contract-editor-risk.high .contract-risk-locate em {
  color: #991b1b;
}

.contract-editor-risk.high .contract-risk-locate em {
  background: #fee2e2;
}

.contract-editor-risk.medium .contract-risk-locate span,
.contract-editor-risk.medium .contract-risk-locate em {
  color: #92400e;
}

.contract-editor-risk.medium .contract-risk-locate em {
  background: #fef3c7;
}

.contract-editor-risk.low .contract-risk-locate span,
.contract-editor-risk.low .contract-risk-locate em {
  color: #1d4ed8;
}

.contract-editor-risk.low .contract-risk-locate em {
  background: #dbeafe;
}

.contract-editor-risk p,
.contract-editor-revision-card p {
  margin: 0;
  color: #374151;
  font-size: 12px;
  line-height: 1.65;
}

.contract-editor-risk blockquote,
.contract-editor-revision-card blockquote,
.contract-editor-modal-panel blockquote {
  margin: 0;
  border-left: 3px solid #cbd5e1;
  padding: 7px 9px;
  color: #64748b;
  background: #f8fafc;
  font-size: 11px;
  line-height: 1.6;
}

.contract-editor-risk-field {
  display: grid;
  gap: 4px;
}

.contract-editor-risk-field > b {
  color: #334155;
  font-size: 11px;
  line-height: 1.4;
}

.contract-editor-suggestion {
  display: grid;
  gap: 4px;
  padding: 8px;
  color: #14532d;
  background: #f0fdf4;
  font-size: 11px;
  line-height: 1.65;
}

.contract-replacement-safety-warning {
  display: grid;
  gap: 4px;
  border: 1px solid #f3c5c5;
  border-radius: 7px;
  padding: 8px;
  color: #8f1d1d;
  background: #fff5f5;
  font-size: 11px;
  line-height: 1.6;
}

.contract-quote-location-warning {
  display: grid;
  gap: 4px;
  margin: 0 16px 12px;
  padding: 10px 12px;
  border: 1px solid #f3b7b7;
  border-radius: 10px;
  background: #fff4f4;
  color: #8b1f1f;
  font-size: 12px;
  line-height: 1.55;
}

.contract-quote-location-warning b {
  font-size: 13px;
}

.contract-replacement-safety-warning b {
  font-size: 11px;
}

.contract-risk-related-clause {
  display: grid;
  gap: 4px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  padding: 8px;
  color: #1e3a8a;
  background: #eff6ff;
  font-size: 11px;
  line-height: 1.6;
}

.contract-risk-related-clause b {
  font-size: 11px;
}

.contract-risk-related-clause.is-blocked {
  border-color: #f5d08a;
  color: #7c4a03;
  background: #fffbeb;
}

.contract-editor-revision-card.is-related-coverage {
  border-color: #86efac;
  background: #f7fff9;
}

.contract-editor-risk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contract-editor-risk-actions button,
.contract-editor-revision-undo,
.contract-editor-version-list button {
  min-height: 28px;
  border: 1px solid #d5dbe5;
  border-radius: 6px;
  padding: 4px 8px;
  color: #334155;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.contract-editor-risk-actions button.is-ignored {
  border-color: #fdba74;
  color: #9a3412;
  background: #ffedd5;
}

.contract-editor-risk-actions button[data-editor-risk-repair] {
  border-color: #99c8c1;
  color: #0f625b;
  background: #f0fdfa;
}

.contract-editor-risk-actions button[data-editor-risk-repair].is-loading {
  cursor: wait;
  opacity: 0.68;
}

.contract-editor-risk-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.contract-editor-version-list strong,
.contract-editor-version-list small {
  display: block;
}

.contract-editor-version-list small {
  color: #64748b;
  font-size: 11px;
}

.contract-editor-version-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}

.contract-editor-version-title em {
  border-radius: 999px;
  padding: 2px 6px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.contract-editor-version-title em.is-sent {
  color: #047857;
  background: #d1fae5;
}

.contract-editor-revision-card {
  border-left: 4px solid #16a34a;
  border-radius: 8px;
  background: #f0fdf4;
}

.contract-editor-revision-locate span {
  color: #15803d;
  font-weight: 900;
}

.contract-editor-revision-locate em {
  border-radius: 999px;
  padding: 2px 6px;
  color: #166534;
  background: #dcfce7;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.contract-editor-revision-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 8px;
  color: #64748b;
  font-size: 11px;
}

.contract-editor-revision-undo {
  justify-self: start;
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff;
}

.contract-editor-version-list article {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.contract-inspector-empty {
  padding: 22px 10px;
  text-align: center;
}

.contract-inspector-empty p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12px;
}

.contract-evidence-warning {
  color: #9f1239;
}

.contract-editor-modal-panel {
  width: min(580px, calc(100vw - 32px));
}

.contract-editor-modal-panel form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 1180px) {
  .contract-editor-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .contract-editor-head,
  .contract-editor-head-actions {
    align-items: flex-start;
  }

  .contract-editor-head-actions {
    flex-wrap: wrap;
  }

  .contract-editor-action-stack {
    justify-items: start;
  }

  .contract-editor-workflow-note {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  body.contract-document-mode .admin-sidebar,
  body.contract-document-mode .admin-topbar {
    display: none;
  }

  body.contract-document-mode .admin-main {
    padding: 14px 12px 28px;
  }

  .contract-editor-head,
  .contract-editor-layout {
    grid-template-columns: 1fr;
  }

  .contract-editor-head-actions {
    justify-content: flex-start;
  }

  .contract-editor-inspector {
    position: static;
    max-height: none;
  }

  .contract-editor-sidebar-content {
    max-height: none;
  }

  .contract-editor-paper-shell {
    min-height: 560px;
    max-height: none;
    padding: 12px;
  }

  #contractProseMirror,
  #contractProseMirror .ProseMirror {
    min-height: var(--contract-page-height, 1056px);
  }

  #contractProseMirror .ProseMirror {
    padding: var(--contract-page-margin-top, 72px) var(--contract-page-margin-right, 72px) 0 var(--contract-page-margin-left, 72px);
  }
}

@media (max-width: 560px) {
  .contract-result-document-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .contract-result-document-card em {
    grid-column: 2;
  }

  .contract-message-file {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .contract-message-file-icon {
    width: 38px;
    height: 44px;
  }

  .contract-message-file-state {
    grid-column: 2;
  }

  .contract-editor-head-actions > * {
    flex: 1 1 auto;
  }

  .contract-editor-toolbar {
    max-height: 136px;
    overflow: auto;
  }
}

@media (max-width: 560px) {
  .api-config-hero,
  .api-provider-head,
  .custom-api-card-head,
  .api-config-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .api-config-summary {
    width: 100%;
  }

  .ai-quick-tools,
  .ai-group-usage,
  .ai-library-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .ai-usage-table button {
    grid-template-columns: 1fr;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-inline: 16px;
  }

  .hero-dots button {
    background: rgba(158, 65, 88, 0.24);
  }

  h1 {
    font-size: 40px;
  }

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

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

  .sub-hero {
    min-height: 380px;
  }

  .sub-hero-content {
    padding-bottom: 54px;
  }

  .sub-hero::after {
    width: 112px;
    right: 18px;
    bottom: 22px;
  }

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

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

#brandGrid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 760px) {
  #brandGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  #brandGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.talent-editor-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.talent-editor-grid .option-field,
.talent-editor-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
.ai-result-feedback {
    align-items: flex-start;
  }

  .talent-editor-grid,
  .brand-editor-grid {
    grid-template-columns: 1fr;
  }

  .brand-admin-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .brand-admin-logo {
    width: 72px;
  }

  .brand-admin-row .record-meta {
    grid-column: 2;
  }

  .news-admin-row {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .news-admin-cover {
    width: 96px;
  }

  .news-admin-meta {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }

  .news-editor-grid {
    grid-template-columns: 1fr;
  }

  .news-publish-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .api-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .api-metric-grid article:nth-child(2) {
    border-right: 0;
  }

  .api-metric-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid #ece8e9;
  }
}

@media (max-width: 720px) {
  .api-page-head,
  .api-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .api-page-health {
    grid-template-columns: 10px minmax(0, 1fr);
    width: 100%;
  }

  .api-health-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .api-health-action { flex: 1 1 120px; }

  .api-connection-card > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .api-provider-badges {
    justify-content: flex-start;
    padding-left: 20px;
  }

  .api-provider-actions {
    grid-template-columns: 1fr;
  }

  .api-provider-actions .panel-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .api-metric-grid {
    grid-template-columns: 1fr;
  }

  .api-metric-grid article,
  .api-metric-grid article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #ece8e9;
  }

  .api-metric-grid article:last-child {
    border-bottom: 0;
  }

  .api-provider-body {
    padding: 14px;
  }

  .api-provider-actions .panel-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .api-provider-actions .button,
  .api-section-head .button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .contract-chat-form {
    margin-top: 14px;
  }

  .contract-chat-composer {
    border-radius: 20px;
    padding: 5px 6px 6px;
  }

  .contract-chat-composer textarea {
    min-height: 82px;
    max-height: 200px;
    padding: 12px 12px 6px;
    font-size: 14px;
  }

  .contract-chat-composer-footer {
    min-height: 38px;
    padding: 0 3px 1px 12px;
  }

  .contract-chat-composer-footer > span {
    font-size: 10px;
  }

  .contract-chat-send {
    width: 36px;
    height: 36px;
  }
}

.contract-baseline-bar {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  border: 1px solid #dbe5e1;
  border-radius: 10px;
  padding: 7px 10px;
  background: #f5fbf8;
}

.contract-baseline-bar.missing { border-color: #fed7aa; background: #fffaf2; }
.contract-baseline-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: #0f766e; font-size: 12px; font-weight: 900; }
.contract-baseline-bar.missing .contract-baseline-mark { background: #d97706; }
.contract-baseline-copy, .contract-baseline-copy strong, .contract-baseline-copy small { display: block; min-width: 0; }
.contract-baseline-copy strong { overflow: hidden; color: #134e4a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.contract-baseline-copy small { margin-top: 2px; color: #64748b; font-size: 11px; }
.contract-baseline-actions { display: flex; gap: 6px; }
.contract-baseline-actions a,
.contract-baseline-actions button { display: inline-flex; min-height: 30px; align-items: center; justify-content: center; border: 1px solid #0f766e; border-radius: 8px; padding: 0 10px; color: #0f766e; background: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
.contract-baseline-actions a[aria-disabled="true"] { pointer-events: none; opacity: .55; }

.contract-chat-composer.is-dragging { border-color: #0f766e; background: #f0fdfa; box-shadow: 0 0 0 4px rgba(15, 118, 110, .1); }
.contract-chat-attachment-tray:empty { display: none; }
.contract-chat-attachment-tray { display: flex; flex-wrap: wrap; gap: 7px; padding: 9px 10px 0; }
.contract-chat-attachment-chip { display: grid; grid-template-columns: auto minmax(70px, 160px) auto 22px; align-items: center; gap: 6px; border: 1px solid #dbe5e1; border-radius: 9px; padding: 5px 6px 5px 8px; background: #f8fafc; font-size: 11px; }
.contract-chat-attachment-chip b { color: #0f766e; }
.contract-chat-attachment-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contract-chat-attachment-chip small { color: #94a3b8; }
.contract-chat-attachment-chip button { width: 22px; height: 22px; border: 0; border-radius: 50%; color: #64748b; background: transparent; cursor: pointer; }
.contract-chat-attachment-chip button:hover { color: #be123c; background: #ffe4e6; }
.contract-chat-attach { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; margin-left: auto; border: 1px solid #d4d4d8; border-radius: 50%; color: #52525b; background: #fff; cursor: pointer; }
.contract-chat-attach:hover:not(:disabled) { border-color: #0f766e; color: #0f766e; background: #f0fdfa; }
.contract-chat-attach:disabled { opacity: .45; cursor: default; }
.contract-chat-attach svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.contract-message-image-thumb { width: 54px; height: 48px; border-radius: 8px; object-fit: cover; background: #e2e8f0; }
.contract-message-file:has(.contract-message-image-thumb) { grid-template-columns: 54px minmax(0, 1fr) auto; }
.contract-image-ocr-result { margin-top: 10px; border: 1px solid #dbe5e1; border-radius: 10px; padding: 8px 10px; background: #f8fafc; }
.contract-image-ocr-result summary { color: #0f766e; font-size: 12px; font-weight: 800; cursor: pointer; }
.contract-image-ocr-result section { margin-top: 8px; }
.contract-image-ocr-result header { display: flex; justify-content: space-between; gap: 8px; color: #64748b; font-size: 11px; }
.contract-image-ocr-result pre { margin: 6px 0 0; border-radius: 7px; padding: 8px; color: #334155; background: #fff; font-family: inherit; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }

.contract-comparison-summary { display: grid; gap: 10px; margin-top: 12px; border: 1px solid #dbe5e1; border-radius: 14px; padding: 13px; background: linear-gradient(135deg, #f7fffc, #fff); }
.contract-comparison-summary header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.contract-comparison-summary header span { color: #0f766e; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.contract-comparison-summary header strong { overflow: hidden; color: #1e293b; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.contract-comparison-summary p { margin: 0; color: #475569; font-size: 12px; }
.contract-comparison-summary > button { justify-self: start; border: 0; border-radius: 8px; padding: 8px 11px; color: #fff; background: #0f766e; font-size: 12px; font-weight: 800; cursor: pointer; }
.contract-comparison-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.contract-comparison-counts span { display: flex; align-items: baseline; gap: 5px; border-radius: 8px; padding: 7px 8px; font-size: 11px; font-weight: 700; }
.contract-comparison-counts b { font-size: 17px; }
.contract-comparison-counts .safe { color: #166534; background: #ecfdf3; }
.contract-comparison-counts .warn { color: #9a3412; background: #fff7ed; }
.contract-comparison-counts .danger { color: #b91c1c; background: #fef2f2; }
.contract-comparison-counts .manual { color: #475569; background: #f1f5f9; }

.contract-baseline-panel { width: min(650px, calc(100vw - 28px)); }
.contract-baseline-panel label { display: grid; gap: 6px; margin-top: 18px; font-size: 13px; font-weight: 800; }
.contract-baseline-warning { display: grid; gap: 2px; margin-top: 12px; border-left: 3px solid #d97706; padding: 8px 10px; color: #92400e; background: #fffbeb; font-size: 12px; }
.contract-comparison-panel { width: min(1120px, calc(100vw - 28px)); max-height: 92vh; overflow: auto; }
.contract-comparison-loading, .contract-comparison-empty { padding: 48px 16px; color: #64748b; text-align: center; }
.contract-comparison-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-right: 30px; }
.contract-comparison-modal-head h3 { margin: 3px 0 4px; }
.contract-comparison-modal-head p:not(.eyebrow) { margin: 0; color: #64748b; font-size: 12px; }
.contract-comparison-basis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 10px; }
.contract-comparison-basis span { display: grid; gap: 3px; border: 1px solid #e2e8f0; border-radius: 9px; padding: 9px 11px; color: #475569; font-size: 12px; }
.contract-comparison-basis b { color: #0f172a; }
.contract-comparison-counts.large { margin-bottom: 12px; }
.contract-comparison-counts.large span { padding: 10px 12px; }
.contract-diff-list { display: grid; gap: 10px; }
.contract-diff-decision-card { border: 1px solid #e2e8f0; border-left-width: 4px; border-radius: 12px; padding: 13px; background: #fff; }
.contract-diff-decision-card.safe { border-left-color: #22c55e; }
.contract-diff-decision-card.warn { border-left-color: #f59e0b; }
.contract-diff-decision-card.danger { border-left-color: #ef4444; }
.contract-diff-decision-card.manual { border-left-color: #64748b; }
.contract-diff-decision-card > header { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.contract-diff-decision-card > header > span { color: #94a3b8; font-size: 12px; font-weight: 900; }
.contract-diff-decision-card > header strong, .contract-diff-decision-card > header small { display: block; }
.contract-diff-decision-card > header small { margin-top: 2px; color: #94a3b8; font-size: 10px; }
.contract-diff-decision-card > header em { border-radius: 999px; padding: 5px 8px; color: #334155; background: #f1f5f9; font-size: 11px; font-style: normal; font-weight: 900; }
.contract-diff-texts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.contract-diff-texts blockquote { margin: 0; border-radius: 9px; padding: 9px 10px; color: #475569; background: #f8fafc; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.contract-diff-texts b, .contract-diff-reply b { display: block; margin-bottom: 3px; color: #0f172a; }
.contract-diff-decision-card > p { margin: 8px 0 0; color: #475569; font-size: 12px; line-height: 1.55; }
.contract-diff-reply { display: grid; gap: 2px; margin-top: 8px; border-radius: 8px; padding: 8px 10px; color: #155e75; background: #ecfeff; font-size: 12px; }
.contract-diff-decision-fields { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 8px; margin-top: 10px; border-top: 1px dashed #e2e8f0; padding-top: 10px; }
.contract-diff-decision-fields label { display: grid; gap: 4px; color: #475569; font-size: 11px; font-weight: 800; }
.contract-diff-decision-fields .full { grid-column: 1 / -1; }
.contract-diff-decision-fields select, .contract-diff-decision-fields input, .contract-diff-decision-fields textarea { width: 100%; border: 1px solid #dbe1e8; border-radius: 8px; padding: 8px; background: #fff; font-size: 12px; }
.contract-diff-decision-fields > button { justify-self: start; border: 1px solid #0f766e; border-radius: 8px; padding: 8px 10px; color: #0f766e; background: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
.contract-diff-decision-fields > small { color: #15803d; font-size: 11px; }
.contract-comparison-footer { position: sticky; bottom: -20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 14px -20px -20px; border-top: 1px solid #e2e8f0; padding: 12px 20px; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
.contract-comparison-footer > span { color: #64748b; font-size: 11px; }
.contract-comparison-footer > small { grid-column: 1 / -1; color: #be123c; }

@media (max-width: 720px) {
  .contract-baseline-bar { grid-template-columns: 28px 1fr; }
  .contract-baseline-actions { grid-column: 1 / -1; }
  .contract-baseline-actions a,
  .contract-baseline-actions button { flex: 1; }
  .contract-chat-composer-footer > span { display: none; }
  .contract-chat-attach { margin-left: auto; }
  .contract-comparison-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contract-comparison-modal-head, .contract-comparison-basis, .contract-diff-texts, .contract-diff-decision-fields, .contract-comparison-footer { grid-template-columns: 1fr; }
  .contract-comparison-modal-head { display: grid; }
  .contract-comparison-footer > small, .contract-diff-decision-fields .full { grid-column: 1; }
}
