:root {
  --bg: #0a0a0a;
  --card: #141414;
  --card-2: #1b1b1b;
  --line: #262626;
  --text: #ededed;
  --muted: #9a9a9a;
  --gold: #c9a24a;
  --gold-dim: #6b5a2c;
  --green: #6fbf73;
  --red: #d9756b;
  --blue: #7aa6d9;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: "Oswald", sans-serif; font-weight: 600; letter-spacing: .02em; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.screen { max-width: 620px; margin: 0 auto; padding: calc(20px + var(--safe-t)) 18px calc(40px + var(--safe-b)); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.brand-logo { width: 64px; height: 64px; object-fit: contain; }
.brand-logo.sm { width: 40px; height: 40px; }
.link-btn { background: none; border: none; color: var(--muted); font-size: 14px; padding: 12px; width: 100%; }

/* ---------- Slot ---------- */
.lock { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 100dvh; justify-content: center; gap: 4px; }
.lock-title { font-size: 30px; margin: 12px 0 2px; }
.lock-sub { color: var(--muted); margin: 0 0 22px; font-size: 15px; }
.pin-dots { display: flex; gap: 16px; margin-bottom: 8px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gold-dim); transition: background .12s; }
.pin-dots span.on { background: var(--gold); border-color: var(--gold); }
.pin-error { color: var(--red); font-size: 14px; height: 20px; margin: 6px 0 10px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 74px); gap: 16px; }
.pinpad button {
  height: 74px; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 26px; font-weight: 500;
  transition: background .12s, transform .06s;
}
.pinpad button:active { transform: scale(.94); background: var(--card-2); }
.pinpad button.ghost { background: transparent; border-color: transparent; font-size: 18px; color: var(--muted); }

