/* MEDIA5 GROUPS — jasny, niezależny motyw POL.FAN / Katalog Firm.
   Tylko widoki z klasą m5g-light-v2. Istniejące zachowania JS/PHP pozostają bez zmian.
   Zmiana nazwy pliku usuwa konflikt z poprzednimi cache CSS. */
html body:has(.m5g-wrap.m5g-light-v2) #page-body,
html body:has(.m5g-wrap.m5g-light-v2) #wrap,
html body:has(.m5g-wrap.m5g-light-v2) #page-footer {
  background-color:#f4f7ff!important;
}
html body:has(.m5g-wrap.m5g-light-v2) #wrap {
  box-shadow:none!important;
}
html body .m5g-wrap.m5g-light-v2 {
  --m5g-ink:#173b60;
  --m5g-ink-deep:#102e50;
  --m5g-muted:#617c96;
  --m5g-border:#dce7f2;
  --m5g-white:#fff;
  --m5g-soft:#f5f9fe;
  --m5g-pale:#eaf4ff;
  --m5g-blue:#1676df;
  --m5g-shadow:0 7px 24px rgba(24,59,93,.055);
  color:var(--m5g-ink)!important;
  background:transparent!important;
  width:min(100% - 28px,1360px)!important;
  max-width:1360px!important;
  min-width:0!important;
  padding:0!important;
  margin:20px auto 44px!important;
  font:14px/1.5 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}
html body .m5g-wrap.m5g-light-v2 *,
html body .m5g-wrap.m5g-light-v2 *::before,
html body .m5g-wrap.m5g-light-v2 *::after { box-sizing:border-box; }
html body .m5g-wrap.m5g-light-v2 h1,
html body .m5g-wrap.m5g-light-v2 h2,
html body .m5g-wrap.m5g-light-v2 h3,
html body .m5g-wrap.m5g-light-v2 strong { text-shadow:none!important; }

