/* ========================================
   LEVELUP – MOBILE PRO UI (SaaS QUALITY)
======================================== */

@media (max-width: 768px){

/* =========================
   GLOBAL RESET
========================= */

html, body{
  overflow: auto !important;
  height:auto;
}

.app{
  grid-template-columns: 1fr !important;
  height:auto !important;
}

/* =========================
   SIDEBAR (OFFCANVAS)
========================= */

.sidebar{
  position: fixed !important;
  top:0;
  left:0;

  width: 85vw;
  max-width: 320px;
  height:100vh;

  transform: translateX(-110%);
  transition: transform .25s ease;

  z-index:2000;
}

.sidebar.open{
  transform: translateX(0);
}

/* overlay */
.mobileOverlay{
  position: fixed;
  inset:0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
  z-index:1500;
}
.mobileOverlay.hidden{display:none}

/* =========================
   TOPBAR
========================= */

.mobileTopbar{
  position: sticky;
  top:0;
  z-index:1000;

  display:flex;
  align-items:center;
  justify-content:space-between;

  height:56px;
  padding:0 12px;

  background: rgba(10,10,12,.85);
  backdrop-filter: blur(12px);

  border-bottom:1px solid rgba(255,255,255,.06);
}

.mobileMenuBtn{
  width:40px;
  height:40px;

  border-radius:12px;
  border:1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:20px;
}

.mobileTitle{
  font-size:15px;
  font-weight:900;
  letter-spacing:.02em;
}

/* =========================
   MAIN / VIEW
========================= */

.main{
  padding:0 !important;
}

.viewRoot{
  padding:12px !important;
}

/* =========================
   CARDS
========================= */

.card{
  border-radius:16px !important;
}

.card__body{
  padding:12px !important;
}

/* =========================
   DASHBOARD – CLEAN MOBILE
========================= */

/* ukryj ciężkie rzeczy */
#dashboard .clients-table,
#dashboard .toolbar,
#dashboard .panel-section{
  display:none !important;
}

/* zostaw top + akcje */
#dashboard .dashWrap{
  gap:10px;
}

/* QUICK ACTIONS */
.quick-actions{
  display:grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin-top:10px;
}

@media (max-width:420px){
  .quick-actions{ grid-template-columns: repeat(2,1fr); }
}

.qa-btn{
  aspect-ratio:1/1;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:16px;
  font-size:12px;

  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}

/* =========================
   TABLE → MOBILE CARDS
========================= */

.clients-table,
.clients-table thead,
.clients-table tbody,
.clients-table tr,
.clients-table td{
  display:block;
  width:100%;
}

.clients-table thead{
  display:none;
}

.clients-table tr{
  margin-bottom:10px;
  padding:12px;
  border-radius:14px;
  background: rgba(255,255,255,.03);
}

.clients-table td{
  padding:6px 4px;
  font-size:13px;
}

/* =========================
   LISTY (powiadomienia, kompendium)
========================= */

.notifList,
.kompList{
  max-height:none !important;
  overflow:visible !important;
}

/* =========================
   GRIDY
========================= */

.kompGrid{
  grid-template-columns:1fr !important;
}

/* =========================
   FORMULARZE
========================= */

.formGrid{
  grid-template-columns:1fr !important;
}

.field input,
.field select{
  height:44px;
  font-size:14px;
}

/* =========================
   BUTTONY
========================= */

.btn{
  width:100%;
  height:44px;
}

/* =========================
   TOOLBAR
========================= */

.toolbarRow{
  flex-direction:column;
  align-items:stretch;
}

.searchBox{
  width:100%;
}

/* =========================
   MODALE
========================= */

.waiting-modal-content{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  border-radius:0 !important;
  height:100vh;
}

/* =========================
   POPOVERY
========================= */

.payPop{
  width:95vw !important;
  left:50% !important;
  transform:translateX(-50%) !important;
}

/* =========================
   SCROLL UX (iOS smooth)
========================= */

*{
  -webkit-overflow-scrolling: touch;
}

/* =========================
   SAFE AREAS (iPhone)
========================= */

body{
  padding-bottom: env(safe-area-inset-bottom);
}

}
/* =========================
   POWIADOMIENIA – APP STYLE
========================= */

