:root {
  color-scheme: light;
  --bg: #eef3f1;
  --surface: #ffffff;
  --surface-soft: #f6f8f7;
  --line: #d8e1dd;
  --line-strong: #aebdb7;
  --text: #14201d;
  --muted: #64726d;
  --quiet: #8b9894;
  --brand: #126756;
  --brand-strong: #0b4e41;
  --brand-soft: #e4f3ee;
  --accent: #b85045;
  --accent-soft: #faedea;
  --warn: #9b5a11;
  --danger: #b3261e;
  --danger-soft: #fff0ee;
  --success: #0b6b58;
  --amber: #8b4a00;
  --amber-soft: #fff4dd;
  --shadow: 0 22px 60px rgba(16, 32, 27, 0.12);
  --shadow-soft: 0 10px 30px rgba(16, 32, 27, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(244, 248, 246, 0.92), rgba(230, 237, 234, 0.92)),
    linear-gradient(90deg, rgba(18, 103, 86, 0.06) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(18, 103, 86, 0.05) 0 1px, transparent 1px 100%),
    var(--bg);
  background-size: 42px 42px;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.5;
}

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

button {
  border: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #121d19;
  color: #edf6f2;
  box-shadow: 18px 0 46px rgba(13, 24, 21, 0.18);
}

.brand-block {
  display: grid;
  gap: 10px;
  padding: 28px 24px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24);
}

.brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-eyebrow .brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  box-shadow: 0 8px 16px rgba(11, 78, 65, 0.18);
}

.brand-sub {
  margin-top: 4px;
  color: rgba(237, 246, 242, 0.66);
  font-size: 13px;
}

.language-picker {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.language-select {
  min-height: 32px;
  max-width: 168px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.language-select:hover,
.language-select:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.sidebar .language-picker {
  color: rgba(237, 246, 242, 0.62);
}

.sidebar .language-select {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar .language-select option {
  color: #14201d;
}

.nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 20px 14px;
}

.nav-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 7px;
  color: rgba(237, 246, 242, 0.68);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.nav-btn:hover,
.nav-btn:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.nav-btn.active {
  color: #11231e;
  background: #f4fff9;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.sidebar-foot {
  display: grid;
  gap: 12px;
  padding: 16px 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.person-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.tiktok-mini {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar .card-meta {
  color: rgba(237, 246, 242, 0.58);
}

.person-chip strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  min-width: 0;
  max-width: 1460px;
  padding: 34px 42px 60px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.topbar::before {
  display: block;
  width: 4px;
  min-height: 74px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), #70b9a6);
  content: "";
}

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

.page-title {
  margin: 4px 0 0;
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: 0;
}

.page-sub {
  margin-top: 8px;
  max-width: 820px;
  color: var(--muted);
  font-size: 14px;
}

.availability-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(20, 184, 166, .28);
  border-radius: 6px;
  background: rgba(20, 184, 166, .08);
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.availability-note::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #13a38c;
  box-shadow: 0 0 0 4px rgba(19, 163, 140, 0.13);
  content: "";
}

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

.connected-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
}

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

.workbench-strip {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow-soft);
}

