/* Team-Dashboard */
.dash { min-height: 100vh; }
.wide { max-width: 1280px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at top, rgba(124, 92, 255, .22), transparent 60%); }
.login-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px;
  animation: rise .6s var(--ease) both; }
.login-card h1 { font-size: 1.8rem; margin: 8px 0 0; }
.login-msg { font-size: .9rem; min-height: 1.2em; color: var(--accent-2); }
.login-msg.err { color: var(--error); }

/* Kopfzeile */
.tag { font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(124, 92, 255, .2); color: var(--accent-2); }
.user { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.live { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 0 rgba(46, 204, 113, .6); animation: pulse-green 2s infinite; }
@keyframes pulse-green { 70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); } }

.dash-main { padding-top: 28px; padding-bottom: 60px; }

/* Kennzahlen */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px; transition: border-color .2s, transform .3s var(--ease); }
.stat:hover { border-color: var(--accent); transform: translateY(-2px); }
.stat strong { font-size: 2rem; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .85rem; }

/* Werkzeugleiste */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; background: var(--bg-alt); padding: 4px; border-radius: 999px; border: 1px solid var(--border); }
.tab { font: inherit; color: var(--muted); background: none; border: 0; padding: 8px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; transition: background .2s, color .2s; }
.tab.active { background: var(--card); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select { padding: 8px 12px; font-size: .9rem; }

/* Liste */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: grid; grid-template-columns: 1.4fr 1fr 2.4fr auto auto; gap: 16px; align-items: center;
  font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px;
  transition: border-color .2s, transform .25s var(--ease); animation: rise .4s var(--ease) both; }
.item:hover { border-color: var(--accent); transform: translateX(3px); }
.item-name { font-weight: 600; }
.item-name small { display: block; color: var(--muted); font-weight: 400; }
.item-desc { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-date { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 60px 16px; border: 1px dashed var(--border); border-radius: var(--radius); }

/* Status-Pillen */
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.st-neu { background: rgba(0, 212, 255, .15); color: #4fe0ff; }
.st-pruefung { background: rgba(255, 193, 7, .15); color: #ffd25e; }
.st-angenommen { background: rgba(124, 92, 255, .2); color: #b3a1ff; }
.st-in_arbeit { background: rgba(255, 140, 50, .18); color: #ffad6b; }
.st-fertig { background: rgba(46, 204, 113, .15); color: #5ee49a; }
.st-abgelehnt { background: rgba(255, 107, 129, .15); color: #ff8a9c; }

/* Detail-Schublade */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: 41; overflow-y: auto;
  background: var(--bg-alt); border-left: 1px solid var(--border); transform: translateX(100%); transition: transform .4s var(--ease); }
.drawer.open { transform: none; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; justify-content: space-between; gap: 16px; padding: 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-alt); z-index: 1; }
.drawer-head h2 { text-align: left; font-size: 1.5rem; margin: 8px 0 2px; }
.drawer-body { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.drawer-body h3 { margin: 0; }
.icon-btn { background: none; border: 1px solid var(--border); color: var(--text); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.icon-btn:hover { border-color: var(--accent); }
.facts { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; }
.facts dt { color: var(--muted); }
.facts dd { word-break: break-word; }
.facts a, .desc a { color: var(--accent-2); }
.desc { white-space: pre-wrap; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.quick, .drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.drawer-actions { justify-content: space-between; }
.d-form { padding: 20px; }
.btn-danger { background: transparent; border: 1px solid rgba(255, 107, 129, .5); color: var(--error); }
.btn-danger:hover { background: rgba(255, 107, 129, .1); box-shadow: none; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .item { grid-template-columns: 1fr auto; }
  .item-type, .item-desc { display: none; }
  .item-date { grid-column: 1; grid-row: 2; }
}
@media (max-width: 520px) {
  #user-email { display: none; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { margin-top: 6px; }
}
