/* FastBounty Backup: Discord-Dark-Theme */
:root {
  --bg-tertiary: #1e1f22;
  --bg-secondary: #2b2d31;
  --bg-primary: #313338;
  --bg-hover: #2e3035;
  --bg-active: #404249;
  --bg-input: #383a40;
  --bg-embed: #2b2d31;
  --bg-chip: #2b2d31;
  --border: #3f4147;
  --text-normal: #dbdee1;
  --text-muted: #949ba4;
  --text-faint: #6d6f78;
  --header-primary: #f2f3f5;
  --header-secondary: #b5bac1;
  --link: #00a8fc;
  --blurple: #5865f2;
  --blurple-hover: #4752c4;
  --green: #248046;
  --green-bright: #23a559;
  --red: #da373c;
  --red-bright: #f23f43;
  --yellow: #f0b232;
  --mention-bg: rgba(88, 101, 242, .3);
  --mention-bg-hover: rgba(88, 101, 242, .6);
  --mention-text: #c9cdfb;
  --spoiler: #202225;
  --code-bg: #2b2d31;
  --code-border: #1e1f22;
  --sidebar-w: 240px;
  --font: "gg sans", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", Menlo, Monaco, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.375;
  color: var(--text-normal);
  background: var(--bg-primary);
  overflow-x: hidden;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input { font-family: inherit; font-size: inherit; }
.hidden { display: none !important; }

/* Layout */
.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: var(--bg-secondary);
  display: flex; flex-direction: column;
  height: 100%;
}
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg-primary); }