.workbench-strip > div {
  min-height: 102px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.workbench-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.workbench-strip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.strip-label {
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel,
.card,
.metric,
.empty-state {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 22px;
}

.panel:hover,
.metric:hover,
.workbench-strip:hover {
  border-color: rgba(174, 189, 183, 0.78);
}

.section {
  margin-top: 22px;
}

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

.section-title {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.25;
}

.section-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.metric {
  min-height: 104px;
  padding: 20px;
}

.metric-value {
  font-size: 32px;
  font-weight: 850;
  line-height: 1;
}

.metric-label {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.capacity-note {
  margin-top: 14px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  box-shadow: var(--shadow-soft);
}

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

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label,
.field-label {
  color: #465261;
  font-size: 13px;
  font-weight: 800;
}

.field:focus-within label,
.field:focus-within .field-label {
  color: var(--brand);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(11, 107, 88, 0.14);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.count-row {
  display: grid;
  grid-template-columns: 40px minmax(80px, 110px) 40px minmax(92px, auto);
  gap: 10px;
  align-items: center;
}

.step-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: 7px;
  color: var(--brand);
  background: var(--brand-soft);
  cursor: pointer;
  font-weight: 850;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.step-btn:hover,
.icon-btn:hover {
  background: #dceee8;
  box-shadow: 0 8px 18px rgba(18, 103, 86, 0.14);
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 7px;
  color: #ffffff;
  background: var(--brand);
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(18, 103, 86, 0.18);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.btn:hover {
  background: var(--brand-strong);
  box-shadow: 0 16px 28px rgba(18, 103, 86, 0.22);
  transform: translateY(-1px);
}

.btn.secondary {
  color: var(--text);
  background: #e8edf1;
  box-shadow: none;
}

.btn.secondary:hover {
  background: #d9e1e8;
}

.btn.ghost {
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: none;
}

.btn.ghost:hover {
  background: #dceee8;
}

.btn.tiktok {
  color: #ffffff;
  background: #111827;
  box-shadow: 0 14px 26px rgba(17, 24, 39, 0.22);
}

.btn.tiktok:hover {
  background: #000000;
}

.btn.danger {
  color: var(--danger);
  background: var(--danger-soft);
  box-shadow: none;
}

.btn.danger:hover {
  color: #ffffff;
  background: var(--danger);
}

.btn.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.btn.full {
  width: 100%;
}

.btn:disabled {
  color: #8f9aa8;
  background: #e6eaee;
  cursor: not-allowed;
}

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

.language-option {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.84);
  cursor: pointer;
}

.language-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
}

.language-option.selected {
  border-color: #9dcfbe;
  background: #eef8f4;
  box-shadow: 0 10px 22px rgba(18, 103, 86, 0.1);
}

.language-code {
  font-weight: 850;
  text-transform: uppercase;
}

.language-name {
  color: var(--muted);
  font-size: 12px;
}

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

.group-brief-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.group-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.list {
  display: grid;
  gap: 12px;
}

.card {
  padding: 17px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.card.selectable {
  cursor: pointer;
}

.card.selectable:hover,
.card.selectable.active {
  border-color: #8dbdad;
  background: #f6fbf8;
  box-shadow: 0 16px 34px rgba(18, 103, 86, 0.12);
  transform: translateY(-1px);
}

.card-head,
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-title {
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.script-preview,
.translated-text,
.logline,
.path-text {
  word-break: break-word;
}

.script-preview {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: 7px;
  color: #2f3944;
  background: #f8f3ea;
  font-size: 14px;
}

.angle-line {
  margin-top: 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
}

.error-line {
  margin-top: 8px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 750;
}

.lang-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill,
.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 850;
}

.pill.disabled {
  color: var(--quiet);
  background: #edf0f3;
}

.tag.running,
.tag.submitted {
  color: var(--amber);
  background: var(--amber-soft);
}

.tag.failed {
  color: var(--danger);
  background: var(--danger-soft);
}

.tag.completed {
  color: var(--success);
  background: var(--brand-soft);
}

.empty-state {
  display: grid;
  min-height: 156px;
  place-items: center;
  padding: 28px;
  border-style: dashed;
  color: var(--muted);
  text-align: center;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow-soft);
}

.seg {
  min-height: 36px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.seg.active {
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(16, 32, 27, 0.1);
}

.asset-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  gap: 18px;
}

.asset-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.thumb {
  width: 112px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 7px;
  background: #dce4e0;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-empty {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.path-text {
  margin-top: 6px;
  color: var(--quiet);
  font-size: 12px;
}

.preview-box {
  display: grid;
  gap: 14px;
}

.preview-box video {
  width: 100%;
  max-height: 520px;
  border-radius: 8px;
  background: #111827;
}

.preview-box audio {
  width: 100%;
}

.file-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.file-input {
  flex: 1 1 260px;
}

.script-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
}

.script-tabs {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
}

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

.translated-text {
  margin-top: 10px;
  color: #303a35;
  font-size: 14px;
}

.jobs-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 18px;
}

.logs {
  max-height: 620px;
  overflow: auto;
  border-color: rgba(16, 24, 32, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    #101820;
  color: #d9e5ee;
}

.logs .logline {
  margin-top: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 38px 24px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.9), rgba(235, 242, 239, 0.88) 52%, rgba(212, 226, 220, 0.72)),
    linear-gradient(90deg, rgba(18, 103, 86, 0.06) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(18, 103, 86, 0.05) 0 1px, transparent 1px 100%),
    var(--bg);
  background-size: auto, 46px 46px, 46px 46px, auto;
}

