/* Alt er scopet til .sig-app, så det kan ligge inde i wp-admin uden at ramme andet. */
.sig-app {
  --bg: #f4f4f2;
  --panel: #ffffff;
  --text: #161616;
  --muted: #6d6d6d;
  --line: #e2e2df;
  --accent: #161616;
  --accent-text: #ffffff;
  --ok: #1f7a3a;
  --err: #b3261e;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

  font: 15px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  padding: 0 20px 40px;
  margin: 0 -20px;

  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }

  .sec { font: 600 13px/1.4 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; padding: 0; }
  code, kbd { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: #f0f0ee; padding: 1px 5px; border-radius: 4px; }

  .top {
    max-width: 1160px; margin: 0 auto; padding: 28px 0 20px;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  }
  .brand-name { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
  .brand-sub { display: block; color: var(--muted); font-size: 14px; }
  .tpl-picker { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
  .tpl-picker select { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }

  .layout {
    max-width: 1160px; margin: 0 auto;
    display: grid; gap: 20px;
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    grid-template-areas: "form preview" "copy preview" "guide preview";
    align-items: start;
  }
  .form-panel { grid-area: form; }
  .preview-panel { grid-area: preview; position: sticky; top: 52px; }
  .copy-panel { grid-area: copy; }
  .guide-panel { grid-area: guide; }
  @media (max-width: 960px) {
    .layout { grid-template-columns: 1fr; grid-template-areas: "form" "preview" "copy" "guide"; }
    .preview-panel { position: static; }
  }

  .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

  .field { display: block; margin-bottom: 14px; }
  .field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
  .field input:not([type=checkbox]) {
    width: 100%; max-width: none; min-height: 0; font: inherit; line-height: 1.4; padding: 9px 11px;
    border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); box-shadow: none;
  }
  .field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--line); box-shadow: none; }
  .field small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
  .field-check { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
  .field-check > span { margin: 0; color: var(--text); font-size: 14px; }

  .preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
  .preview-head .sec { margin: 0; }
  .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
  .seg button { font: 13px var(--font); padding: 5px 14px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
  .seg button.is-active { background: var(--accent); color: var(--accent-text); }

  .preview-frame { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; transition: background .2s; }
  .preview-frame.is-dark { background: #1c1c1e; border-color: #3a3a3c; }
  .preview-frame iframe { display: block; width: 100%; height: 900px; border: 0; }

  .note { font-size: 13px; color: var(--err); margin: 12px 0 0; }

  .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
  .btn {
    font: 14px/1 var(--font); padding: 11px 16px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--line); background: #fff; color: var(--text);
  }
  .btn:hover { border-color: #bdbdb9; }
  .btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
  .btn.primary:hover { background: #333; }
  .hint { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
  .toast { font-size: 13px; color: var(--ok); margin: 8px 0 0; }
  .toast.is-error { color: var(--err); }
  .code summary { font-size: 13px; color: var(--muted); cursor: pointer; margin-top: 8px; }
  .code textarea {
    width: 100%; height: 220px; margin-top: 8px; padding: 10px;
    font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
    border: 1px solid var(--line); border-radius: 7px; background: #fafaf8; color: var(--text); resize: vertical;
  }

  .guide-panel details { border-top: 1px solid var(--line); padding: 10px 0; }
  .guide-panel details:first-of-type { border-top: 0; }
  .guide-panel summary { cursor: pointer; font-weight: 600; font-size: 14px; }
  .guide-panel ol { margin: 8px 0 4px; padding-left: 20px; font-size: 14px; list-style: decimal; }
  .guide-panel li { margin-bottom: 4px; }
  .small { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

  .foot { max-width: 1160px; margin: 24px auto 0; font-size: 12px; color: var(--muted); }
}

/* ---------- tilføjelser til tjenesten (landing, generator, admin) ---------- */
body { margin: 0; background: #f4f4f2; }
.sig-app {
  margin: 0; padding: 0 20px 40px;

  .layout-one { max-width: 720px; margin: 0 auto; }
  .error-box { max-width: 1160px; margin: 0 auto 20px; padding: 14px 16px; background: #fdecea; color: var(--err); border-radius: var(--radius); font-size: 14px; }
  .linkbtn { font: inherit; color: var(--text); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
  .small-top { margin-top: 6px; }
  .btn.small { padding: 7px 11px; font-size: 13px; }
  .btn.danger { color: var(--err); border-color: #e9c4c1; }
  .btn:disabled { opacity: .5; cursor: default; }
  .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .row.between { justify-content: space-between; }
  .grow { flex: 1 1 auto; }

  /* admin */
  .admin-layout { max-width: 1160px; margin: 0 auto; display: grid; gap: 20px; grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
  @media (max-width: 960px) { .admin-layout { grid-template-columns: 1fr; } }
  .company-list { list-style: none; margin: 0; padding: 0; }
  .company-list li { border-top: 1px solid var(--line); }
  .company-list li:first-child { border-top: 0; }
  .company-list button { width: 100%; text-align: left; font: inherit; background: none; border: 0; padding: 10px 6px; cursor: pointer; border-radius: 6px; color: var(--text); }
  .company-list button:hover { background: #f4f4f2; }
  .company-list button.is-active { background: var(--accent); color: var(--accent-text); }
  .company-list small { display: block; color: inherit; opacity: .7; font-size: 12px; }
  .editor h3 { font-size: 15px; margin: 22px 0 10px; }
  .editor h3:first-of-type { margin-top: 0; }
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  @media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
  .field select, .field textarea { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); }
  .field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
  .repeat { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
  .repeat input { flex: 1 1 auto; min-width: 0; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; }
  .repeat .btn { flex: 0 0 auto; }
  .img-box { display: flex; gap: 16px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; }
  .img-box .thumb { width: 120px; min-height: 60px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/16px 16px; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .img-box .thumb img { max-width: 120px; max-height: 160px; display: block; }
  .img-box .meta { font-size: 13px; color: var(--muted); }
  .img-box .meta strong { color: var(--text); }
  .img-box input[type=file] { font-size: 13px; }
  .admin-preview { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
  .admin-preview iframe { display: block; width: 100%; height: 520px; border: 0; }
  .sticky { position: sticky; top: 20px; }
  .status { font-size: 13px; color: var(--muted); min-height: 1.5em; }
  .status.is-error { color: var(--err); }
  .status.is-ok { color: var(--ok); }
  .login { max-width: 380px; margin: 60px auto; }
  .login .field input { width: 100%; }
  .layout-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .layout-cards label { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; font-size: 13px; }
  .layout-cards label.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .layout-cards label strong { display: block; font-size: 14px; margin-bottom: 2px; }
  .layout-cards input { display: none; }
  .pub-link { font-size: 13px; }
  .pub-link code { user-select: all; }
}
