.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.locked-screen__card, .card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08); }
.locked-screen__card { max-width: 540px; width: 100%; }
.locked-screen__text { color: var(--muted); }
.content { max-width: 980px; margin: 0 auto; padding: 20px; }
.tabs,
.content-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
}

.tab,
.content-tabs__btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
}

.tab.active,
.content-tabs__btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
  background: transparent;
}
.screen { display: none; }
.screen[aria-hidden="false"] { display: block; }
.input { width: 100%; margin: 8px 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.btn { border: none; border-radius: 10px; padding: 10px 14px; background: var(--primary); color: #fff; cursor: pointer; }
.btn:hover { background: var(--primary-hover); }
.btn-ghost { background: var(--surface); color: var(--primary); border: 1px solid rgba(36, 125, 139, 0.35); }
.btn-ghost:hover { background: rgba(36, 125, 139, 0.08); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.requests-grid { display: grid; gap: 10px; }
.request-card {
  position: relative;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.request-card:hover {
  transform: translateY(-1px);
  border-color: rgba(36, 125, 139, 0.35);
  box-shadow: 0 8px 18px rgba(36, 125, 139, 0.12);
}
.request-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.request-id { font-size: 12px; color: var(--muted); }
.request-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: #991b1b;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.request-delete-btn:hover {
  background: rgba(226, 85, 108, 0.14);
  border-color: rgba(220, 38, 38, 0.35);
}
.request-title { margin: 0 0 6px; font-size: 16px; }
.request-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.request-meta__row {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.request-meta__label { display: inline; margin: 0; font-size: 12px; color: var(--muted); }
.request-meta__value { display: inline; font-size: 13px; color: var(--text); word-break: break-word; }
.request-error {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  background: rgba(239, 68, 68, 0.08);
  color: #991b1b;
  font-size: 13px;
}
.request-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.status-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status-badge_queued {
  background: var(--surface-disabled);
  color: var(--text);
}
.status-badge_running { background: rgba(234, 179, 8, 0.18); color: #854d0e; }
.status-badge_done { background: rgba(34, 197, 94, 0.18); color: #166534; }
.status-badge_failed {
  background: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}
.layout-grid { display: grid; grid-template-columns: 1.8fr 1fr; gap: 12px; align-items: start; }
.block-title { margin: 0 0 10px; font-weight: 700; }
.field-label { margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.mode-chip { border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer; overflow: hidden; position: relative; }
.mode-chip input { position: absolute; opacity: 0; pointer-events: none; }
.mode-chip span { display: block; padding: 6px 12px; font-size: 13px; }
.mode-chip input:checked + span { background: rgba(36,125,139,0.14); color: var(--primary); }
.mode-chip input:disabled + span { background: var(--surface-disabled); color: #94a3b8; cursor: not-allowed; }
.check-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 8px 0 12px; }
.pretty-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  width: fit-content;
}
.pretty-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pretty-check__box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
}
.pretty-check__box::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--surface);
  transform: scale(0);
  transition: transform 0.16s ease;
}
.pretty-check__text {
  font-size: 14px;
}
.pretty-check input:checked + .pretty-check__box {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 125, 139, 0.14);
}
.pretty-check input:checked + .pretty-check__box::after {
  transform: scale(1);
}
.pretty-check:hover .pretty-check__box {
  border-color: var(--primary);
}
.pretty-check input:focus-visible + .pretty-check__box {
  outline: 2px solid rgba(36, 125, 139, 0.35);
  outline-offset: 2px;
}
.summary-card { position: sticky; top: 20px; }
.summary-row { border-bottom: 1px solid var(--border); padding: 8px 0; }
.summary-row:last-child { border-bottom: 0; }
.summary-key { font-size: 12px; color: var(--muted); }
.summary-val { font-size: 14px; font-weight: 600; word-break: break-word; }
.form-error { margin: 8px 0 0; color: #b91c1c; min-height: 20px; font-size: 13px; }
.rubrics-picker { margin-top: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--surface-soft); }
.rubrics-picker__actions { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.rubrics-picker__count { font-size: 12px; color: var(--muted); margin-left: auto; }
.rubrics-picker__list { max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 8px; }
.rubric-row { padding: 6px 4px; border-bottom: 1px solid var(--border); }
.rubric-row:last-child { border-bottom: 0; }
.picker-dropdown {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  max-height: 220px;
  overflow: auto;
  margin-top: -2px;
}
.picker-option {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.picker-option:last-child { border-bottom: 0; }
.picker-option:hover { background: var(--primary-light); }
.selected-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(36, 125, 139, 0.12);
  color: var(--primary);
  font-size: 12px;
}
.selected-chip button {
  border: none;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 40;
}
.modal-overlay[aria-hidden="false"] { display: flex; }
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 30;
}
.modal[aria-hidden="false"] { display: flex; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
  padding: 14px;
}
.modal__panel_wide { max-width: 620px; }
.modal__title { margin: 0; font-size: 22px; }
.modal__actions { margin-top: 18px; display: flex; justify-content: flex-end; }
.modal-card {
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
}
.modal-card_sm { max-width: 480px; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
}
.modal-title { margin: 0; font-size: 16px; }
.modal-close {
  border: 1px solid var(--border);
  background: var(--surface);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
}
.modal-body { padding: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.modal-kv { margin: 0 0 8px; }
.modal-kv b { display: inline-block; min-width: 140px; }
.events-list { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.event-item { padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.event-item:last-child { border-bottom: 0; }
.request-details { display: grid; gap: 12px; }
.request-details__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.request-details__name { font-size: 16px; font-weight: 700; }
.request-details__panel { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface-soft); }
.request-details__section { border: 1px solid var(--border); border-radius: 10px; padding: 10px; background: var(--surface-soft); }
.request-details__title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.request-details__row { display: grid; grid-template-columns: 130px 1fr; gap: 8px; padding: 4px 0; }
.request-details__label { font-size: 12px; color: var(--muted); }
.request-details__value { font-size: 13px; color: var(--text); word-break: break-word; }
.request-details__error { color: #b91c1c; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.request-details__files { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.request-details__file { font-size: 13px; word-break: break-all; }
.request-details__result-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1f7f90 0%, #247d8b 55%, #2aa2b4 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(36, 125, 139, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.request-details__result-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(36, 125, 139, 0.28);
  filter: brightness(1.02);
}
.request-details__result-link:active { transform: translateY(0); }
.job-details {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.job-details__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}
.job-details__label { font-size: 12px; color: var(--muted); }
.job-details__value { font-size: 13px; color: var(--text); word-break: break-word; }
.job-details__logs-wrap { margin-top: 6px; }
.job-details__logs-title { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.job-logs {
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, 0.24);
  background: #0f172a;
  color: #e2e8f0;
  padding: 10px;
  max-height: 240px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.4;
}
.job-logs__empty {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}
.file-drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
.file-drop-zone:hover { border-color: var(--primary); background: var(--surface-hover); }
.file-drop-zone--drag,
.file-drop-zone--filled { border-color: var(--primary); background: var(--primary-light-strong); }
.file-drop-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-drop-zone__text { font-size: 13px; color: var(--muted); text-align: center; }
.file-drop-zone__name { display: none; font-size: 13px; font-weight: 600; text-align: center; word-break: break-all; }
.file-drop-zone__clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}
.file-drop-zone--filled .file-drop-zone__text { display: none; }
.file-drop-zone--filled .file-drop-zone__name { display: block; }
.file-drop-zone--filled .file-drop-zone__clear { display: inline-flex; }
@media (max-width: 760px) { .actions { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .layout-grid { grid-template-columns: 1fr; } .summary-card { position: static; } }
@media (max-width: 620px) { .request-details__row { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .modal__panel { padding: 20px 16px; }
  .request-meta { gap: 6px 10px; }
  .job-details__row { grid-template-columns: 1fr; gap: 4px; }
}