/* Sidebar */
.sb-header {
  height: 48px; padding: 0 16px; display: flex; align-items: center;
  font-weight: 600; color: var(--header-primary);
  box-shadow: 0 1px 0 rgba(0,0,0,.2), 0 1.5px 0 rgba(0,0,0,.05), 0 2px 0 rgba(0,0,0,.05);
  flex-shrink: 0;
}
.sb-header a { color: var(--header-primary); }
.sb-header a:hover { text-decoration: none; }
.user-panel .name a { color: var(--header-primary); }
.sb-header .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright); margin-left: auto; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.sb-top { padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.sb-cat {
  padding: 16px 8px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .02em; color: var(--header-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-item, .sidebar a.ch {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; margin: 1px 0; border-radius: 4px;
  color: var(--text-muted); font-weight: 500; font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-item:hover, .sidebar a.ch:hover { background: var(--bg-hover); color: var(--text-normal); text-decoration: none; }
.sb-item.active, .sidebar a.ch.active { background: var(--bg-active); color: #fff; }
.sb-item .ic, .sidebar a.ch .ic { width: 20px; text-align: center; flex-shrink: 0; color: var(--text-faint); font-size: 16px; }
.sb-item.active .ic, .sidebar a.ch.active .ic { color: #fff; }
.sb-item .nm, .sidebar a.ch .nm { overflow: hidden; text-overflow: ellipsis; }
.sidebar a.ch[data-thread] { padding-left: 24px; font-size: 15px; }
.sidebar a.ch[data-dim] { opacity: .55; }
.sidebar a.ch .tag {
  margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase;
  background: var(--bg-tertiary); color: var(--text-muted); padding: 1px 5px; border-radius: 3px; flex-shrink: 0;
}
.sb-empty { color: var(--text-faint); font-size: 13px; padding: 12px 8px; }

.user-panel {
  background: var(--bg-tertiary); padding: 8px; display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.user-panel .avatar { width: 32px; height: 32px; }
.user-panel .info { flex: 1; min-width: 0; }
.user-panel .name { font-size: 14px; font-weight: 600; color: var(--header-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-panel .sub { font-size: 12px; color: var(--text-muted); }
.user-panel a.logout { font-size: 12px; color: var(--text-muted); }
.user-panel a.logout:hover { color: var(--text-normal); }
.user-panel form { margin: 0; }
.user-panel button { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 12px; padding: 4px; }
.user-panel button:hover { color: var(--text-normal); }

/* Top bar */
.topbar {
  height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 16px; flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.2), 0 1.5px 0 rgba(0,0,0,.05), 0 2px 0 rgba(0,0,0,.05);
  color: var(--header-primary); font-weight: 600;
}
.topbar .hash { color: var(--text-faint); font-size: 22px; font-weight: 400; }
.topbar .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .topic {
  font-weight: 400; font-size: 14px; color: var(--header-secondary);
  border-left: 1px solid var(--border); padding-left: 8px; margin-left: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.burger {
  display: none; background: none; border: 0; color: var(--header-secondary); cursor: pointer;
  width: 32px; height: 32px; font-size: 22px; line-height: 1; padding: 0;
}
.burger:hover { color: var(--header-primary); }

/* Content */
.content { flex: 1; overflow-y: auto; padding: 16px 16px 24px; }
.content.narrow { max-width: 840px; }
.card {
  background: var(--bg-secondary); border-radius: 8px; padding: 16px; margin-bottom: 16px;
}
h1, h2, h3 { color: var(--header-primary); margin: 0 0 8px; }
h1 { font-size: 24px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
p { margin: 0 0 8px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 3px; border: 0; cursor: pointer;
  background: var(--blurple); color: #fff; font-weight: 500; font-size: 14px; line-height: 1;
  text-decoration: none; min-height: 38px;
}
.btn:hover { background: var(--blurple-hover); text-decoration: none; color: #fff; }
.btn.secondary { background: var(--bg-active); }
.btn.secondary:hover { background: #4e5058; }
.btn.block { width: 100%; }
.btn.lg { padding: 14px 24px; font-size: 16px; min-height: 44px; }
.btn[disabled] { opacity: .5; cursor: default; }
.pager { display: flex; justify-content: center; padding: 8px 0 16px; }
.pager.bottom { padding: 16px 0 0; }

/* Messages */
.messages { padding-bottom: 8px; }
.msg { position: relative; display: flex; gap: 0; padding: 2px 8px 2px 72px; margin-top: 17px; min-height: 44px; }
.msg .avatar-link { position: absolute; left: 16px; top: 2px; width: 40px; height: 40px; }
.msg .avatar-link .avatar { position: static; }
.msg:hover { background: var(--bg-hover); }
.msg .avatar { position: absolute; left: 16px; top: 2px; width: 40px; height: 40px; }
.msg.has-reply .avatar-link, .msg.has-reply .avatar { top: 24px; }
.avatar { border-radius: 50%; object-fit: cover; background: var(--bg-tertiary); flex-shrink: 0; display: block; }
.msg .body { flex: 1; min-width: 0; }
.msg .hdr { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.msg .author { font-weight: 500; color: var(--header-primary); }
.msg .author:hover { text-decoration: underline; }
.msg .bot-tag {
  background: var(--blurple); color: #fff; font-size: 10px; font-weight: 500; padding: 1px 4px; border-radius: 3px;
  text-transform: uppercase; vertical-align: middle;
}
.msg .ts { font-size: 12px; color: var(--text-muted); }
.msg.grouped { margin-top: 0; min-height: 22px; padding-top: 1px; padding-bottom: 1px; }
.msg.grouped .ts-hover {
  position: absolute; left: 0; width: 64px; text-align: right; top: 3px;
  font-size: 11px; color: var(--text-muted); opacity: 0;
}
.msg.grouped:hover .ts-hover { opacity: 1; }
.msg .text { word-wrap: break-word; overflow-wrap: anywhere; white-space: normal; }
.msg .edited { font-size: 10px; color: var(--text-muted); margin-left: 4px; }
.msg.has-reply { margin-top: 27px; }
.reply-line {
  position: relative; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 14px;
  color: var(--header-secondary); white-space: nowrap;
}
.reply-line::before {
  content: ""; position: absolute; left: -36px; top: 50%; width: 30px; height: 14px;
  border-left: 2px solid #4e5058; border-top: 2px solid #4e5058; border-top-left-radius: 6px;
}
.reply-line .avatar { width: 16px; height: 16px; }
.reply-line .rname { font-weight: 500; color: var(--header-primary); flex-shrink: 0; }
.reply-line .rtext { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.msg.system { margin-top: 17px; padding-left: 72px; color: var(--text-muted); font-size: 15px; }
.msg.system .sys-ic { position: absolute; left: 28px; top: 4px; font-size: 16px; }
.msg.system .author { color: var(--header-primary); }
.date-sep {
  display: flex; align-items: center; gap: 8px; margin: 24px 16px 8px; font-size: 12px; font-weight: 600;
  color: var(--text-muted);
}
.date-sep::before, .date-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Markdown */
.text strong { font-weight: 700; }
.text code, .embed code {
  font-family: var(--mono); font-size: 85%; background: var(--code-bg); padding: 2px 4px; border-radius: 3px;
}
.text pre, .embed pre {
  background: var(--code-bg); border: 1px solid var(--code-border); border-radius: 4px;
  padding: 8px; margin: 6px 0; max-width: 90%; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
}
.text pre code, .embed pre code { background: none; padding: 0; font-size: 14px; }
blockquote {
  margin: 4px 0; padding: 0 8px 0 12px; border-left: 4px solid var(--bg-active); border-radius: 4px; max-width: 90%;
}
.text ul, .embed ul { margin: 4px 0; padding-left: 24px; }
.md-h1 { font-size: 24px; font-weight: 700; color: var(--header-primary); margin: 16px 0 8px; line-height: 1.25; }
.md-h2 { font-size: 20px; font-weight: 700; color: var(--header-primary); margin: 16px 0 8px; line-height: 1.25; }
.md-h3 { font-size: 16px; font-weight: 700; color: var(--header-primary); margin: 16px 0 8px; line-height: 1.25; }
.md-h1:first-child, .md-h2:first-child, .md-h3:first-child { margin-top: 0; }
.mention {
  background: var(--mention-bg); color: var(--mention-text); border-radius: 3px; padding: 0 2px; font-weight: 500;
}
.mention:hover { background: var(--mention-bg-hover); color: #fff; text-decoration: none; }
.mention-role { background: rgba(255,255,255,.08); }
.spoiler { background: var(--spoiler); color: transparent; border-radius: 3px; cursor: pointer; }
.spoiler.open { color: inherit; background: rgba(255,255,255,.1); }
.timestamp { background: rgba(255,255,255,.06); border-radius: 3px; padding: 0 2px; }
img.emoji { width: 22px; height: 22px; vertical-align: bottom; object-fit: contain; }

/* Embeds */
.embed {
  display: grid; grid-template-columns: auto; grid-template-rows: auto;
  max-width: 520px; margin-top: 8px; padding: 8px 16px 16px 12px;
  background: var(--bg-embed); border-radius: 4px; border-left: 4px solid var(--border);
  font-size: 14px; position: relative;
}
.embed.has-thumb { grid-template-columns: 1fr 80px; column-gap: 16px; }
.embed .e-provider { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.embed .e-author { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; color: var(--header-primary); }
.embed .e-author img { width: 24px; height: 24px; border-radius: 50%; }
.embed .e-author a { color: var(--header-primary); }
.embed .e-title { margin-top: 8px; font-weight: 600; font-size: 16px; color: var(--header-primary); }
.embed .e-title a { color: var(--link); }
.embed .e-desc { margin-top: 8px; color: var(--text-normal); white-space: normal; }
.embed .e-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; grid-column: 1; }
.embed .e-field { min-width: 0; }
.embed .e-field.full { grid-column: 1 / -1; }
.embed .e-field .fn { font-weight: 600; color: var(--header-primary); margin-bottom: 2px; }
.embed .e-field .fv { color: var(--text-normal); }
.embed .e-image { margin-top: 16px; grid-column: 1 / -1; }
.embed .e-image img { max-width: 400px; max-height: 300px; border-radius: 4px; cursor: zoom-in; display: block; }
.embed .e-thumb { grid-column: 2; grid-row: 1 / 8; margin-top: 8px; }
.embed .e-thumb img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; cursor: zoom-in; }
.embed .e-footer { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--text-muted); grid-column: 1 / -1; }
.embed .e-footer img { width: 20px; height: 20px; border-radius: 50%; }
.embed > * { grid-column: 1; }
.embed .e-thumb { grid-column: 2; }

/* Attachments */
.attachments { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; }
.att-img img { max-width: 400px; max-height: 300px; border-radius: 4px; display: block; cursor: zoom-in; }
.att-file {
  display: flex; align-items: center; gap: 12px; background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 4px; padding: 10px 12px; max-width: 420px; min-width: 240px; width: 100%;
}
.att-file .f-ic { font-size: 26px; flex-shrink: 0; }
.att-file .f-info { flex: 1; min-width: 0; }
.att-file .f-name { color: var(--link); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.att-file .f-size { font-size: 12px; color: var(--text-muted); }
.att-file .f-dl { color: var(--text-muted); font-size: 18px; text-decoration: none; }
.att-file .f-dl:hover { color: var(--text-normal); }

/* Components (Buttons) */
.components { margin-top: 8px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dbtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 16px; min-height: 32px;
  border-radius: 3px; font-size: 14px; font-weight: 500; color: #fff; cursor: not-allowed; opacity: .6;
  border: 0; background: var(--bg-active);
}
.dbtn.s1 { background: var(--blurple); }
.dbtn.s2 { background: #4e5058; }
.dbtn.s3 { background: var(--green); }
.dbtn.s4 { background: var(--red); }
.dbtn.s5 { background: #4e5058; }
.dbtn.s5::after { content: "\2197"; font-size: 12px; margin-left: 2px; }
.dbtn img.emoji { width: 18px; height: 18px; }
.dbtn .btn-emoji { font-size: 16px; line-height: 1; }
.select-ph {
  display: inline-flex; align-items: center; justify-content: space-between; min-width: 220px;
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 3px; padding: 6px 10px;
  color: var(--text-muted); font-size: 14px; opacity: .7;
}

/* Reactions */
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.reaction {
  display: inline-flex; align-items: center; gap: 6px; background: var(--bg-chip);
  border: 1px solid var(--border); border-radius: 8px; padding: 2px 8px; font-size: 14px; color: var(--text-muted);
}
.reaction img.emoji { width: 16px; height: 16px; }
.reaction .cnt { font-weight: 500; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center;
  z-index: 1000; cursor: zoom-out; padding: 24px;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 4px; box-shadow: 0 8px 32px rgba(0,0,0,.6); }
.lightbox .lb-close { position: absolute; top: 12px; right: 16px; color: #fff; font-size: 32px; background: none; border: 0; cursor: pointer; }
.lightbox .lb-open { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; }

/* Search */
.search-form { display: flex; gap: 8px; margin-bottom: 16px; }
.search-form input {
  flex: 1; background: var(--bg-tertiary); border: 0; border-radius: 4px; padding: 10px 12px; color: var(--text-normal);
  min-width: 0;
}
.search-form input:focus { outline: 2px solid var(--blurple); }
.result { background: var(--bg-secondary); border-radius: 8px; padding: 8px 8px 8px 0; margin-bottom: 8px; }
.result .msg { margin-top: 0; }
.result .msg:hover { background: transparent; }
.result .r-chan { padding: 0 0 4px 72px; font-size: 12px; color: var(--text-muted); }
.result .r-chan a { color: var(--header-secondary); font-weight: 600; }
.result .r-jump { text-align: right; padding: 4px 8px 0; font-size: 12px; }

/* Profile */
.profile-hero { display: flex; align-items: center; gap: 16px; }
.profile-hero .avatar { width: 80px; height: 80px; }
.roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.role-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 8px 2px 6px; font-size: 12px; font-weight: 500; color: var(--text-normal); background: var(--bg-tertiary);
}
.role-chip .rdot { width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; background: var(--bg-active); color: var(--text-normal); text-transform: uppercase; }
.badge.red { background: var(--red); color: #fff; }
.badge.green { background: var(--green); color: #fff; }

/* Tables */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { color: var(--header-secondary); font-size: 12px; text-transform: uppercase; }
.tbl-wrap { overflow-x: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--bg-tertiary); border-radius: 8px; padding: 12px; }
.stat .v { font-size: 24px; font-weight: 700; color: var(--header-primary); }
.stat .l { font-size: 12px; color: var(--text-muted); text-transform: uppercase; }
.ok { color: var(--green-bright); } .err { color: var(--red-bright); }

/* Import */
.dropzone {
  border: 2px dashed var(--border); border-radius: 8px; padding: 40px 16px; text-align: center;
  color: var(--text-muted); background: var(--bg-secondary); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--blurple); background: rgba(88,101,242,.08); color: var(--text-normal); }
.dropzone .dz-ic { font-size: 40px; margin-bottom: 8px; }
.dropzone .dz-big { font-size: 18px; font-weight: 600; color: var(--header-primary); }
.dropzone input[type=file] { display: none; }
.file-info { margin: 12px 0; font-size: 14px; color: var(--text-normal); }
.file-info .fname { font-weight: 600; color: var(--header-primary); }
.result-card { border-radius: 8px; padding: 16px; margin-top: 16px; border-left: 4px solid; }
.result-card.ok { background: rgba(35,165,89,.12); border-color: var(--green-bright); }
.result-card.err { background: rgba(242,63,67,.12); border-color: var(--red-bright); }
.result-card pre { white-space: pre-wrap; word-break: break-word; margin: 8px 0 0; font-family: var(--font); font-size: 14px; color: var(--text-normal); }
.result-card .rc-title { font-weight: 600; color: var(--header-primary); }
.spinner {
  width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Login / Error */
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--bg-tertiary); }
.login-card { background: var(--bg-primary); border-radius: 8px; padding: 32px; width: 100%; max-width: 420px; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.login-card .logo { font-size: 40px; margin-bottom: 8px; }
.login-card h1 { font-size: 24px; }
.login-card p { color: var(--text-muted); margin-bottom: 20px; }
.err-code { font-size: 64px; font-weight: 800; color: var(--blurple); line-height: 1; margin-bottom: 8px; }

/* Welcome */
.welcome { max-width: 720px; }
.welcome .hello { font-size: 32px; font-weight: 800; color: var(--header-primary); margin-bottom: 8px; }

/* Transkripte */
.tk-filter { display: flex; flex-direction: column; gap: 12px; }
.tk-filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.tk-field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; flex: 1 1 140px; }
.tk-field.tk-grow { flex: 2 1 220px; }
.tk-field.tk-narrow { flex: 0 1 110px; min-width: 100px; }
.tk-field > span { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--header-secondary); }
.tk-field input, .tk-field select {
  background: var(--bg-tertiary); border: 0; border-radius: 4px; padding: 10px 12px; color: var(--text-normal);
  font-family: inherit; font-size: 15px; min-height: 40px; width: 100%; min-width: 0;
}
.tk-field input:focus, .tk-field select:focus { outline: 2px solid var(--blurple); }
.tk-field input::placeholder { color: var(--text-faint); }
.tk-field select option { background: var(--bg-tertiary); color: var(--text-normal); }
.tk-actions { display: flex; gap: 8px; align-items: flex-end; margin-left: auto; }
.tk-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.tk-total { font-weight: 700; color: var(--header-primary); }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--bg-active); color: var(--text-normal);
  border-radius: 12px; padding: 3px 10px; font-size: 13px;
}
.tk-chip:hover { background: #4e5058; text-decoration: none; }
.tk-chip .x { color: var(--text-muted); font-weight: 700; }
.tk-list { padding: 0; overflow: hidden; }
.tk-row {
  display: flex; gap: 16px; justify-content: space-between; align-items: flex-start;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.tk-row:last-child { border-bottom: 0; }
.tk-row:hover { background: var(--bg-hover); }
.tk-main { flex: 1; min-width: 0; }
.tk-deal { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--header-secondary); }
.tk-name { display: inline-block; font-size: 16px; font-weight: 600; color: var(--header-primary); margin: 2px 0 4px; word-break: break-word; }
.tk-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.tk-snippet { margin-top: 6px; font-size: 14px; color: var(--text-muted); word-break: break-word; }
.tk-snippet a { color: var(--text-muted); }
.tk-snippet mark { background: rgba(240, 178, 50, .35); color: var(--header-primary); border-radius: 2px; padding: 0 1px; }
.tk-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; color: var(--text-muted); flex-shrink: 0; text-align: right; }
.tk-owner { display: inline-flex; align-items: center; gap: 6px; color: var(--header-secondary); font-weight: 500; }
.tk-owner .avatar { width: 20px; height: 20px; }
.tk-links { display: flex; gap: 12px; }
.tk-pager { gap: 12px; align-items: center; }
.badge.tk-status-offen { background: var(--green); color: #fff; }
.badge.tk-status-geschlossen { background: var(--bg-active); color: var(--text-muted); }
.badge.tk-type-dropship { background: var(--blurple); color: #fff; }
.badge.tk-type-reship { background: var(--yellow); color: #1e1f22; }
.badge.tk-type-fba { background: #e67e22; color: #fff; }
.badge.tk-qty { background: var(--bg-tertiary); color: var(--text-normal); }
.badge.tk-hits { background: rgba(240, 178, 50, .25); color: var(--yellow); }
.tk-mini {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--border);
  color: var(--text-normal); font-size: 14px;
}
.tk-mini:last-of-type { border-bottom: 0; }
.tk-mini:hover { text-decoration: none; background: var(--bg-hover); }
.tk-mini-deal { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--header-secondary); flex-basis: 100%; }
.tk-mini-name { font-weight: 600; color: var(--header-primary); word-break: break-word; }
.tk-mini-date { margin-left: auto; font-size: 12px; color: var(--text-muted); }

/* Mobile */
.sb-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }
@media (max-width: 800px) {
  .burger { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%);
    transition: transform .2s ease;
  }
  body.sb-open .sidebar { transform: translateX(0); }
  body.sb-open .sb-backdrop { display: block; }
  .msg { padding-left: 64px; padding-right: 16px; }
  .msg .avatar, .msg .avatar-link { left: 12px; }
  .msg.system { padding-left: 64px; }
  .reply-line::before { left: -30px; width: 24px; }
  .content { padding: 12px 16px 24px; }
  .embed { max-width: 100%; }
  .att-img img, .embed .e-image img { max-width: 100%; }
  .embed .e-fields { grid-template-columns: 1fr 1fr; }
  .topbar .topic { display: none; }
  .att-file { min-width: 0; width: 100%; }
  .tk-filter-row { flex-direction: column; align-items: stretch; }
  .tk-field, .tk-field.tk-grow, .tk-field.tk-narrow { flex: 1 1 auto; min-width: 0; }
  .tk-actions { margin-left: 0; }
  .tk-actions .btn { flex: 1; }
  .tk-row { flex-direction: column; gap: 8px; }
  .tk-meta { align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; gap: 6px 12px; }
}

/* Logo */
.sb-header { height: auto; min-height: 48px; padding: 10px 12px; }
.sb-logo { display: block; width: 120px; height: auto; }
.login-logo { display: block; width: 220px; height: auto; margin: 0 auto 16px; }

/* Payouts */
.po-card h4.po-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--header-secondary); margin: 16px 0 6px; }
.po-stats { margin-bottom: 4px; }
.po-stat-open .v { font-size: 28px; color: var(--green-bright); overflow-wrap: anywhere; }
.stat .v.po-next { font-size: 20px; }
.po-sub { font-size: 14px; color: var(--text-normal); margin: 2px 0 4px; }
.po-list { list-style: none; margin: 0; padding: 0; }
.po-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 8px 10px; border-radius: 6px; background: var(--bg-tertiary); margin-bottom: 6px; font-size: 14px;
}
.po-row .po-date { font-weight: 700; color: var(--header-primary); min-width: 88px; }
.po-row .po-amount { font-weight: 600; color: var(--text-normal); min-width: 90px; }
.po-row .po-deal { flex: 1 1 160px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-normal); }
.po-row .po-ref { color: var(--text-muted); font-size: 13px; }
.po-row .po-days { color: var(--text-muted); font-size: 13px; }
.po-row .po-days.po-late { color: var(--yellow); }
.po-row.po-paid { opacity: .85; }
.po-row.po-issue { border-left: 3px solid var(--red-bright); }
.badge.po-badge { flex-shrink: 0; }
.badge.po-st-scheduled { background: var(--blurple); color: #fff; }
.badge.po-st-pending_schedule, .badge.po-st-pending { background: var(--bg-active); color: var(--text-normal); }
.badge.po-st-verified { background: var(--green); color: #fff; }
.po-details { margin-top: 14px; }
.po-details summary { cursor: pointer; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--header-secondary); margin-bottom: 6px; }
.po-details summary:hover { color: var(--header-primary); }
.po-foot { margin: 12px 0 0; }
@media (max-width: 800px) {
  .po-row { gap: 4px 10px; }
  .po-row .po-deal { flex-basis: 100%; white-space: normal; }
  .po-row .po-date, .po-row .po-amount { min-width: 0; }
}
