/* ============================================================
   Workspace — Design 1:1 nach ChatGPT (dunkles Theme)
   ============================================================ */

:root {
  /* Dunkel = Standard, ChatGPT-Layout in tiefem Schwarz */
  --sidebar: #000000;
  --bg: #050505;
  --raise: #131313;      /* Hover-Flächen */
  --panel: #1c1c1c;      /* aktive Pills, Such-Feld */
  --panel-2: #242424;
  --border: #1d1d1d;
  --border-soft: #151515;
  --text: #f3f3f3;
  --muted: #9a9a9a;
  --faint: #6b6b6b;
  --accent: #ffffff;     /* „Neu"-Button */
  --accent-text: #0d0d0d;
  --blue: #e6e6e6;
  --shadow: 0 10px 34px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

html[data-theme="light"] {
  --sidebar: #f9f9f9;
  --bg: #ffffff;
  --raise: #f4f4f4;
  --panel: #ececec;
  --panel-2: #e3e3e3;
  --border: #e5e5e5;
  --border-soft: #efefef;
  --text: #0d0d0d;
  --muted: #6b6b6b;
  --faint: #8f8f8f;
  --accent: #0d0d0d;
  --accent-text: #ffffff;
  --blue: #1a1a1a;
  --shadow: 0 10px 34px rgba(0, 0, 0, .14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Söhne", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #2e2e2e; border-radius: 8px; border: 3px solid transparent; background-clip: content-box;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #d0d0d0; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

#app { display: flex; height: 100vh; }

/* ============ Sidebar ============ */

.sidebar {
  width: 268px; flex: 0 0 268px;
  background: var(--sidebar);
  border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column;
  padding: 10px 10px 8px;
  overflow: hidden;
}
.sidebar.collapsed { display: none; }

.side-top {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 4px 14px;
}
.wordmark {
  flex: 1; font-size: 19px; font-weight: 700; letter-spacing: -.02em;
  padding-left: 6px;
}

.side-scroll { flex: 1; overflow-y: auto; padding-bottom: 10px; }

.nav-item {
  width: 100%; display: flex; align-items: center; gap: 11px;
  height: 38px; padding: 0 10px; border-radius: 10px;
  text-align: left; font-size: 14.5px; color: var(--text);
}
.nav-item:hover { background: var(--raise); }
.nav-item.active { background: var(--panel); }
.nav-item .ico { flex: 0 0 20px; display: grid; place-items: center; color: var(--text); opacity: .92; }
.nav-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { font-size: 12px; color: var(--faint); }
.nav-item .more {
  opacity: 0; flex: 0 0 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center; color: var(--muted);
}
.nav-item:hover .more { opacity: 1; }
.nav-item .more:hover { background: var(--panel-2); color: var(--text); }

/* Text-Zeilen wie „Aktuelle" bei ChatGPT */
.side-label {
  padding: 20px 10px 6px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.rec-item {
  width: 100%; display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px; border-radius: 10px;
  font-size: 14px; color: var(--text); text-align: left;
}
.rec-item:hover { background: var(--raise); }
.rec-item.active { background: var(--panel); }
.rec-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-item .more { opacity: 0; flex: 0 0 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); }
.rec-item:hover .more { opacity: 1; }
.rec-item .more:hover { background: var(--panel-2); color: var(--text); }

.side-user {
  border-top: 1px solid var(--border-soft);
  padding-top: 8px; margin-top: 4px;
}
.user-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 12px; width: 100%; text-align: left;
}
.user-row:hover { background: var(--raise); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--panel); color: var(--text);
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.uname { font-size: 14px; font-weight: 500; line-height: 1.2; }
.usub { font-size: 12px; color: var(--muted); line-height: 1.3; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; color: var(--muted);
  flex: 0 0 auto;
}
.icon-btn:hover { background: var(--raise); color: var(--text); }
.icon-btn.on { background: var(--panel); color: var(--text); }

.float-toggle {
  position: fixed; left: 12px; top: 12px; z-index: 40;
  background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

/* ============ Hauptbereich ============ */

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.content { flex: 1; overflow: auto; }

.page { max-width: 1060px; margin: 0 auto; padding: 46px 40px 90px; }

.page-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 30px;
}
.page-title {
  margin: 0; flex: 1; min-width: 200px;
  font-size: 31px; font-weight: 700; letter-spacing: -.025em;
  display: flex; align-items: center; gap: 12px;
}
.page-title input {
  background: none; border: 0; outline: 0; font: inherit;
  padding: 2px 8px; border-radius: 10px; min-width: 60px; max-width: 100%;
}
.page-title input:hover { background: var(--raise); }
.page-title input:focus { background: var(--panel); }

.head-actions { display: flex; align-items: center; gap: 12px; }

.search {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 18px; min-width: 300px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; color: var(--muted);
}
html[data-theme="light"] .search { background: var(--bg); }
.search:focus-within { border-color: #333; }
.search input { flex: 1; background: none; border: 0; outline: 0; font-size: 15px; color: var(--text); }
.search input::placeholder { color: var(--muted); }

.btn-white {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text);
  font-size: 15px; font-weight: 500; white-space: nowrap;
}
.btn-white:hover { opacity: .88; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--border); font-size: 14px; color: var(--text);
}
.btn:hover { background: var(--raise); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--raise); }
.btn.sm { height: 32px; font-size: 13px; padding: 0 12px; }

/* Segment-Tabs (Alle / Bilder / Dateien) */
.tabs-row { display: flex; align-items: center; gap: 6px; margin-bottom: 22px; }
.tabs { display: flex; gap: 4px; }
.tab {
  height: 40px; padding: 0 18px; border-radius: 999px;
  font-size: 15px; color: var(--muted);
}
.tab:hover { background: var(--raise); color: var(--text); }
.tab.on { background: var(--panel); color: var(--text); }
.spacer { flex: 1; }

/* ============ Listen-Tabelle im ChatGPT-Stil ============ */

