:root {
  --bg: #eef3f7;
  --bg-strong: #dce5eb;
  --card: rgba(255, 255, 255, 0.9);
  --card-solid: #ffffff;
  --ink: #11243a;
  --muted: #61748b;
  --line: rgba(17, 36, 58, 0.12);
  --line-strong: rgba(17, 36, 58, 0.2);
  --accent: #0c7c6d;
  --accent-strong: #085f54;
  --accent-soft: #dff5ef;
  --gold: #b68928;
  --surface: #f7fbfd;
  --shadow: 0 20px 50px rgba(14, 30, 48, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(12, 124, 109, 0.14), transparent 24%),
    radial-gradient(circle at 90% 10%, rgba(182, 137, 40, 0.1), transparent 22%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
}

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

button {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.secondary-btn,
.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
}

.secondary-btn:hover,
.ghost-btn:hover {
  background: #fff;
  border-color: var(--accent);
}

.site-shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 24px;
}

.landing-shell,
.app-layout {
  display: grid;
  gap: 22px;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand strong {
  display: block;
  font-size: 20px;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #1c9989);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(12, 124, 109, 0.24);
}

.nav-actions,
.hero-actions,
.topbar-actions,
.job-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 520px);
  align-items: start;
}

.hero-grid--centered {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.landing-hero {
  position: relative;
  min-height: min(720px, calc(100vh - 120px));
  display: grid;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  box-shadow: var(--shadow);
}

.landing-hero__scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(17,36,58,.70), rgba(17,36,58,.32) 44%, rgba(12,124,109,.12)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.32) 0 2px, transparent 2px 34px),
    repeating-linear-gradient(90deg, rgba(12,124,109,.10) 0 2px, transparent 2px 42px),
    #dfe8ee;
}

.landing-hero__scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.20);
  backdrop-filter: blur(1px);
}

.landing-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: clamp(28px, 6vw, 72px);
  color: #fff;
}

.landing-hero__copy .eyebrow,
.landing-hero__copy .hero-text {
  color: rgba(255,255,255,.86);
}

.landing-hero__copy h1 {
  margin: 0;
  max-width: 13ch;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(48px, 8vw, 92px);
  line-height: .92;
  letter-spacing: -0.045em;
}

.landing-hero__tagline {
  margin: 18px 0 8px;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  color: #fff;
}

.landing-hero__copy .hero-actions button {
  box-shadow: 0 14px 32px rgba(0,0,0,.18);
}

.landing-hero__copy .secondary-btn,
.landing-hero__copy .ghost-btn {
  background: rgba(255,255,255,.94);
}

.scene-doc,
.scene-route {
  position: absolute;
  z-index: 1;
}

.scene-doc {
  width: min(250px, 24vw);
  min-height: 330px;
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 26px 60px rgba(12,28,45,.26);
  padding: 26px;
}

.scene-doc span {
  display: block;
  height: 10px;
  margin-bottom: 14px;
  border-radius: 4px;
  background: #9fb1c2;
}

.scene-doc span:nth-child(2) { width: 74%; }
.scene-doc span:nth-child(3) { width: 88%; }
.scene-doc span:nth-child(4) { width: 62%; }

.scene-doc--source {
  right: 31%;
  top: 18%;
  transform: rotate(-3deg);
}

.scene-doc--translated {
  right: 8%;
  bottom: 12%;
  transform: rotate(2deg);
}

.scene-doc--translated strong,
.scene-doc--translated em {
  display: block;
  color: var(--accent-strong);
}

.scene-doc--translated strong {
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.scene-doc--translated em {
  margin-top: 28px;
  color: var(--gold);
  font-style: normal;
  font-weight: 800;
}

.scene-route {
  right: 22%;
  top: 55%;
  display: grid;
  gap: 8px;
  color: #fff;
  font-weight: 800;
}

.scene-route span {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(8,95,84,.76);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.landing-section-head {
  max-width: 780px;
}

.landing-section-head h2,
.landing-verification h2,
.landing-audience h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.landing-audience h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
}

.landing-workflow,
.landing-audiences,
.landing-verification,
.landing-auth-section {
  display: grid;
  gap: 22px;
  padding: clamp(28px, 5vw, 56px) 4px;
}

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

.landing-step,
.landing-audience,
.landing-verification,
.landing-qr-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 14px 34px rgba(14,30,48,.06);
}

.landing-step {
  padding: 22px;
  min-height: 230px;
}

