:root {
  --navy-950: #041127;
  --navy-900: #061831;
  --navy-850: #08203f;
  --navy-800: #0b294f;
  --panel: rgba(8, 31, 63, 0.94);
  --panel-soft: rgba(11, 41, 79, 0.82);
  --line: rgba(88, 151, 222, 0.24);
  --line-bright: rgba(66, 205, 255, 0.46);
  --blue: #3677ff;
  --blue-deep: #2353dc;
  --cyan: #35d9ff;
  --mint: #41e5b3;
  --violet: #8d6cff;
  --text: #f2f7ff;
  --text-soft: #bed0e9;
  --muted: #7890b0;
  --danger: #ff728a;
  --shadow: 0 20px 55px rgba(0, 8, 26, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--navy-950);
}

body {
  min-width: 1120px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 2%, rgba(55, 108, 255, 0.14), transparent 28%),
    radial-gradient(circle at 25% 46%, rgba(32, 202, 255, 0.05), transparent 32%),
    linear-gradient(180deg, #06152e 0%, #051329 100%);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 16px;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(83, 139, 210, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 139, 210, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

strong,
b,
small,
span {
  font-style: normal;
}

.app-shell {
  position: relative;
  z-index: 1;
}

.app-header {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  width: 100%;
  height: 82px;
  display: grid;
  grid-template-columns: 250px minmax(360px, 1fr) auto;
  align-items: center;
  color: var(--text);
  border-bottom: 1px solid rgba(89, 156, 230, 0.28);
  background: rgba(4, 17, 39, 0.96);
  box-shadow: 0 12px 35px rgba(0, 8, 24, 0.2);
  backdrop-filter: blur(18px);
}

.app-header::after {
  position: absolute;
  right: 20%;
  bottom: -1px;
  width: 300px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.brand {
  height: 100%;
  padding-left: 22px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-right: 1px solid rgba(89, 156, 230, 0.2);
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-block;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--cyan), var(--blue));
  box-shadow: 0 0 24px rgba(53, 217, 255, 0.24);
  transform: rotate(45deg);
}

.brand-mark i {
  position: absolute;
  border-radius: 2px;
  background: var(--navy-950);
}

.brand-mark i:first-child {
  top: 8px;
  left: 11px;
  width: 7px;
  height: 22px;
}

.brand-mark i:last-child {
  top: 11px;
  left: 8px;
  width: 22px;
  height: 7px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 3px;
}

.brand-copy small {
  margin-top: 3px;
  color: #8299b8;
  font-size: 12px;
  letter-spacing: 2px;
}

.product-title {
  min-width: 0;
  padding-left: 27px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.product-title img {
  width: 46px;
  height: 46px;
  padding: 6px;
  border: 1px solid rgba(86, 151, 255, 0.35);
  border-radius: 13px;
  background: rgba(232, 241, 255, 0.96);
  box-shadow: 0 8px 24px rgba(32, 108, 255, 0.2);
}

.product-title > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.product-title strong {
  font-size: 20px;
  letter-spacing: 1px;
}

.product-title span {
  margin-top: 4px;
  overflow: hidden;
  color: #7791b5;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.header-actions {
  height: 100%;
  padding-right: 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  color: #9eb2cd;
  font-size: 13px;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #77e7c4;
}

.system-status i,
.service-mode i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint);
  animation: statusPulse 2s ease-in-out infinite;
}

.back-button {
  padding: 11px 17px;
  color: #d8e9ff;
  border: 1px solid rgba(79, 177, 255, 0.48);
  border-radius: 5px;
  background: rgba(32, 101, 211, 0.14);
}

.side-nav {
  position: fixed;
  z-index: 30;
  top: 82px;
  bottom: 0;
  left: 0;
  width: 250px;
  padding: 20px 16px;
  overflow-y: auto;
  border-right: 1px solid rgba(89, 156, 230, 0.22);
  background: rgba(5, 20, 44, 0.96);
}

.tenant-card {
  position: relative;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(69, 139, 221, 0.25);
  background:
    linear-gradient(145deg, rgba(32, 97, 202, 0.25), rgba(10, 39, 77, 0.25)),
    rgba(8, 31, 63, 0.72);
}

.tenant-card::after {
  position: absolute;
  right: -30px;
  bottom: -38px;
  width: 90px;
  height: 90px;
  content: "";
  border: 1px solid rgba(53, 217, 255, 0.16);
  border-radius: 50%;
}

