#root {
  width: 100%;
  min-height: 100vh;
}

.auth-screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.locked-screen__card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.locked-screen__title {
  margin: 0 0 12px;
  font-size: 24px;
}

.content {
  max-width: var(--app-max-width);
  margin: 0 auto;
  padding: 24px 20px;
}

.content-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

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

.content-tabs__btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.screen {
  display: none;
}

.screen[aria-hidden="false"] {
  display: block;
}

.wizard {
  padding: 18px 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.wizard-header {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.wizard-step-title {
  font-size: 17px;
  font-weight: 600;
}

.quota-card {
  margin-top: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 10px 12px;
}

.quota-card_compact {
  margin: 0;
  width: 280px;
  flex: 0 0 280px;
}

.quota-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
}

.quota-bar {
  margin-top: 8px;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-disabled);
  overflow: hidden;
}

.quota-bar > span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.quota-card__meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin: 10px 0 6px;
}

.field-input,
.field-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
}

.field-input:focus,
.field-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.field-input:disabled,
.field-textarea:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.field-input:disabled,
.field-textarea:disabled {
  background: var(--surface-disabled);
}

.payload-file-hint {
  margin: 6px 0 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.file-drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 98px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 14px 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--disabled,
.file-drop-zone--disabled:hover {
  cursor: not-allowed;
  opacity: 0.62;
  border-color: var(--border);
  background: var(--surface-disabled);
}

.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: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.file-drop-zone__text {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.file-drop-zone__name {
  display: none;
  font-size: 13px;
  color: var(--text);
  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 rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.file-drop-zone--filled .file-drop-zone__text {
  display: none;
}

.file-drop-zone--filled .file-drop-zone__name,
.file-drop-zone--filled .file-drop-zone__clear {
  display: inline-flex;
}

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

.actions-row {
  margin-top: 16px;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.requests-grid {
  display: grid;
  gap: 10px;
}

.job-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface);
}

.request-card {
  position: relative;
  padding: 12px 44px 12px 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(--text-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(--text-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;
}

.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.18);
  color: #991b1b;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 18px;
  background: var(--surface-soft);
}

.empty-state__text {
  margin: 0;
  color: var(--text-muted);
}

.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: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
}

.modal__panel_wide {
  max-width: 620px;
}

.modal__title {
  margin: 0;
  font-size: 22px;
}

.modal_error .modal__title {
  color: #991b1b;
}

.modal__text {
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal__actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.modal__actions_between {
  justify-content: space-between;
}

.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(--text-muted);
}

.job-details__value {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}

.job-details__value a {
  color: var(--primary);
  text-decoration: none;
}

.job-details__logs-wrap {
  margin-top: 6px;
}

.job-details__logs-title {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-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(--text-muted);
  font-size: 12px;
}

.job-item a {
  color: var(--primary);
  text-decoration: none;
  margin-left: 8px;
}

.muted {
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 768px) {
  .wizard-header {
    flex-direction: column;
  }

  .quota-card_compact {
    width: 100%;
    flex: 1 1 auto;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 18px 14px;
  }

  .modal__panel {
    padding: 20px 16px;
  }

  .request-meta {
    gap: 6px 10px;
  }

  .job-details__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
