/* =====================================================================
   Startseite: Überblick nach dem Anmelden (home.js). Baut auf portal.css auf.
   ===================================================================== */

.hm { display: grid; gap: 30px; margin-bottom: 34px; }
.hm h1, .hm h2, .hm h3 { margin: 0; }
.hm .row, .s-home .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Kopf: Profil links, große Flächen rechts */
.hm-top { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: stretch; }

.hm-me {
  position: relative; overflow: hidden; display: grid; gap: 14px; align-content: start;
  padding: 22px; border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(150deg, color-mix(in srgb, var(--team) 14%, var(--panel)), var(--panel) 60%);
}
.hm-me::before { content: ""; position: absolute; right: 0; top: 0; width: 90px; height: 26px; background: var(--checker); opacity: .08; }
.hm-me::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--team), transparent 70%); }
.hm-me-h { display: flex; gap: 16px; align-items: center; }
.hm-av {
  flex: 0 0 64px; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font: 700 24px var(--f-ui); font-style: normal;
  color: var(--team-ink); background: linear-gradient(140deg, color-mix(in srgb, var(--team) 85%, #fff), color-mix(in srgb, var(--team) 60%, #000));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--team) 30%, transparent);
}
.hm-hello { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.hm-me h1 { font-size: 28px; line-height: 1.1; }
.hm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hm-status { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); font-weight: 700; }
.hm-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); flex: none; }
.hm-status.ok .dot { background: var(--team); box-shadow: 0 0 10px var(--team); }
.hm-status.live { border-color: color-mix(in srgb, var(--red) 50%, var(--line-2)); }
.hm-status.live .dot { background: var(--red); box-shadow: 0 0 10px var(--red); animation: hm-pulse 1.4s ease-in-out infinite; }
@keyframes hm-pulse { 50% { opacity: .3; } }
.hm-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; color: var(--muted); }
.hm-checks li { display: flex; gap: 9px; align-items: baseline; }
.hm-checks li::before { content: "!"; flex: none; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--f-ui);
  background: color-mix(in srgb, var(--yellow) 22%, var(--panel-3)); color: var(--yellow); transform: translateY(2px); }
.hm-checks li.ok::before { content: "✓"; background: color-mix(in srgb, var(--green) 20%, var(--panel-3)); color: var(--green); }
.hm-checks b { color: var(--text); }
.hm-me-f { margin-top: 2px; }

.hm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-content: stretch; }
.hm-tile {
  --c: var(--team);
  position: relative; display: grid; grid-template-rows: 1fr auto auto; gap: 3px; min-height: 132px; padding: 18px; border-radius: 20px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, var(--panel)), var(--panel) 65%);
  border: 1px solid var(--line); color: var(--text) !important; text-decoration: none; overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.hm-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 55%, var(--line)); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.hm-tile:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.hm-tile b { font-size: 19px; }
.hm-tile small { color: var(--muted); font-size: 13px; }
.hm-ico { align-self: start; margin-bottom: 10px; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 22%, var(--panel-3)); color: var(--c); }
.hm-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-tile.t-events { --c: #ff5a4e; grid-column: span 2; }
.hm-tile.t-ses { --c: var(--team); grid-column: span 2; }
.hm-tile.t-teams { --c: #b15cff; }
.hm-tile.t-area { --c: #ff9f0a; grid-column: span 2; }
.hm-tile.t-area b { font-size: 24px; }
.hm-tile.t-replay { --c: #ffd60a; }
.hm-tile.t-demo { --c: #00d36f; }
.hm-tile.t-admin { --c: #8c96a3; }
.hm-tile.t-events b, .hm-tile.t-ses b { font-size: 24px; }
.hm-tile[hidden] { display: none; }

/* Abschnitte (Events, Sitzungen) */
.hm-sec-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hm-sec-h h2 { font-size: 28px; line-height: 1.1; margin: 0; }
.hm-sec-h .p-sub { margin: 4px 0 0; color: var(--muted); }
#sitzungen, #events { scroll-margin-top: 80px; }

.hm-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.hm-ev {
  position: relative; display: grid; gap: 6px; padding: 18px 18px 16px; border-radius: 20px; min-height: 190px; align-content: start;
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--c); color: var(--text) !important; text-decoration: none;
  transition: transform .15s, border-color .15s;
}
.hm-ev:hover { transform: translateY(-2px); border-color: var(--line-2); border-left-color: var(--c); }
.hm-ev.live { box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 40%, transparent) inset; }
.hm-ev.past { opacity: .7; }
.hm-ev h3 { font-size: 21px; line-height: 1.15; }
.hm-ev-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 22px; }
.hm-ev-team { font-size: 12px; font-weight: 700; color: var(--team); letter-spacing: .05em; text-transform: uppercase; }
.hm-ev-sub { margin: 0; color: var(--muted); font-size: 13.5px; }
.hm-ev-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 8px; border-radius: 12px; overflow: hidden; background: var(--line); }
.hm-ev-info > div { background: var(--panel-2); padding: 8px 10px; min-width: 0; }
.hm-ev-info span { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.hm-ev-info b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ev-info small { color: var(--muted); font-weight: 600; }
.hm-empty { padding: 22px; border: 1px dashed var(--line-2); border-radius: 20px; display: grid; gap: 6px; justify-items: start; }
.hm-empty p { margin: 0 0 6px; }

.ev-live { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--red) 18%, var(--panel-3)); color: #ffb3ad; font: 700 11px/1.6 var(--f-ui); letter-spacing: .06em; white-space: nowrap; }
.ev-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: hm-pulse 1.4s ease-in-out infinite; }
.ev-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--panel-3); color: var(--muted); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .ev-live::before, .hm-status.live .dot { animation: none; } .hm-tile, .hm-ev { transition: none; } }

/* Sitzungen: Fläche wie die anderen Abschnitte */
.s-home { padding-top: 26px; border-top: 1px solid var(--line); }
.s-home .room { border-radius: 18px; overflow: hidden; }

@media (max-width: 1000px) {
  .hm-top { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-tile { min-height: 116px; padding: 14px; }
  .hm-tile.t-events, .hm-tile.t-ses, .hm-tile.t-area { grid-column: span 2; }
  .hm-ico { width: 36px; height: 36px; margin-bottom: 6px; }
  .hm-tile b { font-size: 16px; }
  .hm-tile.t-events b, .hm-tile.t-ses b { font-size: 20px; }
  .hm-ev-info { grid-template-columns: 1fr; }
}
