/* i7.chat — Basis: Fonts, Tokens, Reset, Bausteine */

@font-face {
  font-family: 'Jost';
  src: url('fonts/jost-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+20AC;
}
@font-face {
  font-family: 'Jost';
  src: url('fonts/jost-var-latinext.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-var-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+20AC;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-var-latinext.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: 'Space Mono';
  src: url('fonts/spacemono-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('fonts/spacemono-700-latin.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #F6F4EF;
  --paper-deep: #EEEBE3;
  --card: #FFFFFF;
  --ink: #1A1B2E;
  --ink-soft: #5E5F73;
  --ink-mute: #8B8CA0;
  --plum: #3B1F5C;
  --plum-deep: #2A153F;
  --plum-tint: #EFE9F6;
  --plum-soft: #6B4B8F;
  --lime: #C6F26B;
  --lime-deep: #9FD23C;
  --lime-soft: #EAF9C9;
  --line: #E3E0D8;
  --line-strong: #CFCBC0;
  --red: #B4443C;
  --red-tint: #F7E7E5;
  --green: #1E7F5C;
  --green-tint: #E1F1E9;
  --amber: #A8720C;
  --amber-tint: #FBF1D6;
  --blue: #2F5BD6;
  --blue-tint: #E6ECFB;

  --font-display: 'Jost', 'Segoe UI', sans-serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', 'Consolas', monospace;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 20px;

  --shadow-card:
    0 0 0 1px rgba(26, 27, 46, .04),
    0 1px 2px rgba(26, 27, 46, .05),
    0 6px 16px -6px rgba(26, 27, 46, .08),
    0 20px 40px -24px rgba(26, 27, 46, .14);
  --shadow-pop:
    0 0 0 1px rgba(26, 27, 46, .05),
    0 4px 10px rgba(26, 27, 46, .09),
    0 16px 32px -12px rgba(26, 27, 46, .14),
    0 36px 70px -30px rgba(26, 27, 46, .22);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--plum-deep); }
img, svg { max-width: 100%; }
code, .mono { font-family: var(--font-mono); font-size: .85em; }
small, .small { font-size: .875rem; }
.muted { color: var(--ink-soft); }
.mute { color: var(--ink-mute); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

/* Knöpfe */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .7em 1.25em;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s var(--ease), background .15s, box-shadow .15s, color .15s;
  white-space: nowrap;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--plum); color: #fff; }
.btn--primary:hover { background: var(--plum-deep); color: #fff; box-shadow: 0 8px 20px -8px rgba(59, 31, 92, .6); }
.btn--lime { background: var(--lime); color: var(--plum-deep); }
.btn--lime:hover { background: var(--lime-deep); color: var(--plum-deep); }
.btn--ghost { background: transparent; color: var(--plum); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--plum-tint); border-color: var(--plum-soft); }
.btn--soft { background: var(--plum-tint); color: var(--plum); }
.btn--soft:hover { background: #e3d8f0; }
.btn--danger { background: transparent; color: var(--red); border-color: var(--line-strong); }
.btn--danger:hover { background: var(--red-tint); border-color: var(--red); }
.btn--sm { padding: .45em .9em; font-size: .85rem; }
.btn--xs { padding: .3em .7em; font-size: .78rem; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--icon { padding: .5em; border-radius: 999px; }

/* Felder */
.field { margin-bottom: 1.1rem; }
.field label, .label {
  display: block;
  font-weight: 700;
  font-size: .86rem;
  margin-bottom: .35em;
  color: var(--ink);
}
.field .hint, .hint { font-size: .8rem; color: var(--ink-soft); margin: .35em 0 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"],
input[type="tel"], input[type="search"], input[type="color"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: .6em .8em;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(59, 31, 92, .15);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235E5F73' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8em center; padding-right: 2.2em; }
input[type="color"] { padding: .2em; height: 2.6em; width: 3.4em; cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--plum); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 180px; }
.check, .field .check { display: flex; gap: .6em; align-items: flex-start; font-size: .92rem; font-weight: 500; cursor: pointer; margin: .4em 0; }
.field--wide { flex: 2 1 240px !important; }
.check input { margin-top: .25em; accent-color: var(--plum); }

/* Umschalter */
.switch, .field .switch { position: relative; display: inline-flex; align-items: center; gap: .6em; cursor: pointer; font-size: .92rem; font-weight: 500; user-select: none; margin-bottom: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { display: inline-block; width: 40px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 999px; background: #fff; transition: transform .15s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--plum); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(59, 31, 92, .2); }

/* Karten und Abzeichen */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}
.card + .card { margin-top: 16px; }
.card h3 { margin-bottom: .8em; }
.badge {
  display: inline-flex; align-items: center; gap: .35em;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em;
  padding: .25em .7em; border-radius: 999px;
  background: var(--plum-tint); color: var(--plum);
  white-space: nowrap;
}
.badge--green { background: var(--green-tint); color: var(--green); }
.badge--red { background: var(--red-tint); color: var(--red); }
.badge--amber { background: var(--amber-tint); color: var(--amber); }
.badge--blue { background: var(--blue-tint); color: var(--blue); }
.badge--lime { background: var(--lime-soft); color: #4a6b0f; }
.badge--grey { background: var(--paper-deep); color: var(--ink-soft); }

.alert { padding: .8em 1em; border-radius: var(--radius-m); font-size: .92rem; margin-bottom: 1rem; }
.alert--error { background: var(--red-tint); color: var(--red); }
.alert--ok { background: var(--green-tint); color: var(--green); }
.alert--info { background: var(--blue-tint); color: var(--blue); }
.alert--warn { background: var(--amber-tint); color: var(--amber); }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .65em .7em; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(59, 31, 92, .03); }
.table-wrap { overflow-x: auto; }

/* Auth-Seiten */
body.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l);
  box-shadow: var(--shadow-card); padding: 34px 32px 28px;
  position: relative; overflow: hidden;
}
.auth-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--plum), var(--plum-soft) 60%, var(--lime)); }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 700; letter-spacing: .12em; font-size: 1.05rem; margin-bottom: 22px; }
.auth-brand svg { width: 30px; height: 30px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .3em; }
.auth-sub { color: var(--ink-soft); margin-bottom: 1.4rem; font-size: .95rem; }
.auth-error { background: var(--red-tint); color: var(--red); font-weight: 600; font-size: .88rem; border-radius: var(--radius-s); padding: .6em .9em; margin-bottom: 1.1rem; }
.auth-card .btn { width: 100%; margin-top: .4rem; }
.auth-foot { margin: 1.4rem 0 0; font-size: .88rem; color: var(--ink-soft); text-align: center; }
.hp { position: absolute; left: -9999px; top: -9999px; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; font-size: 1.18rem; }
.logo svg { width: 30px; height: 30px; flex: none; }