.tenant-card > span {
  display: block;
  color: #6c86aa;
  font-size: 12px;
}

.tenant-card strong {
  margin: 8px 0 11px;
  display: block;
  font-size: 16px;
}

.tenant-card small {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #77d9ff;
  font-size: 12px;
}

.tenant-card small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.side-nav nav {
  margin-top: 20px;
  display: grid;
  gap: 6px;
}

.side-nav nav a {
  position: relative;
  padding: 15px 12px;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 10px;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.side-nav nav a:hover,
.side-nav nav a.is-active {
  border-color: rgba(58, 149, 255, 0.28);
  background: linear-gradient(90deg, rgba(46, 109, 232, 0.25), rgba(20, 70, 135, 0.03));
}

.side-nav nav a.is-active::before {
  position: absolute;
  top: 13px;
  bottom: 13px;
  left: -1px;
  width: 3px;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 11px rgba(53, 217, 255, 0.7);
}

.side-nav nav a > span {
  grid-row: 1 / 3;
  color: #4f739f;
  font: 700 12px Arial, sans-serif;
  letter-spacing: 1px;
}

.side-nav nav a.is-active > span {
  color: var(--cyan);
}

.side-nav nav strong {
  color: #d8e6f8;
  font-size: 13px;
}

.side-nav nav small {
  margin-top: 4px;
  color: #6680a4;
  font-size: 12px;
}

.side-usage {
  margin-top: 25px;
  padding: 16px;
  border: 1px solid rgba(79, 137, 203, 0.2);
  background: rgba(9, 32, 65, 0.54);
}

.side-usage > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #7690b1;
  font-size: 12px;
}

.side-usage b {
  color: #c5d6eb;
  font-size: 12px;
}

.side-usage > i,
.quality-score-grid > div > i {
  height: 4px;
  margin-top: 12px;
  display: block;
  overflow: hidden;
  background: rgba(85, 130, 186, 0.16);
}

.side-usage > i em,
.quality-score-grid > div > i em {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 10px rgba(53, 217, 255, 0.55);
}

.side-usage p {
  margin: 10px 0 0;
  color: #5e789b;
  font-size: 12px;
  line-height: 1.6;
}

main {
  position: relative;
  z-index: 2;
  margin-left: 250px;
  padding: 102px 24px 28px;
}

.workspace-hero {
  position: relative;
  min-height: 158px;
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  border: 1px solid rgba(77, 142, 222, 0.24);
  background:
    linear-gradient(100deg, rgba(12, 47, 94, 0.94), rgba(7, 27, 57, 0.92)),
    var(--navy-900);
  box-shadow: var(--shadow);
}

.workspace-hero::before {
  position: absolute;
  top: -140px;
  right: 19%;
  width: 390px;
  height: 390px;
  content: "";
  border: 1px solid rgba(74, 170, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 45px rgba(59, 131, 255, 0.035),
    0 0 0 90px rgba(59, 131, 255, 0.025);
}

.workspace-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--cyan));
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 690px;
}

.hero-copy > p {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #6fbce8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
}

.hero-copy > p span {
  width: 26px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(27px, 2.25vw, 36px);
  line-height: 1.24;
  letter-spacing: -1px;
}

.hero-copy > small {
  max-width: 660px;
  display: block;
  color: #9fb4d0;
  font-size: 13px;
  line-height: 1.75;
}

.hero-metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 135px));
  gap: 9px;
}

.hero-metrics article {
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(92, 159, 235, 0.22);
  background: rgba(7, 29, 61, 0.74);
}

.hero-metrics article:hover {
  border-color: rgba(53, 217, 255, 0.4);
}

.hero-metrics span {
  color: #7590b2;
  font-size: 12px;
}

.hero-metrics strong {
  margin: 8px 0 7px;
  display: block;
  color: #f4f8ff;
  font: 700 30px Arial, sans-serif;
}

.hero-metrics strong em {
  margin-left: 2px;
  color: #8bb4e8;
  font: 12px "Microsoft YaHei", sans-serif;
}

.hero-metrics small {
  color: #6e89aa;
  font-size: 12px;
}

.hero-metrics small b {
  color: var(--mint);
}

.translation-flow {
  min-height: 82px;
  margin-top: 14px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(7, 27, 57, 0.8);
}

