/* Najmex v2.58 – Premium UI dla wszystkich sekcji web
   Cel: nie tylko dashboard, ale także lokale, najmy, płatności, dokumenty,
   zgłoszenia, czat, profil, BOK oraz admin. Plik ładowany jako ostatni. */

:root{
  --nx58-bg:#f3f7fc;
  --nx58-card:#ffffff;
  --nx58-card2:#f8fbff;
  --nx58-ink:#0b1728;
  --nx58-muted:#657589;
  --nx58-soft:#8fa0b4;
  --nx58-line:#dfe8f4;
  --nx58-line2:#edf2f8;
  --nx58-navy:#041326;
  --nx58-navy2:#092442;
  --nx58-cyan:#13c5c7;
  --nx58-blue:#1875d1;
  --nx58-green:#13a87d;
  --nx58-orange:#f59e0b;
  --nx58-red:#e5484d;
  --nx58-r:18px;
  --nx58-r2:24px;
  --nx58-shadow:0 18px 45px rgba(8,26,51,.085);
  --nx58-shadow2:0 8px 24px rgba(8,26,51,.065);
}

html{background:var(--nx58-bg)!important}
body{
  font-weight:430!important;
  text-rendering:geometricPrecision;
  -webkit-font-smoothing:antialiased;
}
body :where(b,strong){font-weight:560!important}
body :where(h1,h2,h3,h4,h5,.title,.section-title,.admin-page-title,.nx-title){font-weight:620!important;letter-spacing:-.045em!important;color:var(--nx58-ink)!important}
body :where(p,.muted,.meta,.hint,.help,.admin-muted,.nx-sub,.nx237-muted,.nxv-muted,.nxop-muted,.nxsr-muted){font-weight:430!important;color:var(--nx58-muted)!important}
body :where(.value,.val,.v,.kpi-value,.admin-stat strong){font-weight:620!important;letter-spacing:-.045em!important}

/* ===== Uniwersalny shell strony: wynajmujący/najemca ===== */
body.nx26-app-body :where(.page,.container,.wrap,.content,.main,.main-content,.nm-container){
  max-width:1340px!important;
}
body.nx26-app-body :where(.pagehead,.page-head,.section-head,.nx-head){
  position:relative!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:18px!important;
  margin:0 0 22px!important;
  padding:24px 26px!important;
  border-radius:26px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  background:
    radial-gradient(circle at 92% 4%,rgba(19,197,199,.32),transparent 22rem),
    linear-gradient(135deg,#041326 0%,#092442 55%,#0a3a62 100%)!important;
  box-shadow:0 22px 58px rgba(4,19,38,.23)!important;
  color:#fff!important;
}
body.nx26-app-body :where(.pagehead,.page-head,.section-head,.nx-head)::after{
  content:"";position:absolute;right:-110px;bottom:-155px;width:340px;height:340px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.12),transparent 62%);border:1px solid rgba(255,255,255,.14);pointer-events:none;
}
body.nx26-app-body :where(.pagehead,.page-head,.section-head,.nx-head)>*{position:relative;z-index:1}
body.nx26-app-body :where(.pagehead h1,.page-head h1,.section-head h1,.nx-head h1){
  color:#fff!important;font-size:clamp(25px,3vw,38px)!important;line-height:1.08!important;margin:0 0 6px!important;font-weight:620!important;
}
body.nx26-app-body :where(.pagehead p,.page-head p,.section-head p,.nx-head p,.pagehead .muted,.pagehead .meta){color:rgba(230,242,255,.78)!important;margin:0!important}
body.nx26-app-body :where(.pagehead .btn,.page-head .btn,.section-head .btn,.nx-head .btn){
  background:rgba(255,255,255,.12)!important;color:#fff!important;border-color:rgba(255,255,255,.20)!important;backdrop-filter:blur(10px)!important;
}