#powiadomienia .card{
  background: transparent !important;
  border:none !important;
}

.notifList{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:4px;
}

/* karta */
.notification-card{
  background: linear-gradient(180deg, #111, #0a0a0a);
  border-radius:16px;
  padding:14px;

  border:1px solid rgba(255,255,255,.06);

  display:flex;
  flex-direction:column;
  gap:8px;

  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}

/* header */
.notification-card__title{
  font-size:14px;
  font-weight:700;
  line-height:1.3;
}

/* tekst */
.notification-card__text{
  font-size:13px;
  color:#aaa;
  line-height:1.4;
}

/* footer */
.notification-card__time{
  font-size:11px;
  opacity:.5;
}

/* badge unread */
.notification-card.unread{
  border-color: rgba(212,175,55,.5);
}
/* =========================
   NOWI KLIENCI – PRO MOBILE
========================= */

#nowi table,
#nowi .clients-table{
  display:block;
}

/* usuń header */
#nowi thead{
  display:none !important;
}

/* każdy klient = karta */
#nowi tr{
  display:flex;
  flex-direction:column;
  gap:8px;

  margin-bottom:12px;
  padding:14px;

  border-radius:16px;

  background: linear-gradient(180deg, #111, #0a0a0a);
  border:1px solid rgba(255,255,255,.06);

  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}

/* imię (pierwsza linia) */
#nowi td:nth-child(1){
  font-weight:700;
  font-size:15px;
  color:#fff;
}

/* dane */
#nowi td{
  font-size:13px;
  color:#aaa;
}

/* ukryj puste */
#nowi td:empty{
  display:none;
}

/* akcje */
#nowi td:last-child{
  margin-top:10px;

  display:flex;
  gap:8px;
}

/* przyciski */
#nowi .btn{
  flex:1;
  height:42px;
  font-size:13px;
  border-radius:10px;
}

/* hover efekt */
#nowi tr:active{
  transform: scale(.98);
}
/* =========================
   POWIADOMIENIA – FINAL FIX
========================= */

/* 🔥 usuń sztywne wysokości */
#powiadomienia .card{
  height: auto !important;
  min-height: auto !important;
  display: block !important;
}

/* 🔥 kontener */
#powiadomienia .card__body{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 🔥 lista */
.notifList{
  display: flex;
  flex-direction: column;
  gap: 10px;

  height: auto !important;
  max-height: none !important;
  @media (max-width: 768px){
  #powiadomienia .notifList{
    overflow-y: auto !important;
    height: auto;
  }
}
}

/* 🔥 usuń flex-grow bug */
.notifList > *{
  flex: none !important;
}

/* 🔥 usuń pustą przestrzeń */
#powiadomienia{
  min-height: auto !important;
}

/* 🔥 przyklej content do góry */
.viewRoot{
  align-items: flex-start !important;
}
.notification-card{
  margin-bottom: 0;
}

#powiadomienia .card__header{
  margin-bottom: 6px;
}
/* =========================
   MOBILE BACKGROUND CLEAN
========================= */

/* usuń wszystkie gradienty */
body{
  background: #050505 !important;
}

/* usuń glow (to Ci robi ten efekt) */
body::before{
  display:none !important;
}

/* app full background */
.app{
  background: #050505 !important;
}

/* main */
.main{
  background: #050505 !important;
}

/* view */
.viewRoot{
  background: #050505 !important;
}
/* =========================
   DASHBOARD – CLEAN MOBILE
========================= */

/* wyłącz wszystko stare */
#dashboard .clients-table,
#dashboard .toolbar,
#dashboard .panel-section,
#dashboard .table,
#dashboard .filters,
#dashboard .dashWrap > *{
  display:none !important;
}

/* wrapper */
.mobileDashboard{
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:10px;
}

/* =========================
   NAME
========================= */

.mobileUserName{
  font-size:20px;
  font-weight:900;
  text-align:center;
}

/* =========================
   STATUS PILLS (jak na screenie)
========================= */

.mobileStatusRow{
  display:flex;
  gap:10px;
  overflow:auto;
  padding-bottom:4px;
}