.landing-step span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 900;
}

.landing-step h3,
.landing-audience h3 {
  margin: 0 0 10px;
}

.landing-step p,
.landing-audience p,
.landing-verification p,
.landing-benefits p {
  color: var(--muted);
  line-height: 1.55;
}

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

.landing-audience {
  padding: clamp(24px, 4vw, 42px);
}

.landing-audience ol {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding-left: 20px;
}

.landing-audience li {
  padding-left: 6px;
  line-height: 1.5;
}

.landing-benefits {
  display: grid;
  gap: 8px;
  margin-top: 26px;
}

.landing-benefits strong {
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}

.landing-verification {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .55fr);
  align-items: center;
  padding-inline: clamp(24px, 4vw, 42px);
}

.landing-qr-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
}

.landing-qr {
  display: grid;
  grid-template-columns: repeat(4, 24px);
  grid-template-rows: repeat(4, 24px);
  gap: 6px;
  padding: 14px;
  border: 8px solid #fff;
  background: #fff;
  box-shadow: 0 16px 32px rgba(17,36,58,.14);
}

.landing-qr span {
  background: var(--ink);
}

.landing-qr span:nth-child(2n),
.landing-qr span:nth-child(5),
.landing-qr span:nth-child(11) {
  background: #90a4b6;
}

.landing-auth-section {
  justify-items: center;
}

.landing-auth-section .landing-section-head {
  text-align: center;
}

.hero-copy {
  padding: 24px 8px 8px 4px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.topbar h1 {
  margin: 0 0 16px;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.96;
  max-width: 11ch;
}

.hero-text,
.subtitle,
.job-meta,
.notification-meta,
.metric-card span {
  color: var(--muted);
}

.hero-text {
  max-width: 66ch;
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.role-cards,
.metrics-row,
.language-grid,
.dashboard-grid,
.admin-columns {
  display: grid;
  gap: 16px;
}

.role-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 26px;
}

.feature-card,
.metric-card,
.card,
.auth-card,
.job-card,
.notification-card,
.simple-item {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.feature-card,
.metric-card {
  padding: 18px;
}

.feature-card h2,
.metric-card strong,
.section-head h2,
.auth-card h2 {
  margin: 0 0 8px;
}

.feature-card p,
.metric-card span,
.notification-card p,
.simple-item p,
.job-card p {
  margin-bottom: 0;
}

.metrics-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

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

.auth-panel {
  position: sticky;
  top: 24px;
}

.auth-card,
.card {
  padding: 22px;
}

.auth-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  padding: 4px;
  margin-bottom: 18px;
  background: rgba(17, 36, 58, 0.05);
  border-radius: 18px;
}

.auth-tab {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.auth-tab.is-active {
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(17, 36, 58, 0.08);
}

.demo-credentials {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 251, 253, 0.95), rgba(255, 255, 255, 0.9));
  margin: 18px 0;
}

.demo-credentials h3,
.panel h3,
.feature-card h2,
.auth-card h2,
.section-head h2 {
  font-size: 22px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: 0;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover {
  background: none;
  color: var(--ink);
  transform: none;
}

.forgot-password-row {
  margin-top: 0.25rem;
  text-align: center;
}

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

.lang-pair-row,
.lang-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.lang-pair-row select,
.lang-row select {
  flex: 1;
}

.lang-pair-row .danger-btn,
.lang-row .danger-btn {
  padding: 4px 10px;
  font-size: 12px;
  flex: 0 0 auto;
}

.field-label {
  color: var(--muted);
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

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

.phone-input-row {
  display: flex;
  gap: 8px;
}

.phone-input-row .phone-dial-select {
  flex: 0 0 115px;
  width: 115px;
  min-width: 0;
}

.phone-input-row .phone-number-input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
}

.password-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.password-input-row input {
  flex: 1 1 0;
  min-width: 0;
}

.password-toggle-btn {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.password-toggle-btn:hover {
  border-color: var(--accent);
  background: #fff;
}

.field span {
  color: var(--muted);
  font-size: 14px;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
}

.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 36px 12px 14px;
  background: rgba(255, 255, 255, 0.98) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2361748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(12, 124, 109, 0.55);
  box-shadow: 0 0 0 4px rgba(12, 124, 109, 0.12);
}

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

.role-choice {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-weight: 700;
}

.role-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.role-choice:has(input:checked) {
  border-color: rgba(12, 124, 109, 0.48);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.topbar h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.topbar-brand {
  font-size: 1.5rem;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 2px;
  color: var(--ink);
}

.dashboard-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  align-items: center;
}

.dashboard-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.dashboard-tab:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--line);
}