.translation-flow > div {
  min-width: 178px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.translation-flow > div > span {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #6480a5;
  border: 1px solid rgba(92, 147, 210, 0.3);
  border-radius: 50%;
  font: 700 12px Arial, sans-serif;
}

.translation-flow > div.is-active > span {
  color: #fff;
  border-color: var(--cyan);
  background: linear-gradient(140deg, var(--blue-deep), var(--blue));
  box-shadow: 0 0 18px rgba(53, 217, 255, 0.22);
}

.translation-flow p {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.translation-flow strong {
  color: #c9d9ec;
  font-size: 13px;
}

.translation-flow small {
  margin-top: 4px;
  color: #647fa1;
  font-size: 12px;
}

.translation-flow > i {
  height: 1px;
  min-width: 26px;
  flex: 1;
  margin: 0 13px;
  background: linear-gradient(90deg, rgba(63, 139, 224, 0.5), rgba(63, 139, 224, 0.1));
}

.panel {
  border: 1px solid var(--line);
  background: rgba(7, 27, 57, 0.82);
  box-shadow: var(--shadow);
}

.workbench {
  margin-top: 14px;
}

.workbench-head {
  min-height: 86px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(34, 97, 203, 0.14), transparent 55%),
    rgba(7, 28, 59, 0.88);
}

.workbench-head > div:first-child > span,
.section-card-head > div > span {
  color: #4fbfe7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.workbench-head h2,
.section-card-head h2 {
  margin: 6px 0 4px;
  font-size: 20px;
}

.workbench-head small {
  color: #768fad;
  font-size: 12px;
}

.workbench-actions {
  display: flex;
  gap: 10px;
}

.button {
  min-height: 44px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: 0.2s ease;
}

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

.button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.button.ghost {
  color: #a8bdd8;
  border-color: rgba(92, 151, 220, 0.35);
  background: rgba(13, 48, 94, 0.44);
}

.button.primary {
  min-width: 175px;
  color: #fff;
  background: linear-gradient(110deg, #2758ec, #3489ff);
  box-shadow: 0 10px 25px rgba(38, 99, 242, 0.24);
}

.button.primary b {
  margin-left: 18px;
  position: relative;
  width: 17px;
  height: 10px;
  display: inline-block;
}

.button.primary b::before,
.service-value > a b::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 1px;
  content: "";
  background: currentColor;
}

.button.primary b::after,
.service-value > a b::after {
  position: absolute;
  top: 2px;
  right: 0;
  width: 6px;
  height: 6px;
  content: "";
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.translation-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.92fr) minmax(270px, 0.68fr) minmax(440px, 1.3fr);
  align-items: stretch;
}

.source-column,
.configuration-column,
.result-column {
  min-width: 0;
  padding: 19px;
}

.source-column,
.configuration-column {
  border-right: 1px solid var(--line);
}

.column-heading {
  min-height: 46px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.column-heading > span {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--cyan);
  border: 1px solid rgba(53, 217, 255, 0.32);
  font: 700 12px Arial, sans-serif;
}

.column-heading > div {
  display: flex;
  flex-direction: column;
}

.column-heading strong {
  color: #dce9f8;
  font-size: 16px;
}

.column-heading small {
  margin-top: 4px;
  color: #677f9f;
  font-size: 12px;
}

#translation-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-zone {
  width: 100%;
  min-height: 76px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  color: #d5e3f5;
  border: 1px dashed rgba(66, 172, 255, 0.46);
  background: rgba(14, 54, 103, 0.35);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--cyan);
  background: rgba(21, 74, 136, 0.4);
}

.upload-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: block;
  border: 1px solid rgba(53, 217, 255, 0.38);
  border-radius: 8px;
  background: rgba(26, 106, 199, 0.19);
}

.upload-icon i:first-child {
  position: absolute;
  top: 9px;
  left: 20px;
  width: 1px;
  height: 19px;
  background: var(--cyan);
}

.upload-icon i:nth-child(2) {
  position: absolute;
  top: 9px;
  left: 15px;
  width: 11px;
  height: 11px;
  border-top: 1px solid var(--cyan);
  border-left: 1px solid var(--cyan);
  transform: rotate(45deg);
}

.upload-icon i:last-child {
  position: absolute;
  right: 9px;
  bottom: 7px;
  left: 9px;
  height: 8px;
  border: 1px solid rgba(53, 217, 255, 0.5);
  border-top: 0;
}

.upload-zone > span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.upload-zone strong {
  font-size: 13px;
}

.upload-zone small {
  margin-top: 4px;
  color: #6685aa;
  font-size: 12px;
}