.mobileStatus{
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  white-space:nowrap;

  background: rgba(0,255,150,.08);
  border:1px solid rgba(0,255,150,.2);
  color:#7affc1;
}

/* =========================
   ACTION BAR
========================= */

.mobileActionBar{
  display:flex;
  gap:10px;
  justify-content:space-between;

  padding:10px;
  border-radius:16px;

  background: linear-gradient(180deg, #111, #0a0a0a);
  border:1px solid rgba(255,255,255,.06);
}

/* pojedyncza ikona */
.mobileActionIcon{
  width:44px;
  height:44px;

  border-radius:12px;

  display:flex;
  align-items:center;
  justify-content:center;

  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);

  font-size:16px;
}

.mobileActionIcon:active{
  transform: scale(.92);
}
/* =========================
   DASHBOARD – PREMIUM UI
========================= */

.mobileDashboard{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;

  padding:16px;
}

/* karta */
.mobileDashboard > *{
  width:100%;
  max-width:420px;
}

/* =========================
   NAME
========================= */

.mobileUserName{
  font-size:22px;
  font-weight:900;
  text-align:center;
  letter-spacing:0.02em;
}

/* =========================
   STATUS PILLS
========================= */

.mobileStatusRow{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
}

.mobileStatus{
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;

  background: rgba(0,255,150,.06);
  border:1px solid rgba(0,255,150,.25);
  color:#7affc1;

  backdrop-filter: blur(6px);
}

/* =========================
   ACTION CARD
========================= */

.mobileActionBar{
  display:flex;
  justify-content:space-between;
  gap:10px;

  padding:12px;

  border-radius:18px;

  background: rgba(255,255,255,.03);
  backdrop-filter: blur(12px);

  border:1px solid rgba(255,255,255,.08);

  box-shadow:
    0 10px 30px rgba(0,0,0,.6),
    inset 0 0 0 1px rgba(255,255,255,.04);
}

/* ikony */
.mobileActionIcon{
  width:48px;
  height:48px;

  border-radius:14px;

  display:flex;
  align-items:center;
  justify-content:center;

  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);

  font-size:18px;

  transition: all .15s ease;
}

/* klik */
.mobileActionIcon:active{
  transform: scale(.9);
  background: rgba(255,255,255,.08);
}

/* hover (opcjonalnie desktop test) */
.mobileActionIcon:hover{
  border-color: rgba(212,175,55,.3);
}
.toast{
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(20px);

  background: rgba(20,20,24,.95);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;

  padding: 12px 16px;
  border-radius: 14px;

  font-size: 13px;
  font-weight: 600;

  opacity: 0;
  transition: all .25s ease;

  z-index: 999999;
}

.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast--success{
  border-color: rgba(43,214,123,.35);
}

.toast--error{
  border-color: rgba(255,91,91,.35);
}

.clientCard {
  background: linear-gradient(145deg, #0f0f0f, #1a1a1a);
  border-radius: 24px;
  padding: 20px;
  margin: 20px;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.05);
  position: relative;
}

.clientName {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
}

/* stats */
.clientStats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.statBox {
  flex: 1;
  background: #111;
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  border: 1px solid #222;
}

.statLabel {
  font-size: 11px;
  color: #888;
}

.statValue {
  font-weight: 700;
  margin-top: 4px;
  font-size: 13px;
}
.mobileSearch {
  padding: 12px 16px;
}