.dashboard-tab.is-active {
  background: linear-gradient(135deg, var(--accent), #1c9989);
  color: #fff;
  box-shadow: 0 12px 26px rgba(12, 124, 109, 0.18);
}

.tab-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: rgba(17, 36, 58, 0.08);
  font-size: 14px;
  font-weight: 800;
}

.dashboard-tab.is-active .tab-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.tab-money {
  display: inline-grid;
  min-width: 64px;
  height: 30px;
  padding: 0 10px;
  place-items: center;
  border-radius: 999px;
  background: rgba(12, 124, 109, 0.1);
  color: #0c7c6d;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-tab.is-active .tab-money {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.tab-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e53e3e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.dashboard-tab.is-active .tab-badge {
  background: rgba(255, 255, 255, 0.9);
  color: #0c7c6d;
}

.dashboard-panels {
  display: grid;
  gap: 18px;
}

.panel {
  min-height: 320px;
}

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

#admin-editing-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#admin-editing-banner .secondary-btn {
  white-space: nowrap;
}

.jobs-list,
.notifications-list,
.simple-list {
  display: grid;
  gap: 12px;
}

.data-table-shell {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 251, 253, 0.98), rgba(255, 255, 255, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.data-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

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

.activity-toolbar .field {
  margin: 0;
}

.activity-table {
  min-width: 1180px;
}

.ledger-table {
  min-width: 920px;
}

.ledger-amount {
  font-weight: 650;
  white-space: nowrap;
}

.ledger-amount--positive {
  color: #0f766e;
}

.ledger-amount--negative {
  color: #b42318;
}

.lab-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.lab-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.lab-selected-summary {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--bg);
}

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

.lab-control-grid .field {
  margin: 0;
}

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

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

.lab-table-shell .data-table,
.lab-version-shell .data-table {
  min-width: 780px;
}

.lab-jobs-table tr.is-selected td {
  background: rgba(15, 118, 110, 0.08);
}

@media (max-width: 980px) {
  .lab-layout {
    grid-template-columns: 1fr;
  }
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(17, 36, 58, 0.08);
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(241, 247, 250, 0.96);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.data-table tbody tr:hover {
  background: rgba(12, 124, 109, 0.05);
}

.data-table tbody tr.new-job-row {
  background: linear-gradient(90deg, rgba(12, 124, 109, 0.14), rgba(12, 124, 109, 0.04));
}

.sort-btn {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  box-shadow: none;
}

.sort-btn:hover {
  background: transparent;
  color: var(--accent-strong);
  transform: none;
}

.table-primary {
  font-weight: 700;
}

.table-secondary,
.table-message {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(12, 124, 109, 0.1);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.claim-countdown {
  margin-top: 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.claim-countdown.is-expired {
  background: #fee2e2;
  color: #991b1b;
}

.preview-cell {
  width: 112px;
  position: relative;
}

.job-thumb {
  width: 84px;
  height: 112px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 36, 58, 0.08);
  position: relative;
  z-index: 1;
  cursor: zoom-in;
}

/* Expanded preview — absolutely positioned clone shown on hover */
.job-thumb-expanded {
  display: none;
  position: fixed;
  width: 300px;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 20px 60px rgba(17, 36, 58, 0.3);
  z-index: 9999;
  pointer-events: none;
}

.job-thumb-expanded img,
.job-thumb-expanded iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
}

.job-thumb-image,
.job-thumb-frame,
.job-thumb-canvas {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
  pointer-events: none;
}

.job-thumb-image {
  object-fit: contain;
}

.job-thumb-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f8fbff, #edf5f7);
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.job-card,
.notification-card,
.simple-item {
  padding: 16px;
  background: linear-gradient(180deg, rgba(248, 251, 253, 0.95), rgba(255, 255, 255, 0.95));
}

.jobs-table tr.job-row--active-claim td {
  background: #ecfdf5;
}

.jobs-table tr.job-row--active-claim td:first-child {
  box-shadow: inset 4px 0 0 var(--accent);
}

.jobs-table tr.job-row--claim-blocked { cursor: not-allowed; }

.jobs-table tr.job-row--claim-blocked td {
  color: #94a3b8;
}

.jobs-table tr.job-row--claim-blocked .job-thumb,
.jobs-table tr.job-row--claim-blocked .table-primary,
.jobs-table tr.job-row--claim-blocked .table-secondary,
.jobs-table tr.job-row--claim-blocked .job-actions {
  opacity: 0.48;
  filter: grayscale(0.25);
}

.translator-access-lock {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  padding: 18px;
}

.translator-access-lock strong {
  display: block;
  color: #334155;
  font-size: 1rem;
  margin-bottom: 6px;
}

.translator-access-lock p {
  margin: 0 0 12px;
  max-width: 680px;
}

.claim-lock-floating-tooltip {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  width: max-content;
  max-width: min(420px, 70vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  white-space: normal;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.claim-lock-floating-tooltip.is-visible {
  opacity: 1;
}

.job-meta,
.notification-meta {
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
}

.pill.status-completed {
  background: #dcfce7;
  color: #166534;
}

.pill.status-claimed,
.pill.status-in_progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.pill.status-submitted,
.pill.status-claim_expired {
  background: #fef3c7;
  color: #92400e;
}

.pill.status-pending_payment {
  background: #ede9fe;
  color: #5b21b6;
}

.pill.status-processing_failed {
  background: #fee2e2;
  color: #991b1b;
}

.status {
  min-height: 20px;
  margin-bottom: 0;
  color: var(--accent-strong);
}

.status.error {
  color: #b42318;
}

.page-limit-warning {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.875rem;
  margin-top: 8px;
}

.drop-zone {
  border: 2px dashed rgba(12, 124, 109, 0.45);
  border-radius: 20px;
  min-height: 132px;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-align: center;
  padding: 18px;
  color: #0f5c57;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.95), rgba(236, 253, 245, 0.62));
}

.drop-zone.is-dragover {
  border-color: var(--accent);
  background: #dff8f4;
}

.drop-zone input {
  display: none;
}

.upload-pages-panel {
  display: grid;
  gap: 14px;
}

.section-head.compact {
  margin-bottom: 0;
}

.section-head.compact h3 {
  margin: 0;
}

.upload-pages-list {
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  align-items: flex-start;
}

.upload-page-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  width: 220px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.upload-page-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(15, 92, 87, 0.12);
}

.upload-page-card.is-dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.upload-page-card.is-drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 92, 87, 0.2);
}