.upload-zone > b {
  padding: 8px 11px;
  color: #7fdfff;
  border: 1px solid rgba(53, 217, 255, 0.28);
  border-radius: 3px;
  font-size: 12px;
}

.file-state {
  padding: 8px 2px 12px;
  display: flex;
  justify-content: space-between;
  color: #657f9f;
  font-size: 12px;
}

.file-state b {
  color: #6bbdd8;
  font-weight: 400;
}

.source-editor {
  border: 1px solid rgba(84, 145, 216, 0.26);
  background: rgba(5, 23, 49, 0.64);
}

.editor-toolbar {
  min-height: 43px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(84, 145, 216, 0.2);
}

.editor-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7390b2;
  font-size: 12px;
}

.editor-toolbar select,
.source-options select {
  padding: 7px 26px 7px 9px;
  color: #d2e2f5;
  border: 1px solid rgba(88, 151, 222, 0.28);
  outline: none;
  background: #0a2a53;
  font-size: 12px;
}

.editor-toolbar > span {
  color: #6f8baa;
  font-size: 12px;
}

#translation-source-text {
  width: 100%;
  height: 212px;
  min-height: 170px;
  padding: 15px;
  display: block;
  resize: vertical;
  color: #dbe7f6;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.85;
}

#translation-source-text::placeholder,
#translation-glossary::placeholder {
  color: #4f698b;
}

.sample-actions {
  min-height: 42px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid rgba(84, 145, 216, 0.18);
}

.sample-actions > span {
  margin-right: 3px;
  color: #607b9e;
  font-size: 12px;
}

.sample-actions button {
  padding: 6px 9px;
  color: #87a7cb;
  border: 1px solid rgba(82, 143, 214, 0.24);
  background: rgba(11, 42, 82, 0.54);
  cursor: pointer;
  font-size: 12px;
}

.sample-actions button:hover {
  color: var(--cyan);
  border-color: rgba(53, 217, 255, 0.4);
}

.source-options {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 10px;
}

.source-options > label:first-child {
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #7590b0;
  border: 1px solid rgba(82, 143, 214, 0.22);
  background: rgba(8, 31, 64, 0.5);
  font-size: 12px;
}

.format-switch {
  position: relative;
}

.format-switch input {
  position: absolute;
  opacity: 0;
}

.format-switch > span {
  height: 100%;
  padding: 11px;
  display: grid;
  grid-template-columns: 35px 1fr;
  align-content: center;
  column-gap: 9px;
  color: #c8d8eb;
  border: 1px solid rgba(82, 143, 214, 0.22);
  background: rgba(8, 31, 64, 0.5);
  cursor: pointer;
}

.format-switch i {
  position: relative;
  grid-row: 1 / 3;
  width: 34px;
  height: 18px;
  border-radius: 12px;
  background: #28496e;
  transition: 0.2s;
}

.format-switch i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  content: "";
  border-radius: 50%;
  background: #95a8c0;
  transition: 0.2s;
}

.format-switch input:checked + span i {
  background: #226bd8;
}

.format-switch input:checked + span i::after {
  left: 19px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(53, 217, 255, 0.7);
}

.format-switch b {
  font-size: 12px;
}

.format-switch small {
  margin-top: 2px;
  color: #5f7a9c;
  font-size: 12px;
}

.glossary-editor {
  margin-top: 12px;
  padding: 12px;
  display: block;
  border: 1px solid rgba(82, 143, 214, 0.22);
  background: rgba(8, 31, 64, 0.5);
}

.glossary-editor > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.glossary-editor > span b {
  font-size: 12px;
}

.glossary-editor > span small {
  color: var(--cyan);
  font-size: 12px;
}

#translation-glossary {
  width: 100%;
  height: 86px;
  margin: 9px 0 7px;
  padding: 10px;
  resize: vertical;
  color: #c9daed;
  border: 1px solid rgba(74, 131, 199, 0.22);
  outline: none;
  background: rgba(4, 19, 43, 0.65);
  font-size: 12px;
  line-height: 1.7;
}

.glossary-editor > small {
  color: #5e789a;
  font-size: 12px;
}

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

.setting-title strong {
  font-size: 12px;
}

.setting-title span {
  color: #57c8eb;
  font-size: 12px;
}

.language-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.language-options label,
.tone-options label {
  position: relative;
  cursor: pointer;
}

.language-options input,
.tone-options input {
  position: absolute;
  opacity: 0;
}