/* ===== Karty, siatki, sekcje ===== */
body.nx26-app-body :where(.card,.box,.panel,.tile,.cardx,.nx-card,.nx-soft-card,.nx237-panel,.nx237-card,.nxv-card,.nxop-card,.nxsr-card,.cv-card,.bok-contact-card,.admin-table-card,.admin-stat,.nx-kpi,.kpi,.kpi-card,.stat,.stat-card,.metric,.notice,.alert-soft){
  border:1px solid rgba(220,231,244,.96)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(249,252,255,.90))!important;
  box-shadow:var(--nx58-shadow2)!important;
  border-radius:var(--nx58-r)!important;
}
body.nx26-app-body :where(.card,.box,.panel,.tile,.cardx,.nx-card,.nx-soft-card,.nx237-panel,.nxv-card,.nxop-card,.nxsr-card,.cv-card){padding:18px 20px!important;margin-bottom:18px!important}
body.nx26-app-body :where(.card:hover,.box:hover,.tile:hover,.cardx:hover,.nx-card:hover,.nx-soft-card:hover,.nxop-card:hover,.nxsr-card:hover){box-shadow:var(--nx58-shadow)!important;border-color:#d4e2f2!important;transform:translateY(-1px)}
body.nx26-app-body :where(.grid,.grid2,.grid-2,.form-grid,.admin-stats-grid,.admin-section-grid,.kpi-grid,.props,.list,.cards){gap:16px!important}
body.nx26-app-body :where(.kpi-grid,.admin-stats-grid){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important}
body.nx26-app-body :where(.grid,.grid2,.grid-2,.form-grid,.props){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))!important}

