/* Cut it All – Notizen (WebApp). Formensprache wie die App (src/renderer/src/styles.css): dunkle Flächen in Stufen,
   Iris als Akzent, Segoe/System-Schrift, ruhige Linien. Immer dunkel – wie Cut it All. */
:root {
  --bg-0: #0c0d0f;
  --bg-1: #141518;
  --bg-2: #191a1e;
  --bg-3: #212328;
  --bg-4: #2a2d33;
  --bg-5: #33363d;
  --line: #25272c;
  --line-2: #30333a;
  --text-1: #eceef1;
  --text-2: #a4a8b1;
  --text-3: #8a8f99;
  --accent: #7c6cff;
  --accent-hover: #978aff;
  --accent-soft: rgba(124, 108, 255, 0.14);
  --danger: #f0524f;
  --danger-soft: rgba(240, 82, 79, 0.14);
  --ok: #3fbf86;
  --warn: #e6b450;
  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 16px;
  --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --font-display: 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-1);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
#app {
  max-width: 680px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 16px calc(130px + env(safe-area-inset-bottom));
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
h1 {
  font-size: 22px;
  font-weight: 650;
  margin: 0;
}
h2 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin: 26px 0 10px;
}
a {
  color: var(--accent-hover);
  text-decoration: none;
}
.muted {
  color: var(--text-2);
}
.small {
  font-size: 13px;
}
.hidden {
  display: none !important;
}
.center {
  text-align: center;
}
.grow {
  flex: 1;
  min-width: 0;
}
.tabular {
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- Kopfzeile */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  margin: 0 -16px;
  padding: 8px 16px;
  background: color-mix(in srgb, var(--bg-1) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top h1 {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 17px;
  white-space: nowrap;
}
.brand-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-hover);
  border: 1px solid var(--accent);
  border-radius: 5px;
  padding: 1px 6px;
}
.online {
  font-size: 12px;
  color: var(--warn);
  white-space: nowrap;
}
.online:empty {
  display: none;
}

/* ---------------------------------------------------------------- Knöpfe und Felder */
button,
.btn {
  font: inherit;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-4);
  color: var(--text-1);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
button:hover {
  background: var(--bg-5);
}
button:active {
  transform: scale(0.98);
}
button:disabled {
  opacity: 0.45;
  pointer-events: none;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.primary:hover {
  background: var(--accent-hover);
}
button.ghost {
  background: transparent;
  border-color: transparent;
}
button.ghost:hover {
  background: var(--bg-4);
}
button.danger {
  color: var(--danger);
}
button.icon {
  width: 42px;
  padding: 0;
  flex: none;
}
button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}
input,
textarea,
select {
  font: inherit;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text-1);
  transition: border-color 0.12s, box-shadow 0.12s;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-3);
}
textarea {
  resize: none;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-2);
}
label > input,
label > select,
label > textarea {
  margin-top: 6px;
}
label.row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-1);
  font-size: 15px;
  font-weight: 400;
}
label.row input[type='radio'],
label.row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 2px 0 0;
  accent-color: var(--accent);
  flex: none;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.stack > * + * {
  margin-top: 12px;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 16px;
}
.err {
  color: var(--danger);
  font-size: 14px;
  margin: 0;
}
.err:empty {
  display: none;
}
.status {
  color: var(--warn);
}
.status.fehler {
  color: var(--danger);
}

/* ---------------------------------------------------------------- Anmelden */
.auth {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 24px 0 60px;
}
.auth .brand {
  flex: none;
}
.auth .brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.auth .brand-name {
  font-size: 22px;
}
.auth .lead {
  color: var(--text-2);
  margin: 0;
}
.auth form button[type='submit'] {
  width: 100%;
}
.auth .switch {
  text-align: center;
  font-size: 14px;
}