/* ---------- Home ---------- */
.home-head { text-align: center; margin: 12px 0 26px; }
.home-head h1 { font-size: 30px; margin: 10px 0 2px; }
.home-head .tagline { color: var(--gold); font-size: 14px; margin: 0; letter-spacing: .02em; }
.boards { display: flex; flex-direction: column; gap: 14px; }
.board-btn {
  display: flex; align-items: center; gap: 16px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; color: var(--text); position: relative;
  transition: border-color .15s, transform .06s, background .15s;
}
.board-btn:active { transform: scale(.99); }
.board-btn:hover { border-color: var(--gold-dim); }
.board-ico { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; color: var(--gold); }
.board-ico svg { width: 100%; height: 100%; }
.board-ico.sm { width: 30px; height: 30px; flex-basis: 30px; }
.board-label { font-family: "Oswald", sans-serif; font-size: 21px; line-height: 1.12; font-weight: 600; letter-spacing: .01em; }
.board-label em { font-style: normal; color: var(--muted); font-weight: 500; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.board-count { margin-left: auto; min-width: 30px; height: 30px; padding: 0 9px; border-radius: 15px; background: var(--card-2); color: var(--muted); font-size: 13px; display: grid; place-items: center; font-family: "Poppins"; }

/* ---------- Bord ---------- */
.board-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.board-head h2 { font-size: 22px; margin: 0; }
.icon-btn { background: var(--card); border: 1px solid var(--line); color: var(--text); width: 40px; height: 40px; border-radius: 12px; font-size: 24px; line-height: 1; display: grid; place-items: center; }
.board-ico#board-head-ico { color: var(--gold); }

.capture { display: flex; gap: 10px; align-items: stretch; margin-bottom: 16px; }
.capture textarea {
  flex: 1; resize: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); font-family: inherit; font-size: 16px; padding: 13px 14px; line-height: 1.4;
}
.capture textarea:focus { outline: none; border-color: var(--gold); }
.save-btn { background: var(--gold); color: #1a1400; border: none; border-radius: 14px; font-weight: 600; font-size: 15px; padding: 0 18px; white-space: nowrap; }
.save-btn:active { filter: brightness(.92); }
.save-btn:disabled { opacity: .4; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.toolbar-2 { margin-top: -4px; margin-bottom: 14px; }
.search { flex: 1; background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 9px 12px; font-family: inherit; font-size: 14px; }
.search:focus { outline: none; border-color: var(--gold); }
.sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.sort select { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 7px 10px; font-family: inherit; font-size: 14px; }
.count-pill { color: var(--muted); font-size: 13px; }
.export-btn { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 7px 12px; font-size: 13px; }
.export-btn:active { border-color: var(--gold-dim); color: var(--text); }

.list { display: flex; flex-direction: column; gap: 10px; }
.group-head { font-family: "Oswald"; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 10px 2px 2px; }

.entry { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; transition: opacity .15s; }
.entry.done { opacity: .5; }
.entry-text { font-size: 15.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.entry.done .entry-text { text-decoration: line-through; text-decoration-color: var(--muted); }
.entry-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 11px; }
.entry-date { color: var(--muted); font-size: 12px; margin-left: auto; }

/* Chips */
.chip {
  border: 1px solid var(--line); background: var(--card-2); color: var(--muted);
  border-radius: 999px; font-size: 12.5px; padding: 5px 11px; line-height: 1; font-family: "Poppins";
  display: inline-flex; align-items: center; gap: 5px;
}
.chip:active { transform: scale(.95); }
.chip.on { color: var(--text); border-color: var(--gold-dim); }
.chip.prio.on { color: var(--gold); border-color: var(--gold); }
.chip.money.on { color: var(--green); border-color: var(--green); }
.chip.status.on { color: var(--blue); border-color: var(--blue); }
.chip.status.done.on { color: var(--green); border-color: var(--green); }
.chip.angle.on { color: var(--gold); border-color: var(--gold); }
.chip.act { color: var(--muted); }
.chip.act.del:active { color: var(--red); border-color: var(--red); }
.chip.act.check.on { color: var(--green); border-color: var(--green); }

.empty { text-align: center; color: var(--muted); font-size: 15px; padding: 40px 20px; line-height: 1.5; }

/* ---------- Body-paneel (Meta Ads) ---------- */
.body-panel { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.body-gen-btn {
  background: transparent; border: 1px solid var(--gold-dim); color: var(--gold);
  border-radius: 10px; padding: 9px 14px; font-size: 13.5px; font-weight: 500;
}
.body-gen-btn:active { background: var(--card-2); }
.body-loading { color: var(--gold); font-size: 13.5px; padding: 6px 0; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.body-text {
  width: 100%; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-family: inherit; font-size: 14.5px; line-height: 1.5; padding: 12px 13px; resize: vertical;
}
.body-text:focus { outline: none; border-color: var(--gold); }
.body-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.body-act { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 7px 12px; font-size: 13px; }
.body-act:active { border-color: var(--gold-dim); }
.body-act.muted { color: var(--muted); }
.body-error { color: var(--red); font-size: 13px; line-height: 1.45; margin-bottom: 10px; }

/* Dropdown-chips (native select gestyled als chip) */
.chip.select {
  -webkit-appearance: none; appearance: none;
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239a9a9a' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.chip.select.angle.on { color: var(--gold); border-color: var(--gold); }
.chip.select.type.on { color: var(--blue); border-color: var(--blue); }
.chip.select.angle.suggested { border-style: dashed; }
.chip.date { color: var(--muted); }
.chip.date.on { color: var(--text); }
.chip-wrap { display: inline-flex; align-items: center; gap: 5px; }
.suggest-tag { background: var(--gold-dim); color: #1a1400; border: none; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; padding: 3px 7px; text-transform: uppercase; }
.date-input { background: var(--card-2); border: 1px solid var(--gold); color: var(--text); border-radius: 999px; font-size: 12.5px; padding: 4px 8px; font-family: inherit; color-scheme: dark; }