.upload-page-thumb {
  aspect-ratio: 0.707;
  border-radius: 8px;
  overflow: hidden;
  background: #edf5f3;
  border: 1px solid rgba(15, 92, 87, 0.1);
  width: 100%;
}

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

.upload-page-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.upload-page-meta strong,
.upload-page-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.upload-page-meta span {
  color: var(--muted);
}

.upload-page-actions {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  justify-content: center;
}

.upload-page-actions .secondary-btn,
.upload-page-actions .danger-btn {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 8px;
  flex: 1;
}

.job-progress-bar {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 2px 0 4px;
}

.job-progress-track {
  width: 100%;
  height: 6px;
  background: var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}

.job-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.28s ease-out;
}

.job-progress-label {
  font-size: 13px;
  color: var(--muted);
}

.processing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f5c57;
  font-weight: 600;
}

.job-assign-select {
  min-width: 180px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
}

.danger-btn {
  background: #fff1f2;
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.18);
}

.danger-btn:hover {
  background: #ffe4e6;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #a7f3d0;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.approve-user-btn {
  margin-top: 12px;
}

.app-layout.is-hidden,
.landing-shell.is-hidden,
.processing-indicator.is-hidden,
.is-hidden {
  display: none;
}

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

@media (max-width: 1180px) {
  .hero-grid,
  .admin-columns,
  .role-cards,
  .metrics-row,
  .landing-steps,
  .landing-audiences,
  .landing-verification {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    position: static;
  }

  .scene-doc--source {
    right: 26%;
  }

  .scene-route {
    right: 16%;
  }
}