.mobileSearch input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #222;
  background: #111;
  color: #fff;
}
.clientHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.clientPhone {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.clientCard {
  background: linear-gradient(180deg, #0f0f0f, #161616);
  border-radius: 26px;
  padding: 22px;
  margin: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  border: 1px solid rgba(0,255,150,0.15);
}

/* staty */
.clientStats {
  display: flex;
  gap: 12px;
  margin: 18px 0;
}

.statBox {
  flex: 1;
  background: #0c0c0c;
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  border: 1px solid #1f1f1f;
  transition: 0.2s;
}

.statBox:hover {
  border-color: #22c55e;
  transform: translateY(-2px);
}

.statLabel {
  font-size: 11px;
  color: #777;
}

.statValue {
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
}

.clientTags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:6px;
}

.tag{
  background:rgba(0,255,150,0.1);
  border:1px solid rgba(0,255,150,0.3);
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  color:#00ffa0;
}

.clientContact{
  margin-top:6px;
  font-size:12px;
  color:#aaa;
}

.cardStack{
  position:relative;
}


.clientHeaderTop{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.clientTagsInline{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.tag{
  background:#1a1a1a;
  border:1px solid #333;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
  color:#ccc;
}



/* 👇 kontakt obok siebie */
.clientContactRow{
  display:flex;
  gap:16px;
  margin-top:6px;
  font-size:13px;
  color:#aaa;
  flex-wrap:wrap;
}

/* opcjonalnie lepszy wygląd */
.clientName{
  font-size:18px;
  font-weight:600;
  color:#fff;
}
 

/* 👇 kontakt obok siebie */
.clientContactRow{
  display:flex;
  gap:16px;
  margin-top:6px;
  font-size:13px;
  color:#aaa;
  flex-wrap:wrap;
}

/* opcjonalnie lepszy wygląd */
.clientName{
  font-size:18px;
  font-weight:600;
  color:#fff;
}

.clientPhone::before{
  content:"📞 ";
  opacity:0.6;
}

.clientEmail::before{
  content:"✉️ ";
  opacity:0.6;
}
.clientContactRow{
  display:flex;
  gap:12px;
  font-size:13px;
  color:#aaa;
  margin-top:4px;
}
.clientHeader{
  display:flex;
  flex-direction:column; /* 🔥 klucz */
  align-items:flex-start;
  margin-bottom:12px;
}
.clientContactRow{
  display:flex;
  gap:16px;
  margin-top:6px;

  font-size:15px;        /* 🔥 większa czcionka */
  font-weight:500;       /* 🔥 lepsza czytelność */
  color:#ddd;

  flex-wrap:wrap;
}
.clientPhone,
.clientEmail{
  display:flex;
  align-items:center;
  gap:6px;

  background: rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.06);

  padding:6px 10px;
  border-radius:10px;
}
.clientPhone::before{
  content:"📞";
  font-size:14px;
  opacity:0.7;
}

.clientEmail::before{
  content:"✉️";
  font-size:14px;
  opacity:0.7;
}
.clientCard{
  width:100%;
  max-width:420px;

  margin:0 auto; /* 🔥 centrowanie */

  padding:20px;
  border-radius:20px;

  background: linear-gradient(180deg, #0f0f0f, #161616);

  border:1px solid rgba(212,175,55,.5);

  box-shadow:
    0 10px 30px rgba(0,0,0,.6),
    0 0 20px rgba(212,175,55,.08);
}
.mobileDashboard{
  display:flex;
  flex-direction:column;
  align-items:center;

  gap:16px;
  padding:16px;
}

.mobileDashboard > *{
  width:100%;
  max-width:420px;
}.mobileDashboard{
  padding-left:12px;
  padding-right:12px;
}

.clientCard{
  touch-action: pan-y;
  will-change: transform;
}
#overlayRoot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.overlayBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.overlayBackdrop.show {
  opacity: 1;
}

.overlaySheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0b0b0b;
  border-radius: 22px 22px 0 0;
  padding: 16px;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.45);
  transform: translateY(100%);
  transition: transform 0.25s ease;
  pointer-events: auto;
  max-height: 88vh;
  overflow-y: auto;
}

.overlaySheet.show {
  transform: translateY(0);
}
.popoverBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 9998;
}
.payPop.hidden,
.reportPop.hidden,
.popover.hidden,
#notificationsPopover.hidden {
  pointer-events: none !important;
}

.blockModal {
  pointer-events: none;
}

.blockModal.is-open {
  pointer-events: auto;
}
/* =========================
   SWIPE V2 ENGINE
========================= */

.swipeCard {
  touch-action: pan-y;
  will-change: transform;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.swipeCard.is-dragging {
  transition: none;
}

.swipeCard.is-animating {
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.swipeCard.swipe-left {
  transform: translateX(-120%) rotate(-10deg) scale(0.95);
  opacity: 0;
}

.swipeCard.swipe-right {
  transform: translateX(120%) rotate(10deg) scale(0.95);
  opacity: 0;
}