.list-head, .list-row {
  display: grid; align-items: center;
  gap: 16px; padding: 0 12px;
}
.list-head {
  height: 40px; color: var(--muted); font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.list-head .h { display: flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 5px 8px; margin: 0 -8px; border-radius: 8px; }
.list-head .h:hover { background: var(--raise); color: var(--text); }
.list-head .h .ico { color: var(--faint); font-size: 12px; }

.list-row {
  min-height: 60px; border-bottom: 1px solid var(--border-soft);
  font-size: 15px;
}
.list-row:hover { background: var(--raise); }
.list-row .namecell { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tile {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 9px;
  background: var(--raise); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--muted); font-size: 15px;
}
.list-row:hover .tile { background: var(--panel); }
.list-row input[type="text"], .list-row input[type="number"], .list-row input[type="date"] {
  background: none; border: 0; outline: 0; width: 100%; padding: 4px 6px;
  border-radius: 7px; font-size: 15px;
}
.list-row input:focus { background: var(--panel); }
.list-row .cellwrap { min-width: 0; display: flex; align-items: center; gap: 8px; }
.muted-cell { color: var(--muted); font-size: 14.5px; }

.rowtools { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; }
.list-row:hover .rowtools { opacity: 1; }
.rowtools .icon-btn { width: 30px; height: 30px; border-radius: 8px; }
.rowtools .icon-btn:hover { background: var(--panel-2); }

.add-row {
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 12px; width: 100%;
  color: var(--muted); font-size: 15px; border-radius: 10px; margin-top: 4px;
}
.add-row:hover { background: var(--raise); color: var(--text); }

.tmark {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 15px; font-size: 12px; font-weight: 600; color: currentColor; opacity: .85;
}
.list-head .h svg, .list-head .h .tmark { color: var(--faint); }
.prop-key svg, .prop-key .tmark { color: var(--faint); flex: 0 0 16px; }
.menu button svg { flex: 0 0 auto; color: var(--muted); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.chip.empty { color: var(--faint); background: none; padding: 0 2px; font-weight: 400; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }

.checkbox {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid #3a3a3a; display: grid; place-items: center;
  cursor: pointer; color: transparent;
}
html[data-theme="light"] .checkbox { border-color: #c4c4c4; }
.checkbox.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

/* ============ Board ============ */

.board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 10px; }
.bcol {
  flex: 0 0 280px; width: 280px;
  background: var(--sidebar); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 12px;
  display: flex; flex-direction: column; gap: 9px;
}
.bcol.dragover { border-color: #383838; }
.bcol-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 2px; }
.bcol-head .n { font-size: 12.5px; color: var(--faint); }
.bcol-body { display: flex; flex-direction: column; gap: 9px; max-height: 62vh; overflow-y: auto; }
.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 13px; cursor: grab;
}
.card:hover { border-color: #333; }
.card .t { font-weight: 500; margin-bottom: 8px; font-size: 14.5px; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card .meta .m { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.card.dragging { opacity: .35; }

/* ============ To-Do ============ */

.composer {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 7px 7px 20px;
}
.composer:focus-within { border-color: #333; }
.composer input.title { flex: 1; background: none; border: 0; outline: 0; font-size: 15.5px; }
.composer input.title::placeholder { color: var(--muted); }
.composer .mini {
  background: var(--raise); border: 1px solid var(--border);
  border-radius: 999px; height: 34px; padding: 0 12px; outline: 0; font-size: 13.5px;
}
.send {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center;
}

.group-title {
  font-size: 13px; font-weight: 600; color: var(--muted);
  margin: 30px 0 6px; display: flex; gap: 8px; align-items: center;
}

.todo {
  display: grid; align-items: center;
  grid-template-columns: 20px minmax(0, 1fr) auto auto auto 32px;
  gap: 12px; min-height: 50px; padding: 4px 12px;
  border-radius: 12px; border-bottom: 1px solid var(--border-soft);
}
.todo:hover { background: var(--raise); }
.todo .checkbox { margin: 0; }
.todo .t {
  background: none; border: 0; outline: 0; width: 100%;
  font-size: 15px; padding: 6px 6px; border-radius: 8px; min-width: 0;
}
.todo .t:focus { background: var(--panel); }
.todo.done .t { text-decoration: line-through; color: var(--faint); }
.todo .prio { flex: none; }
.todo .prio .plabel { color: var(--muted); font-size: 12.5px; }
.todo .tfocus { font-size: 12.5px; color: var(--faint); display: inline-flex; align-items: center; gap: 5px; }
.todo .tdate { justify-self: end; }
.todo .tdate.over .datefield { color: var(--text); font-weight: 600; }
.todo .del { opacity: 0; }
.todo:hover .del { opacity: 1; }

@media (max-width: 720px) {
  .todo { grid-template-columns: 20px minmax(0, 1fr) auto auto auto 30px; gap: 8px; }
  .todo .prio .plabel { display: none; }
  .todo .tfocus { display: none; }
}

.empty-state { text-align: center; color: var(--faint); padding: 70px 20px; }
.empty-state .big { font-size: 16px; color: var(--muted); margin-bottom: 6px; }

/* ============ Deep Work ============ */

.timer-wrap { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.ring { position: relative; width: 300px; height: 300px; }
.ring svg { transform: rotate(-90deg); }
.ring .inner {
  position: absolute; inset: 0; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.ring .time { font-size: 62px; font-weight: 300; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.ring .mode { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ring .task { font-size: 13.5px; color: var(--faint); max-width: 210px; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.timer-controls { display: flex; gap: 12px; align-items: center; }
.big-btn {
  height: 50px; min-width: 168px; padding: 0 28px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text); font-size: 16px; font-weight: 500;
}
.big-btn:hover { opacity: .88; }

.stat-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.stat { background: var(--sidebar); border: 1px solid var(--border-soft); border-radius: 14px;
  padding: 16px 20px; min-width: 148px; text-align: center; }
.stat .v { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.stat .k { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.card-box { background: var(--sidebar); border: 1px solid var(--border-soft); border-radius: 14px; padding: 18px 20px; }
.box-label { font-size: 13px; font-weight: 600; color: var(--muted); }

.chart { display: flex; gap: 12px; align-items: flex-end; height: 120px; }
.chart .bar-col { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 42px; }
.chart .bar { width: 28px; border-radius: 7px 7px 4px 4px; background: var(--panel); transition: height .3s ease; }
.chart .bar.has { background: var(--accent); }
.chart .lbl { font-size: 11.5px; color: var(--faint); }

.settings-grid { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.set { background: var(--sidebar); border: 1px solid var(--border-soft); border-radius: 999px;
  padding: 9px 16px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.set input { width: 48px; background: var(--raise); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 6px; text-align: center; outline: 0; color: var(--text); }

.log-item { display: flex; align-items: center; gap: 12px; padding: 11px 10px;
  border-radius: 10px; font-size: 14px; border-bottom: 1px solid var(--border-soft); }
.log-item:last-child { border-bottom: 0; }
.log-item:hover { background: var(--raise); }
.log-item .when { color: var(--faint); font-size: 12.5px; }

/* ============ Overlays ============ */

#overlay { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
#overlay.on { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }

.menu {
  position: absolute; min-width: 210px;
  background: #131313; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: 6px;
  max-height: 72vh; overflow: auto;
}
html[data-theme="light"] .menu { background: #ffffff; }
.menu button, .menu .mi {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 9px; font-size: 14px; text-align: left;
}
.menu button:hover { background: var(--raise); }
html[data-theme="light"] .menu button:hover { background: #f2f2f2; }
.menu .sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu .head { padding: 8px 10px 5px; font-size: 12px; color: var(--faint); }
.menu button.danger:hover { background: var(--panel-2); color: var(--text); }
.menu input.mininput {
  width: 100%; background: var(--raise); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 10px; outline: 0; margin-bottom: 5px;
}

.modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px));
  background: #131313; border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow); padding: 24px;
}
html[data-theme="light"] .modal { background: #ffffff; }
.modal h3 { margin: 0 0 18px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; background: var(--raise); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 13px; outline: 0;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(540px, 100vw);
  background: var(--bg); border-left: 1px solid var(--border);
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  animation: slide .18s ease;
}
@keyframes slide { from { transform: translateX(26px); opacity: .3 } to { transform: none; opacity: 1 } }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border-soft); }
.panel-body { overflow: auto; padding: 26px 30px 70px; }
.panel-body h2 { margin: 0 0 22px; font-size: 28px; font-weight: 700; letter-spacing: -.025em; }
.panel-body h2 input { width: 100%; background: none; border: 0; outline: 0; font: inherit; }
.prop-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 5px; min-height: 36px; }
.prop-key { flex: 0 0 160px; display: flex; align-items: center; gap: 8px; color: var(--muted);
  font-size: 14px; padding: 7px 6px; }
.prop-val { flex: 1; padding: 6px 10px; border-radius: 9px; min-height: 34px; display: flex; align-items: center; }
.prop-val:hover { background: var(--raise); }
.prop-val input { width: 100%; background: none; border: 0; outline: 0; }
.notes { width: 100%; min-height: 240px; margin-top: 22px; resize: vertical;
  background: none; border: 0; outline: 0; font: inherit; line-height: 1.7; }
.notes::placeholder { color: var(--faint); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-text);
  padding: 12px 20px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow); z-index: 90;
}



/* ============ Postfach ============ */

.notice {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--sidebar); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 18px; margin-bottom: 22px;
}
.notice-t { font-size: 15px; font-weight: 600; }
.notice-s { font-size: 13.5px; color: var(--muted); margin-top: 3px; max-width: 560px; }
.notice .btn-white { height: 40px; margin-left: auto; }

.mail-row .namecell { gap: 10px; }
.mail-row .dot-unread { width: 7px; flex: 0 0 7px; display: flex; }
.mail-row .from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.mail-row.unread .from,
.mail-row.unread .subj { font-weight: 600; }
.mail-row .subjectcell { flex-direction: column; align-items: flex-start; gap: 2px; overflow: hidden; }
.mail-row .subj { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mail-row .prev { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.tile.av {
  background: var(--panel); color: var(--text);
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
}

.mail-meta {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 16px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.mail-body { width: 100%; border: 0; min-height: 220px; background: transparent; }

.setup-steps {
  margin: 6px 0 0; padding-left: 20px;
  color: var(--muted); font-size: 13px; line-height: 1.75;
}
.setup-steps strong { color: var(--text); font-weight: 600; }


/* ============ Priorität als Stufen-Anzeige ============ */

.prio {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--muted); cursor: pointer;
  padding: 3px 8px 3px 6px; border-radius: 8px; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.prio:hover { background: var(--raise); color: var(--text); }
.prio .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.prio .bars i {
  width: 3px; border-radius: 1.5px; background: var(--border);
  transition: background .18s ease, height .18s ease;
}
html[data-theme="light"] .prio .bars i { background: #dcdcdc; }
.prio .bars i:nth-child(1) { height: 5px; }
.prio .bars i:nth-child(2) { height: 8.5px; }
.prio .bars i:nth-child(3) { height: 12px; }
.prio .bars i.on { background: var(--text); }
.prio .plabel { font-variant-numeric: tabular-nums; }
.menu .prio { cursor: inherit; padding: 0; }
.menu .prio:hover { background: none; }

/* ============ Hinweise / Fehler ============ */

.notice.error { border-color: var(--border-strong, var(--panel-2)); border-left: 3px solid var(--text); }
.notice-s.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; color: var(--text); margin-top: 6px;
  background: var(--raise); border-radius: 8px; padding: 8px 10px;
  white-space: pre-wrap; word-break: break-word;
}
.field-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.55; }

/* ============ Animationen beim Öffnen einer Sektion ============ */

@keyframes pageIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px) }
  to { opacity: 1; transform: none }
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-4px) scale(.985) }
  to { opacity: 1; transform: none }
}
@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.96) }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) }
}
@keyframes scrimIn { from { opacity: 0 } to { opacity: 1 } }