/* HERO — ten sam jasny błękit i obramowanie co w Katalogu Firm. */
html body .m5g-wrap.m5g-light-v2 .m5g-hero {
  display:flex!important;gap:18px;align-items:center;
  padding:24px 27px!important;min-height:116px;
  border:1px solid var(--m5g-border)!important;
  border-radius:17px!important;
  background:linear-gradient(110deg,#f8fbff 0%,#eaf4ff 60%,#c9e2ff 100%)!important;
  color:var(--m5g-ink-deep)!important;
  box-shadow:var(--m5g-shadow)!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-hero-icon {
  display:grid!important;place-items:center;flex:0 0 65px;
  width:65px;height:65px;border-radius:14px;background:#daeaff!important;
  font-size:34px;color:#145cb1!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-hero h1 {
  color:#102f53!important;font-weight:800!important;
  font-size:clamp(23px,2.5vw,32px)!important;margin:0 0 5px!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-hero p {color:#587590!important;opacity:1!important;margin:0!important;}

/* WSPÓLNE BIAŁE MODUŁY / NAGŁÓWKI */
html body .m5g-wrap.m5g-light-v2 :is(
  .m5g-section,.m5g-topic-section,.m5g-topic-table,.m5g-panel,.m5g-post,
  .m5g-card,.m5g-watched-table,.m5g-member-card,.m5g-page-title,
  .m5g-new-topic,.m5g-tabs,.m5g-manage-nav,.m5g-access-panel,
  .m5g-trash-section,.m5g-approval-card,.m5g-modal,.m5g-success-panel,
  .m5g-trash-panel,.m5g-reply-form
) {
  background:#fff!important;color:var(--m5g-ink)!important;
  border-color:var(--m5g-border)!important;
  box-shadow:var(--m5g-shadow)!important;
}
html body .m5g-wrap.m5g-light-v2 :is(.m5g-section,.m5g-panel,.m5g-topic-table,.m5g-post,.m5g-card,.m5g-page-title,.m5g-tabs) {
  border-radius:13px!important;
}
html body .m5g-wrap.m5g-light-v2 :is(.m5g-section-title,.m5g-topic-section-title,.m5g-panel-head,.m5g-page-title,.m5g-trash-section-title) {
  background:linear-gradient(100deg,#edf6ff,#f9fcff)!important;
  color:#173b60!important;
  border-color:var(--m5g-border)!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-section {overflow:hidden;}
html body .m5g-wrap.m5g-light-v2 .m5g-section-title {
  padding:16px 18px!important;min-height:75px;
  border-bottom:1px solid var(--m5g-border)!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-section-title.official {border-left:4px solid #f3bd45!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-section-title.public {border-left:4px solid #2aac79!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-section-title.private {border-left:4px solid #8e7ae2!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-section-title strong {color:#163b5e!important;font-size:18px;}
html body .m5g-wrap.m5g-light-v2 :is(.m5g-section-title small,.m5g-page-title p,.m5g-card p,.m5g-members,.m5g-topic-author-label,.m5g-trash-help) {
  color:var(--m5g-muted)!important;
}
html body .m5g-wrap.m5g-light-v2 :is(.m5g-section-title small,.m5g-card p) {opacity:1!important;}

/* NAWIGACJA — białe zakładki i mocno widoczny tekst, również w pojedynczym temacie */
html body .m5g-wrap.m5g-light-v2 .m5g-groups-nav,
html body .m5g-wrap.m5g-light-v2 .m5g-tabs {
  background:#fff!important;
  border:1px solid var(--m5g-border)!important;
  border-radius:12px!important;
  padding:8px!important;
  gap:6px!important;
  box-shadow:var(--m5g-shadow)!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-groups-nav {
  display:flex!important;justify-content:flex-end;flex-wrap:wrap;margin:0 0 16px!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-tabs {
  display:flex!important;justify-content:space-between;align-items:center;
  flex-wrap:wrap;margin:10px 0 20px!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-tabs-local,
html body .m5g-wrap.m5g-light-v2 .m5g-tabs-global {
  background:transparent!important;display:flex!important;flex-wrap:wrap;gap:6px!important;
}
html body .m5g-wrap.m5g-light-v2 :is(.m5g-tabs a,.m5g-groups-nav a,.m5g-page-links a,.m5g-manage-nav a) {
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid #d8e6f4!important;border-radius:9px!important;
  background:#f7faff!important;color:#21567f!important;
  font-weight:700!important;text-decoration:none!important;
  padding:10px 12px!important;opacity:1!important;
  text-shadow:none!important;white-space:normal;
}
html body .m5g-wrap.m5g-light-v2 :is(.m5g-tabs a:hover,.m5g-groups-nav a:hover,.m5g-page-links a:hover,.m5g-manage-nav a:hover) {
  background:#e9f3ff!important;color:#0c60b8!important;border-color:#9fc8f0!important;
}
html body .m5g-wrap.m5g-light-v2 :is(.m5g-tabs a.active,.m5g-manage-nav a.active) {
  color:#fff!important;background:var(--m5g-blue)!important;border-color:#1167c1!important;
  box-shadow:0 2px 8px rgba(22,118,223,.18)!important;
}
html body .m5g-wrap.m5g-light-v2 :is(.m5g-tabs a.active:hover,.m5g-manage-nav a.active:hover) {background:#1266bd!important;color:#fff!important;}

/* LISTA GRUP — równe białe karty jak firmy. */
html body .m5g-wrap.m5g-light-v2 .m5g-grid {
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px!important;padding:18px!important;background:#fff!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-card {
  display:grid!important;grid-template-columns:155px minmax(0,1fr)!important;
  min-height:176px;border:1px solid var(--m5g-border)!important;
  overflow:hidden;background:#fff!important;
  transition:transform .15s,box-shadow .15s;
}
html body .m5g-wrap.m5g-light-v2 .m5g-card:hover {
  transform:translateY(-2px);box-shadow:0 10px 24px rgba(24,59,93,.12)!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-card-img {
  display:flex!important;width:100%;min-height:100%;position:relative;
  align-items:center;justify-content:center;overflow:hidden;
  background:linear-gradient(135deg,#dbeaff,#f2f8ff)!important;color:#1466ab!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-card-img img {
  display:block;width:100%!important;height:100%!important;
  max-width:none!important;object-fit:cover!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-card-body {background:#fff!important;padding:17px!important;min-width:0;}
html body .m5g-wrap.m5g-light-v2 .m5g-card h3 a {color:#143d65!important;text-decoration:none!important;font-size:16px!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-card h3 a:hover {color:#0c6ccb!important;text-decoration:underline!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-card .m5g-btn {margin-top:auto!important;}

/* PRZYCISKI, POLA — bez fioletu na dużych powierzchniach */
html body .m5g-wrap.m5g-light-v2 .m5g-btn-blue,
html body .m5g-wrap.m5g-light-v2 .m5g-btn-green {
  background:var(--m5g-blue)!important;color:#fff!important;
  border:1px solid #1268c8!important;border-radius:9px!important;
  text-decoration:none!important;box-shadow:none!important;
}
html body .m5g-wrap.m5g-light-v2 :is(.m5g-btn-blue:hover,.m5g-btn-green:hover) {background:#095cb7!important;}
html body .m5g-wrap.m5g-light-v2 :is(.m5g-btn-outline,.m5g-btn-light,.m5g-watch-btn,.m5g-topic-back) {
  background:#f3f8ff!important;border:1px solid #d1e1f2!important;color:#1764a7!important;
  border-radius:9px!important;box-shadow:none!important;
}
html body .m5g-wrap.m5g-light-v2 :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
  background:#fff!important;color:#173b60!important;
  border:1px solid #cbdced!important;border-radius:9px!important;
}
html body .m5g-wrap.m5g-light-v2 :is(input:focus-visible,select:focus-visible,textarea:focus-visible) {
  outline:2px solid #79b8f2!important;outline-offset:1px;
}

/* TEMATY — białe listy i wiersze, w tym przypięte. */
html body .m5g-wrap.m5g-light-v2 .m5g-topic-section {border:0!important;box-shadow:none!important;background:transparent!important;margin-bottom:18px!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-topic-section-title {
  padding:12px 16px!important;border:1px solid var(--m5g-border)!important;
  border-radius:12px 12px 0 0!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-topic-section-title h2,
html body .m5g-wrap.m5g-light-v2 .m5g-content-head h2 {color:#153c60!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-topic-table {
  overflow:hidden!important;border:1px solid var(--m5g-border)!important;
  border-radius:0 0 12px 12px!important;box-shadow:var(--m5g-shadow)!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-topic-head {
  background:#eaf3fe!important;color:#385f80!important;
  font-size:11px!important;border-bottom:1px solid var(--m5g-border)!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-topic-row-wrap {
  display:flex;background:#fff!important;border-top:1px solid #e7eef6!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-topic-row {
  flex:1;min-width:0;background:#fff!important;color:#183b5d!important;border:0!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-topic-row:hover {background:#f3f8fe!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-topic-row strong,
html body .m5g-wrap.m5g-light-v2 .m5g-topic-title-link {color:#173b60!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-topic-row-actions {background:#fff!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-last small {color:#607b96!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-identity-name {color:#126cbe!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-identity-nick {color:#6e8297!important;}

/* POJEDYNCZY TEMAT: cała karta jasna; odcień niebieskiego w panelu autora. */
html body .m5g-wrap.m5g-light-v2 .m5g-topic-title {
  background:#fff!important;border:1px solid var(--m5g-border)!important;
  border-radius:13px!important;min-height:auto!important;
  padding:18px 20px!important;margin-bottom:16px!important;
  display:flex!important;align-items:center;flex-wrap:wrap;
  box-shadow:var(--m5g-shadow)!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-topic-title h1 {font-size:clamp(22px,2.2vw,28px)!important;color:#173b60!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-topic-actions {
  background:transparent!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-post {
  display:grid!important;grid-template-columns:165px minmax(0,1fr)!important;
  border:1px solid var(--m5g-border)!important;
  overflow:hidden;background:#fff!important;
  margin-bottom:14px!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-post aside {
  background:#eef6ff!important;color:#274d72!important;
  border-right:1px solid var(--m5g-border)!important;
  padding:17px 12px!important;align-items:center;
}
html body .m5g-wrap.m5g-light-v2 .m5g-post-body {
  background:#fff!important;color:#173b60!important;
  padding:30px 22px 22px!important;min-width:0;word-break:break-word;
}
html body .m5g-wrap.m5g-light-v2 .m5g-post-meta,
html body .m5g-wrap.m5g-light-v2 .m5g-post-meta span {color:#70869b!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-post-body :is(p,div,span) {text-shadow:none!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-post-author-info {color:#173b60!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-reactions {border-color:#e5edf6!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-reaction-btn {background:#fff!important;color:#315f83!important;border-color:#d4e3f2!important;}

/* ZDJĘCIE OKŁADKOWE — tylko ono zachowuje ciemny gradient dla czytelności tekstu */
html body .m5g-wrap.m5g-light-v2 .m5g-cover {
  background-color:#d8e8f9!important;border:1px solid var(--m5g-border)!important;
  border-radius:14px!important;box-shadow:var(--m5g-shadow)!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-cover-overlay {
  background:linear-gradient(90deg,rgba(9,39,70,.83) 0%,rgba(8,39,70,.37) 65%,rgba(8,39,70,.16) 100%)!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-cover :is(h1,p,.m5g-cover-meta) {color:#fff!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-cover a {color:#fff!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-cover .m5g-btn {color:#fff!important;}

/* POZOSTAŁE PODSTRONY GRUP, MODERACJA I ZARZĄDZANIE */
html body .m5g-wrap.m5g-light-v2 :is(.m5g-watched-head,.m5g-member-head,.m5g-trash-section-title) {
  background:#ecf5ff!important;color:#315879!important;
}
html body .m5g-wrap.m5g-light-v2 :is(.m5g-watched-row,.m5g-member-row,.m5g-trash-item,.m5g-admin-row) {
  background:#fff!important;color:#173b60!important;border-color:#e2ebf5!important;
}
html body .m5g-wrap.m5g-light-v2 .m5g-mute-form,
html body .m5g-wrap.m5g-light-v2 .m5g-security-panel {background:#fff!important;color:#173b60!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-reply-form {padding:18px!important;}
html body .m5g-wrap.m5g-light-v2 .m5g-manage-nav {border:1px solid var(--m5g-border)!important;}

@media (max-width:1000px) {
  html body .m5g-wrap.m5g-light-v2 .m5g-grid {grid-template-columns:minmax(0,1fr)!important;}
}
@media (max-width:700px) {
  html body .m5g-wrap.m5g-light-v2 {width:calc(100% - 16px)!important;margin:12px auto 28px!important;}
  html body .m5g-wrap.m5g-light-v2 .m5g-hero {padding:16px!important;gap:12px!important;flex-wrap:wrap;}
  html body .m5g-wrap.m5g-light-v2 .m5g-hero-icon {flex-basis:48px;width:48px;height:48px;font-size:28px;}
  html body .m5g-wrap.m5g-light-v2 .m5g-hero .m5g-btn {margin-left:0!important;}
  html body .m5g-wrap.m5g-light-v2 .m5g-grid {padding:12px!important;gap:12px!important;}
  html body .m5g-wrap.m5g-light-v2 .m5g-card {grid-template-columns:110px minmax(0,1fr)!important;min-height:148px;}
  html body .m5g-wrap.m5g-light-v2 .m5g-card-body {padding:12px!important;}
  html body .m5g-wrap.m5g-light-v2 .m5g-tabs,
  html body .m5g-wrap.m5g-light-v2 .m5g-groups-nav {justify-content:flex-start!important;}
  html body .m5g-wrap.m5g-light-v2 .m5g-post {grid-template-columns:minmax(0,1fr)!important;}
  html body .m5g-wrap.m5g-light-v2 .m5g-post aside {border-right:0!important;border-bottom:1px solid var(--m5g-border)!important;}
  html body .m5g-wrap.m5g-light-v2 .m5g-post-body {padding:26px 13px 16px!important;}
  html body .m5g-wrap.m5g-light-v2 .m5g-topic-title {padding:14px!important;}
}
@media (max-width:390px) {
  html body .m5g-wrap.m5g-light-v2 .m5g-card {grid-template-columns:90px minmax(0,1fr)!important;}
  html body .m5g-wrap.m5g-light-v2 .m5g-tabs a,
  html body .m5g-wrap.m5g-light-v2 .m5g-groups-nav a {padding:8px!important;font-size:11px!important;}
}

/* M5 GROUPS 1.0.32 — same content width as /start and other sections;
   avoid independent 1360/1480px declarations escaping page canvas. */
html body #page-body .m5g-wrap.m5g-light-v2 {
  box-sizing:border-box !important;
  width:min(1280px, calc(100% - 28px)) !important;
  max-width:1280px !important;
  min-width:0 !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
@media(max-width:700px) {
  html body #page-body .m5g-wrap.m5g-light-v2 {
    width:calc(100% - 16px) !important;
    max-width:100% !important;
  }
}
