* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background: #fbf6e7;
  color: #0a1f12;
  min-height: 100vh;
}

/* ─── Login ─────────────────────────────────────────── */
.login-bg {
  background: linear-gradient(135deg, #0f3d23 0%, #1d5e3a 100%);
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
}
.login-box {
  background: #fbf6e7; padding: 48px; border-radius: 16px; min-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-box h2 { margin-bottom: 24px; color: #0f3d23; font-weight: 600; }
.logo {
  font-family: "Fraunces", "Georgia", serif; font-size: 32px; font-weight: 800; color: #1d5e3a;
  margin-bottom: 8px;
}
.logo span { font-style: italic; color: #f5b400; }
.login-box input {
  display: block; width: 100%; padding: 14px 16px; margin-bottom: 12px;
  border: 2px solid #e5e0c8; border-radius: 8px; font-size: 15px; background: white;
}
.login-box input:focus { outline: none; border-color: #1d5e3a; }
.login-box button {
  width: 100%; padding: 14px; background: #1d5e3a; color: white;
  border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: background 0.2s;
}
.login-box button:hover { background: #0f3d23; }
.error {
  background: #fee; color: #c00; padding: 10px; border-radius: 6px; margin-bottom: 16px; font-size: 14px;
}

/* ─── Nav ───────────────────────────────────────────── */
nav {
  background: #0f3d23; color: white; padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
nav .logo { color: white; font-size: 20px; margin-bottom: 0; }
nav .logo span { color: #f5b400; }
.nav-links a {
  color: rgba(255,255,255,0.75); text-decoration: none; margin-left: 24px;
  font-size: 14px; font-weight: 500;
}
.nav-links a.active, .nav-links a:hover { color: white; }

/* ─── Container ─────────────────────────────────────── */
.container { max-width: 980px; margin: 32px auto; padding: 0 24px; }
h1 { margin-bottom: 24px; color: #0f3d23; font-family: "Fraunces", serif; font-weight: 700; font-size: 32px; }
h3 { color: #1d5e3a; margin-bottom: 12px; font-size: 18px; }
h4 { color: #0a1f12; margin: 16px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── Cards ─────────────────────────────────────────── */
.card {
  background: white; padding: 24px; border-radius: 12px; margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04); border: 1px solid #e5e0c8;
}
.hint { color: #777; font-size: 13px; margin-bottom: 12px; }

/* ─── Buttons ───────────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-danger, .btn-mini {
  padding: 12px 24px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.btn-primary { background: #1d5e3a; color: white; }
.btn-primary:hover { background: #0f3d23; }
.btn-secondary { background: #f5efd8; color: #0f3d23; border: 1px solid #e5e0c8; }
.btn-secondary:hover { background: #ebe5cd; }
.btn-danger { background: #c0392b; color: white; }
.btn-danger:hover { background: #a03020; }
.btn-mini { padding: 6px 12px; font-size: 12px; }

/* ─── Forms ─────────────────────────────────────────── */
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  padding: 10px 14px; border: 1px solid #e5e0c8; border-radius: 6px;
  font-size: 14px; font-family: inherit; background: white; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #1d5e3a; }
label { display: inline-flex; align-items: center; gap: 8px; }
textarea { resize: vertical; min-height: 80px; }

/* ─── Upload section ────────────────────────────────── */
.upload-section { display: flex; gap: 12px; align-items: center; }
.upload-section select { flex: 1; }

/* ─── Settings grid ─────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.settings-grid div { padding: 8px 12px; background: #f5efd8; border-radius: 6px; font-size: 13px; }
.link { color: #1d5e3a; font-size: 13px; }

/* ─── Launch ────────────────────────────────────────── */
.launch-section { display: flex; gap: 12px; }
.btn-primary { font-size: 18px; padding: 16px 32px; }

/* ─── Progress ──────────────────────────────────────── */
.progress-card { border-left: 4px solid #1d5e3a; }
.progress-stats { display: flex; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { color: #777; font-size: 12px; text-transform: uppercase; }
.badge {
  padding: 4px 12px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: #f5efd8; color: #0f3d23;
}
.badge-running { background: #d4f4dd; color: #1d5e3a; }
.badge-completed { background: #c4e8ce; color: #0f3d23; }
.badge-paused { background: #fff3cd; color: #856404; }
.badge-error { background: #fee; color: #c00; }
.progress-bar { width: 100%; height: 10px; background: #f5efd8; border-radius: 6px; overflow: hidden; margin-bottom: 16px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #1d5e3a, #a3d9b8); transition: width 0.3s; width: 0%; }
.log-output {
  background: #0a1f12; color: #a3d9b8; padding: 16px; border-radius: 8px;
  font-family: "Menlo", "Monaco", monospace; font-size: 12px; max-height: 280px; overflow-y: auto;
}
.log-output div { margin-bottom: 2px; }

/* ─── Server cards ──────────────────────────────────── */
.smtp-server {
  background: #f5efd8; padding: 16px; border-radius: 8px; margin-bottom: 12px;
}
.server-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.server-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ─── Variants ──────────────────────────────────────── */
.variant-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.variant-row input, .variant-row textarea { flex: 1; }

.actions { display: flex; gap: 16px; align-items: center; margin-top: 24px; }
#save-status { color: #1d5e3a; font-weight: 600; }