.page.anim { animation: pageIn .18s ease both; }
.page.anim > * { animation: riseIn .42s cubic-bezier(.22, .61, .36, 1) both; }
.page.anim > *:nth-child(1) { animation-delay: 0ms }
.page.anim > *:nth-child(2) { animation-delay: 30ms }
.page.anim > *:nth-child(3) { animation-delay: 55ms }
.page.anim > *:nth-child(4) { animation-delay: 75ms }
.page.anim > *:nth-child(5) { animation-delay: 92ms }
.page.anim > *:nth-child(6) { animation-delay: 106ms }
.page.anim > *:nth-child(7) { animation-delay: 118ms }
.page.anim > *:nth-child(8) { animation-delay: 128ms }
.page.anim > *:nth-child(9) { animation-delay: 136ms }
.page.anim > *:nth-child(n+10) { animation-delay: 144ms }

.page.anim .timer-wrap > *,
.page.anim .board > * { animation: riseIn .46s cubic-bezier(.22, .61, .36, 1) both; }
.page.anim .timer-wrap > *:nth-child(1), .page.anim .board > *:nth-child(1) { animation-delay: 60ms }
.page.anim .timer-wrap > *:nth-child(2), .page.anim .board > *:nth-child(2) { animation-delay: 100ms }
.page.anim .timer-wrap > *:nth-child(3), .page.anim .board > *:nth-child(3) { animation-delay: 132ms }
.page.anim .timer-wrap > *:nth-child(4), .page.anim .board > *:nth-child(4) { animation-delay: 158ms }
.page.anim .timer-wrap > *:nth-child(n+5), .page.anim .board > *:nth-child(n+5) { animation-delay: 178ms }

.menu { animation: menuIn .14s ease both; }
.modal { animation: modalIn .18s cubic-bezier(.22, .61, .36, 1) both; }
.scrim { animation: scrimIn .18s ease both; }
.toast { animation: riseIn .22s cubic-bezier(.22, .61, .36, 1) both; }

.nav-item, .rec-item, .tab, .icon-btn, .btn, .btn-white, .list-row, .todo, .card, .user-row {
  transition: background .16s ease, color .16s ease, border-color .16s ease, opacity .16s ease;
}

@media (prefers-reduced-motion: reduce) {
  .page.anim, .page.anim > *, .page.anim .timer-wrap > *, .page.anim .board > *,
  .menu, .modal, .scrim, .toast, .panel { animation: none !important; }
  * { transition: none !important; }
}

/* ============ Übersicht ============ */

.hero { margin-bottom: 26px; }
.hero-title {
  margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.03em;
}
.hero-sub { color: var(--muted); font-size: 15px; margin-top: 6px; }

.quick { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 26px; }
.quick .btn { height: 40px; padding: 0 16px; }
.quick .btn svg { opacity: .8; }

.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px;
}
.metric {
  background: var(--sidebar); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 16px 18px; text-align: left;
}
.metric:hover { background: var(--raise); }
.metric .mv { font-size: 25px; font-weight: 600; letter-spacing: -.025em; }
.metric .mk { font-size: 13px; color: var(--muted); margin-top: 3px; }