.language-options label > span {
  min-height: 59px;
  padding: 9px;
  display: grid;
  grid-template-columns: 27px 1fr;
  align-content: center;
  column-gap: 8px;
  border: 1px solid rgba(78, 137, 206, 0.24);
  background: rgba(7, 29, 59, 0.6);
  transition: 0.2s;
}

.language-options label > span > i {
  position: relative;
  --language-accent: #79a8d8;
  width: 27px;
  height: 27px;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  color: var(--language-accent);
  border: 1px solid currentColor;
  border-radius: 50%;
  font-style: normal;
  opacity: 0.78;
}

.language-options label > span > i::before {
  position: absolute;
  top: 6px;
  right: 4px;
  bottom: 6px;
  left: 4px;
  content: "";
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  border-radius: 50%;
}

.language-options label > span > i::after {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 9px;
  width: 7px;
  content: "";
  border-right: 1px solid currentColor;
  border-left: 1px solid currentColor;
  border-radius: 50%;
}

.language-options [data-language-icon="en"] {
  --language-accent: #55cfff;
}

.language-options [data-language-icon="ja"] {
  --language-accent: #ff7f9e;
}

.language-options [data-language-icon="ko"] {
  --language-accent: #7aa5ff;
}

.language-options [data-language-icon="fr"] {
  --language-accent: #8b87ff;
}

.language-options [data-language-icon="es"] {
  --language-accent: #ffbd5c;
}

.language-options [data-language-icon="ar"] {
  --language-accent: #53dfaa;
}

.language-options [data-language-icon="zh-TW"] {
  --language-accent: #45d2e8;
}

.language-options [data-language-icon="de"] {
  --language-accent: #f4d36a;
}

.language-options b {
  font-size: 12px;
}

.language-options small {
  margin-top: 2px;
  color: #5d7798;
  font-size: 12px;
}

.language-options input:checked + span {
  border-color: rgba(53, 217, 255, 0.54);
  background: linear-gradient(135deg, rgba(41, 102, 219, 0.3), rgba(15, 70, 126, 0.28));
  box-shadow: inset 0 0 18px rgba(42, 129, 255, 0.08);
}

.language-options input:checked + span > i {
  color: #fff;
  border-color: var(--cyan);
  background: #2369dc;
  box-shadow: 0 0 12px rgba(53, 217, 255, 0.22);
  opacity: 1;
}

.tone-panel,
.translation-api-card,
.task-summary {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(82, 143, 214, 0.18);
}

.tone-options {
  display: grid;
  gap: 7px;
}

.tone-options label > span {
  min-height: 52px;
  padding: 9px 12px 9px 31px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(78, 137, 206, 0.22);
  background: rgba(7, 29, 59, 0.55);
}

.tone-options label > span::before {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 10px;
  height: 10px;
  content: "";
  border: 1px solid #55789f;
  border-radius: 50%;
  transform: translateY(-50%);
}

.tone-options b {
  font-size: 12px;
}

.tone-options small {
  margin-top: 3px;
  color: #5f799a;
  font-size: 12px;
}

.tone-options input:checked + span {
  border-color: rgba(70, 148, 255, 0.45);
  background: rgba(27, 78, 156, 0.34);
}

.tone-options input:checked + span::before {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53, 217, 255, 0.12), 0 0 9px rgba(53, 217, 255, 0.5);
}

.translation-api-card {
  padding: 13px;
  border: 1px solid rgba(79, 142, 214, 0.23);
  background: rgba(5, 24, 52, 0.66);
}

.translation-api-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.translation-api-card > div:first-child span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #7592b5;
}

.translation-api-card > div:first-child i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 9px var(--mint);
}

.translation-api-card > div:first-child strong {
  color: #69dfbc;
  font-size: 12px;
}

.api-log {
  margin-top: 10px;
}

.api-log p {
  margin: 0;
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(77, 135, 202, 0.16);
  font-size: 12px;
}

.api-log p span {
  color: #607d9f;
}

.api-log p b {
  max-width: 60%;
  overflow: hidden;
  color: #9fb6d2;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.task-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.task-summary > strong {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-size: 12px;
}

.task-summary > div {
  padding: 10px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(77, 137, 207, 0.18);
  background: rgba(7, 28, 57, 0.46);
}

.task-summary span {
  color: #5e7899;
  font-size: 12px;
}

.task-summary b {
  margin-top: 5px;
  color: #b8cbe1;
  font-size: 12px;
}

