/* Lukas' HQ – Cockpit (Variante A) */
:root {
  --ground: #EEF0EC;
  --card: #FFFFFF;
  --line: #DDE1DB;
  --line-soft: #EBEDE9;
  --ink: #17201D;
  --ink-2: #2B3430;
  --ink-3: #3E4743;
  --muted: #56605B;
  --faint: #6B746F;
  --accent: #1F6B57;
  --accent-ink: #154B3D;
  --accent-soft: #E4EFEA;
  --accent-line: #B9D3C8;
  --chip: #F4F5F2;
  --warn: #9A520B;
  --warn-soft: #F7EBDD;
  --bar: #C9D3CE;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); }
body { font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
button, input { font-family: inherit; }
input::placeholder { color: var(--faint); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 40px 24px 56px; display: flex; flex-direction: column; gap: 28px; min-height: 100vh; }
.muted { color: var(--muted); }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* Kopf */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.head-date { font-family: "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.head h1 { margin: 6px 0 0; font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font-size: 14px; }
.pill strong { font-weight: 700; }

/* Raster */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 18px; min-height: 330px; }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tile-head h2 { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile-head span { font-size: 13px; color: var(--muted); }
.tile-foot { margin-top: auto; font-size: 14px; }
.tile-foot a { font-weight: 600; text-decoration: none; }
.empty { font-size: 15px; color: var(--muted); line-height: 1.5; margin: 0; }
.empty small { display: block; font-size: 13px; color: var(--faint); }

/* Fokus */
.absicht { margin: 0; font-size: 19px; line-height: 1.4; font-weight: 700; letter-spacing: -.01em; }
.absicht-form { display: flex; gap: 8px; }
.field { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font-size: 16px; color: var(--ink); background: var(--card); }
.list { display: flex; flex-direction: column; gap: 4px; }
.list-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.task { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.check { flex: none; width: 44px; height: 44px; margin: 0 -10px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #AEB7B2; background: var(--card); display: flex; align-items: center; justify-content: center; }
.is-done .box { border-color: var(--accent); background: var(--accent); }
.task-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.task-meta { font-size: 12px; color: var(--muted); }
.is-done .task-title { text-decoration: line-through; color: var(--faint); }

/* Eisenhower-Farbcode: 1 Rot, 2 Orange, 3 Gelb, 4 Grau */
.q1 { --q: #D32F2F; --q-ink: #FFFFFF; }
.q2 { --q: #F07C1B; --q-ink: #17201D; }
.q3 { --q: #F2C94C; --q-ink: #17201D; }
.q4 { --q: #B8BFBB; --q-ink: #17201D; }
.task[class*="q"] { border-left: 4px solid var(--q); border-radius: 3px; padding: 4px 0 4px 12px; }
.task[class*="q"] .check { margin-left: -8px; }
.task-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.stufe { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--q-ink); background: var(--q); border-radius: 999px; padding: 2px 8px; position: relative; top: -1px; }
.task-meta .late { color: #B3261E; font-weight: 700; }
.is-done.task[class*="q"] { border-left-color: var(--line); }
.is-done .stufe { background: var(--line-soft); color: var(--faint); }
.done-list { padding-top: 10px; border-top: 1px solid var(--line-soft); }

/* Termine */
.next { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); }
.next-label { font-size: 12px; font-weight: 700; color: var(--accent); }
.next-title { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.next-sub { font-size: 14px; color: var(--ink-3); }
.event { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.event:last-child { border-bottom: 0; }
.event-time { font-family: "IBM Plex Mono", monospace; font-size: 14px; color: var(--muted); width: 48px; flex: none; }
.event-title { font-size: 15px; font-weight: 600; }
.is-past .event-title { color: var(--faint); }

/* Mails */
.mail { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit; }
.mail-top { display: flex; align-items: center; gap: 8px; }
.mail-from { font-size: 14px; font-weight: 700; }
.tag { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.mail-time { margin-left: auto; font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--muted); }
.mail-subject { font-size: 15px; color: var(--ink-2); }
a.mail:hover .mail-subject { color: var(--accent-ink); }

/* Habits */
.bar { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bar > div { height: 8px; border-radius: 999px; background: var(--accent); transition: width .25s ease; }
.habits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.habit { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.habit .dot { width: 18px; height: 18px; flex: none; border-radius: 999px; background: var(--line); display: flex; align-items: center; justify-content: center; }
.habit.is-done { background: var(--accent-soft); border-color: var(--accent-line); }
.habit.is-done .dot { background: var(--accent); }
.habit .auto { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 500; }
.habit[disabled] { cursor: default; }

/* Wohlbefinden */
.score-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.score { display: flex; align-items: baseline; gap: 6px; }
.score b { font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.score span { font-size: 18px; color: var(--muted); font-weight: 600; }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 56px; }
.spark i { display: block; width: 14px; border-radius: 4px; background: var(--bar); }
.spark i.today { background: var(--accent); }
.spark i.none { background: var(--line-soft); height: 4px !important; }
.parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.part { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--chip); }
.part span { font-size: 12px; color: var(--muted); }
.part b { font-size: 16px; }
.part.low { background: var(--warn-soft); }
.part.low b { color: var(--warn); }
.rate { display: flex; gap: 8px; flex-wrap: wrap; }
.rate button { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 20px; font-weight: 800; color: var(--ink); cursor: pointer; }
.rate button:hover { border-color: var(--accent); color: var(--accent); }

/* Ziele */
.goal-kicker { font-size: 12px; font-weight: 700; color: var(--accent); }
.goal-title { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pipe div { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 10px; background: var(--chip); }
.pipe b { font-size: 20px; font-weight: 800; }
.pipe span { font-size: 12px; color: var(--muted); }
.pipe .hot { background: var(--accent-soft); }
.pipe .hot b { color: var(--accent); }
.next-step { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.next-step span { font-size: 12px; color: var(--muted); }
.next-step b { font-size: 15px; font-weight: 600; }

/* Schnell ablegen */
.capture { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 10px 10px 18px; }
.capture label { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.capture input { flex: 1 1 260px; min-width: 0; min-height: 44px; border: 0; outline: none; font-size: 16px; color: var(--ink); background: transparent; }
.status { font-size: 13px; font-weight: 600; color: var(--accent); }
.btn { min-height: 44px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--accent); color: #FFFFFF; font-size: 15px; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--accent-ink); }
.btn[disabled] { opacity: .6; cursor: wait; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; min-height: 24px; }

.error { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 600; }

/* Login */
.login { max-width: 400px; margin: 12vh auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.login h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }

@media (max-width: 520px) {
  .wrap { padding: 24px 16px 40px; gap: 18px; }
  .head h1 { font-size: 30px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tile { padding: 18px; min-height: 0; gap: 14px; border-radius: 18px; }
  .score b { font-size: 44px; }
  .pill { padding: 8px 12px; font-size: 13px; }
}