@media (max-width: 760px) {
  .site-shell {
    padding: 16px;
  }

  .landing-nav,
  .topbar {
    flex-direction: column;
  }

  .role-choice-grid,
  .language-grid {
    grid-template-columns: 1fr;
  }

  .upload-pages-list {
    flex-wrap: wrap;
  }

  .upload-page-card {
    width: 160px;
  }

  .upload-page-actions {
    justify-content: flex-start;
  }

  .hero-copy h1 {
    max-width: 100%;
  }

  .landing-hero {
    min-height: 680px;
  }

  .landing-hero__copy {
    padding: 28px;
  }

  .landing-hero__copy h1 {
    max-width: 100%;
    font-size: clamp(42px, 14vw, 62px);
  }

  .landing-hero__scene {
    background-position: center;
  }

  .scene-doc,
  .scene-route {
    opacity: .22;
  }

  .scene-doc {
    width: 180px;
    min-height: 250px;
    padding: 18px;
  }

  .scene-doc--source {
    right: 46%;
    top: 18%;
  }

  .scene-doc--translated {
    right: -10%;
    bottom: 8%;
  }

  .scene-route {
    display: none;
  }

  .landing-step {
    min-height: auto;
  }

  .landing-verification {
    padding-inline: 18px;
  }
}

/* ── Settings panel ──────────────────────────────────────────────────────────── */

.settings-sections {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
  padding: 4px 0;
  align-items: start;
}

.settings-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}

.settings-section--profile {
  grid-column: 1;
  grid-row: 1;
}

.settings-section--earnings {
  grid-column: 1;
  grid-row: 2;
}

.settings-section--docs {
  grid-column: 2;
}

.settings-section--decl {
  grid-column: 2;
}

.settings-form {
  max-width: 100%;
}

.settings-section h3 {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.settings-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

.settings-section h4 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.settings-form {
  max-width: 480px;
}

.settings-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}

#settings-translator-section .settings-divider {
  margin: 16px 0 12px;
}

#settings-translator-section h4 {
  margin: 0 0 10px;
}

.field-readonly {
  background: var(--bg);
  color: var(--muted);
  cursor: default;
  border-color: var(--line) !important;
}

.settings-docs-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-docs-row {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
}

.settings-doc-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.settings-doc-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.settings-doc-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: underline;
}

.settings-doc-none {
  font-size: 13px;
  color: var(--muted);
}

.settings-doc-pdf-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--accent-strong);
  font-size: 13px;
}

.settings-doc-pdf-label {
  font-size: 12px;
  color: var(--muted);
}

.settings-doc-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.settings-doc-upload .field {
  margin-bottom: 0;
}

.settings-auth-section {
  margin-top: 4px;
}

.settings-auth-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
}

.settings-auth-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.settings-auth-entry {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

/* 3-column grid: thumbnail | fields | languages */
.settings-auth-entry-cols {
  display: grid;
  grid-template-columns: 20% 40% 1fr;
  gap: 0;
  align-items: stretch;
}

/* Column 1: thumbnail — fills full row height */
.settings-auth-thumb-col {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-right: 1px solid var(--line);
}

.settings-auth-thumb-link {
  display: block;
  flex: 1;
  min-height: 0;
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
}

.auth-thumb-canvas,
.auth-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.auth-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* Column 2: fields */
.settings-auth-fields-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
}

.settings-auth-fields-col .field {
  margin-bottom: 0;
}

.settings-auth-fields-col .field span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Column 3: languages */
.settings-auth-langs-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px 14px 12px;
}

.settings-auth-langs-col .settings-auth-pairs-rows {
  flex: 1;
}

.settings-auth-pairs-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.settings-auth-pairs-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Language selects inside auth entries match field input style */
.settings-auth-langs-col .lang-row {
  margin-bottom: 0;
  width: 100%;
}

.settings-auth-langs-col .auth-add-pair-btn {
  width: 100%;
}

.settings-auth-langs-col .lang-row select {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 36px 12px 14px;
  background: rgba(255,255,255,0.98) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2361748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--ink);
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.settings-auth-langs-col .lang-row select:focus {
  outline: none;
  border-color: rgba(12, 124, 109, 0.55);
  box-shadow: 0 0 0 4px rgba(12, 124, 109, 0.12);
}

/* Actions bar below the 3 columns */
.settings-auth-entry-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.settings-auth-add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.settings-auth-add-form .field {
  margin-bottom: 0;
}

.settings-auth-delete-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 10px;
  line-height: 1.4;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  margin-left: auto;
}

.settings-auth-delete-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.settings-auth-save-btn {
  align-self: flex-start;
}

.file-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.file-history-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.file-history-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
}

.file-history-add-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.file-history-add-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.file-history-entry {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.file-history-entry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s;
}

.file-history-entry-header:hover:not(.is-active) {
  background: var(--surface);
  filter: brightness(0.96);
}

.file-history-entry-header.is-active {
  background: var(--accent-soft);
}

.file-history-upload-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
}

.file-history-date {
  font-size: 12px;
  color: var(--muted);
}