.cards {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.ov { padding: 16px 18px 12px; }
.ov-head { display: flex; align-items: center; margin-bottom: 10px; }
.ov-head .btn { margin-left: auto; }

.ov-row {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 8px; margin: 0 -8px; border-radius: 10px;
  cursor: pointer; min-width: 0;
}
.ov-row:hover { background: var(--raise); }
.ov-row .ov-t {
  flex: 1; min-width: 0; font-size: 14.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ov-row .ov-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ov-row .ov-meta.strong { color: var(--text); font-weight: 600; }
.ov-row .tile { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; font-size: 11px; }
.ov-row .prio { padding: 2px 4px; }
.ov-row .prio .plabel { display: none; }

.ov-empty, .ov-note { color: var(--faint); font-size: 13.5px; padding: 10px 0 6px; }
.ov-note { border-top: 1px solid var(--border-soft); margin-top: 8px; }

.ov-big {
  font-size: 30px; font-weight: 600; letter-spacing: -.03em;
  display: flex; align-items: baseline; gap: 12px; margin: 4px 0 16px;
}
.ov-big-sub { font-size: 13.5px; font-weight: 400; color: var(--muted); letter-spacing: 0; }

.chart.mini { height: 78px; gap: 8px; }
.chart.mini .bar-col { width: 30px; }
.chart.mini .bar { width: 20px; }

@media (max-width: 1000px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 28px; }
}

/* ============ Logo ============ */

.logo-btn { display: grid; place-items: center; padding: 0; border-radius: 10px; }
.logo-btn:hover .mark { transform: scale(1.05); }
.mark {
  display: grid; place-items: center;
  background: #000; color: #fff;              /* Marke immer weiß auf schwarz */
  border-radius: 9px;
  transition: transform .16s ease;
}
html[data-theme="light"] .mark { box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.logo-btn { margin-right: 4px; }

.modal.wide { width: min(620px, calc(100vw - 32px)); }
.logo-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.logo-opt {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 16px 6px 12px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--raise);
}
.logo-opt:hover { border-color: var(--muted); }
.logo-opt.on { border-color: var(--text); background: var(--panel); }
.logo-name { font-size: 12px; color: var(--muted); }
.logo-opt.on .logo-name { color: var(--text); }

@media (max-width: 620px) {
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Postfach: Umschlag-Kachel mit Punkt für Ungelesen */
.tile.mailtile { position: relative; color: var(--muted); overflow: visible; }
.list-row:hover .tile.mailtile,
.ov-row:hover .tile.mailtile { color: var(--text); }
.tile.mailtile.unread { color: var(--text); }
.tile.mailtile.unread::after {
  content: ''; position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text); border: 2px solid var(--bg);
}
.list-row:hover .tile.mailtile.unread::after { border-color: var(--raise); }

/* To-Do: Prioritätsfilter */
.tab.prio-tab { padding: 0 10px; display: inline-flex; align-items: center; }
.tab.prio-tab .prio { padding: 0; color: inherit; }
.tab.prio-tab .prio:hover { background: none; }
.tab.prio-tab.on .prio .plabel { color: var(--text); }
.group-title .prio { padding: 0; cursor: default; color: var(--muted); }
.group-title .prio:hover { background: none; }

/* ============ Einstellungen: Hintergründe, Schrift, Dichte, Bewegung ============ */

:root { --font-ui: "Söhne", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
body { font-family: var(--font-ui); }

html[data-font="grotesk"] { --font-ui: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; }
html[data-font="rounded"] { --font-ui: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", system-ui, sans-serif; }
html[data-font="serif"]   { --font-ui: Charter, Georgia, "Iowan Old Style", "Times New Roman", serif; }
html[data-font="mono"]    { --font-ui: ui-monospace, SFMono-Regular, Menlo, "Cascadia Mono", monospace; }

html[data-theme="dark"][data-bg="coal"]     { --sidebar: #0f0f0f; --bg: #161616; --raise: #1f1f1f; --panel: #292929; --panel-2: #333; --border: #272727; --border-soft: #1e1e1e; }
html[data-theme="dark"][data-bg="graphite"] { --sidebar: #171717; --bg: #212121; --raise: #2a2a2a; --panel: #333; --panel-2: #3c3c3c; --border: #313131; --border-soft: #262626; }
html[data-theme="light"][data-bg="mist"]    { --sidebar: #f2f2f2; --bg: #fafafa; --raise: #ededed; --panel: #e6e6e6; --panel-2: #dcdcdc; --border: #e0e0e0; --border-soft: #eaeaea; }
html[data-theme="light"][data-bg="stone"]   { --sidebar: #eaeaea; --bg: #f4f4f4; --raise: #e3e3e3; --panel: #dadada; --panel-2: #d0d0d0; --border: #d8d8d8; --border-soft: #e2e2e2; }

/* zoom skaliert auch die 100vh-Box — Höhe gegenrechnen, sonst endet die
   Seitenleiste vor dem Fensterrand und das Profil schwebt zu weit oben. */
html[data-size="sm"] #app { zoom: .93; height: calc(100vh / .93); }
html[data-size="lg"] #app { zoom: 1.09; height: calc(100vh / 1.09); }

html[data-radius="sharp"] .btn, html[data-radius="sharp"] .btn-white, html[data-radius="sharp"] .tab,
html[data-radius="sharp"] .search, html[data-radius="sharp"] .composer, html[data-radius="sharp"] .chip,
html[data-radius="sharp"] .metric, html[data-radius="sharp"] .card-box, html[data-radius="sharp"] .modal,
html[data-radius="sharp"] .menu, html[data-radius="sharp"] .nav-item, html[data-radius="sharp"] .rec-item,
html[data-radius="sharp"] .tile, html[data-radius="sharp"] .icon-btn, html[data-radius="sharp"] .bcol,
html[data-radius="sharp"] .card, html[data-radius="sharp"] .notice { border-radius: 5px; }

html[data-radius="soft"] .btn, html[data-radius="soft"] .btn-white, html[data-radius="soft"] .tab,
html[data-radius="soft"] .search, html[data-radius="soft"] .composer, html[data-radius="soft"] .chip { border-radius: 999px; }
html[data-radius="soft"] .metric, html[data-radius="soft"] .card-box, html[data-radius="soft"] .bcol,
html[data-radius="soft"] .notice { border-radius: 22px; }
html[data-radius="soft"] .modal { border-radius: 28px; }
html[data-radius="soft"] .menu, html[data-radius="soft"] .card { border-radius: 18px; }
html[data-radius="soft"] .nav-item, html[data-radius="soft"] .rec-item,
html[data-radius="soft"] .icon-btn, html[data-radius="soft"] .tile { border-radius: 14px; }

html[data-density="compact"] .list-row { min-height: 46px; }
html[data-density="compact"] .nav-item { height: 34px; }
html[data-density="compact"] .rec-item { height: 32px; }
html[data-density="compact"] .page { padding-top: 30px; padding-bottom: 60px; }
html[data-density="compact"] .todo { padding: 8px 12px; }
html[data-density="airy"] .list-row { min-height: 74px; }
html[data-density="airy"] .nav-item { height: 44px; }
html[data-density="airy"] .rec-item { height: 42px; }
html[data-density="airy"] .page { padding-top: 60px; }
html[data-density="airy"] .todo { padding: 16px 12px; }

html[data-anim="off"] .page.anim, html[data-anim="off"] .page.anim > *,
html[data-anim="off"] .page.anim .timer-wrap > *, html[data-anim="off"] .page.anim .board > *,
html[data-anim="off"] .menu, html[data-anim="off"] .modal, html[data-anim="off"] .panel,
html[data-anim="off"] .scrim, html[data-anim="off"] .toast { animation: none !important; }
html[data-anim="off"] * { transition: none !important; }

html[data-speed="slow"] .page.anim > * { animation-duration: .72s; }
html[data-speed="slow"] .panel, html[data-speed="slow"] .modal { animation-duration: .34s; }
html[data-speed="fast"] .page.anim > * { animation-duration: .24s; }
html[data-speed="fast"] .page.anim > *:nth-child(n) { animation-delay: 0ms; }
html[data-speed="fast"] .panel, html[data-speed="fast"] .modal { animation-duration: .1s; }

.set-list { max-height: 62vh; overflow: auto; padding-right: 4px; }
.set-group {
  font-size: 12px; font-weight: 600; color: var(--faint);
  text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 8px;
}
.set-group:first-child { margin-top: 0; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 7px 0; flex-wrap: wrap; }
.set-label { flex: 0 0 100px; font-size: 14px; color: var(--muted); }
.set-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.set-opt {
  height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); font-size: 13.5px; color: var(--muted);
}
.set-opt:hover { background: var(--raise); color: var(--text); }
.set-opt.on { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 500; }

/* ============ Eigener Datums-Button und Kalender ============ */

.datefield {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 11px; border-radius: 9px;
  border: 1px solid var(--border); font-size: 14px; color: var(--text);
  white-space: nowrap;
}
.datefield:hover { background: var(--raise); }
.datefield .dfico { display: grid; place-items: center; color: var(--faint); }
.datefield .dftext.ph { color: var(--faint); }
.datefield.plain { border-color: transparent; padding: 0 6px; color: var(--muted); }
.datefield.plain:hover { color: var(--text); }
.datefield.tiny { height: 22px; font-size: 12.5px; gap: 5px; }
.datefield.mini { height: 34px; background: var(--raise); border-radius: 999px; }

.menu.menu-cal { overflow: visible; padding: 8px; min-width: 0; }

.cal { width: 252px; }
.cal-quick { display: flex; gap: 4px; margin-bottom: 8px; }
.cal-quick button {
  flex: 1; height: 28px; border-radius: 8px; font-size: 12.5px;
  color: var(--muted); background: var(--raise);
}
.cal-quick button:hover { color: var(--text); background: var(--panel); }
.cal-quick button.on { background: var(--accent); color: var(--accent-text); font-weight: 500; }

.cal-head { display: flex; align-items: center; gap: 2px; margin-bottom: 6px; }
.cal-title {
  display: inline-flex; align-items: center; gap: 4px;
  height: 30px; padding: 0 8px; border-radius: 8px;
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
}
.cal-title:hover { background: var(--raise); }
.cal-caret { display: grid; place-items: center; color: var(--faint); }
.cal-head .icon-btn { width: 28px; height: 28px; font-size: 17px; line-height: 1; }

.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-week span {
  text-align: center; font-size: 10.5px; color: var(--faint);
  padding-bottom: 5px; letter-spacing: .04em;
}
.cal-day {
  height: 32px; display: grid; place-items: center;
  border-radius: 8px; font-size: 13px; color: var(--text);
  font-variant-numeric: tabular-nums;
}
button.cal-day:hover { background: var(--raise); }
.cal-day.wknd { color: var(--muted); }
.cal-day.out { color: var(--faint); opacity: .35; }
.cal-day.today { font-weight: 700; box-shadow: inset 0 0 0 1px var(--border-strong, var(--panel-2)); }
.cal-day.sel { background: var(--accent); color: var(--accent-text); font-weight: 600; box-shadow: none; }

.cal-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 2px 0 4px; }
.cal-month { height: 38px; border-radius: 9px; font-size: 13px; color: var(--text); }
.cal-month:hover { background: var(--raise); }
.cal-month.sel { background: var(--accent); color: var(--accent-text); font-weight: 600; }

.cal-clear {
  width: 100%; height: 30px; margin-top: 6px; border-radius: 8px;
  font-size: 12.5px; color: var(--faint);
}
.cal-clear:hover { background: var(--raise); color: var(--text); }

/* ============ Finanzen ============ */

.monthnav {
  display: flex; align-items: center; gap: 2px;
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 6px; height: 46px;
}
.monthnav .icon-btn { width: 32px; height: 32px; font-size: 20px; line-height: 1; }
.monthnav .mlabel { font-size: 14.5px; min-width: 118px; text-align: center; }

.fin-row input[type="text"] { background: none; border: 0; outline: 0; width: 100%; padding: 4px 6px; border-radius: 7px; font-size: 15px; }
.fin-row input[type="text"]:focus { background: var(--panel); }
.fin-amount {
  background: none; border: 0; outline: 0; text-align: right; width: 92px;
  padding: 4px 6px; border-radius: 7px; font-size: 15px; font-variant-numeric: tabular-nums;
}
.fin-amount:focus { background: var(--panel); }
.metric .mv.bad, .kpi.bad { opacity: .65; text-decoration: underline; text-underline-offset: 4px; }
.kpi { font-variant-numeric: tabular-nums; }
.kpi.good { font-weight: 600; }

.catrow { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.catname { flex: 0 0 130px; font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catbar { flex: 1; height: 8px; background: var(--raise); border-radius: 99px; overflow: hidden; }
.catbar span { display: block; height: 100%; background: var(--text); opacity: .8; border-radius: 99px; }
.catval { flex: 0 0 92px; text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* Product Runs */
.run-row .runname { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.run-row .rn { font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-row .rs { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px; margin: 22px 0 8px;
}
.kpi-cell { background: var(--raise); border-radius: 12px; padding: 11px 12px; }
.kpi-cell .kv { font-size: 16px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-cell .kv.good { }
.kpi-cell .kk { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.jhead { font-size: 13px; font-weight: 600; color: var(--muted); margin: 26px 0 10px; }
.jform { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.jform input {
  background: var(--raise); border: 1px solid var(--border); border-radius: 999px;
  height: 34px; padding: 0 12px; outline: 0; font-size: 13.5px; width: 96px;
}
.jform input[type="text"] { flex: 1; min-width: 130px; }
.jform .btn-white { height: 34px; width: 40px; padding: 0; justify-content: center; }

.jrow {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; margin: 0 -8px; border-radius: 10px;
  border-bottom: 1px solid var(--border-soft); font-size: 13.5px;
}
.jrow:hover { background: var(--raise); }
.jdate { flex: 0 0 74px; color: var(--muted); }
.jnums { display: flex; gap: 10px; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.jnote { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jrow .icon-btn { width: 28px; height: 28px; opacity: 0; }
.jrow:hover .icon-btn { opacity: 1; }

/* ============ Einstellungen: Vorschauen ============ */

.set-block { margin-bottom: 18px; }
.set-block .set-label { flex: none; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }

.swatch {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 9px 9px 8px; border-radius: 14px;
  border: 1px solid var(--border); background: transparent; min-width: 74px;
}
.swatch:hover { background: var(--raise); }
.swatch.on { border-color: var(--text); background: var(--raise); }
.sw-name { font-size: 11.5px; color: var(--muted); }
.swatch.on .sw-name { color: var(--text); font-weight: 500; }

.pv { display: grid; place-items: center; width: 62px; height: 40px; border-radius: 8px; overflow: hidden; }

/* Mini-Fenster für Modus und Hintergrund */
.pv-win { display: flex; border: 1px solid var(--border); padding: 0; }
.pv-win i { width: 34%; height: 100%; display: block; }
.pv-win b { flex: 1; height: 100%; display: block; }
.pv-win.dark i, .pv-win.bg-pitch i { background: #000; }
.pv-win.dark b, .pv-win.bg-pitch b { background: #050505; }
.pv-win.light i, .pv-win.bg-paper i { background: #f9f9f9; }
.pv-win.light b, .pv-win.bg-paper b { background: #fff; }
.pv-win.bg-coal i { background: #0f0f0f; } .pv-win.bg-coal b { background: #161616; }
.pv-win.bg-graphite i { background: #171717; } .pv-win.bg-graphite b { background: #212121; }
.pv-win.bg-mist i { background: #f2f2f2; } .pv-win.bg-mist b { background: #fafafa; }
.pv-win.bg-stone i { background: #eaeaea; } .pv-win.bg-stone b { background: #f4f4f4; }

/* Schrift */
.pv-font { background: var(--raise); font-size: 19px; letter-spacing: -.01em; }
.pv-font.f-sans { font-family: "Söhne", ui-sans-serif, system-ui, sans-serif; }
.pv-font.f-grotesk { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.pv-font.f-rounded { font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif; }
.pv-font.f-serif { font-family: Charter, Georgia, serif; }
.pv-font.f-mono { font-family: ui-monospace, Menlo, monospace; }

.pv-size { background: var(--raise); }
.pv-shape { background: var(--raise); width: 40px; height: 40px; border: 1px solid var(--border-soft); }
.pv-icon { background: var(--raise); color: var(--muted); }
.pv-logo { background: var(--raise); }

/* Dichte */
.pv-rows { background: var(--raise); flex-direction: column; display: flex; justify-content: center; padding: 0 12px; }
.pv-rows i { display: block; height: 3px; background: var(--muted); border-radius: 2px; width: 100%; }
.pv-rows.d-compact i { margin: 2px 0; }
.pv-rows.d-md i { margin: 4px 0; }
.pv-rows.d-airy i { margin: 6px 0; }

/* Bewegung */
.pv-motion { background: var(--raise); display: flex; align-items: flex-end; gap: 4px; padding-bottom: 10px; }
.pv-motion i { width: 5px; height: 8px; background: var(--muted); border-radius: 2px; }
.pv-motion.on i, .pv-motion.sp-slow i, .pv-motion.sp-normal i, .pv-motion.sp-fast i {
  animation: pvBounce 1.1s ease-in-out infinite;
}
.pv-motion.on i:nth-child(2) { animation-delay: .12s }
.pv-motion.on i:nth-child(3) { animation-delay: .24s }
.pv-motion.sp-slow i { animation-duration: 1.7s }
.pv-motion.sp-fast i { animation-duration: .55s }
.pv-motion.off i { height: 8px; opacity: .45; animation: none; }
@keyframes pvBounce { 0%, 100% { height: 8px } 50% { height: 20px } }

html[data-anim="off"] .pv-motion i { animation: none !important; }

.wordmark .wm-dot { color: var(--muted); font-weight: 500; }

/* Import-Dialog */
.drop {
  border: 1.5px dashed var(--border); border-radius: 16px;
  padding: 26px 18px; text-align: center; cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.drop:hover, .drop.over { border-color: var(--muted); background: var(--raise); }
.dropico { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 10px;
  border-radius: 12px; background: var(--raise); color: var(--muted); }
.drop.over .dropico, .drop:hover .dropico { color: var(--text); }
.dropt { font-size: 14.5px; font-weight: 500; }
.drops { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* Farbakzent: nur der Punkt leuchtet */
.pv-dots { background: var(--raise); display: flex; gap: 6px; align-items: center; justify-content: center; }
.pv-dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }

html[data-color="on"] .tile.mailtile.unread::after {
  background: #4a90d9;
  box-shadow: 0 0 7px rgba(74, 144, 217, .75), 0 0 2px #4a90d9;
  border-color: var(--bg);
}
html[data-color="on"] .list-row:hover .tile.mailtile.unread::after { border-color: var(--raise); }

/* ============ Märkte ============ */

.prop-val.mkt-val { flex-wrap: wrap; gap: 5px; padding: 5px 8px; }
.prop-val.mkt-val .mkt-input { flex: 1; min-width: 120px; }

.chip.mkt { height: 27px; font-size: 12.5px; letter-spacing: .02em; padding: 0 10px; }
.chip.mkt.used:hover { background: var(--panel-2); }
.chip.mkt .mkt-x { color: var(--faint); font-size: 14px; line-height: 1; margin-left: 1px; }
.chip.mkt:hover .mkt-x { color: var(--text); }

.mkt-input {
  background: transparent; border: 1px dashed var(--border); outline: 0;
  border-radius: 999px; height: 27px; padding: 0 12px; min-width: 150px;
  font-size: 12.5px; color: var(--text);
}
.mkt-input::placeholder { color: var(--faint); }
.mkt-input:focus { border-style: solid; border-color: var(--muted); }

.mkt-cell { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; overflow: hidden; }
.chip.mini-mkt { height: 21px; padding: 0 7px; font-size: 11.5px; }

/* ============ Timer-Designs ============ */

.face-arc { display: flex; flex-direction: column; align-items: center; }
.face-arc svg { display: block; }
.face-arc .arc-text {
  margin-top: -96px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; text-align: center;
}
.face-arc .time { font-size: 52px; }

.face-bar, .face-min {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: min(560px, 100%); padding-top: 10px;
}
.face-bar .time, .face-min .time { font-size: 76px; }
.face-min .time { font-weight: 200; letter-spacing: -.045em; }
.face-bar .mode, .face-min .mode { order: -1; }
.face-bar .task, .face-min .task { margin-bottom: 6px; }

.tbar {
  width: 100%; height: 12px; border-radius: 99px;
  background: var(--panel); overflow: hidden; margin-top: 10px;
}
.tbar span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .3s linear; }

.tline { width: 100%; height: 2px; background: var(--panel); margin-top: 18px; }
.tline span { display: block; height: 100%; width: 0; transition: width .3s linear; }

/* Vorschau in den Einstellungen */
.pv-timer { background: var(--raise); color: var(--text); }
.pvbar { display: block; width: 38px; height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.pvbar i { display: block; height: 100%; width: 55%; background: currentColor; border-radius: 99px; }
.pvmin { font-size: 13px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ============ Copys und Creatives ============ */

.copy-form { position: relative; margin-bottom: 12px; }
.copy-input {
  display: block; width: 100%; min-height: 62px; max-height: 240px;
  padding-right: 52px;              /* Platz für den Knopf im Feld */
  resize: none; overflow-y: auto;   /* kein Anfasser, der über die runde Ecke ragt */
  background: var(--raise); border: 1px solid var(--border); border-radius: 14px;
  padding: 10px 13px; outline: 0; font-size: 14px; line-height: 1.55;
}
.copy-input:focus { border-color: var(--muted); }
.copy-form .btn-white {
  position: absolute; right: 8px; bottom: 8px;
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
  justify-content: center;
}

.copy-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 10px; margin: 0 -10px; border-radius: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.copy-item:hover { background: var(--raise); }
.copy-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.copy-tools { display: flex; gap: 2px; opacity: 0; }
.copy-item:hover .copy-tools { opacity: 1; }
.copy-tools .icon-btn { width: 30px; height: 30px; }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.img-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.img-del {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px;
  border-radius: 8px; display: grid; place-items: center;
  background: rgba(0, 0, 0, .62); color: #fff; opacity: 0;
}
.img-thumb:hover .img-del { opacity: 1; }
.img-del:hover { background: rgba(0, 0, 0, .85); }

.img-add {
  aspect-ratio: 1; border: 1.5px dashed var(--border); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--faint); font-size: 11.5px; text-align: center; padding: 6px;
}
.img-add:hover { border-color: var(--muted); color: var(--text); background: var(--raise); }

.lightbox {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  max-width: min(90vw, 900px); max-height: 86vh;
  display: flex; flex-direction: column; gap: 10px;
}
.lightbox img {
  max-width: 100%; max-height: 74vh; object-fit: contain;
  border-radius: 16px; border: 1px solid var(--border); background: var(--sidebar);
}
.lb-bar { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; }

/* Zahnrad und Moduswechsel unten links in Textfarbe statt Grau */
.side-user .icon-btn { color: var(--text); }
.side-user .icon-btn:hover { background: var(--panel); }

/* Offener Fokus ohne Zielzeit */
.face-open {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 26px 0 10px; position: relative;
}
.face-open .time { font-size: 86px; font-weight: 200; letter-spacing: -.045em; }
.face-open .mode { order: -1; }
.face-open .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--panel-2); margin-top: 12px;
}
.face-open .pulse.on { background: var(--text); animation: pulseDot 1.6s ease-in-out infinite; }
@keyframes pulseDot { 0%, 100% { opacity: .25; transform: scale(.85) } 50% { opacity: 1; transform: scale(1.15) } }
.big-btn + .btn[disabled] { opacity: .4; pointer-events: none; }

/* hidden muss auch bei display-Klassen greifen */
[hidden] { display: none !important; }

/* ============ Menü-Ebene über Panels ============ */
#menulayer { position: fixed; inset: 0; pointer-events: none; z-index: 75; }
#menulayer.on { pointer-events: auto; }

/* ============ Plus im Feld statt weißem Knopf ============ */
.field-add { position: relative; }
.field-add > input {
  width: 100%; background: var(--raise); border: 1px solid var(--border);
  border-radius: 999px; height: 38px; padding: 0 44px 0 14px; outline: 0; font-size: 14px;
}
.field-add > input:focus { border-color: var(--muted); }
.field-add.wide > input { height: 44px; font-size: 15px; }

.add-inline {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); background: transparent;
}
.add-inline:hover { background: var(--panel); color: var(--text); }
.copy-form .add-inline { top: auto; bottom: 9px; transform: none; right: 9px; }

.jform { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.jform-row { display: flex; gap: 6px; flex-wrap: wrap; }
.jform-row input {
  background: var(--raise); border: 1px solid var(--border); border-radius: 999px;
  height: 34px; padding: 0 12px; outline: 0; font-size: 13.5px; width: 100px;
}
.jform .field-add > input { height: 34px; font-size: 13.5px; }
.jform .add-inline { width: 26px; height: 26px; }

/* ============ Häkchen-Form ============ */
html[data-check="round"] .checkbox { border-radius: 50%; }
html[data-check="square"] .checkbox { border-radius: 2px; }
.pv-check { background: var(--raise); }
.pv-check .checkbox { width: 20px; height: 20px; }
.pv-check .c-round { border-radius: 50%; }
.pv-check .c-square { border-radius: 2px; }
.pv-check .c-soft { border-radius: 5px; }

/* ============ Deep Work aufgeräumt ============ */
.timer-wrap { width: 100%; margin: 0; gap: 12px; }
.timer-card {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: 30px 20px 26px; width: 100%;
}
.timer-card .timer-controls { margin: 0; }
.timer-wrap .cards { width: 100%; }
.timer-wrap .settings-grid { justify-content: flex-start; gap: 6px; }
.timer-wrap .set { padding: 7px 12px; font-size: 13px; }

/* Aufräumen-Knopf sauber in der Gruppenzeile */
.group-title .btn.sm {
  margin-left: auto; height: 26px; padding: 0 12px; font-size: 12.5px;
  border: 1px solid var(--border); color: var(--muted); border-radius: 999px;
}
.group-title .btn.sm:hover { color: var(--text); background: var(--raise); }

/* ============ Manifest ============ */
.affirm {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  background: var(--sidebar); border: 1px solid var(--border-soft);
  border-radius: 16px; padding: 18px 20px; margin-bottom: 22px;
}
.affirm-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.affirm-text { flex: 1; font-size: 18px; line-height: 1.5; letter-spacing: -.01em; }

.belief {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px; margin: 0 -12px; border-radius: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.belief:hover { background: var(--raise); }
.belief .bq { font-size: 22px; color: var(--faint); line-height: 0; padding-top: 8px; }
.belief input {
  flex: 1; background: none; border: 0; outline: 0; font-size: 15.5px;
  padding: 5px 6px; border-radius: 8px; min-width: 0;
}
.belief input:focus { background: var(--panel); }
.belief .icon-btn { opacity: 0; }
.belief:hover .icon-btn { opacity: 1; }

.mf-entry {
  padding: 14px 12px; margin: 0 -12px; border-radius: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.mf-entry:hover { background: var(--raise); }
.mf-meta { display: flex; align-items: center; font-size: 12.5px; color: var(--faint); margin-bottom: 6px; }
.mf-meta .icon-btn { margin-left: auto; width: 26px; height: 26px; opacity: 0; }
.mf-entry:hover .mf-meta .icon-btn { opacity: 1; }
.mf-text { font-size: 15px; line-height: 1.65; white-space: pre-wrap; }

.img-grid.board { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* Intervall-Felder sauber im Raster */
.int-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 8px; }
.int {
  display: flex; flex-direction: column; gap: 7px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 13px;
}
.int:focus-within { border-color: var(--muted); }
.int-label { font-size: 12px; color: var(--muted); }
.int-field { display: flex; align-items: baseline; gap: 7px; }
.int-field input {
  width: 56px; background: transparent; border: 0; outline: 0;
  font-size: 20px; font-weight: 600; letter-spacing: -.02em;
  padding: 0; color: var(--text); font-variant-numeric: tabular-nums;
}
.int-field input:focus { border-bottom: 1px solid var(--muted); }
.int-field em { font-style: normal; font-size: 12.5px; color: var(--faint); }
.int-field input::-webkit-outer-spin-button,
.int-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Visionen auf der Übersicht */
.visions { margin-top: 12px; }
.vision-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.vision {
  aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; padding: 0;
  border: 1px solid var(--border); background: var(--raise);
}
.vision img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.vision:hover img { transform: scale(1.04); }
@media (max-width: 760px) { .vision-row { grid-template-columns: repeat(2, 1fr); } }

.affirm-text .q { color: var(--faint); }

/* Konto in der Profilzeile */
.user-main { flex: 1; min-width: 0; text-align: left; }
.user-main .uname, .user-main .usub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.avatar { border: 0; }

.sqlbox {
  background: var(--raise); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; margin: 12px 0 0; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; line-height: 1.6; color: var(--muted); white-space: pre;
}

/* Anmeldung in der Seitenleiste */
.signin-row {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 12px; margin-bottom: 4px;
  border: 1px solid var(--border); text-align: left;
}
.signin-row:hover { background: var(--raise); border-color: var(--muted); }
.signin-row .ico { display: grid; place-items: center; color: var(--text); }
.signin-text { min-width: 0; }
.st-main { display: block; font-size: 13.5px; font-weight: 500; }
.st-sub { display: block; font-size: 11.5px; color: var(--faint); }

.linkbtn { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 12.5px; padding: 0; }
.linkbtn:hover { color: var(--text); }
.auth-error {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--raise); border-left: 3px solid var(--text);
  font-size: 13px; line-height: 1.5;
}

/* DEPLOY-TEST: fliegt nach dem Test wieder raus */
.deploytest { font-size: 120px; line-height: 1.1; margin-bottom: 6px; }


/* ============================================================
   Mobil — Seitenleiste, Listen, Bedienung mit dem Finger
   ============================================================ */

#app { height: 100vh; height: 100dvh; }

.side-scrim { display: none; }
.list-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.list-scroll .list-head, .list-scroll .list-row { min-width: 660px; }

/* Ohne Maus gibt es kein Überfahren — Werkzeuge dauerhaft zeigen */
@media (hover: none) {
  .rowtools, .todo .del, .copy-tools, .belief .icon-btn, .mf-meta .icon-btn,
  .jrow .icon-btn, .img-del, .nav-item .more, .rec-item .more { opacity: 1; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed; z-index: 60; height: 100%; width: min(84vw, 300px);
    flex-basis: min(84vw, 300px); box-shadow: var(--shadow);
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
  .side-scrim {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(0, 0, 0, .5);
    animation: scrimIn .18s ease both;
  }
  .sidebar.collapsed + .side-scrim, .sidebar.collapsed ~ .side-scrim { display: none; }

  .float-toggle { top: max(12px, env(safe-area-inset-top)); }

  /* Platz für den schwebenden Seitenleisten-Knopf */
  .page { padding: 62px 16px 90px; }
  .page-head { gap: 12px; margin-bottom: 22px; }
  .page-title { font-size: 26px; min-width: 0; }
  .head-actions { width: 100%; gap: 8px; }
  .search { min-width: 0; flex: 1; height: 42px; padding: 0 14px; }
  .search input { font-size: 16px; }        /* verhindert das Zoomen in iOS */
  .btn-white { height: 42px; padding: 0 16px; font-size: 14px; }

  .tabs-row {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin: 0 -16px 18px; padding: 0 16px 2px; scrollbar-width: none;
  }
  .tabs-row::-webkit-scrollbar { display: none; }
  .tabs-row .spacer { min-width: 8px; }
  .tab { height: 36px; padding: 0 14px; font-size: 14px; }

  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric { padding: 13px 14px; }
  .metric .mv { font-size: 21px; }
  .cards { grid-template-columns: minmax(0, 1fr); }

  .hero-title { font-size: 27px; }
  .hero-sub { font-size: 14px; }
  .quick { gap: 7px; margin-bottom: 20px; }
  .quick .btn { height: 36px; padding: 0 13px; font-size: 13.5px; }

  .composer { flex-wrap: wrap; border-radius: 22px; padding: 10px 10px 10px 16px; gap: 8px; }
  .composer input.title { flex: 1 1 100%; font-size: 16px; order: -1; padding: 4px 0; }
  .composer .mini, .composer .datefield.mini { height: 32px; font-size: 13px; }
  .send { margin-left: auto; }

  .todo {
    grid-template-columns: 20px minmax(0, 1fr) auto auto auto 30px;
    gap: 8px; padding: 6px 8px; min-height: 46px;
  }
  .todo .t { font-size: 15px; }
  .todo .prio { padding: 2px 2px; }
  .todo .prio .plabel { display: none; }
  .todo .tfocus { display: none; }
  .todo .tdate .datefield { padding: 0 2px; gap: 3px; font-size: 11.5px; }
  .todo .tdate .dfico { display: none; }
  .todo .del { width: 30px; height: 30px; }

  .panel { width: 100vw; border-left: 0; }
  .panel-body { padding: 20px 18px calc(60px + env(safe-area-inset-bottom)); }
  .panel-body h2 { font-size: 23px; }
  .prop-row { flex-direction: column; gap: 2px; margin-bottom: 10px; }
  .prop-key { flex: none; padding: 0 4px; }
  .prop-val { width: 100%; }

  .modal { width: calc(100vw - 24px); padding: 20px 18px; border-radius: 20px; }
  .modal .set-list { max-height: 58vh; }
  .swatch { min-width: 66px; padding: 8px 7px; }
  .pv { width: 54px; height: 36px; }

  .ring, .ring svg { width: 240px; height: 240px; }
  .ring .time { font-size: 50px; }
  .face-arc svg { width: 260px; height: 145px; }
  .face-arc .arc-text { margin-top: -76px; }
  .face-open .time, .face-bar .time, .face-min .time { font-size: 58px; }
  .timer-card { padding: 22px 14px 20px; gap: 18px; }
  .big-btn { height: 46px; min-width: 140px; font-size: 15px; }

  .bcol { flex: 0 0 240px; width: 240px; }
  .img-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .img-grid.board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vision-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .affirm { padding: 15px 16px; }
  .affirm-text { font-size: 16px; }

  .jform-row { gap: 5px; }
  .jform-row input { width: calc(50% - 3px); }
  .jform-row .datefield.mini { width: 100%; }
  .int-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .monthnav { height: 42px; }
  .monthnav .mlabel { min-width: 96px; font-size: 13.5px; }

  input, textarea, select { font-size: 16px; }   /* kein Auto-Zoom beim Tippen */
  .list-row input, .fin-row input[type="text"], .belief input { font-size: 15px; }
}

@media (max-width: 420px) {
  .page { padding: 58px 12px 90px; }
  .page-title { font-size: 23px; }
  .metrics { gap: 7px; }
  .metric .mv { font-size: 19px; }
  .metric .mk { font-size: 12px; }
  .cal { width: 232px; }
  .cal-day { height: 30px; font-size: 12.5px; }
  .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ring, .ring svg { width: 210px; height: 210px; }
  .ring .time { font-size: 44px; }
}


/* Karteninhalte dürfen den Rahmen nicht sprengen */
.cards > * { min-width: 0; }
.ov-row { min-width: 0; }
.ov-big { flex-wrap: wrap; }
.ov-head { gap: 8px; flex-wrap: wrap; }
.chart.mini { overflow-x: auto; }
.timer-wrap > *, .page > * { max-width: 100%; }
