:root {
  --ioz-blue: #1c6ee8;
  --ioz-navy: #202733;
  --ioz-ink: #273142;
  --ioz-muted: #6f7a89;
  --ioz-line: #dfe4eb;
  --ioz-soft: #f4f6f9;
  --ioz-green: #38a169;
  --ioz-orange: #dd7a18;
  --ioz-red: #d64555;
  --ioz-purple: #8250df;
}

.ioz-language-admin {
  max-width: 1680px;
  margin: 20px 20px 0 0;
  color: var(--ioz-ink);
}

.ioz-language-admin * { box-sizing: border-box; }
.ioz-language-admin [hidden] { display: none !important; }
.ioz-language-admin button,
.ioz-language-admin input,
.ioz-language-admin select,
.ioz-language-admin textarea { font: inherit; }

.ioz-language-hero {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(120deg, #163a79, var(--ioz-blue));
  box-shadow: 0 8px 24px rgb(29 48 79 / 15%);
  color: #fff;
}

.ioz-language-hero h1 {
  margin: 2px 0 4px;
  color: #fff;
  font-size: 28px;
  line-height: 1.2;
}

.ioz-language-hero p { margin: 0; color: rgb(255 255 255 / 78%); font-size: 14px; }
.ioz-eyebrow { color: #c9dcff; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.ioz-language-route {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 8px;
  background: rgb(255 255 255 / 9%);
}

.ioz-language-route b {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--ioz-blue);
  font-size: 12px;
}
.ioz-language-route > span { color: #c9dcff; font-size: 20px; }
.ioz-language-route small { grid-column: 1 / -1; color: rgb(255 255 255 / 70%); text-align: center; }

.ioz-language-notice {
  padding: 11px 16px;
  border: 1px solid #b9d3fb;
  border-left: 4px solid var(--ioz-blue);
  background: #edf5ff;
  color: #25466f;
}
.ioz-language-notice[data-tone='success'] { border-color: #aad8bd; border-left-color: var(--ioz-green); background: #edf9f2; color: #205a39; }
.ioz-language-notice[data-tone='warning'] { border-color: #f0cc9e; border-left-color: var(--ioz-orange); background: #fff8ec; color: #704510; }
.ioz-language-notice[data-tone='error'] { border-color: #efb9c0; border-left-color: var(--ioz-red); background: #fff1f3; color: #7d2531; }

.ioz-language-summary {
  display: grid;
  grid-template-columns: minmax(290px, 1.7fr) repeat(4, minmax(110px, .7fr)) minmax(170px, .9fr);
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--ioz-line);
  border-radius: 8px;
  background: var(--ioz-line);
  box-shadow: 0 3px 12px rgb(25 39 58 / 7%);
}

.ioz-language-summary > * {
  min-width: 0;
  min-height: 112px;
  border: 0;
  background: #fff;
}

.ioz-readiness {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 20px;
}
.ioz-readiness > div:last-child { display: grid; gap: 3px; }
.ioz-readiness > div > span,
.ioz-ai-state > span,
.ioz-summary-card > span { color: var(--ioz-muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ioz-readiness strong { font-size: 15px; }
.ioz-readiness small,
.ioz-ai-state small,
.ioz-summary-card small { color: #88919e; font-size: 11px; }

.ioz-progress-ring {
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ioz-green) var(--progress), #e8edf2 0);
}
.ioz-progress-ring::before { width: 52px; height: 52px; border-radius: 50%; background: #fff; content: ''; grid-area: 1 / 1; }
.ioz-progress-ring span { z-index: 1; grid-area: 1 / 1; font-size: 18px; font-weight: 700; }
.ioz-progress-ring small { color: inherit; font-size: 10px; }

.ioz-summary-card {
  display: grid;
  align-content: center;
  gap: 1px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}
.ioz-summary-card:hover,
.ioz-summary-card:focus-visible { position: relative; z-index: 1; background: #f8fbff; box-shadow: inset 0 0 0 2px var(--ioz-blue); outline: 0; }
.ioz-summary-card strong { margin: 1px 0; font-size: 25px; line-height: 1.1; }
.ioz-summary-card.state-missing strong,
.state-missing { color: var(--ioz-red); }
.ioz-summary-card.state-stale strong,
.state-stale { color: var(--ioz-orange); }
.ioz-summary-card.state-blocked strong,
.state-blocked { color: #b52c3b; }
.ioz-summary-card.state-needs_review strong,
.state-needs_review,
.state-draft { color: var(--ioz-purple); }
.state-approved { color: var(--ioz-green); }

.ioz-ai-state {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 14px 18px;
}
.ioz-ai-state strong { color: var(--ioz-green); font-size: 13px; }
.ioz-ai-state[data-available='false'] strong { color: var(--ioz-orange); }

.ioz-language-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--ioz-line);
  border-radius: 7px;
  background: #fff;
}
.ioz-language-toolbar label { display: grid; min-width: 160px; gap: 4px; }
.ioz-language-toolbar label:first-child { min-width: 260px; flex: 1 1 auto; }
.ioz-language-toolbar label > span { color: var(--ioz-muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ioz-language-toolbar input,
.ioz-language-toolbar select { width: 100%; min-height: 36px; border-color: #cbd3dd; }
.ioz-language-toolbar .button { min-height: 36px; white-space: nowrap; }

.ioz-language-workspace {
  position: relative;
  display: grid;
  min-height: 640px;
  grid-template-columns: minmax(320px, 390px) minmax(520px, 1fr);
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--ioz-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px rgb(25 39 58 / 8%);
}

.ioz-language-list-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--ioz-line);
  background: #f8f9fb;
}
.ioz-language-list-head {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 13px;
  border-bottom: 1px solid var(--ioz-line);
  background: #fff;
  color: var(--ioz-muted);
  font-size: 11px;
}
.ioz-language-list-head label { display: flex; align-items: center; gap: 6px; }

.ioz-language-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}
.ioz-language-row {
  display: grid;
  min-height: 83px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-bottom: 1px solid #e5e9ef;
  background: #fff;
}
.ioz-language-row:hover,
.ioz-language-row.is-active { position: relative; z-index: 1; background: #edf4ff; box-shadow: inset 3px 0 0 var(--ioz-blue); }
.ioz-row-check { display: grid; place-items: center; }
.ioz-row-open { display: grid; min-width: 0; gap: 3px; padding: 3px 2px; border: 0; background: transparent; color: var(--ioz-ink); text-align: left; cursor: pointer; }
.ioz-row-open:focus-visible { border-radius: 3px; box-shadow: 0 0 0 2px var(--ioz-blue); outline: 0; }
.ioz-row-open strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ioz-row-open small { display: flex; overflow: hidden; align-items: center; gap: 4px; color: #7d8795; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ioz-row-open small i { color: #b3bac4; font-style: normal; }
.ioz-row-type { color: #8993a1; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.state-dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }

.ioz-state-pill {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef1f5;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.ioz-state-pill.state-missing { background: #ffeaed; }
.ioz-state-pill.state-stale { background: #fff1db; }
.ioz-state-pill.state-blocked { background: #ffe1e4; }
.ioz-state-pill.state-draft,
.ioz-state-pill.state-needs_review { background: #f0eaff; }
.ioz-state-pill.state-approved { background: #e1f5e9; }

.ioz-language-pagination {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-top: 1px solid var(--ioz-line);
  background: #fff;
  color: var(--ioz-muted);
  font-size: 11px;
}

.ioz-language-editor {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: #fff;
}
.ioz-editor-head {
  display: flex;
  min-height: 88px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--ioz-line);
}
.ioz-editor-head > div { min-width: 0; }
.ioz-editor-head > div > span { color: var(--ioz-blue); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.ioz-editor-head h2 { overflow: hidden; margin: 2px 0 3px; font-size: 18px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.ioz-editor-head small { color: var(--ioz-muted); }
.ioz-editor-fields { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 18px 20px 88px; background: var(--ioz-soft); }
.ioz-field { margin-bottom: 14px; overflow: hidden; border: 1px solid var(--ioz-line); border-radius: 6px; background: #fff; }
.ioz-field > header { display: flex; min-height: 51px; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 13px; border-bottom: 1px solid var(--ioz-line); }
.ioz-field > header > div { display: grid; gap: 1px; }
.ioz-field > header > div > span { font-weight: 700; }
.ioz-field > header small { color: var(--ioz-muted); font-size: 10px; }
.ioz-field-columns { display: grid; grid-template-columns: 1fr 1fr; }
.ioz-field-columns label { display: grid; min-width: 0; gap: 5px; padding: 12px; }
.ioz-field-columns label + label { border-left: 1px solid var(--ioz-line); background: #fbfdff; }
.ioz-field-columns label > span { display: flex; align-items: center; gap: 7px; color: #626d7b; font-size: 10px; font-weight: 600; }
.ioz-field-columns label > span b { display: grid; width: 24px; height: 20px; place-items: center; border-radius: 3px; background: #e8edf3; color: #5c6674; font-size: 9px; }
.ioz-field-columns label + label > span b { background: #dbe9ff; color: var(--ioz-blue); }
.ioz-field-columns textarea { width: 100%; min-height: 86px; resize: vertical; border: 1px solid #cbd3dd; border-radius: 4px; font-family: inherit; font-size: 12px; line-height: 1.5; }
.ioz-field-columns textarea[readonly] { background: #f3f5f7; color: #515b68; }
.ioz-field-columns textarea:focus { border-color: var(--ioz-blue); box-shadow: 0 0 0 1px var(--ioz-blue); outline: 0; }
.ioz-field-columns label > small { color: #929aa5; font-size: 9px; text-align: right; }
.ioz-field-issues { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; align-items: center; padding: 7px 12px; border-top: 1px solid #edf0f4; background: #fafbfc; }
.ioz-field-issues > span { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; }
.ioz-qa-ok { color: var(--ioz-green); }
.ioz-qa-pending { color: var(--ioz-muted); }
.ioz-qa-blocker { color: var(--ioz-red); }
.ioz-qa-warning { color: var(--ioz-orange); }

.ioz-media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.ioz-media-pair > section { min-width: 0; padding: 12px; }
.ioz-media-pair > section + section { border-left: 1px solid var(--ioz-line); background: #fbfdff; }
.ioz-media-pair h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; color: #626d7b; font-size: 10px; }
.ioz-media-pair h3 b { display: grid; width: 24px; height: 20px; place-items: center; border-radius: 3px; background: #e8edf3; color: #5c6674; font-size: 9px; }
.ioz-media-pair > section + section h3 b { background: #dbe9ff; color: var(--ioz-blue); }
.ioz-media-card { position: relative; display: grid; min-height: 178px; align-content: start; overflow: hidden; border: 1px solid #d6dce5; border-radius: 5px; background: #fff; }
.ioz-media-card > span { position: absolute; z-index: 1; top: 7px; left: 7px; display: grid; min-width: 27px; height: 24px; place-items: center; border-radius: 4px; background: rgb(25 35 50 / 82%); color: #fff; font-size: 9px; font-weight: 800; }
.ioz-media-card img { width: 100%; height: 132px; object-fit: contain; background: repeating-conic-gradient(#f1f3f6 0 25%, #fff 0 50%) 0 / 18px 18px; }
.ioz-media-card > div:last-child { display: grid; min-width: 0; gap: 2px; padding: 9px 10px; border-top: 1px solid var(--ioz-line); }
.ioz-media-card strong,
.ioz-media-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ioz-media-card strong { color: var(--ioz-ink); font-size: 11px; }
.ioz-media-card small { color: var(--ioz-muted); font-size: 9px; }
.ioz-media-card--empty { align-content: center; justify-items: center; gap: 6px; padding: 25px; border-style: dashed; color: #8d97a5; text-align: center; }
.ioz-media-card--empty > div { padding: 0; border: 0; color: #b4becb; font-size: 36px; }
.ioz-media-card--empty strong { white-space: normal; }
.ioz-media-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.ioz-media-actions .button { min-height: 34px; }

.ioz-editor-actions {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 390px;
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  border-top: 1px solid #ced5df;
  background: rgb(255 255 255 / 97%);
  box-shadow: 0 -4px 14px rgb(27 42 62 / 8%);
}
.ioz-editor-spacer { flex: 1 1 auto; }
.ioz-ai-button { border-color: #cbbdf0 !important; color: #6742b8 !important; }
.ioz-editor-actions .button { min-height: 36px; }

.ioz-language-empty,
.ioz-language-empty-list,
.ioz-language-error,
.ioz-language-loading {
  display: grid;
  min-height: 260px;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 28px;
  color: var(--ioz-muted);
  text-align: center;
}
.ioz-language-empty { min-height: 100%; }
.ioz-language-empty > span { display: grid; width: 74px; height: 74px; place-items: center; border-radius: 50%; background: #e8f1ff; color: var(--ioz-blue); font-weight: 800; }
.ioz-language-empty h2 { margin: 9px 0 0; color: var(--ioz-ink); font-size: 18px; }
.ioz-language-empty p,
.ioz-language-empty-list p,
.ioz-language-error p { max-width: 390px; margin: 0; }
.ioz-language-loading i { width: 24px; height: 24px; border: 3px solid #d8e4f6; border-top-color: var(--ioz-blue); border-radius: 50%; animation: ioz-spin .8s linear infinite; }
@keyframes ioz-spin { to { transform: rotate(360deg); } }

.ioz-language-boundary { margin: 10px 2px 20px; color: #7b8592; font-size: 11px; }

.ioz-translation-preview {
  position: relative;
  z-index: 9999;
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 7px 16px;
  background: #6c3fc7;
  color: #fff;
  font: 12px/1.3 Arial, sans-serif;
}
.ioz-translation-preview span { color: rgb(255 255 255 / 78%); }
.ioz-translation-preview a { color: #fff; font-weight: 700; }

@media (max-width: 1250px) {
  .ioz-language-summary { grid-template-columns: minmax(280px, 2fr) repeat(4, minmax(100px, 1fr)); }
  .ioz-ai-state { grid-column: 1 / -1; min-height: 68px; }
  .ioz-language-workspace { grid-template-columns: 340px minmax(480px, 1fr); }
  .ioz-editor-actions { left: 340px; }
}

@media (max-width: 960px) {
  .ioz-language-admin { margin-right: 10px; }
  .ioz-language-summary { grid-template-columns: 1fr 1fr; }
  .ioz-readiness { grid-column: 1 / -1; }
  .ioz-ai-state { grid-column: auto; }
  .ioz-language-toolbar { flex-wrap: wrap; }
  .ioz-language-toolbar label,
  .ioz-language-toolbar label:first-child { min-width: 210px; flex: 1 1 210px; }
  .ioz-language-workspace { display: block; overflow: visible; }
  .ioz-language-list-panel { max-height: 520px; border-right: 0; border-bottom: 1px solid var(--ioz-line); }
  .ioz-language-editor { min-height: 580px; }
  .ioz-editor-actions { position: sticky; left: 0; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .ioz-language-hero { align-items: flex-start; padding: 18px; }
  .ioz-language-route { display: none; }
  .ioz-language-summary { grid-template-columns: 1fr 1fr; }
  .ioz-readiness,
  .ioz-ai-state { grid-column: 1 / -1; }
  .ioz-language-toolbar { align-items: stretch; }
  .ioz-language-toolbar label,
  .ioz-language-toolbar label:first-child { min-width: 100%; }
  .ioz-language-toolbar .button { width: 100%; }
  .ioz-language-row { grid-template-columns: 27px minmax(0, 1fr); }
  .ioz-language-row > .ioz-state-pill { grid-column: 2; justify-self: start; }
  .ioz-field-columns { grid-template-columns: 1fr; }
  .ioz-field-columns label + label { border-top: 1px solid var(--ioz-line); border-left: 0; }
  .ioz-media-pair { grid-template-columns: 1fr; }
  .ioz-media-pair > section + section { border-top: 1px solid var(--ioz-line); border-left: 0; }
  .ioz-editor-head { align-items: flex-start; }
  .ioz-editor-actions .button { flex: 1 1 44%; }
  .ioz-editor-spacer { display: none; }
  .ioz-translation-preview { align-items: flex-start; flex-direction: column; gap: 2px; }
}
