:root {
  --bg: #ffffff;
  --card: #f5f5f5;
  --muted: #555555;
  --accent: #ee7d0c;
  --glass: rgba(0, 0, 0, 0.05);
  --error: #dc3545;
  --success: #28a745;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: #000000;
  min-height: 100vh;
  padding: 28px;
}

.container {
  max-width: 920px;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

h1 {
  margin: 0 0 12px 0;
  font-size: 20px;
}

p.lead {
  color: var(--muted);
  margin: 0 0 16px 0;
}

button {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
  font-family: inherit;
  font-size: 14px;
}

button:hover:not(:disabled) {
  opacity: 0.9;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.ghost {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-weight: 500;
}

button.ghost:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.05);
}

button.loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1000;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  color: #000000;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-wide {
  max-width: 720px;
}

.modal h2 {
  margin: 0 0 6px 0;
  font-size: 18px;
}

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

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #000000;
}

.required {
  color: var(--error);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #ffffff;
  color: #000000;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  resize: vertical;
}

.form-group textarea {
  min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--error);
}

.error-msg {
  display: block;
  color: var(--error);
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

.checkbox-group {
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  cursor: pointer;
}

.checkbox-label span {
  font-size: 14px;
}

.controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
}

.controls p {
  margin: 0;
  display: flex;
  align-self: center;
}

.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.domain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 20px;
}

.tag {
  background: var(--glass);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

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

.credentials-notice {
  padding: 12px;
  background: rgba(238, 125, 12, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(238, 125, 12, 0.2);
}

.form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.form-row input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #ffffff;
  color: #000000;
  font-size: 14px;
  font-family: inherit;
}

.form-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.cred-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cred-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cred-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.summary-item {
  padding: 12px;
  background: var(--card);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.summary-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.summary-item .small {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.result-links-list {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.result-links-list p {
  margin: 8px 0;
  font-size: 14px;
}

.result-links-list p.success {
  color: var(--success);
}

.result-links-list p.error {
  color: var(--error);
}

.result-links-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.result-links-list a:hover {
  text-decoration: underline;
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 2000;
  min-width: 320px;
  max-width: 420px;
  transform: translateX(calc(100% + 40px));
  transition: transform 0.3s ease-out;
}

.notification.show {
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notification-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--success);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
}

.notification-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-text strong {
  font-size: 14px;
  color: #000000;
}

.notification-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
}

.notification-link:hover {
  text-decoration: underline;
}

.notification-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-close:hover {
  color: #000000;
  opacity: 1;
}