/* =========================================================
   Jegit – gemeinsames Design für Portal und alle Tool-Oberflächen
   Farben aus dem Shopify-Theme: Gold #96700F, Creme #F4EBE3, Text #282928
   Einbinden: <link rel="stylesheet" href="/portal/assets/jegit.css">
   ========================================================= */
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
             src: url("dm-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400; font-display: swap;
             src: url("playfair-display-italic-latin.woff2") format("woff2"); }

:root {
  --bg: #fbf7f3; --card: #fff; --ink: #282928; --text: #454645; --muted: #77716a; --line: #ece2d7;
  --accent: #96700f; --accent-ink: #fff; --accent-soft: rgba(150, 112, 15, .1); --cream: #f4ebe3;
  --ok: #3f6b2f; --ok-bg: #e7efdf; --warn: #b3261e; --warn-bg: #f8e4e1;
  --note-bg: #f4ebe3; --note-line: #e5d5c3; --err-bg: #fbeceb; --err-line: #f0c4be;
  --bar: #c9a44a; --media-bg: #efe6dc; --radius: 14px; --shadow: 0 6px 20px rgba(40, 41, 40, .08);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-highlight: "Playfair Display", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1f1e; --card: #282928; --ink: #f2ede7; --text: #d0d0d0; --muted: #a39d95; --line: #3b3c3b;
    --accent: #c9a44a; --accent-ink: #1e1f1e; --accent-soft: rgba(201, 164, 74, .15); --cream: #282928;
    --ok: #a9cf8f; --ok-bg: #2c3a25; --warn: #f0a090; --warn-bg: #3a2420;
    --note-bg: #322c20; --note-line: #4d4228; --err-bg: #3a2220; --err-line: #5c302b;
    --bar: #96700f; --media-bg: #323332; --shadow: 0 6px 20px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { overflow-x: hidden; font: 15px/1.5 var(--font); background: var(--bg); color: var(--text);
       min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-underline-offset: 3px; }
em.hl { font-family: var(--font-highlight); font-style: italic; font-weight: 400; color: var(--accent); }
h1, h2, h3 { color: var(--ink); font-weight: 500; letter-spacing: -.01em; }

/* ---------- Kopfzeile ---------- */
.jg-header { background: var(--cream); border-bottom: 1px solid var(--line); }
.jg-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between;
           padding: 14px 24px; max-width: 1400px; margin: 0 auto; }
.jg-brand { display: flex; align-items: center; gap: 14px; min-width: 0; color: inherit; text-decoration: none; }
.jg-brand img { width: 48px; height: 48px; flex: none; }
.jg-brand h1 { font-size: 1.5rem; line-height: 1.15; margin: 0; }
.jg-brand p { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.jg-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.jg-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.jg-nav a { color: var(--ink); text-decoration: none; padding: 5px 12px; border-radius: 40px; font-weight: 500; }
.jg-nav a:hover { background: var(--accent-soft); }
.jg-nav a.active { background: var(--accent); color: var(--accent-ink); }
.jg-badge { display: inline-block; min-width: 1.4em; padding: 0 6px; margin-left: 4px; border-radius: 40px;
            background: var(--warn); color: #fff; font-size: .75rem; text-align: center; font-weight: 600; }
.jg-user { color: var(--muted); padding: 0 4px; }

/* ---------- Grundbausteine ---------- */
.jg-main { flex: 1; width: 100%; padding: 0 24px 48px; max-width: 1400px; margin: 0 auto; }
.jg-main > h2:first-child, .jg-title { font-size: 1.7rem; margin: 28px 0 4px; }
.intro { color: var(--muted); font-size: .95rem; margin: 0; max-width: 72ch; }
.btn, button, select, input, textarea { font: inherit; border-radius: 40px; border: 1px solid var(--line);
  padding: 8px 16px; background: var(--card); color: var(--ink); }
textarea { border-radius: 14px; resize: vertical; }
.btn { display: inline-block; text-decoration: none; cursor: pointer; font-weight: 500; }
button { cursor: pointer; }
.btn:hover, button:hover:not(:disabled) { border-color: var(--accent); }
.btn.primary, button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
  font-weight: 600; letter-spacing: .02em; }
.btn.primary:hover, button.primary:hover:not(:disabled) { filter: brightness(.92); }
button.danger { color: var(--warn); }
button:disabled, .btn.disabled { opacity: .55; cursor: default; pointer-events: none; }
input:focus, select:focus, textarea:focus, button:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 40px; background: var(--card); border: 1px solid var(--line);
        font-size: .82rem; }
.pill:empty { display: none; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip { display: inline-block; background: var(--accent-soft); border: 0; border-radius: 40px; padding: 2px 9px;
        font-size: .78rem; color: var(--ink); }
.notice { margin: 14px 0; padding: 11px 16px; border-radius: var(--radius); background: var(--note-bg);
          border: 1px solid var(--note-line); color: var(--ink); }
.notice.err { background: var(--err-bg); border-color: var(--err-line); }
.notice.ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Karten ---------- */
.jg-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.jg-card { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
           padding: 20px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .2s, transform .2s; }
a.jg-card { text-decoration: none; color: inherit; }
.jg-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.jg-card h3 { font-size: 1.35rem; margin: 0; }
.jg-card p { margin: 0; }
.jg-card .tagline { color: var(--accent); font-weight: 500; font-size: .9rem; }
.jg-card .foot { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.jg-card.locked { opacity: .7; }
.jg-card.locked:hover { transform: none; box-shadow: none; }

/* ---------- Formulare ---------- */
.jg-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
            box-shadow: var(--shadow); width: min(440px, 100%); }
.jg-center { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.jg-form { display: grid; gap: 12px; }
.jg-form label { display: grid; gap: 5px; font-size: .82rem; color: var(--muted); font-weight: 500; }
.jg-form input, .jg-form textarea { width: 100%; padding: 11px 16px; }
.jg-form button { padding: 11px 16px; }
.jg-form .hint { font-size: .78rem; color: var(--muted); margin: -4px 0 0; }

/* ---------- Tabellen ---------- */
.jg-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.jg-table { width: 100%; border-collapse: collapse; }
.jg-table th, .jg-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.jg-table th { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
               background: var(--cream); white-space: nowrap; }
.jg-table tr:last-child td { border-bottom: 0; }

/* ---------- Fußzeile ---------- */
.jg-footer { border-top: 1px solid var(--line); background: var(--cream); }
.jg-footer > div { color: var(--muted); font-size: .8rem; padding: 18px 24px 26px; max-width: 1400px; margin: 0 auto; }

@media (max-width: 560px) {
  .jg-head, .jg-main, .jg-footer > div { padding-left: 16px; padding-right: 16px; }
  .jg-brand img { width: 40px; height: 40px; }
  .jg-brand h1 { font-size: 1.3rem; }
  .jg-panel { padding: 22px 18px; }
}