.file-history-delete-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.file-history-delete-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
  transform: none;
}

.file-history-versions {
  display: flex;
  flex-direction: column;
}

.file-history-version {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}

.file-history-child {
  padding-left: 28px;
  cursor: pointer;
  position: relative;
}

.file-history-versions .file-history-child::before {
  content: "•";
  position: absolute;
  left: 12px;
  color: var(--muted);
  font-size: 12px;
}

.file-history-child:hover:not(.is-active) {
  background: var(--surface);
}

.file-history-version:last-child {
  border-bottom: none;
}

.file-history-version.is-active {
  background: var(--accent-soft);
}


.file-history-version-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.file-history-version-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.file-history-active-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.file-history-version-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.file-history-download-btn {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}

.decl-pair-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.decl-pair-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.decl-pair-arrow {
  font-size: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.decl-pair-select {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 32px 7px 12px;
  font-size: 13px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2361748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.decl-pair-select:focus {
  outline: none;
  border-color: rgba(12, 124, 109, 0.55);
  box-shadow: 0 0 0 4px rgba(12, 124, 109, 0.12);
}

.settings-declaration-hint {
  font-size: 12px;
  color: var(--muted);
  margin: -10px 0 14px;
}

.decl-formatting-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 0 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.decl-page-shell {
  background: #e0e4e8;
  border-radius: 8px;
  padding: 16px;
}

.decl-page-scroll {
  overflow: visible;
  display: flex;
  justify-content: center;
}

.decl-page {
  background: white;
  width: 210mm;
  padding: 12.7mm;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  /* zoom is set dynamically in JS to fit container width */
}

.decl-page-content {
  outline: none;
}

/* Toolbar shared styles (mirrors pdf-editor.css for use in settings) */
.decl-formatting-toolbar .tb-select {
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  outline: none;
}
.decl-formatting-toolbar .tb-select:focus { border-color: var(--accent); }
.decl-formatting-toolbar .tb-font-family { width: 110px; }
.decl-formatting-toolbar .tb-font-size  { width: 60px;  }
.decl-formatting-toolbar .tb-divider {
  width: 1px; height: 22px;
  background: var(--line);
  margin: 0 4px; flex-shrink: 0;
}
.decl-formatting-toolbar .tb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 7px;
  border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 400; cursor: pointer; line-height: 1;
  transition: background 0.1s, border-color 0.1s;
}
.decl-formatting-toolbar .tb-btn:hover { background: var(--bg); border-color: var(--line); }
.decl-formatting-toolbar .tb-btn.is-active { background: #def7f3; border-color: var(--accent); color: var(--accent-strong); }
.decl-formatting-toolbar .tb-btn svg { display: block; }
.decl-formatting-toolbar .tb-underline-btn { text-decoration: underline; }
.decl-formatting-toolbar .tb-strike-btn   { text-decoration: line-through; }
.decl-formatting-toolbar .tb-action-btn {
  font-size: 12px; font-weight: 600; padding: 0 10px;
  color: var(--accent-strong); border-color: var(--accent);
}
.decl-formatting-toolbar .tb-color-label {
  display: inline-flex; flex-direction: column; align-items: center;
  gap: 1px; padding: 3px 7px;
  border: 1px solid transparent; border-radius: 6px;
  cursor: pointer; position: relative; line-height: 1;
}
.decl-formatting-toolbar .tb-color-label:hover { background: var(--bg); border-color: var(--line); }
.decl-formatting-toolbar .tb-color-letter { font-size: 13px; font-weight: 700; color: var(--ink); display: block; }
.decl-formatting-toolbar .tb-color-bar   { display: block; width: 18px; height: 4px; border-radius: 2px; }
.decl-formatting-toolbar .tb-color-label input[type="color"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: none; padding: 0;
}

.settings-doc-box {
  border: 1px solid var(--accent);
  border-radius: 10px;
  overflow: hidden;
  background: var(--accent-soft);
}

.settings-doc-media {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-sizing: border-box;
}

.settings-doc-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-doc-box--id {
  background: #fff;
  position: relative;
  overflow: hidden;
}

.settings-doc-box--id .settings-doc-media {
  padding: 0;
}

.settings-doc-box--id .settings-doc-preview {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
}

.settings-doc-box--id .settings-doc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  cursor: pointer;
  display: block;
}

.settings-doc-box .crop-row {
  border-top: 1px solid rgba(12, 124, 109, 0.25);
  background: rgba(255,255,255,0.45);
  padding: 0;
  gap: 0;
}

.settings-doc-box .crop-btn {
  flex: 1;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 0;
  color: var(--accent-strong);
  cursor: pointer;
  transition: background 0.15s;
}

.settings-doc-box .crop-btn:first-child {
  border-bottom-left-radius: 9px;
}

.settings-doc-box .crop-btn:last-of-type {
  border-bottom-right-radius: 9px;
}

.settings-doc-box .crop-btn + .crop-btn {
  border-left: 1px solid rgba(12, 124, 109, 0.25);
}

.settings-doc-box .crop-btn:hover {
  background: rgba(12, 124, 109, 0.1);
}

.settings-doc-box .crop-actions {
  flex: 1;
  justify-content: center;
  padding: 5px 8px;
}

.crop-wrapper {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 4px;
}


.crop-selection {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  display: none;
  pointer-events: none;
  box-sizing: border-box;
}

.crop-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 2px;
  pointer-events: auto;
  box-sizing: border-box;
}