/* KPI i liczby */
body.nx26-app-body :where(.kpi,.kpi-card,.stat,.stat-card,.admin-stat,.nx237-kpi){
  position:relative!important;overflow:hidden!important;min-height:105px!important;padding:18px!important;
}
body.nx26-app-body :where(.kpi,.kpi-card,.stat,.stat-card,.admin-stat,.nx237-kpi)::before{
  content:"";position:absolute;right:-35px;top:-45px;width:120px;height:120px;border-radius:50%;
  background:radial-gradient(circle,rgba(19,197,199,.14),transparent 68%);pointer-events:none;
}
body.nx26-app-body :where(.kpi .k,.stat .k,.admin-stat .k,.label,.tp-label){font-size:12px!important;text-transform:none!important;color:var(--nx58-muted)!important;font-weight:480!important;letter-spacing:-.01em!important}
body.nx26-app-body :where(.kpi .v,.kpi .val,.stat .v,.stat .val,.admin-stat strong,.value){font-size:clamp(22px,2.6vw,32px)!important;color:#08172a!important;line-height:1.08!important}

/* ===== Tabele we wszystkich modułach ===== */
body.nx26-app-body :where(.tablewrap,.table-wrap,.nx-table-wrap,.admin-table-card){
  overflow:auto!important;border-radius:22px!important;background:rgba(255,255,255,.82)!important;border:1px solid var(--nx58-line)!important;box-shadow:var(--nx58-shadow2)!important;padding:10px!important;
}
body.nx26-app-body table{
  width:100%!important;border:0!important;border-collapse:separate!important;border-spacing:0 9px!important;background:transparent!important;
}
body.nx26-app-body thead th{
  background:transparent!important;border:0!important;padding:7px 12px!important;font-size:11px!important;letter-spacing:.075em!important;text-transform:uppercase!important;color:#8392a6!important;font-weight:560!important;
}
body.nx26-app-body tbody td{
  padding:13px 12px!important;background:#fff!important;border-top:1px solid var(--nx58-line2)!important;border-bottom:1px solid var(--nx58-line2)!important;vertical-align:middle!important;color:#17243a!important;font-weight:430!important;
}
body.nx26-app-body tbody td:first-child{border-left:1px solid var(--nx58-line2)!important;border-radius:15px 0 0 15px!important}
body.nx26-app-body tbody td:last-child{border-right:1px solid var(--nx58-line2)!important;border-radius:0 15px 15px 0!important}
body.nx26-app-body tbody tr:hover td{background:#f9fcff!important;border-color:#dbe7f4!important}
body.nx26-app-body td :where(a:not(.btn)){color:#1468b8!important;font-weight:520!important}

/* ===== Formularze: lokale, umowy, rachunki, profil, ustawienia ===== */
body.nx26-app-body :where(form,.form,.nxop-form,.nxv-form){max-width:100%}
body.nx26-app-body :where(.field,.fld,.form-group,.nx237-field,.nx-auto-field){display:flex!important;flex-direction:column!important;gap:7px!important;margin-bottom:14px!important}
body.nx26-app-body :where(label,.label,.lab){font-size:13px!important;color:#243854!important;font-weight:520!important;letter-spacing:-.01em!important}
body.nx26-app-body :where(input,select,textarea,.input,.tp-inp){
  min-height:43px!important;border-radius:14px!important;border:1px solid #d8e4f2!important;background:#fff!important;color:#10223b!important;
  padding:10px 12px!important;font-size:14px!important;font-weight:430!important;box-shadow:0 1px 0 rgba(8,26,51,.02)!important;
}
body.nx26-app-body :where(textarea){min-height:105px!important;resize:vertical!important}
body.nx26-app-body :where(input:focus,select:focus,textarea:focus){outline:3px solid rgba(19,197,199,.16)!important;border-color:#87dade!important;box-shadow:none!important}
body.nx26-app-body :where(.sticky-actions,.actions,.toolbar,.tools,.admin-title-actions,.nx237-actions,.nxop-actions,.nxv-actions){display:flex!important;gap:10px!important;align-items:center!important;flex-wrap:wrap!important}

/* ===== Przyciski i statusy ===== */
body.nx26-app-body :where(.btn,a.btn,button.btn,input[type=submit],button[type=submit],.nx-btn,.nxop-btn,.nxsr-btn,.cv-btn,.tp-btn,.t_btn,.ch_btn){
  min-height:38px!important;border-radius:13px!important;padding:9px 13px!important;font-size:13px!important;font-weight:540!important;letter-spacing:-.01em!important;
  border:1px solid transparent!important;text-decoration:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;transition:.16s ease!important;
}
body.nx26-app-body :where(.btn:not(.ghost):not(.outline):not(.btn-muted):not(.small),button[type=submit],input[type=submit],.btn-primary,.primary,.nxop-btn.primary,.nxsr-btn.primary){
  background:linear-gradient(135deg,#10bfc2,#1976d2)!important;color:#fff!important;box-shadow:0 12px 25px rgba(19,197,199,.20)!important;
}
body.nx26-app-body :where(.btn.ghost,.btn-muted,.outline,.nxop-btn:not(.primary),.nxsr-btn:not(.primary),.cv-btn,.tp-btn,.t_btn,.ch_btn){
  background:#f7fbff!important;color:#143253!important;border-color:#d9e6f4!important;box-shadow:none!important;
}
body.nx26-app-body :where(.btn:hover,.nx-btn:hover,.nxop-btn:hover,.nxsr-btn:hover,.cv-btn:hover){transform:translateY(-1px)!important;filter:brightness(.99)!important}
body.nx26-app-body :where(.badge,.chip,.pill,.nx-badge,.nx237-badge,.nxv-badge,.nxop-badge,.t_chip){
  display:inline-flex!important;align-items:center!important;gap:5px!important;border-radius:999px!important;padding:5px 9px!important;font-size:12px!important;font-weight:520!important;border:1px solid transparent!important;white-space:nowrap!important;
}
body.nx26-app-body :where(.ok,.success,.badge.ok,.chip.ok){background:#e9fbf4!important;color:#08765b!important;border-color:#c4efdf!important}
body.nx26-app-body :where(.warn,.warning,.badge.warn,.chip.warn){background:#fff7e8!important;color:#965600!important;border-color:#ffe0a3!important}
body.nx26-app-body :where(.err,.danger,.error,.badge.err,.chip.err){background:#fff0f0!important;color:#a91e2c!important;border-color:#ffcaca!important}
body.nx26-app-body :where(.info,.badge.info,.chip.info){background:#eef7ff!important;color:#135c99!important;border-color:#cfebff!important}

/* ===== Listy i kafle: lokale, najemcy, umowy, dokumenty, płatności ===== */
body.nx26-app-body :where(.item,.itm,.bok-list > *, .msg,.thread,.nx-admin-status-item){
  border-radius:18px!important;border:1px solid var(--nx58-line)!important;background:#fff!important;box-shadow:0 8px 22px rgba(8,26,51,.045)!important;padding:14px!important;
}
body.nx26-app-body :where(.item,.itm){display:grid!important;gap:12px!important;align-items:center!important}
body.nx26-app-body :where(.item:hover,.itm:hover,.thread:hover){border-color:#d4e2f2!important;background:#fbfdff!important}
body.nx26-app-body :where(.title-small,.ttl){font-weight:580!important;color:#10243d!important;letter-spacing:-.025em!important}
body.nx26-app-body :where(.addr,.sub,.helper,.help){font-size:13px!important;color:var(--nx58-muted)!important}
body.nx26-app-body :where(.empty,.admin-empty,.card-empty,.nx-soft-empty){
  border:1px dashed #c9d8e9!important;border-radius:22px!important;background:linear-gradient(180deg,#fff,#f8fbff)!important;color:#75849a!important;padding:24px!important;text-align:center!important;
}

/* ===== Moduły specjalne ===== */
body.nx26-app-body .modal-backdrop{background:rgba(4,19,38,.52)!important;backdrop-filter:blur(4px)!important}
body.nx26-app-body .modal{border-radius:24px!important;border:1px solid var(--nx58-line)!important;box-shadow:0 32px 90px rgba(4,19,38,.34)!important;overflow:hidden!important;background:#fff!important}
body.nx26-app-body .modal header{background:linear-gradient(180deg,#fff,#f7fbff)!important;border-bottom:1px solid var(--nx58-line)!important;padding:16px 18px!important}
body.nx26-app-body :where(.prog,.bar){height:8px!important;border-radius:999px!important;background:#edf4fb!important;overflow:hidden!important}
body.nx26-app-body :where(.prog span,.bar span){display:block;height:100%!important;border-radius:999px!important;background:linear-gradient(90deg,#10bfc2,#1976d2)!important}
body.nx26-app-body :where(.tabs,.tabbar){display:flex!important;gap:8px!important;flex-wrap:wrap!important;background:#edf4fb!important;border-radius:16px!important;padding:6px!important;border:1px solid #dfe8f4!important}
body.nx26-app-body :where(.tab,.tabs a,.tabbar a){border-radius:12px!important;padding:9px 12px!important;color:#38516d!important;font-weight:520!important;text-decoration:none!important}
body.nx26-app-body :where(.tab.active,.tabs a.active,.tabbar a.active){background:#fff!important;color:#0b1728!important;box-shadow:0 8px 20px rgba(8,26,51,.07)!important}

/* ===== Chat / wiadomości ===== */
body.nx26-app-body :where(.threads,.messages,.chat-wrap,.chatbox){border-radius:22px!important;background:rgba(255,255,255,.86)!important;border:1px solid var(--nx58-line)!important;box-shadow:var(--nx58-shadow2)!important;overflow:hidden!important}
body.nx26-app-body :where(.msg.me,.message.me){background:#eaf9fb!important;border-color:#beecef!important;margin-left:auto!important}
body.nx26-app-body :where(.msg:not(.me),.message:not(.me)){background:#fff!important}

/* ===== Strony konkretnych modułów – subtelne rozróżnienie ===== */
body[data-nx-route*="properties"] .pagehead,
body[data-nx-route*="property"] .pagehead{background:radial-gradient(circle at 94% 0%,rgba(19,197,199,.30),transparent 22rem),linear-gradient(135deg,#041326,#0b3457)!important}
body[data-nx-route*="billing"] .pagehead,
body[data-nx-route*="payments"] .pagehead,
body[data-nx-route*="platnosci"] .pagehead,
body[data-nx-route*="faktury"] .pagehead{background:radial-gradient(circle at 94% 0%,rgba(22,184,143,.28),transparent 22rem),linear-gradient(135deg,#041326,#0b3e4f)!important}
body[data-nx-route*="contract"] .pagehead,
body[data-nx-route*="contracts"] .pagehead{background:radial-gradient(circle at 94% 0%,rgba(25,118,210,.32),transparent 22rem),linear-gradient(135deg,#041326,#0a2e62)!important}
body[data-nx-route*="service"] .pagehead,
body[data-nx-route*="managed"] .pagehead{background:radial-gradient(circle at 94% 0%,rgba(245,158,11,.26),transparent 22rem),linear-gradient(135deg,#041326,#40310d)!important}
body[data-nx-route*="chat"] .pagehead,
body[data-nx-route*="notifications"] .pagehead{background:radial-gradient(circle at 94% 0%,rgba(124,58,237,.25),transparent 22rem),linear-gradient(135deg,#041326,#2d235f)!important}

/* ===== ADMIN i BOK – wszystkie podstrony ===== */
body.nx-admin-page .nx-content,
body.nx-bok-shell .nx-content{max-width:1360px!important}
body.nx-admin-page :where(.nx-pagehead,.admin-page-title,.pagehead),
body.nx-bok-shell :where(.nx-pagehead,.pagehead,.page-head){
  position:relative!important;overflow:hidden!important;border-radius:26px!important;padding:24px 26px!important;margin:0 0 22px!important;border:1px solid rgba(255,255,255,.18)!important;
  background:radial-gradient(circle at 95% 0%,rgba(19,197,199,.30),transparent 22rem),linear-gradient(135deg,#041326,#092442 60%,#0b3b60)!important;color:#fff!important;box-shadow:0 22px 58px rgba(4,19,38,.22)!important;
}
body.nx-admin-page .nx-pagehead h1,
body.nx-bok-shell .nx-pagehead h1,
body.nx-bok-shell .pagehead h1{color:#fff!important;font-size:clamp(24px,2.7vw,36px)!important;font-weight:620!important;margin:0!important}
body.nx-admin-page .nx-pagehead p,
body.nx-bok-shell .nx-pagehead p{color:rgba(230,242,255,.78)!important}
body.nx-admin-page :where(.card,.box,.panel,.tile,.admin-table-card,.admin-stat,.nx-soft-card,.nx-admin-module,.bok-quick-card,.bok-contact-card),
body.nx-bok-shell :where(.card,.box,.panel,.tile,.admin-table-card,.admin-stat,.nx-soft-card,.nx-admin-module,.bok-quick-card,.bok-contact-card){
  border:1px solid var(--nx58-line)!important;border-radius:20px!important;background:linear-gradient(180deg,#fff,#f9fcff)!important;box-shadow:var(--nx58-shadow2)!important;
}
body.nx-admin-page :where(table),
body.nx-bok-shell :where(table){border-collapse:separate!important;border-spacing:0 9px!important;background:transparent!important;border:0!important;width:100%!important}
body.nx-admin-page :where(th),
body.nx-bok-shell :where(th){background:transparent!important;border:0!important;font-size:11px!important;text-transform:uppercase!important;letter-spacing:.075em!important;color:#8392a6!important;font-weight:560!important;padding:7px 12px!important}
body.nx-admin-page :where(td),
body.nx-bok-shell :where(td){background:#fff!important;border-top:1px solid var(--nx58-line2)!important;border-bottom:1px solid var(--nx58-line2)!important;padding:13px 12px!important;font-weight:430!important}
body.nx-admin-page td:first-child,body.nx-bok-shell td:first-child{border-left:1px solid var(--nx58-line2)!important;border-radius:15px 0 0 15px!important}
body.nx-admin-page td:last-child,body.nx-bok-shell td:last-child{border-right:1px solid var(--nx58-line2)!important;border-radius:0 15px 15px 0!important}
body.nx-admin-page :where(input,select,textarea),
body.nx-bok-shell :where(input,select,textarea){border-radius:14px!important;border:1px solid #d8e4f2!important;min-height:42px!important;font-weight:430!important;background:#fff!important;color:#10223b!important}
body.nx-admin-page :where(.btn,a.btn,button.btn,.nx-btn),
body.nx-bok-shell :where(.btn,a.btn,button.btn,.nx-btn){border-radius:13px!important;font-weight:540!important}

/* BOK stary inline layout – nadpisanie */
body.nx-bok-shell .wrap{display:grid!important;grid-template-columns:266px 1fr!important;background:transparent!important}
body.nx-bok-shell aside{background:radial-gradient(circle at 20% 0%,rgba(19,197,199,.20),transparent 15rem),linear-gradient(180deg,#041326,#030b17)!important;box-shadow:18px 0 45px rgba(4,17,33,.22)!important}
body.nx-bok-shell header{background:rgba(248,251,255,.86)!important;backdrop-filter:saturate(150%) blur(16px)!important;border-bottom:1px solid rgba(216,226,239,.86)!important;box-shadow:0 8px 28px rgba(12,30,56,.055)!important}
body.nx-bok-shell main{padding:26px 28px!important}
body.nx-bok-shell nav a{font-weight:470!important;border-radius:13px!important}
body.nx-bok-shell nav a.active{background:linear-gradient(135deg,rgba(19,197,199,.22),rgba(25,118,210,.15))!important}

/* ===== Mobile ===== */
@media(max-width:980px){
  body.nx26-app-body :where(.pagehead,.page-head,.section-head,.nx-head){display:block!important;padding:21px!important;border-radius:22px!important}
  body.nx26-app-body :where(.pagehead h1,.page-head h1,.section-head h1,.nx-head h1){font-size:25px!important}
  body.nx26-app-body :where(.grid,.grid2,.grid-2,.form-grid,.props,.kpi-grid){grid-template-columns:1fr!important}
  body.nx26-app-body :where(.tablewrap,.table-wrap,.nx-table-wrap,.admin-table-card){padding:6px!important;margin-left:-2px!important;margin-right:-2px!important}
  body.nx26-app-body table{min-width:720px!important}
  body.nx26-app-body :where(.btn,a.btn,button.btn){white-space:normal!important}
  body.nx-bok-shell .wrap{grid-template-columns:1fr!important}
  body.nx-bok-shell main{padding:16px 14px!important}
}
@media(max-width:640px){
  body.nx26-app-body :where(.page,.container,.wrap,.content,.main,.main-content,.nm-container){padding-left:14px!important;padding-right:14px!important}
  body.nx26-app-body :where(.pagehead,.page-head,.section-head,.nx-head){margin-bottom:16px!important}
  body.nx26-app-body :where(.card,.box,.panel,.tile,.cardx,.nx-card){padding:15px!important;border-radius:17px!important}
}