/* ---------------------------------------------------------------- Projekte */
.new-project {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.new-project input {
  flex: 1;
  min-width: 0;
}
.projects {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.proj {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  font-weight: 400;
}
.proj:hover {
  background: var(--bg-3);
  border-color: var(--line-2);
}
.proj-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-hover);
}
.proj-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.proj-text b {
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-meta {
  font-size: 13px;
  color: var(--text-2);
}
.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--accent-hover);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj .chev {
  color: var(--text-3);
}
.hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px dashed var(--line-2);
  color: var(--text-2);
  font-size: 13px;
}
.empty {
  text-align: center;
  color: var(--text-2);
  padding: 40px 20px;
}
.empty .empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--bg-3);
  color: var(--accent-hover);
}
.empty b {
  display: block;
  color: var(--text-1);
  font-size: 16px;
  margin-bottom: 4px;
}

/* ---------------------------------------------------------------- Projektseite */
.linkline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 4px;
  font-size: 13px;
  color: var(--text-2);
}
.linkline.on {
  color: var(--accent-hover);
}
.notes {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 14px 14px 10px;
}
.note.wartet {
  border-style: dashed;
  border-color: var(--line-2);
}
.note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 12.5px;
  color: var(--text-3);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-2);
  font-size: 12px;
  white-space: nowrap;
}
a.pill:hover {
  color: var(--text-1);
}
.pill.warn {
  background: rgba(230, 180, 80, 0.12);
  color: var(--warn);
}
.pill.err {
  background: var(--danger-soft);
  color: var(--danger);
}
.note-title {
  font-size: 16px;
  font-weight: 600;
  margin: 8px 0 2px;
}
.note-text {
  margin: 4px 0 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.note-text.leer {
  color: var(--text-3);
  font-style: italic;
}
.note audio {
  width: 100%;
  height: 36px;
  margin-top: 10px;
  border-radius: 999px;
}
.note-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-hover);
}
.seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: var(--bg-1);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 550;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
}
.seg button.on {
  background: var(--bg-4);
  color: var(--text-1);
}
.note-actions {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.note-actions button {
  width: 36px;
  min-height: 36px;
  padding: 0;
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.note-actions button:hover {
  background: var(--bg-4);
  color: var(--text-1);
}
.note-actions button.danger:hover {
  color: var(--danger);
}
.note-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.note-edit textarea {
  min-height: 120px;
  resize: vertical;
}

/* ---------------------------------------------------------------- Eingabe unten, Aufnahme */
.compose {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg-1) 92%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
}
.compose .inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.compose textarea {
  flex: 1;
  min-height: 48px;
  max-height: 40vh;
  border-radius: 24px;
  padding: 12px 16px;
  background: var(--bg-2);
}
.compose .send {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  flex: none;
}
.mic {
  width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  flex: none;
  box-shadow: 0 6px 20px rgba(124, 108, 255, 0.35);
}
.mic:hover {
  background: var(--accent-hover);
}
/* Aufnahme: eigenes Feld statt Eingabezeile – nichts überdeckt sich */
.rec {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rec-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  animation: blink 1.2s ease-in-out infinite;
  flex: none;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
.rec-time {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.rec-head .pill {
  margin-left: auto;
}
.level {
  display: block;
  width: 100%;
  height: 56px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.rec-hint {
  margin: -2px 0 0;
  font-size: 13px;
  color: var(--text-2);
  min-height: 1.4em;
}
.rec-hint.warn {
  color: var(--warn);
}
.rec-actions {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 10px;
}
.rec-actions button {
  min-height: 48px;
}
.rec-actions .stop {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.rec-actions .stop:hover {
  background: #ff6a67;
}

/* ---------------------------------------------------------------- Konto, Verwaltung */
.list-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.list-card .grow b {
  display: block;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 5px;
  margin-left: 6px;
  background: var(--bg-4);
  color: var(--text-2);
  vertical-align: 1px;
}
.badge.accent {
  background: var(--accent-soft);
  color: var(--accent-hover);
}
.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.code {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 3px;
  text-align: center;
}

/* ---------------------------------------------------------------- Meldung */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(140px + env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--bg-4);
  border: 1px solid var(--line-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 20;
  font-size: 14px;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
