/* public/styles/start.css */
/* ================= START MOBILE-FIRST ================= */

.dashboardStart {
  display: grid;
  gap: var(--space-3);
}

.startTop {
  display: grid;
  gap: var(--space-3);
}

.startHero {
  display: grid;
  gap: var(--space-2);
}

.startStatVal {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

/* ── Sekcje i listy ── */
.startSection {
  max-width: 100%;
}

.startList {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.startListItem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="light"] .startListItem {
  background: rgba(12, 18, 32, 0.02);
}

.startListMain {
  min-width: 0;
}

.startListTitle {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  /* Ta sama ochrona co .imprezaName w events.css — nazwa imprezy nie wypycha
     ikonki klubu poza wiersz na wąskim ekranie. */
  min-width: 0;
  overflow-wrap: break-word;
}

.startListMeta {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

.startListSide {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.startStatValNeg {
  color: var(--danger);
}

/* ── Stat inline (ikonki + wartości w jednej linii) ── */
.startStatInline { display: flex; gap: 16px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.startStatInlineItem { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; color: var(--text); }
.startStatInlineItem svg { color: var(--text-muted); flex-shrink: 0; }

.startStatInlineBtn {
  background: none;
  border: none;
  margin: 0;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.startStatInlineBtn:hover,
.startStatInlineBtn:focus-visible {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  outline: none;
}
.startStatInlineBtn:hover svg,
.startStatInlineBtn:focus-visible svg {
  color: var(--primary);
}

/* ── Odznaka powiadomień na kafelku ── */
.tileNotifBadge { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; background: #e53535; color: #fff; border-radius: 9px; font-size: 10px; font-weight: 800; line-height: 18px; text-align: center; padding: 0 4px; pointer-events: none; }

/* ── Kafelek danger (składki nieopłacone) ── */
.startTile2.danger { border-color: rgba(255, 107, 107, 0.45); background: linear-gradient(180deg, rgba(255,107,107,0.22), rgba(255,107,107,0.12)); }
.startTile2.danger .startTile2Title { color: var(--danger); }

/* ── Kafelek kierownika imprezy klubowej (zielony, ma rzucać się w oczy) ── */
.startTile2.kierownik { border-color: rgba(34, 197, 94, 0.5); background: linear-gradient(180deg, rgba(34,197,94,0.24), rgba(34,197,94,0.13)); }
.startTile2.kierownik .startTile2Title,
.startTile2.kierownik .startTile2Subtitle { color: #16a34a; }

/* ── Stat bar (poziomy układ chipów) ── */
.startStatBar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.startStatChip { display: flex; flex-direction: column; gap: 1px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; min-width: 70px; }
:root[data-theme="light"] .startStatChip { background: rgba(12,18,32,0.04); }
.startStatChipKey { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.startStatChipVal { font-size: 13px; font-weight: 800; color: var(--text); }

/* ── Tile grid (3 kolumny mobile, 4 tablet) ── */
.startTileGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 480px) { .startTileGrid { grid-template-columns: repeat(4, 1fr); } }

/* Skróty modułu Sprzęt: zawsze dokładnie 3 kafelki — na szerokim ekranie
   4-kolumnowa siatka bazowa zostawiała fantomową 4. kolumnę i kafelki wyglądały
   na "przyklejone do lewej" zamiast wyśrodkowane (feedback użytkownika
   07.09.2026). Węższa, wyśrodkowana grupa zamiast rozciągania na całą kartę. */
.gearShortcutTiles {
  grid-template-columns: repeat(3, 1fr);
  max-width: 480px;
  margin: 0 auto 14px;
}

/* ── Kafelek 2.0 (większy tap target) ── */
.startTile2 { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0; height: 84px; border-radius: 16px; text-align: center; overflow: hidden; }
@media (min-width: 480px) { .startTile2 { height: 92px; } }
.startTile2 svg { flex-shrink: 0; display: block; }
.startTile2Title { font-size: 11px; font-weight: 800; color: var(--text); line-height: 1.1; letter-spacing: 0.01em; }
@media (min-width: 480px) { .startTile2Title { font-size: 12px; } }

.startTile2Subtitle { font-size: 10px; font-weight: 700; color: var(--text-muted); line-height: 1; }
.startTile2Subtitle .startStatVal { font-size: 10px; }

/* Przycisk „Zobacz wszystkie" na końcu listy sekcji (pełna szerokość) */
.startSectionFooterBtn { width: 100%; margin-top: 10px; }

/* ── Rozwijane wydarzenia na stronie głównej (najbliższe wydarzenia) ── */
.startEventItem { border: 1px solid var(--border); border-radius: 14px; background: rgba(255, 255, 255, 0.03); overflow: hidden; overflow-wrap: anywhere; word-break: break-word; }
:root[data-theme="light"] .startEventItem { background: rgba(12, 18, 32, 0.02); }
/* summary współdzieli .startListItem (grid 1fr auto), ale bez własnego obramowania/tła */
.startEventItem .startEventSummary { border: 0; border-radius: 0; background: transparent; cursor: pointer; align-items: center; list-style: none; }
.startEventItem .startEventSummary::-webkit-details-marker { display: none; }
.startEventChevron { color: var(--text-muted); flex-shrink: 0; align-self: center; transition: transform 0.18s ease; }
.startEventItem[open] .startEventChevron { transform: rotate(180deg); }
.startEventSide { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.startEventSide .imprezaInterest { margin-left: 0; }
.startEventDetail { padding: 0 12px 12px; display: grid; gap: 6px; }
.startEventDetailRow { font-size: 13px; color: var(--text); line-height: 1.4; }
.startEventDetailRow strong { color: var(--text-muted); font-weight: 700; }
.startEventDetailRow a { color: var(--accent, #5b9dff); font-weight: 700; text-decoration: none; }
.startEventDetailRow a:hover { text-decoration: underline; }
.startEventDetailRow--desc { white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; }

/* ── Profil: jedna spójna karta (staż, opiekunowie, popover roli) ── */
.profileChipsWrap { position: relative; }
.profileBlock { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); text-align: left; }
.profileBlockTitle { margin: 0 0 8px; font-size: 14px; font-weight: 800; color: var(--text); }
.stazVal { font-size: 15px; color: var(--text); margin-bottom: 8px; }
.stazVal strong { font-size: 22px; font-weight: 800; }
.stazProgress { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-bottom: 8px; }
:root[data-theme="light"] .stazProgress { background: rgba(12, 18, 32, 0.1); }
.stazBar { height: 100%; border-radius: 4px; background: var(--primary); transition: width 0.3s; }
.stazRemaining { margin: 0 0 8px; font-weight: 700; color: var(--text); }
.stazRemaining.stazDone { color: var(--ok); }
.stazHint { margin: 0; font-size: 12px; line-height: 1.4; }
.mentorRow { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mentorRow:last-child { border-bottom: none; }
.mentorRole { color: var(--text-muted); flex-shrink: 0; }
.mentorName { color: var(--text); font-weight: 700; text-align: right; }

/* ── Box „Klub" w karcie profilu (zarząd, KR, konto, dokumenty) ── */
.klubMail { margin-left: 6px; color: var(--accent, #5b9dff); text-decoration: none; font-weight: 700; }
.klubMail:hover { text-decoration: underline; }
.klubList { margin: 0; padding-left: 18px; text-align: left; }
.klubList li { padding: 3px 0; color: var(--text); font-weight: 700; }
.klubKonto { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.klubKontoLine { flex: 1 1 200px; min-width: 0; font-size: 13px; line-height: 1.5; color: var(--text); }
.klubKontoLine strong { font-weight: 800; margin-right: 6px; }
.klubKontoNr { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: 0.02em; overflow-wrap: anywhere; user-select: all; }
.klubCopyBtn { flex: 0 0 auto; padding: 4px 10px; font-size: 12px; }
.klubFinanse { margin-top: 8px; display: grid; gap: 4px; }
.klubFinRow { font-size: 13px; color: var(--text-muted); }
.klubFinRow strong { color: var(--text); font-weight: 800; }
.klubLinks { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 0 2px; }
.klubLinks a { color: var(--accent, #5b9dff); font-weight: 700; text-decoration: none; }
.klubLinks a:hover { text-decoration: underline; }

/* ── Moduł Klub: nagłówek (konto/adresy) + zakładki (Klucze / Kto jest kim) ── */
.klubHeaderInfo .profileBlock:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.klubVideo { width: 100%; display: block; border-radius: 12px; margin-top: 4px; background: #000; }

/* Kafelki z ikonkami zamiast płaskich przycisków-zakładek (feedback użytkownika
   05.09.2026) — ten sam wzorzec co .startTile2 na stronie głównej, ale mniejsze
   i ZAWSZE 3 w rzędzie (bez przejścia na 4 kolumny przy szerszym ekranie jak w
   .startTileGrid) — priorytet ma wygląd na mobile, gdzie ten ekran jest używany
   najczęściej. */
.klubTileGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.klubTile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  height: 64px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
/* Kafelek „Dysk klubowy" jest linkiem (<a>), nie przyciskiem — patrz komentarz
   w klub_module.js. Bez tego przeglądarka podkreśliłaby jego etykietę. */
a.klubTile { text-decoration: none; }
/* Adresy w module Klub prowadzą do nawigacji — podkreślenie kropkowane sygnalizuje
   klikalność, nie krzycząc kolorem linku w gęstym bloku danych. */
.klubAddrLink { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.klubAddrLink:hover { color: var(--accent, #5b9dff); }
:root[data-theme="light"] .klubTile { background: rgba(12, 18, 32, 0.03); }
.klubTile svg { flex-shrink: 0; display: block; }
.klubTile.active, .klubTile:hover { border-color: var(--accent, #3b82f6); background: rgba(59, 130, 246, 0.14); }
.klubTileTitle { font-size: 10.5px; font-weight: 800; color: var(--text); line-height: 1.1; letter-spacing: 0.01em; }

/* Ikonka „i" przy roli + wyskakująca chmurka z wyjaśnieniem (tylko po kliknięciu) */
.infoIcon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 6px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 11px; font-weight: 800; font-style: italic; line-height: 1; cursor: pointer; vertical-align: middle; }
.infoIcon:hover { color: var(--text); border-color: var(--text-muted); }
.infoPopover { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 20; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-1); text-align: left; cursor: pointer; }
.infoPopover.show { display: block; }
.infoPopover::before { content: ""; position: absolute; top: -6px; left: 20px; width: 10px; height: 10px; background: var(--surface); border-left: 1px solid var(--border); border-top: 1px solid var(--border); transform: rotate(45deg); }