.crop-handle--nw { top: -1px;            left: -1px;           cursor: nw-resize; }
.crop-handle--n  { top: -1px;            left: calc(50% - 5px); cursor: n-resize;  }
.crop-handle--ne { top: -1px;            right: -1px;          cursor: ne-resize; }
.crop-handle--e  { top: calc(50% - 5px); right: -1px;          cursor: e-resize;  }
.crop-handle--se { bottom: -1px;         right: -1px;          cursor: se-resize; }
.crop-handle--s  { bottom: -1px;         left: calc(50% - 5px); cursor: s-resize;  }
.crop-handle--sw { bottom: -1px;         left: -1px;           cursor: sw-resize; }
.crop-handle--w  { top: calc(50% - 5px); left: -1px;           cursor: w-resize;  }

.crop-row {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 11;
}

.crop-btn {
  font-size: 12px;
  padding: 3px 10px;
}

.crop-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.threshold-actions {
  flex: 1;
}

.threshold-slider {
  flex: 1;
  min-width: 0;
  width: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.threshold-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  min-width: 24px;
  text-align: right;
}

.crop-actions .secondary-btn {
  font-size: 12px;
  padding: 3px 10px;
}

.settings-doc-img {
  max-width: 100%;
  max-height: 138px;
  object-fit: contain;
  display: block;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-box {
  background: #fff;
  border-radius: 10px;
  padding: 32px 36px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.modal-body {
  color: #444;
  margin-bottom: 16px;
}

.payment-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 14px;
}

.payment-summary-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.payment-summary-table td:first-child {
  color: #888;
  width: 140px;
}

.payment-source-choice {
  display: grid;
  gap: 8px;
  margin: -2px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.payment-source-choice label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.payment-source-choice .modal-note {
  margin: -2px 0 4px 24px;
}

.modal-note {
  font-size: 12px;
  color: #888;
  margin-bottom: 20px;
}

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

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

.original-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.original-file-row:first-child {
  border-top: 0;
}

.original-file-row > div {
  min-width: 0;
}

.payout-country-modal .field {
  margin-bottom: 18px;
}

.payout-country-modal select {
  width: 100%;
}

.revision-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 140px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  font: inherit;
  line-height: 1.4;
}

.payment-multilang-note {
  display: block;
  font-size: 12px;
  color: var(--gold);
  padding: 4px 0 2px;
}

.payment-lang-select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 30px 6px 10px;
  background: rgba(255,255,255,0.98) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2361748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-size: 14px;
}

.payment-lang-select:focus {
  outline: none;
  border-color: rgba(12, 124, 109, 0.55);
  box-shadow: 0 0 0 3px rgba(12, 124, 109, 0.12);
}

.payment-credit-note {
  min-height: 16px;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.payment-assign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.payment-assign-row--disabled {
  opacity: 0.45;
}

.payment-assign-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-assign-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.payment-assign-sub {
  font-size: 12px;
  color: var(--muted);
}

.pill-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.pill-toggle--disabled {
  cursor: not-allowed;
}

.pill-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.pill-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--line-strong);
  border-radius: 999px;
  transition: background 0.2s;
}

.pill-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.2s;
}

.pill-toggle input:checked + .pill-toggle-track {
  background: var(--accent);
}

.pill-toggle input:checked + .pill-toggle-track::after {
  transform: translateX(20px);
}