.result-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(78, 139, 210, 0.18);
}

.result-heading > div:nth-child(2) {
  min-width: 140px;
  margin-right: auto;
}

.result-actions {
  flex-direction: row !important;
  gap: 7px;
}

.result-actions button {
  padding: 8px 10px;
  color: #8eb0d5;
  border: 1px solid rgba(82, 146, 218, 0.28);
  background: rgba(9, 38, 77, 0.6);
  cursor: pointer;
  font-size: 12px;
}

.result-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.result-actions button:not(:disabled):hover {
  color: var(--cyan);
  border-color: rgba(53, 217, 255, 0.45);
}

.language-tabs {
  min-height: 47px;
  display: flex;
  align-items: end;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(82, 144, 214, 0.21);
}

.language-tabs .is-empty {
  padding: 0 4px 13px;
  color: #587394;
  font-size: 12px;
}

.language-tabs button {
  position: relative;
  min-width: 78px;
  padding: 12px 12px;
  color: #718dac;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.language-tabs button::after {
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 2px;
  content: "";
  background: transparent;
}

.language-tabs button.is-active {
  color: #e2f3ff;
  background: rgba(32, 91, 177, 0.16);
}

.language-tabs button.is-active::after {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.translation-output {
  min-height: 534px;
  max-height: 650px;
  overflow: auto;
  background:
    linear-gradient(rgba(67, 128, 198, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 128, 198, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
}

.output-welcome {
  min-height: 500px;
  padding: 50px 9%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.welcome-visual {
  position: relative;
  width: 128px;
  height: 128px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
}

.welcome-visual > span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(56, 177, 240, 0.18);
  border-radius: 50%;
  animation: orbitSpin 9s linear infinite;
}

.welcome-visual > span::before {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.welcome-visual > span:nth-child(2) {
  inset: 14px;
  animation-direction: reverse;
  animation-duration: 7s;
}

.welcome-visual > span:nth-child(3) {
  inset: 29px;
  animation-duration: 5s;
}

.welcome-visual img {
  position: relative;
  z-index: 2;
  width: 62px;
  height: 62px;
  padding: 9px;
  border-radius: 17px;
  background: rgba(240, 246, 255, 0.96);
  box-shadow: 0 0 30px rgba(48, 132, 255, 0.24);
}

.output-welcome > p {
  margin: 0 0 8px;
  color: #54cce8;
  font-size: 12px;
  letter-spacing: 2px;
}

.output-welcome h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.output-welcome > small {
  max-width: 510px;
  color: #718aaa;
  font-size: 12px;
  line-height: 1.85;
}

.welcome-capabilities {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.welcome-capabilities span {
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #86a3c5;
  border: 1px solid rgba(78, 142, 212, 0.22);
  background: rgba(8, 32, 65, 0.5);
  font-size: 12px;
}

.welcome-capabilities i,
.result-footer i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
}

.result-document {
  min-height: 500px;
  padding: 24px;
}

.result-document-head {
  padding-bottom: 15px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(80, 140, 207, 0.2);
}

.result-document-head > div {
  display: flex;
  flex-direction: column;
}

.result-document-head span {
  color: #50cce9;
  font-size: 12px;
  letter-spacing: 1.3px;
}

.result-document-head strong {
  margin-top: 6px;
  font-size: 16px;
}

.result-document-head b {
  padding: 7px 10px;
  color: #6ce3be;
  border: 1px solid rgba(65, 229, 179, 0.25);
  background: rgba(32, 126, 102, 0.13);
  font-size: 12px;
}

.result-document-body {
  padding: 20px 3px;
  color: #d0deee;
  font-size: 13px;
  line-height: 2;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-document-body[dir="rtl"] {
  text-align: right;
}

.result-document-meta {
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  color: #607b9e;
  border-top: 1px solid rgba(80, 140, 207, 0.18);
  font-size: 12px;
}

.loading-state {
  min-height: 500px;
  display: grid;
  place-items: center;
  text-align: center;
}

.loading-state > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-ring {
  position: relative;
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  border: 2px solid rgba(60, 151, 230, 0.16);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: orbitSpin 1.1s linear infinite;
}

.loading-ring::after {
  position: absolute;
  inset: 9px;
  content: "";
  border: 1px solid rgba(63, 111, 255, 0.42);
  border-right-color: transparent;
  border-radius: 50%;
  animation: orbitSpin 0.7s linear infinite reverse;
}

.loading-state strong {
  font-size: 16px;
}

.loading-state small {
  margin-top: 8px;
  color: #708aaa;
  font-size: 12px;
}

.error-state {
  min-height: 500px;
  padding: 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-state > span {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--danger);
  border: 1px solid rgba(255, 114, 138, 0.35);
  border-radius: 50%;
}

.error-state > span::before,
.error-state > span::after {
  position: absolute;
  top: 28px;
  left: 17px;
  width: 24px;
  height: 2px;
  content: "";
  background: currentColor;
}

.error-state > span::before {
  transform: rotate(45deg);
}

.error-state > span::after {
  transform: rotate(-45deg);
}

.error-state strong {
  margin-top: 17px;
  font-size: 16px;
}

.error-state p {
  max-width: 480px;
  color: #7d91ad;
  font-size: 12px;
  line-height: 1.75;
}

.result-footer {
  min-height: 39px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #5c7798;
  border-top: 1px solid rgba(82, 143, 214, 0.18);
  font-size: 12px;
}

.result-footer span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.result-footer b {
  color: #718daf;
  font-weight: 400;
}

.quality-section {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr;
  gap: 14px;
}

.quality-panel,
.glossary-panel,
.version-panel {
  min-height: 356px;
  padding: 19px;
}

.section-card-head {
  min-height: 52px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(83, 143, 211, 0.18);
}

.section-card-head h2 {
  margin-top: 5px;
  font-size: 16px;
}

.section-card-head > b {
  padding: 7px 10px;
  color: #7ea2c8;
  border: 1px solid rgba(82, 145, 217, 0.24);
  background: rgba(10, 39, 78, 0.5);
  font-size: 12px;
}

.quality-score-grid {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.quality-score-grid > div {
  padding: 12px;
  border: 1px solid rgba(80, 140, 207, 0.2);
  background: rgba(8, 31, 64, 0.55);
}

.quality-score-grid span {
  color: #6d88aa;
  font-size: 12px;
}

.quality-score-grid strong {
  margin-top: 8px;
  display: block;
  font: 700 20px Arial, sans-serif;
}

.quality-score-grid > div > i {
  margin: 8px 0;
}

.quality-score-grid small {
  color: #5a7495;
  font-size: 12px;
}

.qa-list {
  margin-top: 12px;
}

.qa-list p {
  margin: 0;
  padding: 10px 2px;
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: center;
  gap: 9px;
  border-top: 1px solid rgba(78, 138, 206, 0.15);
}

.qa-list p > i {
  width: 7px;
  height: 7px;
  border: 1px solid #496b91;
  border-radius: 50%;
}

.qa-list p.is-pass > i {
  border-color: var(--mint);
  background: var(--mint);
  box-shadow: 0 0 8px rgba(65, 229, 179, 0.45);
}

.qa-list p.is-warning > i {
  border-color: #ffc363;
  background: #ffc363;
}

.qa-list p > span {
  display: flex;
  flex-direction: column;
}

.qa-list b {
  font-size: 12px;
}

.qa-list small {
  margin-top: 3px;
  color: #5e7898;
  font-size: 12px;
}

.qa-list p > strong {
  color: #6f8dad;
  font-size: 12px;
}

.qa-list p.is-pass > strong {
  color: var(--mint);
}

.qa-list p.is-warning > strong {
  color: #ffc363;
}

.glossary-result,
.version-list {
  height: 274px;
  margin-top: 15px;
  overflow-y: auto;
}

.empty-mini {
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6e87a7;
  text-align: center;
}

.mini-orbit {
  position: relative;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(53, 217, 255, 0.2);
  border-radius: 50%;
}

.mini-orbit::before,
.mini-orbit::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(73, 130, 196, 0.16);
  border-radius: 50%;
}

.mini-orbit::before {
  inset: 7px;
}

.mini-orbit::after {
  inset: 15px;
}

.mini-orbit i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}

.empty-mini strong {
  color: #a4b7cd;
  font-size: 13px;
}

.empty-mini small {
  max-width: 250px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.7;
}

.glossary-item {
  padding: 11px;
  display: grid;
  grid-template-columns: minmax(70px, 0.8fr) 18px minmax(85px, 1fr) auto;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(78, 138, 206, 0.16);
  background: rgba(7, 29, 59, 0.4);
}

.glossary-item > span {
  overflow: hidden;
  color: #8aa5c4;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.glossary-item > i {
  position: relative;
  width: 16px;
  height: 9px;
  display: block;
  color: #4dbfe3;
  font-style: normal;
}

.glossary-item > i::before {
  position: absolute;
  top: 4px;
  left: 1px;
  width: 13px;
  height: 1px;
  content: "";
  background: currentColor;
}

.glossary-item > i::after {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 6px;
  height: 6px;
  content: "";
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.glossary-item > b {
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.glossary-item > strong {
  padding: 5px 7px;
  color: var(--mint);
  border: 1px solid rgba(65, 229, 179, 0.2);
  font-size: 12px;
}

.glossary-item.is-warning > strong {
  color: #ffc363;
  border-color: rgba(255, 195, 99, 0.24);
}

.version-item {
  position: relative;
  padding: 12px 9px 12px 26px;
  border-bottom: 1px solid rgba(78, 138, 206, 0.16);
  cursor: pointer;
}

.version-item::before {
  position: absolute;
  top: 19px;
  left: 8px;
  width: 7px;
  height: 7px;
  content: "";
  border: 2px solid #3c6ea4;
  border-radius: 50%;
  background: var(--navy-900);
}

.version-item::after {
  position: absolute;
  top: 29px;
  bottom: -10px;
  left: 11px;
  width: 1px;
  content: "";
  background: rgba(70, 126, 193, 0.24);
}

.version-item:last-child::after {
  display: none;
}

.version-item:hover {
  background: rgba(22, 68, 128, 0.22);
}

.version-item > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.version-item strong {
  font-size: 12px;
}

.version-item time {
  color: #5f7b9d;
  font-size: 12px;
}

.version-item p {
  margin: 5px 0 0;
  color: #6883a3;
  font-size: 12px;
  line-height: 1.55;
}

.service-value {
  min-height: 88px;
  margin-top: 14px;
  padding: 17px 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(100deg, rgba(12, 48, 95, 0.82), rgba(7, 27, 56, 0.82));
}

.service-value > div {
  display: flex;
  flex-direction: column;
}

.service-value span {
  color: #5ec8e9;
  font-size: 12px;
}

.service-value strong {
  margin-top: 6px;
  color: #b8cce3;
  font-size: 12px;
}

.service-value > a {
  padding: 11px 14px;
  color: #b8d4f4;
  border: 1px solid rgba(78, 151, 232, 0.3);
  font-size: 12px;
}

.service-value > a b {
  margin-left: 10px;
  position: relative;
  width: 17px;
  height: 10px;
  display: inline-block;
  color: var(--cyan);
}

.toast {
  position: fixed;
  z-index: 100;
  right: 28px;
  bottom: 28px;
  min-width: 230px;
  max-width: 390px;
  padding: 14px 18px;
  color: #e8f5ff;
  border: 1px solid rgba(53, 217, 255, 0.45);
  border-radius: 4px;
  background: rgba(7, 31, 63, 0.96);
  box-shadow: 0 15px 40px rgba(0, 5, 20, 0.36);
  font-size: 12px;
}

.toast.is-error {
  border-color: rgba(255, 114, 138, 0.52);
}

[hidden] {
  display: none !important;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: rgba(5, 20, 43, 0.5);
}

::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: #264e7b;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 0.68;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

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

@media (max-width: 1540px) {
  .hero-metrics {
    grid-template-columns: repeat(4, 112px);
  }

  .translation-grid {
    grid-template-columns: minmax(315px, 0.9fr) minmax(255px, 0.66fr) minmax(400px, 1.25fr);
  }

  .translation-flow > div {
    min-width: 155px;
  }

  .quality-score-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1280px) {
  .app-header {
    grid-template-columns: 230px minmax(330px, 1fr) auto;
  }

  .brand {
    padding-left: 16px;
  }

  .side-nav {
    width: 230px;
  }

  main {
    margin-left: 230px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .header-actions > a:first-of-type {
    display: none;
  }

  .workspace-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-metrics {
    grid-template-columns: repeat(4, 1fr);
  }

  .translation-grid {
    grid-template-columns: minmax(320px, 1fr) minmax(260px, 0.78fr);
  }

  .result-column {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .source-column {
    border-right: 1px solid var(--line);
  }

  .configuration-column {
    border-right: 0;
  }

  .translation-output {
    min-height: 420px;
  }

  .translation-flow > div {
    min-width: 120px;
  }

  .translation-flow small {
    display: none;
  }

  .quality-section {
    grid-template-columns: 1fr 1fr;
  }

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