/* ============ MythoriaBlocks Team-Panel – OPSucht Style (DaisyUI Dark) ============ */
:root {
  --b1: #1d232a;   /* Hintergrund */
  --b2: #191e24;   /* Karten, Sidebar */
  --b3: #15191e;   /* dunkler (Inputs) */
  --bc: #a6adbb;   /* gedämpfter Text */
  --text: #e5e7eb;
  --p: #ff9f1c;    /* Primary: Orange */
  --p-hover: #ffa940;
  --pc: #1d232a;   /* Text auf Primary */
  --a: #ffc22d;    /* Accent: Gold */
  --su: #22c55e;
  --er: #ef4444;
  --wa: #facc15;
  --in: #5a8df4;
  --border: rgba(255, 255, 255, .07);
  --border-2: rgba(255, 255, 255, .12);
  --radius-box: 1rem;
  --radius-btn: .5rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--b1);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--a); text-decoration: none; }
a:hover { text-decoration: underline; }

.fa-solid { width: 1.1em; text-align: center; }
.muted { color: var(--bc); }
.mono { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 13px; }
.empty { color: var(--bc); padding: 18px 0; text-align: center; }
.inline-form { display: inline; }

/* ============ Drawer-Layout (Sidebar) ============ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 280px;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  background: var(--b2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-logo { width: 42px; height: 42px; flex-shrink: 0; }
.brand-logo svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.brand-text span { font-size: 11px; color: var(--a); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; }

/* DaisyUI Menu */
.nav { flex: 1; padding: 12px; }
.nav-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--bc); opacity: .7;
  padding: 16px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: .5rem; color: var(--bc);
  font-weight: 500; font-size: .875rem;
  transition: background .15s, color .15s;
}
.nav-item .fa-solid { width: 20px; font-size: 15px; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-item.active {
  background: var(--p);
  color: var(--pc); font-weight: 700;
}
.nav-item.active .fa-solid { color: var(--pc); }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.sidebar-user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sidebar-user-info strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info span { font-size: 12px; font-weight: 600; }

.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 30px; height: 30px; }
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--p), var(--a));
  color: var(--pc); font-weight: 700; font-size: 15px;
}

.main { flex: 1; margin-left: 280px; display: flex; flex-direction: column; min-width: 0; }

/* Navbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px;
  background: rgba(29, 35, 42, .97);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 20px; font-weight: 700; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.server-ip {
  font-family: ui-monospace, Consolas, monospace; font-size: 13px;
  color: var(--a); background: rgba(255, 194, 45, .08);
  border: 1px solid var(--border-2); border-radius: .5rem; padding: 5px 10px;
}
.menu-btn { display: none; }

.content { padding: 26px 28px; max-width: 1180px; width: 100%; margin: 0 auto; flex: 1; }
.footer {
  padding: 16px 28px; text-align: center;
  color: var(--bc); font-size: 12.5px; opacity: .7;
  border-top: 1px solid var(--border);
}

/* ============ Buttons (DaisyUI btn) ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px; height: 42px; border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font-family: inherit; font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
  color: var(--text); background: rgba(255, 255, 255, .08);
}
.btn:hover { text-decoration: none; background: rgba(255, 255, 255, .14); }
.btn .fa-solid { font-size: 14px; }
.btn-primary { background: var(--p); color: var(--pc); }
.btn-primary:hover { background: var(--p-hover); }
.btn-ghost { background: transparent; border-color: var(--border-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.btn-danger { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .4); color: #fca5a5; }
.btn-danger:hover { background: rgba(239, 68, 68, .22); }
.btn-discord { background: #fff; color: #1d232a; }
.btn-discord:hover { background: #e5e7eb; }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: .8125rem; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: .5rem;
  background: transparent; border: 1px solid transparent;
  color: var(--bc); cursor: pointer; transition: all .15s;
  font-size: 14px;
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.icon-btn.danger:hover { background: rgba(239, 68, 68, .15); color: #fca5a5; }

/* ============ Cards (DaisyUI card) ============ */
.card {
  background: var(--b2);
  border: 1px solid var(--border);
  border-radius: var(--radius-box);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.card-head h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2 .card { margin-bottom: 0; }

.welcome-card {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(255, 159, 28, .14), rgba(255, 194, 45, .05));
  border: 1px solid rgba(255, 159, 28, .25);
  border-radius: var(--radius-box);
  padding: 22px 24px; margin-bottom: 20px;
}
.welcome-card h2 { font-size: 21px; margin-bottom: 4px; }
.welcome-card p { color: var(--bc); }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Stats (DaisyUI stat) */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { display: flex; align-items: center; gap: 14px; margin-bottom: 0; padding: 18px; }
.stat-icon {
  width: 46px; height: 46px; border-radius: .75rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 159, 28, .14); color: var(--a);
  font-size: 19px;
}
.stat-num { font-size: 26px; font-weight: 700; line-height: 1.1; color: #fff; }
.stat-label { font-size: 12.5px; color: var(--bc); font-weight: 500; }

.page-head {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.page-head p { color: var(--bc); }

/* ============ Tabellen (DaisyUI table) ============ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th {
  text-align: left; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--bc); padding: 10px 12px;
  border-bottom: 1px solid var(--border-2);
}
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.table tbody tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.detail-table td:first-child { width: 130px; }

/* ============ Badges (DaisyUI badge) ============ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 1.9rem;
  border: 1px solid; white-space: nowrap;
}
.badge-rank { background: rgba(255, 194, 45, .1); border-color: rgba(255, 194, 45, .35); color: var(--a); }
.badge-cat-Ban { background: rgba(239, 68, 68, .13); border-color: rgba(239, 68, 68, .45); color: #fca5a5; }
.badge-cat-Kick { background: rgba(250, 204, 21, .12); border-color: rgba(250, 204, 21, .45); color: #fde047; }
.badge-cat-Mute { background: rgba(255, 159, 28, .13); border-color: rgba(255, 159, 28, .45); color: #fdba74; }
.badge-cat-Warn { background: rgba(255, 194, 45, .12); border-color: rgba(255, 194, 45, .4); color: var(--a); }
.badge-cat-Sonstiges { background: rgba(166, 173, 187, .12); border-color: rgba(166, 173, 187, .4); color: #d1d5db; }
.badge-status-Offen { background: rgba(90, 141, 244, .13); border-color: rgba(90, 141, 244, .45); color: #93c5fd; }
.badge-status-Geprüft { background: rgba(34, 197, 94, .13); border-color: rgba(34, 197, 94, .45); color: #86efac; }
.badge-status-Umgesetzt { background: rgba(34, 197, 94, .13); border-color: rgba(34, 197, 94, .45); color: #86efac; }
.badge-status-Abgelehnt { background: rgba(239, 68, 68, .13); border-color: rgba(239, 68, 68, .45); color: #fca5a5; }
.badge-status-In { background: rgba(250, 204, 21, .12); border-color: rgba(250, 204, 21, .45); color: #fde047; }
.badge-team-Aktiv { background: rgba(34, 197, 94, .13); border-color: rgba(34, 197, 94, .45); color: #86efac; }
.badge-team-Urlaub { background: rgba(250, 204, 21, .12); border-color: rgba(250, 204, 21, .45); color: #fde047; }
.badge-team-Inaktiv { background: rgba(166, 173, 187, .12); border-color: rgba(166, 173, 187, .4); color: #d1d5db; }

/* ============ Formulare (DaisyUI input/select/textarea) ============ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .8125rem; font-weight: 600; color: var(--bc); }
.form-group input, .form-group select, .form-group textarea {
  background: var(--b3); border: 1px solid var(--border-2);
  border-radius: var(--radius-btn); padding: 0 14px; height: 42px;
  color: var(--text); font-family: inherit; font-size: .875rem;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.form-group textarea { height: auto; padding: 10px 14px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(255, 159, 28, .18);
}
.form-group .hint { font-size: 12px; color: var(--bc); opacity: .8; }
.form-group .hint code { background: var(--b3); padding: 1px 5px; border-radius: 5px; color: var(--a); font-size: 11.5px; }
.code-area { font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.6; }
.color-input { padding: 4px !important; height: 42px; cursor: pointer; }
.role-select { background: var(--b3); border: 1px solid var(--border-2); border-radius: .5rem; padding: 6px 8px; color: var(--text); font-family: inherit; font-size: 13px; }

.file-drop {
  display: flex; align-items: center; gap: 10px;
  background: var(--b3); border: 1.5px dashed var(--border-2);
  border-radius: var(--radius-btn); padding: 14px; cursor: pointer;
  color: var(--bc); font-size: 13.5px; transition: border-color .15s;
}
.file-drop:hover { border-color: var(--p); color: var(--a); }
.file-drop input { display: none; }
.file-drop .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.filter-bar { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 14px; align-items: end; }
.filter-bar .form-group { margin-bottom: 0; }

.status-form { display: flex; gap: 10px; align-items: end; margin-top: 18px; }
.status-form .form-group { flex: 1; }
.status-inline select { background: var(--b3); border: 1px solid var(--border-2); border-radius: .5rem; padding: 6px 8px; color: var(--text); font-family: inherit; font-size: 13px; }

/* ============ Modal (DaisyUI modal) ============ */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 12, 15, .78);
  display: none; align-items: center; justify-content: center;
  padding: 18px;
}
.modal.open { display: flex; }
.modal-box {
  background: var(--b2); border: 1px solid var(--border-2);
  border-radius: var(--radius-box); padding: 24px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  animation: modalIn .18s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h3 { font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ============ Alerts (DaisyUI alert) ============ */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-btn); margin-bottom: 18px;
  font-size: .875rem; font-weight: 500;
  border: 1px solid;
}
.alert .fa-solid { font-size: 15px; }
.alert-success { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .4); color: #86efac; }
.alert-error { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .4); color: #fca5a5; }