/* ── User detail modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.modal-overlay.is-hidden {
  display: none;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 720px;
  position: relative;
  padding: 2rem;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.25rem 0.5rem;
}

.modal-close-btn:hover { color: var(--ink); }

.user-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.user-detail-header h2 { margin: 0.25rem 0; }

.user-detail-section {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}

.user-detail-section h3 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.user-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem 1.5rem;
}

.user-detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-detail-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.user-detail-doc {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.user-detail-doc img {
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) / 2);
  background: #fff;
}

.simple-item--clickable {
  cursor: pointer;
  transition: background 0.15s;
}

.simple-item--clickable:hover { background: var(--bg); }

.translator-stats {
  display: flex;
  gap: 12px;
}

.translator-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(17, 36, 58, 0.04);
  border-radius: 12px;
  padding: 8px 16px;
  min-width: 110px;
}

.translator-stat.is-hidden {
  display: none;
}

.translator-stat--total {
  background: linear-gradient(135deg, var(--accent), #1c9989);
}

.translator-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.translator-stat--total .translator-stat-label {
  color: rgba(255,255,255,0.75);
}

.translator-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-top: 2px;
}

.translator-stat--total .translator-stat-value {
  color: #fff;
}

.translator-stat--clickable {
  cursor: pointer;
}

.translator-stat--clickable[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: 260px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #11243a;
  color: #fff;
  box-shadow: 0 12px 28px rgba(17, 36, 58, 0.18);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  text-transform: none;
}

.sub-tabs {
  display: inline-flex;
  gap: 4px;
  background: rgba(17, 36, 58, 0.06);
  border-radius: 12px;
  padding: 4px;
  margin: 4px 0 22px;
}

.sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  box-shadow: none;
  white-space: nowrap;
}

.sub-tab:hover {
  color: var(--text);
}

.sub-tab.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(17, 36, 58, 0.12);
}

.sub-tab-badge {
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.jobs-section-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.jobs-section-heading:first-child { margin-top: 0; }

.status-pending { color: #d97706; font-weight: 600; }
.status-active  { color: #16a34a; font-weight: 600; }

.admin-user-edit-form .field input,
.admin-user-edit-form .field select { width: 100%; }

.admin-user-edit-form .user-detail-section { margin-top: 1.5rem; }

.user-detail-form-footer {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-detail-form-footer button { margin: 0; }

.user-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.user-role-change {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-role-select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) / 2);
  font-size: 0.875rem;
  background: var(--card-solid);
  color: var(--ink);
}

/* ── Admin users table ──────────────────────────────────────────────── */
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  table-layout: auto;
}

.users-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
}

.users-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.users-table tbody tr:last-child td { border-bottom: none; }

.users-table tbody tr:hover td { background: var(--bg); }

.users-table-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: flex-end;
  white-space: nowrap;
}

.users-table-actions button {
  white-space: nowrap;
}

.money-adjust-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
}

.money-adjust-cell .secondary-btn {
  padding: 0.55rem 0.75rem;
}

.inline-select {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.8rem;
  background: var(--card-solid);
  color: var(--ink);
  cursor: pointer;
  max-width: 130px;
}

.inline-select--status option[value="pending"] { color: var(--muted); }
.inline-select--status option[value="active"]   { color: #16a34a; }
.inline-select--status option[value="suspended"]{ color: #dc2626; }

.delete-user-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: #dc2626;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.18s ease;
  transform: none;
}

.delete-user-btn:hover { border-color: #dc2626; }

.confirm-modal h3 { margin: 0 0 0.75rem; }
.confirm-modal p  { margin: 0 0 0.5rem; }

.claim-warning-modal {
  max-width: 460px;
}

.claim-warning-text {
  margin: 12px 0 0;
  border-left: 4px solid #dc2626;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
  line-height: 1.45;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.danger-confirm-btn {
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
}

.danger-confirm-btn:hover { background: #b91c1c; }

.delete-countdown-cell {
  background: #fff5f5;
  padding: 12px 16px !important;
}

.delete-countdown-msg {
  color: #dc2626;
  font-size: 0.875rem;
}

.delete-countdown-n {
  font-weight: 700;
  font-size: 1rem;
}

.delete-undo-btn {
  margin-left: 1rem;
  font-size: 0.8rem;
  padding: 6px 14px;
}

.earnings-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px;
  background: linear-gradient(135deg, #f0fdf9, #ffffff);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.earnings-balance {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.earnings-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.earnings-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

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

.earnings-note {
  width: 100%;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
