/* generator.css – shared styles for the e-mail generator pages */
  :root {
    --bg: #f6f7f9;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #e5e7eb;
    --output-bg: #f9fafb;
  }
  * { box-sizing: border-box; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 32px 16px;
    line-height: 1.5;
  }
  .container {
    max-width: 760px;
    margin: 0 auto;
  }
  h1 {
    font-size: 24px;
    margin: 0 0 4px 0;
  }
  .subtitle {
    color: var(--muted);
    margin: 0 0 24px 0;
    font-size: 14px;
  }
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  }
  .form-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
  }
  .gender-toggle {
    display: inline-flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
  }
  .gender-btn {
    padding: 7px 18px;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    background: transparent;
    color: var(--muted);
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  }
  .gender-btn.active {
    background: var(--card);
    color: var(--text);
    box-shadow: 0 0 0 1px var(--border);
  }
  label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
  }
  .hint {
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
    margin-left: 6px;
  }
  input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
  }
  input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  }
  .buttons {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
  }
  button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
  }
  .btn-primary {
    background: var(--accent);
    color: white;
  }
  .btn-primary:hover {
    background: var(--accent-hover);
  }
  .btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
  }
  .btn-secondary:hover {
    background: var(--bg);
  }
  .output {
    background: var(--output-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13.5px;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 200px;
    line-height: 1.6;
  }
  .output.empty {
    color: var(--muted);
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 10px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
  }
  .recipient-line {
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
    padding-left: 6ch;
    text-indent: -6ch;
  }
  .attach-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.45;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 4px 0 16px;
    background: rgba(37, 99, 235, 0.06);
    border-left: 4px solid var(--accent);
    color: #1f2937;
  }
  .attach-note .icon {
    font-size: 18px;
    line-height: 1.3;
  }
  .attach-note.required {
    background: rgba(217, 119, 6, 0.08);
    border-left-color: #d97706;
  }
  .recipient-note {
    font-size: 12px;
    color: #6b7280;
    margin: 12px 0 0;
    display: flex;
    gap: 6px;
    align-items: flex-start;
  }
  .recipient-note .rn-list {
    display: flex;
    flex-direction: column;
  }
  .subject-line {
    font-weight: 700;
    display: block;
    margin-bottom: 12px;
  }
  .toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #111827;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    transition: transform 0.2s;
    pointer-events: none;
  }
  .toast.show {
    transform: translateX(-50%) translateY(0);
  }
  .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
    transition: color 0.15s;
  }
  .back-link:hover { color: var(--accent); }
  .field-hint {
    font-size: 12px;
    color: var(--muted);
    margin: -2px 0 8px;
  }

  /* --- shared additions (fields used by some pages) --- */
  .field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
  }
  input.invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  }
  button:focus-visible, input[type="radio"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
  }
  .radio-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 0;
    cursor: pointer;
  }
  .radio-opt input {
    margin: 0;
    flex-shrink: 0;
  }
  .gps-row {
    display: flex;
    gap: 8px;
  }
  .gps-row input {
    flex: 1;
  }
  .btn-locate {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .btn-locate:disabled {
    opacity: 0.6;
    cursor: wait;
  }
  #map {
    height: 220px;
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    z-index: 0;
  }
  .map-hint {
    font-size: 12px;
    color: var(--muted);
    margin: 6px 0 0;
  }

.btn-report {
  margin-top: 10px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.85rem;
  color: #666;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
}
.btn-report:hover:not(:disabled) { background: #f3f3f3; color: #222; }
.btn-report:disabled { opacity: 0.6; cursor: default; }