/* ============ Clans ============ */
.clan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.clan-card { margin-bottom: 0; display: flex; flex-direction: column; gap: 10px; }
.clan-top { display: flex; align-items: center; gap: 14px; }
.clan-tag {
  font-weight: 700; font-size: 15px;
  background: linear-gradient(135deg, var(--p), var(--a)); color: var(--pc);
  padding: 8px 12px; border-radius: .5rem; flex-shrink: 0;
}
.clan-top h3 { font-size: 17px; }
.clan-top .muted { font-size: 13px; }
.clan-desc { color: var(--bc); font-size: 14px; flex: 1; }
.clan-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.clan-actions { justify-content: flex-start; margin-top: 4px; }

/* ============ Requests ============ */
.request-list { display: flex; flex-direction: column; gap: 14px; }
.request-card { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 0; flex-wrap: wrap; }
.request-main { flex: 1; min-width: 260px; }
.request-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.request-top h3 { font-size: 16px; }
.request-desc { color: var(--bc); margin-bottom: 8px; }
.request-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.request-actions { display: flex; align-items: flex-start; gap: 8px; }

/* ============ Markdown-Seiten ============ */
.markdown h1 { font-size: 26px; margin-bottom: 14px; color: #fff; }
.markdown h2 { font-size: 19px; margin: 22px 0 8px; color: var(--a); }
.markdown h3 { font-size: 16px; margin: 16px 0 6px; }
.markdown p { margin-bottom: 10px; color: #d1d5db; }
.markdown ul, .markdown ol { margin: 6px 0 12px 22px; color: #d1d5db; }
.markdown li { margin-bottom: 4px; }
.markdown code { background: var(--b3); padding: 1px 6px; border-radius: 5px; color: var(--a); font-size: 13px; }
.markdown a { color: var(--a); }

/* ============ Beweis-Detail ============ */
.proof-media { width: 100%; border-radius: .75rem; border: 1px solid var(--border-2); background: #000; }
.proof-url { font-size: 12px; color: var(--bc); word-break: break-all; margin-top: 10px; font-family: ui-monospace, Consolas, monospace; }

/* ============ Admin ============ */
.user-cell { display: flex; align-items: center; gap: 10px; }
.role-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 20px; }
.perm-item {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--bc); cursor: pointer;
  padding: 6px 8px; border-radius: .5rem; transition: background .12s;
}
.perm-item:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.perm-item input { accent-color: var(--p); width: 16px; height: 16px; cursor: pointer; }
.reason-list { display: flex; flex-direction: column; gap: 6px; }
.reason-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: .5rem; background: var(--b3);
  border: 1px solid var(--border); font-size: 14px;
}
.reason-item .inline-form { margin-left: auto; }

/* ============ Error ============ */
.error-card { text-align: center; max-width: 520px; margin: 60px auto; padding: 40px 30px; }
.error-icon {
  width: 64px; height: 64px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(239, 68, 68, .12); color: #fca5a5;
  font-size: 26px;
}
.error-card h2 { font-size: 22px; margin-bottom: 8px; }
.error-card p { color: var(--bc); margin-bottom: 22px; }

/* ============ Login (OPSucht Style) ============ */
.login-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--b1);
}
.login-wrap { width: 100%; max-width: 400px; text-align: center; }
.login-card {
  background: var(--b2);
  border: 1px solid var(--border);
  border-radius: var(--radius-box);
  padding: 36px 32px 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
}
.login-logo { width: 84px; height: 84px; margin: 0 auto 16px; }
.login-logo svg { width: 100%; height: 100%; }
.login-title { font-size: 28px; font-weight: 700; letter-spacing: .2px; }
.login-title span { color: var(--a); }
.login-sub { color: var(--bc); font-size: 12px; text-transform: uppercase; letter-spacing: 2.5px; font-weight: 700; margin: 4px 0 26px; }
.login-note { color: var(--bc); font-size: 12.5px; margin-top: 20px; line-height: 1.6; }
.login-note a { color: var(--bc); text-decoration: underline; }
.login-features { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.login-features span {
  font-size: 11.5px; font-weight: 600; color: var(--a);
  background: rgba(255, 194, 45, .08); border: 1px solid var(--border-2);
  padding: 4px 10px; border-radius: 1.9rem;
}
.login-foot { color: var(--bc); font-size: 12.5px; margin-top: 18px; font-family: ui-monospace, Consolas, monospace; opacity: .7; }
.btn-discord .discord-logo { width: 20px; height: 20px; flex-shrink: 0; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,.6); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .server-ip { display: none; }
  .content { padding: 18px 16px; }
  .topbar { padding: 12px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
}

/* ============ Kanban-Board ============ */
.board { display:grid; grid-template-columns:repeat(auto-fit, minmax(230px, 1fr)); gap:14px; align-items:start; padding-bottom:10px; }
.board-col {
  background: var(--b2); border:1px solid var(--border); border-radius: var(--radius-box);
  min-width: 0; width: auto; padding: 12px;
  display:flex; flex-direction:column; max-height: calc(100vh - 220px);
}
.board-col-head { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.board-col-head strong { flex:1; font-size:14px; }
.board-cards { display:flex; flex-direction:column; gap:8px; overflow-y:auto; min-height:40px; border-radius:.5rem; }
.board-cards.drag-over { outline:2px dashed var(--p); outline-offset:-2px; }
.board-card {
  background: var(--b3); border:1px solid var(--border-2); border-radius:.6rem; padding:10px 12px;
  cursor:pointer; transition: border-color .12s, transform .12s;
}
.board-card:hover { border-color: var(--p); }
.board-card.dragging { opacity:.5; transform: rotate(1deg); }
.board-card-title { font-weight:600; font-size:13.5px; margin-bottom:6px; }
.board-card-meta { display:flex; flex-wrap:wrap; gap:8px; font-size:11.5px; align-items:center; }
.badge-prio-Hoch { background:rgba(250,204,21,.12); border-color:rgba(250,204,21,.45); color:#fde047; }
.badge-prio-Kritisch { background:rgba(239,68,68,.15); border-color:rgba(239,68,68,.5); color:#fca5a5; }
.badge-prio-Niedrig { background:rgba(166,173,187,.12); border-color:rgba(166,173,187,.4); color:#d1d5db; }

/* ============ Glyphs ============ */
.glyph-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:12px; }
.glyph-card { background:var(--b3); border:1px solid var(--border); border-radius:.6rem; padding:12px; text-align:center; }
.glyph-preview { height:64px; display:flex; align-items:center; justify-content:center; background:var(--b1); border-radius:.5rem; margin-bottom:8px; padding:6px; }
.glyph-name { font-weight:600; font-size:13px; }
.glyph-value { font-size:11px; margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ============ Bild-Galerie ============ */
.img-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; }
.img-thumb { position:relative; background:var(--b3); border:1px solid var(--border); border-radius:.5rem; overflow:hidden; }
.img-thumb img { width:100%; height:110px; object-fit:cover; display:block; }
.img-thumb form { position:absolute; top:4px; right:4px; }

/* Karten-Detail im Modal */
.card-attachments { display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:8px; margin:10px 0; }
.card-attachments img, .card-attachments video { width:100%; height:90px; object-fit:cover; border-radius:.5rem; border:1px solid var(--border-2); }
.comment-list { display:flex; flex-direction:column; gap:8px; margin:10px 0; max-height:200px; overflow-y:auto; }
.comment { background:var(--b3); border-left:3px solid var(--p); border-radius:.4rem; padding:8px 10px; font-size:13px; }

/* Abmeldungen */
.badge-leave-Geplant { background: rgba(90,141,244,.13); border-color: rgba(90,141,244,.45); color: #93c5fd; }
.badge-leave-Aktiv { background: rgba(250,204,21,.14); border-color: rgba(250,204,21,.5); color: #fde047; }
.badge-leave-Abgelaufen { background: rgba(166,173,187,.14); border-color: rgba(166,173,187,.45); color: #d1d5db; }

/* Kanban-Karten: Bild-Vorschau (per Link) */
.board-card-img { display:block; width:100%; max-height:140px; object-fit:cover; border-radius:.5rem; margin-bottom:8px; border:1px solid var(--border-2); }

/* Datei-Vorschau vor dem Upload */
.file-preview-list { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.file-preview-item { display:flex; align-items:center; gap:8px; background:var(--b3); border:1px solid var(--border-2); border-radius:.5rem; padding:6px 10px; font-size:13px; }
.file-preview-item .fp-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fp-remove { width:22px; height:22px; font-size:11px; }
/* Anhänge im Karten-Modal */
.card-attachments { display:flex; flex-wrap:wrap; gap:10px; }
.attach-item { display:flex; flex-direction:column; max-width:220px; }
.card-attachments img, .card-attachments video { max-width:220px; max-height:140px; border-radius:.5rem; border:1px solid var(--border-2); }

/* Glyph-Vorschau: feste Box – kleine Bilder werden automatisch größer skaliert (pixelated = knackig) */
.glyph-img { width:56px; height:56px; object-fit:contain; image-rendering:pixelated; border-radius:.3rem; }
.glyph-img-sm { width:36px; height:36px; object-fit:contain; image-rendering:pixelated; border-radius:.3rem; }

/* Konzept-Inhalt direkt in der Kanban-Karte */
.concept-body h1,.concept-body h2,.concept-body h3 { margin:8px 0 4px; font-size:15px; }
.concept-body p { margin:4px 0; }
.concept-body ul,.concept-body ol { margin:4px 0 4px 18px; padding:0; }
.concept-body code { background:var(--b2); padding:1px 5px; border-radius:4px; font-size:12px; }
.concept-body a { color:var(--p); }

/* Konzept-Karte als Dokument-Ansicht (Word-like, read-only) */
.doc-view { max-width: 720px; font-size: 14px; line-height: 1.55; }
.doc-view h1 { font-size: 20px; margin: 10px 0 6px; }
.doc-view h2 { font-size: 17px; margin: 12px 0 5px; }
.doc-view h3 { font-size: 15px; margin: 10px 0 4px; }
.doc-view p { margin: 6px 0; }
.doc-view ul, .doc-view ol { margin: 6px 0 6px 20px; }
.doc-view li { margin: 2px 0; }
.doc-view code { background: var(--b2); padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }
.doc-view pre { background: var(--b2); padding: 10px; border-radius: .5rem; overflow-x: auto; }
.doc-view a { color: var(--p); }
.doc-view img { max-width: 100%; border-radius: .5rem; }
.doc-view strong { color: #fff; }

/* ===== Team-Besprechung / Präsentationsmodus ===== */
#pres-stage { position: fixed; inset: 0; z-index: 200; background: #0b0d10; display: flex; flex-direction: column; }
.pres-progress { height: 5px; background: rgba(255,255,255,.08); }
.pres-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #ff8a00, #ffc233); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.pres-slide-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 6vw; overflow: hidden; }
.pres-slide { max-width: 1100px; width: 100%; text-align: center; color: #f3f4f6; }
.pres-slide.slide-in { animation: slideIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes slideIn { from { opacity: 0; transform: translateX(60px) scale(.98); } to { opacity: 1; transform: none; } }
.pres-head { font-size: clamp(28px, 5vw, 56px); font-weight: 800; background: linear-gradient(90deg,#ff8a00,#ffc233); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 26px; }
.pres-bullets { list-style: none; padding: 0; margin: 0; display: inline-block; text-align: left; }
.pres-bullets li { font-size: clamp(17px, 2.4vw, 27px); margin: 12px 0; padding-left: 34px; position: relative; color: #d1d5db; animation: bulletIn .4s ease both; }
.pres-bullets li::before { content: '▸'; position: absolute; left: 0; color: #ff8a00; }
.pres-bullets li:nth-child(2) { animation-delay: .08s; } .pres-bullets li:nth-child(3) { animation-delay: .16s; }
.pres-bullets li:nth-child(4) { animation-delay: .24s; } .pres-bullets li:nth-child(5) { animation-delay: .32s; }
@keyframes bulletIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pres-img { max-width: 100%; max-height: calc(100vh - 220px); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.pres-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 22px; background: rgba(255,255,255,.04); border-top: 1px solid rgba(255,255,255,.08); }
.pres-title { font-weight: 700; color: #e5e7eb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pres-counter { font-size: 13px; color: #9ca3af; font-variant-numeric: tabular-nums; }

/* Lightbox: Bilder groß öffnen */
#lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(5,6,8,.92); display: none; align-items: center; justify-content: center; cursor: zoom-out; }
#lightbox.open { display: flex; }
#lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.7); animation: lbIn .18s ease; }
@keyframes lbIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
#lightbox .lb-close { position: absolute; top: 18px; right: 24px; color: #fff; font-size: 26px; opacity: .8; }

/* 1:1 PPTX-Folien */
.pres-canvas { position: relative; margin: 0 auto; border-radius: 8px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.65); color: #111; }
.pres-block { position: absolute; overflow: hidden; }
.pres-block p { line-height: 1.25; }

/* PPTX-Block: Text standardmäßig lesbar */
.pres-canvas .pres-block { color: #111; }

/* ===== Kalender ===== */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { margin-bottom: 6px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px; }
.cal-cell { min-height: 96px; background: var(--b3); border: 1px solid var(--border-2); border-radius: .5rem; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal-empty { background: transparent; border: none; }
.cal-today { border-color: var(--p); box-shadow: 0 0 0 2px rgba(255,159,28,.25); }
.cal-day { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-today .cal-day { color: var(--p); }
.cal-event { display: block; width: 100%; text-align: left; background: rgba(255,138,0,.14); border: 1px solid rgba(255,138,0,.45); color: #ffcf9e; border-radius: .4rem; padding: 3px 7px; font-size: 12px; cursor: pointer; font-family: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event:hover { background: rgba(255,138,0,.28); }
@media (max-width: 900px) { .cal-cell { min-height: 64px; } }

/* ===== Rollen & Rechte (Discord-Style) ===== */
.role-nav-card { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px); }
.role-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--border-2); border-radius: 999px; background: var(--b3); color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 600; transition: background .15s; }
.role-chip:hover { background: rgba(255,138,0,.12); }
.role-card { scroll-margin-top: 190px; }
.role-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 4px; }
.perm-group { margin-top: 14px; border: 1px solid var(--border-2); border-radius: .6rem; padding: 10px 12px; background: rgba(255,255,255,.015); }
.perm-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 14px; color: var(--p); text-transform: uppercase; letter-spacing: .06em; }
.perm-group-actions { display: flex; gap: 6px; }
.btn-xs { padding: 2px 10px; font-size: 12px; }
.perm-item { align-items: flex-start; cursor: pointer; }
.perm-text { display: flex; flex-direction: column; gap: 1px; }
.perm-label { font-weight: 600; }
.perm-desc { font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.35; }

/* ===== Suchbarer Picker (Multi/Single) ===== */
.picker { border: 1px solid var(--border-2); border-radius: .5rem; background: var(--b3); padding: 8px; }
.picker-search { width: 100%; margin-bottom: 6px; }
.picker-list { max-height: 180px; overflow-y: auto; border: 1px solid var(--border-2); border-radius: .4rem; background: var(--b2); }
.picker-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13.5px; cursor: pointer; border-bottom: 1px solid var(--border-2); }
.picker-item:last-child { border-bottom: none; }
.picker-item:hover { background: rgba(255,138,0,.1); }
.picker-item input { accent-color: var(--p); width: 15px; height: 15px; }
.picker-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.picker-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,138,0,.14); border: 1px solid rgba(255,138,0,.45); color: #ffcf9e; border-radius: 999px; padding: 3px 6px 3px 10px; font-size: 12.5px; font-weight: 600; }
.picker-x { background: none; border: none; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.picker-x:hover { background: rgba(255,255,255,.15); }

/* ===== Light Theme ===== */
:root[data-theme="light"] {
  --b1: #f4f5f7;
  --b2: #ffffff;
  --b3: #eef0f3;
  --bc: #5b6472;
  --text: #1d232a;
  --border: rgba(0, 0, 0, .08);
  --border-2: rgba(0, 0, 0, .14);
}
:root[data-theme="light"] .perm-item:hover { background: rgba(0,0,0,.05); }
:root[data-theme="light"] .picker-list { background: var(--b3); }
:root[data-theme="light"] .cal-event { color: #b45309; }
:root[data-theme="light"] .role-chip { background: var(--b2); }

/* ===== Topbar: Suche, Dropdowns ===== */
.topbar-search input { width: 200px; }
.dd { position: relative; }
.dd summary { list-style: none; cursor: pointer; }
.dd summary::-webkit-details-marker { display: none; }
.dd-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: .5rem; color: var(--text); }
.dd-btn:hover { background: rgba(255,255,255,.06); }
:root[data-theme="light"] .dd-btn:hover { background: rgba(0,0,0,.06); }
.dd[open] .dd-menu { display: block; }
.dd-menu { display: none; position: absolute; right: 0; top: 40px; width: 320px; max-height: 420px; overflow-y: auto; background: var(--b2); border: 1px solid var(--border-2); border-radius: .6rem; box-shadow: 0 12px 32px rgba(0,0,0,.4); z-index: 100; padding: 6px; }
.dd-badge { position: absolute; top: -4px; right: -4px; background: var(--er); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 6px; }
.dd-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: 13px; }
.dd-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: .4rem; color: var(--text); font-size: 13px; text-decoration: none; }
.dd-item:hover { background: rgba(255,138,0,.1); text-decoration: none; }
.dd-item.unread { background: rgba(255,159,28,.08); }
.dd-all { display: block; padding: 8px 10px; font-size: 12.5px; color: var(--p); }
.dd-add { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); }
.dd-add input { flex: 1; min-width: 0; }

/* ===== Suche / Notifs / Stats / Wiki ===== */
.search-results { display: flex; flex-direction: column; }
.search-item { display: flex; flex-direction: column; gap: 1px; padding: 9px 6px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 14px; }
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: rgba(255,138,0,.08); text-decoration: none; }
.notif-list { display: flex; flex-direction: column; }
.notif-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(255,159,28,.06); }
.notif-text { color: var(--text); text-decoration: none; display: flex; gap: 8px; align-items: center; font-size: 14px; }
.notif-text:hover { text-decoration: none; color: var(--p); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; flex: none; }
.unread .notif-dot { background: var(--p); }
.stat-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; }
.stat-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.stat-bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, var(--p), rgba(255,159,28,.4)); border-radius: 3px 3px 0 0; min-height: 2px; }
.stat-bar-col span { font-size: 10px; color: var(--bc); }
.stat-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; }
.stat-row > span:first-child { width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row-bar { flex: 1; height: 8px; background: var(--b3); border-radius: 999px; overflow: hidden; }
.stat-row-bar div { height: 100%; background: var(--p); border-radius: 999px; }
.wiki-layout { display: grid; grid-template-columns: 260px 1fr; gap: 14px; align-items: start; }
.wiki-sidebar { position: sticky; top: 12px; }
.wiki-page-link { display: block; padding: 7px 10px; border-radius: .4rem; color: var(--text); font-size: 13.5px; text-decoration: none; }
.wiki-page-link:hover { background: rgba(255,138,0,.1); text-decoration: none; }
.wiki-page-link.active { background: rgba(255,159,28,.15); color: var(--p); font-weight: 600; }
@media (max-width: 800px) { .wiki-layout { grid-template-columns: 1fr; } .topbar-search input { width: 120px; } }