.login-card {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card-wide {
  width: min(1120px, 100%);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.login-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 248, 0.86)),
    linear-gradient(90deg, rgba(18, 103, 86, 0.08) 0 1px, transparent 1px 100%);
  background-size: auto, 38px 38px;
  box-shadow: var(--shadow);
}

.login-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.login-topline .language-picker {
  flex-shrink: 0;
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  margin-top: 18px;
}

.login-grid > section {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.login-side {
  display: grid;
  align-content: start;
  gap: 16px;
}

.login-title {
  max-width: 680px;
  margin: 4px 0 8px;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.oauth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 2px;
  padding: 18px;
  border: 1px solid #cbd8d3;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 103, 86, 0.08), rgba(255, 255, 255, 0.88)),
    var(--surface-soft);
}

.oauth-panel.stacked {
  align-items: stretch;
  grid-template-columns: 1fr;
}

.oauth-panel strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

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

.login-stats div {
  display: flex;
  min-height: 94px;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
}

.login-stats strong {
  font-size: 15px;
}

.login-stats span {
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 7px;
  color: #ffffff;
  background: #17212b;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

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

.modal-mask {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
}

.modal {
  width: min(900px, 100%);
  max-height: min(82vh, 820px);
  overflow: auto;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.modal-head,
.modal-body {
  padding: 18px 20px;
}

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

.modal-title {
  font-size: 18px;
  font-weight: 850;
}

.modal video {
  width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  background: #111827;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 16px;
  font-size: 13px;
}

.login-card-wide .legal-links {
  padding: 0 2px;
}

.legal-links a {
  font-weight: 750;
}

html[dir="rtl"] .topbar::before {
  order: 2;
}

.mobile-bar {
  display: none;
}

@media (max-width: 1060px) {
  .layout,
  .grid.two,
  .workbench-strip,
  .asset-layout,
  .script-layout,
  .jobs-layout,
  .login-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .layout {
    display: block;
  }

  .nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .nav-btn {
    flex: 0 0 auto;
    width: auto;
  }

  .sidebar-foot {
    display: none;
  }

  .grid.metrics,
  .language-grid,
  .login-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-hero {
    grid-template-columns: 1fr;
  }

  .status-stack {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 20px 14px 42px;
  }

  .brand-block {
    padding: 18px 16px 14px;
  }

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

  .topbar::before {
    width: 100%;
    min-height: 4px;
  }

  .login-page {
    padding: 18px 12px;
  }

  .login-hero,
  .login-grid > section {
    padding: 20px;
  }

  .login-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-title {
    font-size: 30px;
  }

  .toolbar,
  .actions-row {
    justify-content: stretch;
  }

  .toolbar .btn,
  .actions-row .btn,
  .actions-row .select {
    width: 100%;
  }

  .grid.metrics,
  .form-grid.compact,
  .language-grid,
  .language-cards,
  .login-stats {
    grid-template-columns: 1fr;
  }

  .count-row {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .count-row .btn {
    grid-column: 1 / -1;
  }

  .asset-row {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .thumb {
    width: 92px;
  }

  .page-title {
    font-size: 25px;
  }
}
