/* ===== [AWIH] Tiles Menu ===== */
body.has-awih-crm{
  --tiles-height: 112px;               /* wysokość kafla */
  --tiles-gap: 12px;
  --page-padding-x: 12px;              /* małe marginesy po bokach */
  padding-top: calc(var(--tiles-height) + 28px); /* odsunięcie treści pod fixed menu */
}

.awih-tiles-menu{
  position: fixed; top:0; left:0; right:0; z-index: 9999;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.awih-tiles-row{
  display: grid;
  grid-template-columns: repeat( auto-fit, minmax(220px, 1fr) ); /* elastycznie, 1 wiersz na dużych ekranach */
  gap: var(--tiles-gap);
  padding: 10px var(--page-padding-x);
  max-width: 100%;
  margin: 0 auto;
}

.tile, .tile:link, .tile:visited{
  display:flex; align-items:center; justify-content:center;
  height: var(--tiles-height);
  color:#fff; background:#8a8a8a; text-decoration:none;
  text-transform: uppercase; font-weight:700; border-radius:6px; user-select:none;
  text-align:center; padding: 0 8px;
}
.tile--red  { background:#b30000; }
.tile--gold { background:#d8a100; }
.tile--blue { background:#1a73e8; }
.tile--gray { background:#5f6368; }

.tile-wrap{ position: relative; }
.tile-wrap .tile{ width: 100%; }

.dropdown{
  position:absolute; top: calc(var(--tiles-height) + 6px); left:0;
  background:#fff; border:1px solid #e5e5e5; border-radius:6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  min-width: 240px; padding: 8px; overflow:auto; max-height: 60vh;
}
.dropdown a{
  display:block; padding:10px 12px; color:#333; text-decoration:none; border-radius:4px;
}
.dropdown a:hover{ background:#f3f3f3; }

/* Pełna szerokość treści strony z małymi marginesami */
body.has-awih-crm .container, 
body.has-awih-crm .container-width, 
body.has-awih-crm .row{
  max-width: 100% !important;
  padding-left:  var(--page-padding-x);
  padding-right: var(--page-padding-x);
}

/* Mobile: 2–3 kafle w rzędzie w zależności od szerokości */
@media (max-width: 980px){
  .awih-tiles-row{ grid-template-columns: repeat( auto-fit, minmax(180px, 1fr) ); }
}
@media (max-width: 580px){
  body.has-awih-crm{ --tiles-height: 96px; }
  .awih-tiles-row{ grid-template-columns: repeat(2, 1fr); }
}
