/* panelklienta.css — wersja spójna (mobile-first) */

/* blokada scrolla */
.panel-lock-scroll {
  overflow: hidden !important;
}

/* overlay */
.panelk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 12px;

}

/* modal */
.panelk-modal {
  width: 100%;
  max-width: 520px;               /* telefon / mały tablet */
  max-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 26px;
  background: #f3f6fb;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  -webkit-overflow-scrolling: touch;
}

/* content */
.panelk-shell {
  position: relative;
  padding: 16px;
}

/* watermark (subtelny, żeby nie psuł czytelności) */
.panelk-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 26px;
  pointer-events: none;
  background: url("/HusService24.png") center 58% / 78% no-repeat;
  opacity: 0.08;
  filter: saturate(1.05);
}
.panelk-shell > * {
  position: relative;
  z-index: 1;
}

/* górny banner */
.panelk-topcard {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ece7ff 0%, #e6e0ff 100%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  margin-bottom: 14px;
}

.panelk-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.panelk-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.panelk-brandtext {
  min-width: 0;
}

.panelk-brandname {
  font-weight: 800;
  font-size: 20px;
  color: #1f1740;
  line-height: 1.1;
}

.panelk-brandtag {
  font-size: 13px;
  color: rgba(31, 23, 64, 0.75);
  font-weight: 600;
  margin-top: 2px;
}

/* data (na telefonie nie może wchodzić pod X) */
.panelk-date {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(31, 23, 64, 0.18);
  color: #1f1740;
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
  margin-right: 52px; /* robi miejsce na X */
}

/* close */
.panelk-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #1c2c4a;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18), inset 0 0 0 1px rgba(0,0,0,0.06);
}

/* karta user */
.panelk-usercard {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(120, 140, 255, 0.10), transparent 45%),
    radial-gradient(circle at 75% 55%, rgba(255, 180, 120, 0.10), transparent 50%);
}

.panelk-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #dbe7f6;
  display: grid;
  place-items: center;
  color: #1a3a6b;
  font-weight: 900;
  font-size: 20px;
}

.panelk-userinfo { min-width: 0; }

.panelk-username {
  font-size: 18px;
  font-weight: 800;
  color: #1b1b1b;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panelk-userline {
  font-size: 13px;
  font-weight: 650;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panelk-logout {
  border: 0;
  background: transparent;
  color: #1a4c9a;
  font-weight: 900;
  cursor: pointer;
  padding: 10px 8px;
  border-radius: 12px;
}
.panelk-logout:active { transform: scale(0.98); }

/* sekcja */
.panelk-section {
  font-size: 22px;
  font-weight: 900;
  color: #141414;
  margin: 6px 2px 12px;
}

/* kafelki — telefon: 2 kolumny */
.panelk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panelk-tile {
  text-align: left;
  border: 0;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  min-height: 108px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.panelk-tile--wide {
  grid-column: 1 / -1;
  min-height: 96px;
}

/* ikony */
.panelk-tile-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
  color: #173a6b;
  background: #e8f0fb;
  box-shadow: inset 0 0 0 1px rgba(23, 58, 107, 0.06);
  overflow: hidden;
}

.panelk-tile-txt {
  font-size: 16px;
  font-weight: 850;
  color: #1a1a1a;
}

/* delikatne różnice ikon */
.panelk-ico-plus  { background: #e7f0ff; }
.panelk-ico-check { background: #e8f7ff; }
.panelk-ico-clock { background: #eef1ff; }
.panelk-ico-doc   { background: #eef7ff; }
.panelk-ico-info  { background: #eef3ff; }

/* ====== MAŁY TABLET (większe ekrany telefonu) ====== */
@media (min-width: 600px) {
  .panelk-overlay { padding: 14px;}
  .panelk-modal { max-width: 560px; }
  .panelk-shell { padding: 18px; }
  .panelk-tile { min-height: 118px; }
}

@media (max-height: 915px) {
    .panelk-brandtag{
        font-size: 11px;
    }
    .panelk-topcard{
        margin-bottom: 10px;
    }
  .panelk-shell{
    max-height: 97%;
    
  }
  .panelk-close{
    right: 13px;
    top: 15px;
  }

 .panelk-datebtn{
    padding: 3px 16px !important;
    font-size: 15px !important;
    background: #e8f7ff !important;
  }
}

/* ====== DESKTOP / TABLET VIEW ====== */
@media (min-width: 900px) {
  .panelk-overlay{
    -webkit-backdrop-filter: blur(6px);
    padding: 18px;
    background: radial-gradient(1200px 520px at 50% -10%, rgba(14,165,233,.14), rgba(14,165,233,0) 60%), rgba(15,23,42,.42);
    backdrop-filter: blur(10px) saturate(1.05);
    max-height: 99%;
  }

  /* większy modal, ale nadal “aplikacyjny” */
  .panelk-modal{
    max-width: 860px;        /* tu regulujesz szerokość na desktop */
    max-height: 90vh;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: 0 40px 120px rgba(0,0,0,0.45);
  }

  .panelk-shell{ padding: 20px; }

  /* układ kafelków: 2 kolumny (czytelne na desktop) */
  .panelk-grid{
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .panelk-tile{
    min-height: 160px;
    padding: 18px;
    transition: transform .12s ease, box-shadow .12s ease;
  }
  .panelk-tile:hover{
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(0,0,0,0.12);
  }

  .panelk-tile--wide{
    grid-column: 1 / -1;
    min-height: 140px;
  }

  .panelk-tile-ico{
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
}
