
:root {
  --navy:#0b1f3a; --blue:#1769e0; --light:#eef5ff; --line:#d9e3f0;
  --text:#152238; --muted:#6d7b8e; --success:#1f8a4c; --danger:#c43b3b;
  --warning:#b56b00; --bg:#f6f8fb;
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,sans-serif;color:var(--text);background:var(--bg)}
button,input,select,textarea{font:inherit} button{cursor:pointer}
#app{min-height:100vh;display:flex}
.sidebar{width:250px;background:var(--navy);color:white;padding:22px 14px 14px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;overflow:hidden}
.brand{font-weight:800;font-size:28px;letter-spacing:-.5px}
.brand.big{font-size:42px;color:var(--navy)}
.brand-sub{font-size:12px;opacity:.7;margin-bottom:16px}
#nav{display:block;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:2px 4px 18px 0;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.28) transparent}
#nav::-webkit-scrollbar{width:7px}
#nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.25);border-radius:999px}
.nav-group{margin-bottom:7px}
.nav-group-toggle{width:100%;display:grid;grid-template-columns:24px 1fr 18px;align-items:center;gap:8px;text-align:left;border:0;background:transparent;color:#91a9c9;padding:9px 10px;border-radius:10px;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.nav-group-toggle:hover{background:rgba(255,255,255,.07);color:white}
.nav-group-icon{font-size:16px;text-align:center}
.nav-chevron{text-align:center;font-size:12px}
.nav-group-items{display:none;padding:2px 0 3px 12px}
.nav-group.open .nav-group-items{display:grid;gap:4px}
.nav-item{width:100%;text-align:left;border:0;background:transparent;color:#dbe8ff;padding:10px 12px;border-radius:9px;position:relative}
.nav-item::before{content:"";position:absolute;left:2px;top:50%;width:4px;height:4px;border-radius:50%;background:rgba(255,255,255,.35);transform:translateY(-50%)}
.nav-item span{display:block;padding-left:4px}
.nav-item.active,.nav-item:hover{background:rgba(255,255,255,.12);color:white}
.nav-item.active::before{height:18px;border-radius:4px;background:#5ca1ff}
.logout{flex:0 0 auto;margin-top:10px;background:transparent;border:1px solid rgba(255,255,255,.2);color:white;padding:10px;border-radius:10px}
.main{margin-left:250px;width:calc(100% - 250px);padding:24px}
.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;gap:16px}
.topbar h1{margin:0}.topbar p{margin:6px 0 0;color:var(--muted)}
.top-actions{display:flex;gap:10px}
.primary,.secondary,.danger{border-radius:10px;padding:11px 16px;border:1px solid transparent;font-weight:700}
.primary{background:var(--blue);color:white}.secondary{background:white;color:var(--navy);border-color:var(--line)}
.danger{background:#fff0f0;color:var(--danger);border-color:#f2caca}.full{width:100%;margin-top:10px}
.grid{display:grid;gap:16px}.grid.cards{grid-template-columns:repeat(4,minmax(0,1fr))}
.card{background:white;border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:0 3px 12px rgba(11,31,58,.04)}
.metric-label{color:var(--muted);font-size:14px}.metric-value{font-size:28px;font-weight:800;margin-top:8px}.metric-good{color:var(--success)}
.section-title{display:flex;align-items:center;justify-content:space-between;margin:26px 0 12px}.section-title h2{margin:0;font-size:20px}
.table-wrap{overflow:auto;background:white;border:1px solid var(--line);border-radius:16px}
table{width:100%;border-collapse:collapse;min-width:760px} th,td{padding:14px 16px;border-bottom:1px solid var(--line);text-align:left}
th{color:var(--muted);font-size:13px;background:#fbfcfe}
.badge{display:inline-block;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:700}
.badge.green{background:#e9f7ef;color:var(--success)}.badge.orange{background:#fff3df;color:#9c6500}
.badge.blue{background:#e8f1ff;color:var(--blue)}.badge.gray{background:#eef1f5;color:#566271}
.link-btn{border:0;background:transparent;color:var(--blue);font-weight:700;padding:0}
.empty{padding:40px;text-align:center;color:var(--muted)}
.worker-panel{max-width:760px;margin:auto}.worker-hero{background:linear-gradient(135deg,var(--navy),var(--blue));color:white;border-radius:18px;padding:24px}
.worker-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:18px}.worker-actions button{border:0;border-radius:14px;padding:18px;font-weight:800;background:white;color:var(--navy)}
.modal{position:fixed;inset:0;background:rgba(5,16,32,.45);display:none;align-items:center;justify-content:center;padding:18px;z-index:10}
.modal.visible{display:flex}.modal-card{width:min(560px,100%);max-height:92vh;overflow:auto;background:white;border-radius:18px;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.22)}
.modal-card.wide{width:min(900px,100%)}.login-card{width:min(420px,100%);text-align:center}
.modal-head{display:flex;justify-content:space-between;align-items:center}.icon-btn{border:0;background:transparent;font-size:28px}
.quick-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:16px}
.quick-grid button{padding:18px 10px;border:1px solid var(--line);background:var(--light);color:var(--navy);border-radius:12px;font-weight:700}
form{display:grid;gap:13px;margin-top:14px}label{display:grid;gap:6px;font-weight:700;font-size:14px}
input,select,textarea{border:1px solid var(--line);border-radius:10px;padding:11px 12px;width:100%;background:white}
textarea{min-height:100px;resize:vertical}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}
.notice{padding:14px 16px;background:var(--light);border-left:4px solid var(--blue);border-radius:10px;margin-bottom:16px}
.offer-lines{display:grid;gap:8px}.offer-line{display:grid;grid-template-columns:1fr 120px 44px;gap:8px}
#toast{position:fixed;right:20px;bottom:20px;background:var(--navy);color:white;padding:14px 18px;border-radius:12px;display:none;z-index:30}
.details-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:12px}.details-box{border:1px solid var(--line);border-radius:12px;padding:14px}
@media(max-width:900px){
  .sidebar{width:210px;padding:18px 10px 12px}.brand{font-size:22px}.brand-sub{margin-bottom:10px}
  .nav-group-toggle{grid-template-columns:22px 1fr 16px;padding:8px;font-size:11px}
  .nav-item{padding:9px 10px}
  .main{margin-left:210px;width:calc(100% - 210px);padding:16px}.grid.cards{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:720px){
  .sidebar{width:76px;padding:16px 8px 10px}
  .brand{font-size:19px;text-align:center}.brand-sub{display:none}
  .nav-group-toggle{display:flex;justify-content:center;padding:9px 4px}
  .nav-group-label,.nav-chevron{display:none}
  .nav-group-icon{font-size:17px}
  .nav-group-items{padding-left:0}
  .nav-item{font-size:0;text-align:center;padding:10px 4px}
  .nav-item span::first-letter{font-size:17px}
  .nav-item::before{display:none}
  .logout{font-size:0}.logout::after{content:"↩";font-size:18px}
  .main{margin-left:76px;width:calc(100% - 76px)}
}
@media(max-width:620px){
  .topbar{align-items:flex-start;flex-direction:column}.top-actions{width:100%}.top-actions button{flex:1}
  .grid.cards{grid-template-columns:1fr}.quick-grid{grid-template-columns:1fr}.worker-actions{grid-template-columns:1fr}
  .details-grid{grid-template-columns:1fr}.offer-line{grid-template-columns:1fr 100px 44px}
}

button:disabled{opacity:.45;cursor:not-allowed}

@media print{
  .sidebar,.topbar,.form-actions{display:none!important}
  .main{margin:0;width:100%;padding:0}
  body{background:white}
}

.alert-card{display:flex;align-items:center;justify-content:space-between;gap:16px;background:white;border:1px solid var(--line);border-left:5px solid var(--blue);border-radius:14px;padding:16px}
.alert-card p{margin:5px 0 0;color:var(--muted)}
.alert-card.danger{border-left-color:var(--danger)}
.alert-card.warning{border-left-color:var(--warning)}
.alert-card.info{border-left-color:var(--blue)}
.attachment-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
.attachment-card{border:1px solid var(--line);border-radius:14px;padding:12px;background:white;display:grid;gap:8px}
.attachment-card img{width:100%;height:120px;object-fit:cover;border-radius:10px;background:var(--light)}
.attachment-card small{color:var(--muted)}
.attachment-actions{display:flex;gap:8px}
.attachment-actions button{flex:1;padding:8px}
.file-icon{height:120px;border-radius:10px;background:var(--light);display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:800;color:var(--navy)}

.comment-list{display:grid;gap:10px}
.comment-card{background:white;border:1px solid var(--line);border-radius:12px;padding:14px}
.comment-card small{display:block;color:var(--muted);margin-top:3px}
.comment-card p{margin:10px 0 0;white-space:pre-wrap}
.worker-actions{grid-template-columns:repeat(2,1fr)}

.week-grid{display:grid;grid-template-columns:repeat(7,minmax(160px,1fr));gap:10px;overflow:auto;padding-bottom:8px}
.day-column{background:white;border:1px solid var(--line);border-radius:14px;padding:12px;min-height:220px}
.day-column h3{margin:0 0 12px;text-transform:capitalize}
.plan-item{border-left:4px solid var(--blue);background:var(--light);border-radius:8px;padding:9px;margin-bottom:8px;display:grid;gap:4px}
.plan-item.task{border-left-color:var(--warning)}
.plan-item small{color:var(--muted)}
.timeline{display:grid;gap:10px}
.timeline-item{display:grid;grid-template-columns:42px 1fr;gap:12px;align-items:start}
.timeline-number{width:34px;height:34px;border-radius:50%;background:#eef1f5;display:flex;align-items:center;justify-content:center;font-weight:800}
.timeline-item.active .timeline-number{background:var(--blue);color:white}
.timeline-item.done .timeline-number{background:var(--success);color:white}
.timeline-content{background:white;border:1px solid var(--line);border-radius:12px;padding:12px;display:grid;grid-template-columns:1fr auto;gap:6px 12px;align-items:center}
.timeline-content small{color:var(--muted)}
.timeline-content select{grid-row:1/3;grid-column:2}

.planner-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.overload{background:#fff0f0;color:var(--danger);font-weight:700}
.positive-result{color:var(--success)}
.negative-result{color:var(--danger)}
@media(max-width:700px){
  .planner-actions{width:100%}
  .planner-actions button{flex:1}
}

.progress-wrap{display:flex;align-items:center;gap:8px;min-width:110px}
.progress-track{height:9px;background:#e8edf4;border-radius:99px;overflow:hidden;flex:1}
.progress-fill{height:100%;background:var(--blue);border-radius:99px}
.progress-wrap span{font-size:12px;font-weight:700;min-width:34px;text-align:right}
.stage-progress{grid-column:1/2;max-width:280px}
.stage-actions{grid-column:2;grid-row:1/4;display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.stage-actions button,.stage-actions select{padding:8px}
.timeline-content{grid-template-columns:1fr auto}
@media(max-width:700px){
  .stage-actions{grid-column:1;grid-row:auto}
  .timeline-content{grid-template-columns:1fr}
}

.client-hero{background:linear-gradient(135deg,var(--navy),var(--blue));color:white;border-radius:18px;padding:24px;display:flex;align-items:center;gap:20px;margin-bottom:18px}
.client-hero img{width:150px;height:70px;object-fit:contain;background:white;border-radius:10px;padding:8px}
.client-hero span{opacity:.75}
.client-hero h2{margin:5px 0}
.client-hero p{margin:0;opacity:.85}
@media(max-width:620px){
  .client-hero{align-items:flex-start;flex-direction:column}
  .client-hero img{width:130px}
}

.client-stage-actions{margin-top:8px}
.attachment-card .badge{justify-self:start}

.messages-list{display:grid;gap:10px;max-height:420px;overflow:auto;padding:4px}
.message-bubble{max-width:78%;border-radius:14px;padding:12px 14px;display:grid;gap:4px}
.message-bubble p{margin:4px 0 0;white-space:pre-wrap}
.message-bubble small{color:var(--muted)}
.company-msg{background:var(--light);justify-self:start;border-bottom-left-radius:4px}
.client-msg{background:#eaf7ee;justify-self:end;border-bottom-right-radius:4px}
.message-form{margin-top:14px}
@media(max-width:620px){
  .message-bubble{max-width:92%}
}

.table-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.version-list{display:grid;gap:10px;margin-top:14px}
.version-card{display:grid;grid-template-columns:1.2fr 1fr auto;gap:14px;align-items:center;background:white;border:1px solid var(--line);border-radius:12px;padding:14px}
.version-card small{display:block;color:var(--muted);margin-top:4px}
.changed-row{background:#fff8e8}
@media(max-width:700px){
  .version-card{grid-template-columns:1fr}
}

.cash-calendar{display:grid;gap:10px}
.cash-day{display:grid;grid-template-columns:130px 1fr;gap:14px;background:white;border:1px solid var(--line);border-radius:12px;padding:12px}
.cash-date{font-weight:700;color:var(--navy)}
.cash-event{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid var(--line)}
.cash-event:last-child{border-bottom:0}
.cash-in strong{color:#15803d}
.cash-out strong{color:#b42318}
@media(max-width:650px){
  .cash-day{grid-template-columns:1fr}
  .cash-event{align-items:flex-start;flex-direction:column}
}

.low-stock-row{background:#fff7ed}
.low-stock-row td:first-child{border-left:4px solid #f59e0b}

.search-trigger{display:flex;align-items:center;gap:8px;border:1px solid var(--line);background:white;color:var(--navy);padding:10px 12px;border-radius:10px;font-weight:700}
.search-trigger:hover{background:var(--light)}
.search-trigger kbd,.search-help kbd{font:inherit;font-size:11px;background:#eef2f7;border:1px solid #d8e0ea;border-bottom-width:2px;border-radius:5px;padding:2px 5px;color:#5b6b7d}
.search-modal{align-items:flex-start;padding-top:9vh}
.search-card{width:min(760px,calc(100vw - 28px));max-height:78vh;padding:0;overflow:hidden}
.search-box{display:grid;grid-template-columns:32px 1fr 38px;align-items:center;border-bottom:1px solid var(--line);padding:12px 14px}
.search-box input{border:0!important;outline:0;font-size:18px;padding:10px 4px;background:transparent}
.search-icon{font-size:24px;color:var(--muted)}
.search-help{display:flex;justify-content:space-between;gap:12px;padding:8px 16px;background:#f8fafc;color:var(--muted);font-size:12px;border-bottom:1px solid var(--line)}
.search-results{overflow-y:auto;max-height:58vh;padding:8px}
.search-result-count{padding:8px 10px;color:var(--muted);font-size:12px;font-weight:700;text-transform:uppercase}
.search-result{width:100%;display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:12px;border:0;background:white;padding:11px 12px;border-radius:10px;text-align:left;color:var(--text)}
.search-result:hover,.search-result.selected{background:#edf5ff}
.search-result-icon{width:34px;height:34px;border-radius:9px;background:var(--light);display:grid;place-items:center;font-weight:800;color:var(--blue)}
.search-result-main{min-width:0;display:grid;gap:3px}
.search-result-main strong,.search-result-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.search-result-main small{color:var(--muted)}
.search-result-type{font-size:11px;font-weight:800;text-transform:uppercase;color:var(--muted);background:#f3f6f9;border-radius:999px;padding:5px 8px}
.search-result mark{background:#fff0a8;color:inherit;border-radius:3px;padding:0 1px}
.search-empty{text-align:center;color:var(--muted);padding:45px 20px}
@media(max-width:900px){
  .search-trigger-label,.search-trigger kbd{display:none}
  .search-trigger{padding:10px 13px}
}
@media(max-width:620px){
  .search-modal{padding-top:2vh}
  .search-card{max-height:94vh}
  .search-help{display:none}
  .search-results{max-height:76vh}
  .search-result{grid-template-columns:36px 1fr}
  .search-result-type{display:none}
}

.lead-pipeline{display:grid;grid-template-columns:repeat(7,minmax(230px,1fr));gap:12px;overflow-x:auto;padding:4px 2px 16px;margin-top:16px}
.lead-column{background:#f4f7fb;border:1px solid var(--line);border-radius:14px;min-height:300px}
.lead-column-head{padding:12px;border-bottom:1px solid var(--line)}
.lead-column-head div{display:grid;gap:3px}.lead-column-head small{color:var(--muted)}
.lead-column-body{display:grid;gap:9px;padding:10px}
.lead-card{background:white;border:1px solid var(--line);border-radius:11px;padding:11px;cursor:pointer;box-shadow:0 2px 8px rgba(18,38,63,.04)}
.lead-card:hover{border-color:#a8c9f4;transform:translateY(-1px)}
.lead-card-top{display:flex;justify-content:space-between;gap:10px}.lead-card-top span{font-weight:800;color:var(--blue);white-space:nowrap}
.lead-card p{margin:8px 0;color:var(--text)}.lead-card small{color:var(--muted)}
.lead-next{display:flex;gap:7px;margin-top:10px;padding:8px;background:#edf5ff;border-radius:8px;font-size:12px}
.lead-next.overdue{background:#fff0ed;color:#a22}
.lead-empty{text-align:center;color:var(--muted);padding:24px 8px}
.lead-stage-buttons{display:flex;flex-wrap:wrap;gap:8px}
@media(max-width:700px){.lead-pipeline{grid-template-columns:repeat(7,220px)}}

.nav-primary{display:grid;gap:5px;margin-bottom:10px}
.primary-nav-item{width:100%;display:grid;grid-template-columns:28px 1fr;align-items:center;gap:9px;text-align:left;border:0;background:transparent;color:#f1f6ff;padding:11px 12px;border-radius:10px;font-weight:750}
.primary-nav-item:hover,.primary-nav-item.active{background:rgba(255,255,255,.13)}
.primary-nav-item.active{box-shadow:inset 3px 0 0 #5ca1ff}
.primary-nav-icon{width:22px;height:22px;display:grid;place-items:center;border-radius:7px;background:rgba(255,255,255,.09);font-size:13px}
.nav-divider{display:flex;align-items:center;gap:8px;color:#7890b0;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;margin:12px 8px 6px}
.nav-divider::after{content:"";height:1px;background:rgba(255,255,255,.1);flex:1}
.sidebar-profile{flex:0 0 auto;border-top:1px solid rgba(255,255,255,.12);padding-top:10px}
.profile-card{width:100%;display:grid;grid-template-columns:38px 1fr 14px;align-items:center;gap:9px;border:0;background:transparent;color:white;text-align:left;padding:9px;border-radius:11px}
.profile-card:hover,.profile-card.active{background:rgba(255,255,255,.11)}
.profile-avatar{width:38px;height:38px;border-radius:11px;background:#2d73d5;display:grid;place-items:center;font-weight:850}
.profile-copy{min-width:0;display:grid;gap:2px}.profile-copy strong,.profile-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-copy small{color:#9fb3cf;font-size:11px}
.profile-arrow{font-size:20px;color:#87a0c2}
.sidebar-logout{width:100%;margin-top:5px;border:1px solid rgba(255,255,255,.14);background:transparent;color:#cbd9eb;padding:8px;border-radius:9px;font-size:12px}
.sidebar-logout:hover{background:rgba(255,255,255,.08);color:white}
.profile-hero-card{background:linear-gradient(135deg,var(--navy),#174b8c);color:white;border-radius:18px;padding:24px;display:grid;grid-template-columns:74px 1fr auto;gap:18px;align-items:center;margin-bottom:18px}
.profile-hero-card h2{margin:4px 0}.profile-hero-card p{margin:0;color:#c8d8ec}.profile-hero-card .metric-label{color:#a9bed8}
.profile-large-avatar{width:74px;height:74px;border-radius:20px;background:#2d73d5;display:grid;place-items:center;font-size:25px;font-weight:900}
.profile-details{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px}
.profile-detail-value{font-size:17px;font-weight:750;margin-top:8px}
@media(max-width:900px){
  .primary-nav-item{padding:10px 9px}
  .profile-details{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  .primary-nav-item{display:flex;justify-content:center;padding:9px 3px;font-size:0}
  .primary-nav-icon{font-size:13px}
  .nav-divider span,.profile-copy,.profile-arrow,.sidebar-logout{display:none}
  .nav-divider{margin:8px 4px}.nav-divider::after{width:100%}
  .profile-card{display:flex;justify-content:center;padding:7px 2px}
  .profile-avatar{width:36px;height:36px}
}
@media(max-width:620px){
  .profile-hero-card{grid-template-columns:60px 1fr}.profile-hero-card .primary{grid-column:1/-1}
  .profile-large-avatar{width:60px;height:60px}
  .profile-details{grid-template-columns:1fr}
}

.inspection-checklist{display:grid;gap:8px;margin-top:16px}
.inspection-item{display:grid;grid-template-columns:24px 1fr 34px;align-items:center;gap:10px;background:white;border:1px solid var(--line);border-radius:11px;padding:11px 12px}
.inspection-item.done{background:#f2fbf5;border-color:#bfe3c8}
.inspection-item input{width:18px;height:18px}
.inspection-item span{display:grid;gap:3px}
.inspection-item small{color:var(--muted)}
.inspection-item.done strong{text-decoration:line-through;color:#52705c}

.diary-timeline{display:grid;gap:12px;margin-top:16px}
.diary-entry{display:grid;grid-template-columns:150px 1fr;background:white;border:1px solid var(--line);border-radius:14px;overflow:hidden;cursor:pointer}
.diary-entry:hover{border-color:#9fc3ee;box-shadow:0 5px 16px rgba(11,31,58,.07)}
.diary-date{padding:16px;background:#f4f7fb;display:grid;align-content:start;gap:5px}
.diary-date small{color:var(--muted)}
.diary-content{padding:16px}
.diary-head{display:flex;justify-content:space-between;gap:12px}.diary-head h3{margin:0 0 4px}.diary-head small{color:var(--muted)}
.diary-content p{margin:12px 0 0}
.diary-warning{margin-top:12px;background:#fff0ed;color:#9c2f24;border-radius:9px;padding:9px 11px}
.diary-detail-section{background:white;border:1px solid var(--line);border-radius:11px;padding:14px;margin-top:10px}
.diary-detail-section.has-issue{background:#fff5f2;border-color:#efc3ba}
.diary-detail-section p{margin:7px 0 0;white-space:pre-wrap}
@media(max-width:650px){.diary-entry{grid-template-columns:1fr}.diary-date{grid-template-columns:1fr 1fr}}

.gallery-filters{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.gallery-filters select{max-width:240px}
.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
.gallery-card{background:white;border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:0 3px 12px rgba(11,31,58,.05)}
.gallery-image-button{width:100%;height:180px;padding:0;border:0;background:#e8eef6;display:block;overflow:hidden}
.gallery-image-button img{width:100%;height:100%;object-fit:cover;transition:transform .2s}.gallery-image-button:hover img{transform:scale(1.03)}
.gallery-card-body{padding:13px}.gallery-card-body p{margin:8px 0}.gallery-card-body small{color:var(--muted)}
.gallery-card-head{display:flex;justify-content:space-between;gap:8px;margin-bottom:9px}
.gallery-preview{width:100%;max-height:520px;object-fit:contain;background:#eef3f8;border-radius:14px}

.contract-document{background:white;border:1px solid var(--line);border-radius:14px;padding:22px}
.contract-doc-head{display:flex;gap:18px;align-items:center;border-bottom:2px solid var(--navy);padding-bottom:16px}
.contract-doc-head img{max-width:150px;max-height:70px;object-fit:contain}
.contract-doc-head h2{margin:0 0 5px}.contract-doc-head p{margin:0;color:var(--muted)}
.contract-parties{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:20px}
.contract-signatures{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-top:50px}
.contract-signatures div{border-top:1px solid #8897a8;padding-top:8px}.contract-signatures span{display:block;color:var(--muted);font-size:12px}
@media(max-width:650px){.contract-parties,.contract-signatures{grid-template-columns:1fr}.contract-doc-head{align-items:flex-start;flex-direction:column}}

.orders-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.orders-tabs .active{background:var(--navy);color:white}
.quote-list{display:grid;gap:8px;margin:14px 0}.quote-row{width:100%;display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--line);background:white;padding:11px;border-radius:10px;text-align:left}.quote-row span{display:grid;gap:3px}.quote-row small{color:var(--muted)}.quote-row.best{border-color:#7eb38a;background:#f2fbf5}

.equipment-status-card{display:grid;gap:8px}

.warranty-board{display:grid;grid-template-columns:repeat(4,minmax(240px,1fr));gap:14px;margin-top:16px;overflow-x:auto}
.warranty-column{background:#f3f6fa;border:1px solid var(--line);border-radius:14px;padding:12px;min-height:300px}
.warranty-column-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.warranty-column-head span{background:white;border-radius:999px;padding:3px 8px;font-size:12px}
.warranty-cards{display:grid;gap:10px}.warranty-card{background:white;border:1px solid var(--line);border-radius:12px;padding:12px;cursor:pointer}.warranty-card:hover{border-color:#9fc3ee;box-shadow:0 4px 12px rgba(11,31,58,.06)}
.warranty-card-top,.warranty-meta{display:flex;justify-content:space-between;gap:10px}.warranty-card h3{margin:10px 0 6px}.warranty-card p{margin:0 0 10px;color:var(--muted)}.warranty-meta{font-size:12px;color:var(--muted)}
@media(max-width:900px){.warranty-board{grid-template-columns:repeat(4,280px)}}

.report-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.report-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:16px;margin-top:16px}
.report-bars{display:grid;gap:12px}.report-bar-row{display:grid;grid-template-columns:150px 1fr 100px;gap:10px;align-items:center}.report-bar{height:10px;background:#edf2f7;border-radius:999px;overflow:hidden}.report-bar i{display:block;height:100%;background:var(--blue);border-radius:999px}
@media(max-width:1000px){.report-grid{grid-template-columns:1fr}.report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.report-kpis{grid-template-columns:1fr}.report-bar-row{grid-template-columns:1fr}.report-bar-row strong{text-align:left}}

.notification-list{display:grid;gap:9px}.notification-row{display:grid;grid-template-columns:10px 1fr 34px;gap:12px;align-items:start;background:white;border:1px solid var(--line);border-radius:12px;padding:13px;cursor:pointer}.notification-row.unread{border-left:4px solid var(--blue);background:#f7fbff}.notification-row.read{opacity:.74}.notification-dot{width:8px;height:8px;border-radius:50%;background:var(--blue);margin-top:7px}.notification-row.read .notification-dot{background:#aab5c3}.notification-title-row{display:flex;justify-content:space-between;gap:10px;align-items:center}.notification-row p{margin:6px 0}.notification-row small{color:var(--muted)}
.switch-row{display:flex!important;align-items:center;gap:9px;margin:12px 0}.switch-row input{width:18px;height:18px}
.profile-notification-badge{min-width:20px;height:20px;border-radius:999px;background:#e85050;color:white;display:grid;place-items:center;font-size:11px}

:root{--global-topbar-height:68px}.app-shell-v4{min-height:100vh;background:#f4f7fb}.global-topbar{height:68px;position:fixed;inset:0 0 auto;z-index:1200;display:grid;grid-template-columns:auto auto minmax(280px,1fr) auto;align-items:center;gap:18px;padding:0 20px;background:#0b1f3a;color:white;box-shadow:0 4px 18px rgba(6,20,38,.18)}.global-brand{border:0;background:transparent;color:white;display:grid;text-align:left;cursor:pointer}.global-brand strong{font-size:24px}.global-brand small{font-size:8px;letter-spacing:2px;color:#8db9ea}.global-main-nav{display:flex;gap:5px}.global-main-nav button{border:0;background:transparent;color:#c7d5e6;padding:11px 13px;border-radius:9px;font-weight:700;cursor:pointer}.global-main-nav button:hover,.global-main-nav button.active{background:#17385f;color:white}.global-search-field{height:42px;border:1px solid #3d5a7a;background:#16304f;color:#dbe7f5;border-radius:10px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:9px;padding:0 12px;text-align:left;cursor:pointer}.global-actions{display:flex;align-items:center;gap:7px}.global-icon-button{position:relative;width:41px;height:41px;border:0;border-radius:10px;background:#16304f;color:white;cursor:pointer;font-size:17px}.global-icon-button b{position:absolute;right:-3px;top:-4px;min-width:18px;height:18px;border-radius:999px;background:#e94d5c;color:white;font-size:10px;place-items:center}.global-profile-button{height:46px;border:0;background:transparent;color:white;border-left:1px solid #36516f;padding-left:12px;display:flex;align-items:center;gap:9px;cursor:pointer}.top-avatar{width:34px;height:34px;border-radius:10px;background:#2d69a5;display:grid;place-items:center;font-weight:800}.top-profile-copy{display:grid;text-align:left}.top-profile-copy small{color:#9fb4ca;font-size:10px}.shell-body{display:grid;grid-template-columns:230px 1fr;padding-top:68px;min-height:100vh}.contextual-sidebar{position:fixed;left:0;top:68px;bottom:0;width:230px;padding:18px 12px;background:white;border-right:1px solid #dfe7f0;overflow:auto}.workspace-heading{padding:4px 10px 14px;border-bottom:1px solid #edf1f5;margin-bottom:12px;display:grid}.workspace-heading small{font-size:9px;letter-spacing:1.5px;color:#8795a6}.workspace-heading strong{font-size:19px;color:#0b1f3a}.context-nav{display:grid;gap:4px}.context-nav .nav-item{display:flex;width:100%;border:0;background:transparent;color:#42556b;padding:10px 12px;border-radius:9px;text-align:left;cursor:pointer}.context-nav .nav-item.active{background:#e6f1fd;color:#0b4e91;font-weight:800}.app-shell-v4 .main{grid-column:2;padding:24px 28px;max-width:none}.page-header-v4{display:flex;justify-content:space-between;align-items:flex-start}.breadcrumb{font-size:11px;color:#718198}.context-quick-links{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0 18px}.context-quick-links button{border:1px solid #d9e4ef;background:white;color:#37516d;padding:7px 10px;border-radius:999px;cursor:pointer}.global-panel{position:fixed;z-index:1300;right:16px;top:76px;width:390px;max-height:calc(100vh - 92px);overflow:auto;background:white;border:1px solid #dce5ee;border-radius:15px;box-shadow:0 20px 55px rgba(5,20,38,.24);display:none}.global-panel.open{display:block}.global-panel-head{position:sticky;top:0;background:white;display:flex;justify-content:space-between;align-items:center;padding:15px;border-bottom:1px solid #edf1f5}.global-panel-head h3{margin:0}.global-panel-head button{border:0;background:transparent;font-size:22px}.panel-list-item{display:grid;width:100%;border:0;border-bottom:1px solid #edf1f5;background:white;padding:13px 15px;text-align:left;cursor:pointer;gap:4px}.panel-list-item.unread{border-left:4px solid #2e79bd;background:#f7fbff}.panel-list-item span,.panel-list-item small{color:#657789}.panel-footer-button{width:calc(100% - 24px);margin:12px;border:1px solid #c9d8e6;background:#f4f8fc;padding:10px;border-radius:9px}.panel-empty{padding:28px;text-align:center;color:#7c8998}.profile-panel{width:300px}.profile-panel-card{text-align:center;padding:22px}.profile-panel-avatar{width:58px;height:58px;border-radius:16px;background:#1d5c98;color:white;display:grid;place-items:center;margin:auto;font-size:20px;font-weight:800}.profile-menu-item{width:100%;border:0;border-top:1px solid #edf1f5;background:white;padding:13px 16px;text-align:left}.danger-text{color:#b5313e}.workspace-hero{display:flex;justify-content:space-between;gap:18px;align-items:center;background:linear-gradient(135deg,#0b1f3a,#1d5d98);color:white;border-radius:17px;padding:24px;margin-bottom:16px}.workspace-hero span{font-size:9px;letter-spacing:2px;color:#9bc4ed}.workspace-hero h2{font-size:28px;margin:5px 0}.workspace-hero p{margin:0;color:#d7e4f2}.hub-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.project-hub-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}.project-hub-card{background:white;border:1px solid #dce6ef;border-radius:14px;padding:16px}.project-hub-top{display:flex;justify-content:space-between}.project-hub-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:15px 0}.project-hub-stats span{background:#f4f7fa;border-radius:9px;padding:8px;text-align:center;font-size:11px}.project-hub-stats b{display:block;font-size:17px}.project-hub-actions{display:flex;gap:7px;flex-wrap:wrap}.document-project-picker{display:flex;gap:10px;align-items:end;flex-wrap:wrap;background:white;border:1px solid #dce6ef;border-radius:13px;padding:14px;margin-bottom:15px}.document-project-picker label{min-width:300px;flex:1}.document-folder-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.document-folder{background:white;border:1px solid #dce6ef;border-radius:14px;padding:14px}.document-folder-head{display:flex;justify-content:space-between;border-bottom:1px solid #edf1f5;padding-bottom:9px}.document-folder>button{display:grid;width:100%;border:0;border-bottom:1px solid #edf1f5;background:white;text-align:left;padding:10px 3px}.document-folder-empty{padding:15px;color:#82909e}.app-group{margin-bottom:20px}.app-tile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:11px}.app-tile{border:1px solid #dce6ef;background:white;border-radius:13px;padding:16px;text-align:left;display:grid;gap:6px}.app-tile>span{width:38px;height:38px;border-radius:10px;background:#e9f2fb;color:#14568f;display:grid;place-items:center}.mail-layout,.chat-layout{display:grid;grid-template-columns:260px 1fr;gap:14px}.mail-projects,.chat-channels{background:white;border:1px solid #dce6ef;border-radius:13px;padding:8px}.mail-projects button,.chat-channels button{display:grid;width:100%;border:0;background:white;padding:10px;border-radius:8px;text-align:left}.mail-projects button.active,.chat-channels button.active{background:#e9f3fd}.mail-thread,.chat-thread{background:white;border:1px solid #dce6ef;border-radius:13px;padding:14px}.mail-message{border:1px solid #dfe7ef;border-radius:12px;padding:12px;margin-bottom:10px}.mail-message>div{display:flex;justify-content:space-between}.mail-message footer{display:flex;gap:7px}.mail-message.external{border-left:4px solid #2f7ac0}.mail-message.company{border-left:4px solid #75a581}.chat-messages{min-height:360px;max-height:520px;overflow:auto}.chat-messages article{border-bottom:1px solid #edf1f5;padding:10px}.chat-compose{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:12px}@media(max-width:1050px){.global-topbar{grid-template-columns:auto 1fr auto}.global-main-nav{display:none}.shell-body{grid-template-columns:190px 1fr}.contextual-sidebar{width:190px}.document-folder-grid{grid-template-columns:1fr}}@media(max-width:760px){.top-profile-copy{display:none}.shell-body{display:block}.contextual-sidebar{display:none}.app-shell-v4 .main{padding:16px}.workspace-hero{align-items:flex-start;flex-direction:column}.mail-layout,.chat-layout{grid-template-columns:1fr}.global-panel{right:7px;width:calc(100vw - 14px)}}

/* eVerk 4.1 polish */
.contextual-sidebar{background:linear-gradient(180deg,#0b2d52 0%,#0b3d70 100%);border-right:0;box-shadow:4px 0 18px rgba(7,32,61,.12)}
.workspace-heading{border-bottom-color:rgba(255,255,255,.14)}
.workspace-heading small{color:#8fb7dc}.workspace-heading strong{color:white}
.context-nav .nav-item{color:#d8e7f5}
.context-nav .nav-item:hover{background:rgba(255,255,255,.09);color:white}
.context-nav .nav-item.active{background:white;color:#0b4e91;box-shadow:0 4px 12px rgba(0,0,0,.12)}
.modal-card{padding:0}
.modal-head{position:sticky;top:0;z-index:20;background:white;padding:18px 22px;border-bottom:1px solid #e4ebf2;border-radius:18px 18px 0 0;box-shadow:0 3px 10px rgba(9,31,55,.06)}
.modal-card>form,.modal-card>#detailsContent,.modal-card>.quick-grid,.modal-card>p,.modal-card>.notice{margin-left:22px;margin-right:22px}
.modal-card>form,.modal-card>#detailsContent{padding-bottom:22px}
.modal-card .modal-head+.quick-grid{margin-top:18px;margin-bottom:22px}
.modal-card .modal-head+#detailsContent{padding-top:18px}
.everk-inline-brand{margin-left:auto;text-align:right}.everk-inline-brand small{display:block;color:#718296;font-size:10px}.everk-inline-brand strong{font-size:22px;color:#0b1f3a}
@media(max-width:760px){.contextual-sidebar{background:#0b2d52}.contract-doc-head{flex-wrap:wrap}.everk-inline-brand{width:100%;text-align:left;margin-left:0}}


/* eVerk 4.2 – korekta układu górnego paska i szerokości roboczej */
html,body{overflow-x:hidden}
.global-topbar{
  grid-template-columns:230px auto minmax(340px,1fr) auto;
  gap:14px;
  padding:0 16px 0 18px;
}
.global-brand{
  width:230px;
  padding-left:10px;
}
.global-main-nav{
  justify-self:start;
  margin-left:6px;
}
.global-main-nav button{padding:11px 18px}
.global-search-field{min-width:0;width:100%}
.global-actions{justify-self:end}
.shell-body{
  display:block;
  padding-top:68px;
  min-height:100vh;
}
.contextual-sidebar{
  width:230px;
}
.app-shell-v4 .main{
  grid-column:auto;
  margin-left:230px;
  width:calc(100% - 230px);
  max-width:calc(100% - 230px);
  padding:24px 20px 28px 18px;
  overflow-x:hidden;
}
.page-header-v4{gap:16px}
#content,.page-header-v4,.context-quick-links{max-width:100%}
.grid,.metrics-grid,.project-hub-grid,.document-folder-grid,.app-tile-grid,.payroll-summary,.owner-report-grid,.reports-grid{max-width:100%}
.warranty-board,.kanban,.issues-board,.inspections-board,.site-diary-grid,.gallery-grid,.document-folder-grid,.mail-layout,.chat-layout,.app-tile-grid,.project-hub-grid{max-width:100%}
@media(max-width:1050px){
  .global-topbar{grid-template-columns:190px 1fr auto;gap:12px;padding:0 14px}
  .global-brand{width:190px;padding-left:4px}
  .shell-body{display:block}
  .contextual-sidebar{width:190px}
  .app-shell-v4 .main{margin-left:190px;width:calc(100% - 190px);max-width:calc(100% - 190px);padding:20px 16px 24px 14px}
}
@media(max-width:760px){
  .global-topbar{grid-template-columns:1fr auto;gap:10px;padding:8px 10px;height:auto;min-height:68px}
  .global-brand{width:auto;padding-left:0}
  .global-search-field{grid-column:1 / -1;order:3}
  .shell-body{display:block}
  .app-shell-v4 .main{margin-left:0;width:100%;max-width:100%;padding:16px}
}


/* eVerk 4.3 – dokładniejsze szlify topbara, kart i sekcji */
:root{
  --surface-radius:16px;
  --surface-radius-sm:12px;
  --surface-pad:16px;
  --surface-border:1px solid #dce6ef;
  --surface-shadow:0 6px 20px rgba(11,31,58,.05);
  --content-max:1500px;
}
html,body{overflow-x:hidden}
.app-shell-v4 .main{
  padding:22px 18px 28px 12px;
}
#content{
  width:100%;
  max-width:var(--content-max);
  display:grid;
  gap:16px;
  align-content:start;
}
#content > *{max-width:100%}
.global-topbar{
  grid-template-columns:228px max-content minmax(420px,1fr) auto;
  gap:16px;
  padding:0 16px 0 16px;
}
.global-brand{
  width:228px;
  padding-left:12px;
}
.global-main-nav{
  gap:8px;
  margin-left:10px;
  align-self:center;
}
.global-main-nav button{
  padding:11px 18px;
  white-space:nowrap;
}
.global-search-field{
  min-width:0;
  width:100%;
  max-width:none;
}
.global-actions{
  gap:8px;
  margin-left:6px;
}
.page-header-v4{
  gap:18px;
  margin-bottom:2px;
}
.page-header-v4 > div,
.page-header-v4 > section,
.page-header-v4 > article{min-width:0}
.page-header-v4 h1,
.page-header-v4 h2,
.workspace-hero h2{letter-spacing:-.02em}
.section-title{
  margin:10px 0 0;
  gap:10px;
  flex-wrap:wrap;
}
.section-title h2{font-size:22px}
.context-quick-links{margin:2px 0 6px}
.hub-toolbar,.planner-actions,.table-actions,.project-hub-actions{gap:10px}
.table-wrap,.card,.project-hub-card,.document-folder,.document-project-picker,.mail-projects,.mail-thread,.chat-channels,.chat-thread,.global-panel,.notification-row,.day-column,.timeline-content,.cash-day,.attachment-card,.comment-card,.version-card,.alert-card,.lead-column,.lead-card,.project-box,.settings-card,.hr-card,.owner-report-card,.report-card{
  border-radius:var(--surface-radius);
  border:var(--surface-border);
  box-shadow:var(--surface-shadow);
  background:white;
}
.card,.project-hub-card,.document-folder,.mail-thread,.chat-thread,.mail-projects,.chat-channels,.attachment-card,.comment-card,.version-card,.cash-day,.alert-card,.notification-row,.day-column,.document-project-picker{
  padding:var(--surface-pad);
}
.metrics-grid,.project-hub-grid,.document-folder-grid,.app-tile-grid,.payroll-summary,.owner-report-grid,.reports-grid,.warranty-board,.kanban,.issues-board,.inspections-board,.site-diary-grid,.gallery-grid,.mail-layout,.chat-layout,.project-hub-grid,.lead-pipeline,.report-grid{
  width:100%;
  max-width:100%;
}
.grid,.metrics-grid,.project-hub-grid,.document-folder-grid,.app-tile-grid,.payroll-summary,.owner-report-grid,.reports-grid{gap:16px}
.project-hub-card,.document-folder,.app-tile,.attachment-card,.comment-card,.version-card,.cash-day,.day-column,.timeline-content,.lead-card,.mail-message,.chat-thread article,.notification-row,.alert-card{
  overflow:hidden;
}
.table-wrap{overflow:auto}
table{width:100%}
.primary,.secondary,.danger,.global-main-nav button,.context-quick-links button,.search-trigger,.panel-footer-button,.project-hub-actions button,.hub-toolbar button,.planner-actions button,.table-actions button{
  min-height:42px;
}
.global-icon-button{box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}
.workspace-hero,.client-hero{
  box-shadow:0 12px 28px rgba(11,31,58,.12);
}
.app-tile{
  min-height:150px;
  border-radius:var(--surface-radius);
  box-shadow:var(--surface-shadow);
}
.app-tile-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.project-hub-grid{grid-template-columns:repeat(auto-fill,minmax(320px,1fr))}
.document-folder-grid{grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}
.mail-layout,.chat-layout{grid-template-columns:minmax(240px,280px) minmax(0,1fr)}
.report-grid{grid-template-columns:minmax(0,1.25fr) minmax(320px,1fr)}
.report-kpis,.metrics-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.warranty-board,.kanban,.issues-board,.inspections-board,.site-diary-grid,.gallery-grid,.owner-report-grid,.reports-grid,.payroll-summary{
  display:grid;
  gap:16px;
}
.contextual-sidebar{scrollbar-width:thin}
.contextual-sidebar::-webkit-scrollbar{width:8px}
.contextual-sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.18);border-radius:999px}
@media(max-width:1280px){
  .global-topbar{grid-template-columns:210px max-content minmax(300px,1fr) auto;gap:12px}
  .global-brand{width:210px;padding-left:8px}
  .global-main-nav{margin-left:4px;gap:6px}
  .global-main-nav button{padding:10px 14px}
  .app-shell-v4 .main{padding:20px 16px 26px 10px}
  #content{gap:14px}
}
@media(max-width:1050px){
  .global-topbar{grid-template-columns:190px 1fr auto;gap:12px;padding:0 12px}
  .global-brand{width:190px;padding-left:4px}
  .app-shell-v4 .main{margin-left:190px;width:calc(100% - 190px);max-width:calc(100% - 190px);padding:18px 14px 24px 10px}
  .report-grid,.mail-layout,.chat-layout{grid-template-columns:1fr}
}
@media(max-width:760px){
  #content{gap:12px}
  .page-header-v4{flex-direction:column;align-items:stretch}
  .section-title{margin-top:4px}
  .app-shell-v4 .main{padding:14px}
  .document-folder-grid,.project-hub-grid,.app-tile-grid,.report-kpis,.metrics-grid{grid-template-columns:1fr}
}


/* eVerk 4.4 */
.app-shell-v4{display:block!important;width:100%;max-width:100%}.shell-body{display:block!important;width:100%;max-width:100%}
.app-shell-v4 .main{margin-left:230px;width:calc(100% - 230px)!important;max-width:calc(100% - 230px)!important;min-width:0}
#content{display:block;width:100%;max-width:none}#content>*{width:100%;max-width:100%}
.global-search-wrap{position:relative;padding:0 12px;cursor:text}.global-search-wrap input{width:100%;height:40px;border:0!important;outline:0;background:transparent;color:#eef5ff;padding:0 4px;font-size:16px}.global-search-wrap input::placeholder{color:#c8d7e7}.global-search-icon{color:#d7e5f4;font-size:17px}
.global-search-results-dropdown{position:absolute;left:0;right:0;top:calc(100% + 9px);max-height:min(66vh,620px);overflow:auto;background:white;color:var(--text);border:1px solid #d5e0eb;border-radius:14px;box-shadow:0 22px 55px rgba(5,20,38,.24);padding:8px;display:none;z-index:1500}.global-search-wrap.active .global-search-results-dropdown{display:block}.global-search-wrap.active{border-color:#7eb5ea;background:#1b3b61;box-shadow:0 0 0 3px rgba(64,140,215,.14)}
.chat-workspace{height:calc(100vh - 285px);min-height:420px;display:flex;flex-direction:column;gap:12px}.chat-workspace-head{flex:0 0 auto;background:linear-gradient(135deg,#0b1f3a,#1d5d98);color:white;border-radius:16px;padding:16px 20px;box-shadow:0 10px 24px rgba(11,31,58,.12)}.chat-workspace-head span{font-size:9px;letter-spacing:2px;color:#9bc4ed}.chat-workspace-head h2{margin:4px 0 2px}.chat-workspace-head p{margin:0;color:#d7e4f2}
.chat-workspace .chat-layout{flex:1;min-height:0;height:auto;display:grid;grid-template-columns:minmax(220px,270px) minmax(0,1fr);gap:14px}.chat-workspace .chat-channels{height:100%;overflow:auto;min-height:0}.chat-workspace .chat-thread{height:100%;min-height:0;display:flex;flex-direction:column;padding:0;overflow:hidden}.chat-thread-title{flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;padding:13px 16px;border-bottom:1px solid var(--line);background:#fbfcfe}.chat-thread-title small{color:var(--muted)}.chat-workspace .chat-messages{flex:1;min-height:0;max-height:none;overflow:auto;padding:8px 14px}.chat-workspace .chat-compose{flex:0 0 auto;margin:0;padding:12px 14px;background:white;border-top:1px solid var(--line);z-index:3}.chat-workspace .chat-compose input{min-height:44px}
@media(max-width:1050px){.app-shell-v4 .main{margin-left:190px;width:calc(100% - 190px)!important;max-width:calc(100% - 190px)!important}.chat-workspace{height:calc(100vh - 275px)}.chat-workspace .chat-layout{grid-template-columns:210px minmax(0,1fr)}}
@media(max-width:760px){.app-shell-v4 .main{margin-left:0;width:100%!important;max-width:100%!important}.global-search-wrap{grid-column:1/-1;order:3}.chat-workspace{height:auto;min-height:calc(100vh - 150px)}.chat-workspace .chat-layout{display:flex;flex-direction:column}.chat-workspace .chat-channels{display:flex;height:auto;max-height:90px;overflow:auto}.chat-workspace .chat-channels button{min-width:170px}.chat-workspace .chat-thread{min-height:480px}}


/* eVerk Basic 5.0 — kompletny rdzeń bez nadbagażu */
.global-topbar{grid-template-columns:220px max-content minmax(280px,1fr) auto;gap:12px}
.global-brand{width:220px}
.basic-main-nav{gap:4px}
.basic-main-nav button{padding:10px 12px;font-size:13px}
.owner-settings-button{font-size:19px}
.basic-day-start{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:12px}
.basic-day-start button{border:1px solid var(--line);background:white;border-radius:14px;padding:14px;display:flex;align-items:center;gap:10px;color:var(--navy);box-shadow:0 4px 14px rgba(11,31,58,.04)}
.basic-day-start span{width:34px;height:34px;border-radius:10px;background:var(--light);display:grid;place-items:center;color:var(--blue);font-weight:800}
.basic-included{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.basic-included span{background:#eef5ff;color:#14568f;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:700}
.addon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:14px}
.addon-card{display:grid;grid-template-columns:48px 1fr auto;gap:14px;align-items:center;background:white;border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:0 4px 14px rgba(11,31,58,.04)}
.addon-card h3{margin:0 0 5px}.addon-card p{margin:0;color:var(--muted);font-size:13px}.addon-icon{width:46px;height:46px;border-radius:12px;background:#e9f2fb;color:#14568f;display:grid;place-items:center;font-weight:800}
.notes-layout{display:grid;grid-template-columns:minmax(320px,420px) minmax(0,1fr);gap:16px;align-items:start}.note-composer{position:sticky;top:88px}.note-compose-row{display:grid;grid-template-columns:1fr 1fr auto;gap:9px}.notes-list{display:grid;gap:12px}.note-card>div:first-child{display:flex;justify-content:space-between;gap:12px}.note-card small{color:var(--muted)}.note-card p{white-space:pre-wrap}
@media(max-width:1350px){.global-topbar{grid-template-columns:190px max-content minmax(220px,1fr) auto}.global-brand{width:190px}.basic-main-nav button{padding:9px 9px}.top-profile-copy{display:none}.basic-day-start{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1050px){.basic-main-nav{display:none}.global-topbar{grid-template-columns:190px 1fr auto}.notes-layout{grid-template-columns:1fr}.note-composer{position:static}}
@media(max-width:760px){.basic-day-start{grid-template-columns:repeat(2,1fr)}.addon-card{grid-template-columns:44px 1fr}.addon-card button{grid-column:1/-1}.note-compose-row{grid-template-columns:1fr}.global-topbar{grid-template-columns:1fr auto}.owner-settings-button{display:none}}

/* eVerk Basic 5.2 — pełna konfiguracja firmy i projekt z nowym klientem */
.form-section{border:1px solid var(--line);border-radius:14px;padding:16px;background:#fbfcfe;display:grid;gap:14px}
.form-section h3{margin:0;color:var(--navy)}
.form-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.client-mode-switch{display:flex;gap:16px;flex-wrap:wrap;padding:10px 12px;background:white;border:1px solid var(--line);border-radius:10px}
.client-mode-switch label,.checkbox-row{display:flex;grid-template-columns:none;align-items:center;gap:8px;font-weight:700}
.client-mode-switch input,.checkbox-row input{width:auto}
.notice.subtle{background:#f5f8fc;border-left-color:#8ba4be}
.setup-intro{display:grid;gap:4px;padding:16px;background:linear-gradient(135deg,#eaf4ff,#f7fbff);border:1px solid #cfe1f3;border-radius:14px}
.setup-logo-preview,.settings-logo{max-width:220px;max-height:100px;object-fit:contain;background:white;border:1px solid var(--line);border-radius:12px;padding:10px}
.logo-placeholder{min-height:82px;border:2px dashed #c9d7e5;border-radius:12px;display:grid;place-items:center;color:var(--muted);background:white}
.number-preview{padding:12px;background:white;border:1px solid var(--line);border-radius:10px}
.settings-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.settings-hero{margin-bottom:0}.metric-value.small{font-size:22px}.form-actions.left{justify-content:flex-start}
.modal-card:has(#dynamicForm .form-section){width:min(1040px,calc(100vw - 28px))}
.modal-card:has(#dynamicForm .form-section) #dynamicForm{grid-template-columns:1fr;max-width:none}
@media(max-width:760px){.form-grid-2{grid-template-columns:1fr}.client-mode-switch{flex-direction:column}.modal-card:has(#dynamicForm .form-section){width:100%}}


/* eVerk Basic 5.3 — działające logo, czas bez przewijania, poczta i wykresy */
.compact-time-form{width:100%;max-width:none!important;margin:0!important;padding:16px 20px 18px!important;gap:12px!important}
#formModal:has(.compact-time-form) .modal-card{width:min(960px,calc(100vw - 32px));max-height:none;overflow:visible}
#formModal:has(.compact-time-form){align-items:center}
.time-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 14px}
.time-form-grid label{min-width:0}
.time-form-grid input,.time-form-grid select,.time-form-grid textarea{padding:9px 10px}
.time-form-grid .time-desc{grid-column:1/-1}
.time-form-grid .time-desc textarea{min-height:58px;max-height:72px;resize:none}
.compact-time-form .form-actions{position:static;margin-top:0}
.setup-logo-preview,.settings-logo{max-width:220px;max-height:110px;object-fit:contain;display:block;margin:10px 0;padding:8px;background:white;border:1px solid var(--line);border-radius:12px}
.logo-placeholder{min-height:90px;display:grid;place-items:center;border:1px dashed #aebfd1;border-radius:12px;background:#f7f9fc;color:var(--muted);margin:10px 0}
.mail-thread-fixed{display:grid;grid-template-rows:auto minmax(220px,1fr) auto;min-height:calc(100vh - 270px);max-height:calc(100vh - 210px);padding:0!important;overflow:hidden}
.mail-thread-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line)}
.mail-thread-head div{display:grid}.mail-thread-head small{color:var(--muted)}
.mail-messages-scroll{overflow:auto;padding:14px}
.mail-compose-fixed{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;margin:0!important;padding:12px 14px;border-top:1px solid var(--line);background:white}
.mail-compose-fixed textarea{min-height:52px;max-height:90px;resize:none}
.finance-dashboard{display:grid;gap:14px}
.finance-dashboard-head{display:flex;justify-content:space-between;align-items:end;gap:16px}
.finance-dashboard-head span{font-size:10px;letter-spacing:1.5px;color:var(--blue);font-weight:800}.finance-dashboard-head h2{margin:4px 0;font-size:25px}.finance-dashboard-head p{margin:0;color:var(--muted)}
.finance-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.finance-chart-card{background:white;border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:0 6px 20px rgba(11,31,58,.05);min-width:0}
.finance-chart-card>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.finance-chart-card>div:first-child span{color:var(--muted);font-size:13px}.finance-chart-card>div:first-child strong{font-size:20px}
.finance-svg{display:block;width:100%;height:155px;margin-top:8px;overflow:visible}.finance-svg rect{fill:#1769e0}.finance-svg text{fill:#6d7b8e;font-size:12px}
.finance-status-bar{height:28px;border-radius:999px;overflow:hidden;display:flex;background:#edf2f7;margin:28px 0 18px}.finance-status-bar i,.finance-status-bar b,.finance-status-bar em{display:block;height:100%;font-style:normal}.finance-status-bar i{background:#1f8a4c}.finance-status-bar b{background:#1769e0}.finance-status-bar em{background:#aebfd1}
.finance-legend,.finance-status-values{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.finance-legend span{font-size:12px;color:var(--muted)}.finance-legend i,.finance-legend b,.finance-legend em{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px}.finance-legend i{background:#1f8a4c}.finance-legend b{background:#1769e0}.finance-legend em{background:#aebfd1}.finance-status-values{margin-top:12px;font-weight:800}
.operational-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden}.operational-strip>div{background:white;padding:14px;display:grid;gap:5px}.operational-strip span{color:var(--muted);font-size:12px}.operational-strip strong{font-size:18px}
@media(max-width:980px){.time-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-chart-grid{grid-template-columns:1fr}.operational-strip{grid-template-columns:repeat(2,1fr)}}
@media(max-width:680px){#formModal:has(.compact-time-form) .modal-card{max-height:94vh;overflow:auto}.time-form-grid{grid-template-columns:1fr}.mail-compose-fixed{grid-template-columns:1fr}.mail-thread-fixed{min-height:620px}.finance-dashboard-head{align-items:flex-start;flex-direction:column}.finance-legend,.finance-status-values{grid-template-columns:1fr}.operational-strip{grid-template-columns:1fr}}

/* eVerk 5.6 — pełny edytor faktury */
.invoice-editor-head,.invoice-detail-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}.invoice-editor-head h2,.invoice-detail-head h2{margin:4px 0}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.08em;color:#667085}.invoice-meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.invoice-party-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0}.invoice-party-grid section{border:1px solid var(--line,#dfe5ee);border-radius:12px;padding:16px;background:#fff}.invoice-party-grid h3{margin:0 0 12px}.invoice-source-bar{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:10px;align-items:end;margin:14px 0}.invoice-table-wrap{overflow-x:auto;border:1px solid var(--line,#dfe5ee);border-radius:12px}.invoice-lines{min-width:1060px}.invoice-lines input,.invoice-lines select{min-width:74px;padding:8px}.invoice-lines td:first-child input{min-width:230px}.invoice-lines small,.invoice-detail-head small,td small{display:block;color:#667085;margin-top:4px}.invoice-bottom-grid{display:grid;grid-template-columns:1fr 360px;gap:22px;margin-top:18px}.invoice-totals{border:1px solid var(--line,#dfe5ee);border-radius:12px;padding:16px;background:#f8fafc}.invoice-totals>div{display:flex;justify-content:space-between;padding:8px 0}.invoice-totals .grand{border-top:2px solid #172033;margin-top:6px;padding-top:14px;font-size:18px}.invoice-warning{display:flex;flex-direction:column;gap:4px;margin-top:18px;padding:14px;border-radius:10px;background:#fff7ed;border:1px solid #fed7aa}.invoice-actions{position:sticky;bottom:0;background:#fff;padding:14px 0 4px;z-index:3}.text-action{border:0;background:none;color:#1769e0;font-weight:700;padding:10px 0;cursor:pointer}.empty-cell{text-align:center;color:#667085;padding:28px!important}.invoice-due{display:flex;flex-direction:column;text-align:right}.invoice-due strong{font-size:24px}.invoice-summary-detail{display:grid;grid-template-columns:1fr 300px;gap:18px;margin-top:18px;align-items:start}.invoice-summary-detail>div{display:flex;flex-direction:column;gap:8px;text-align:right}.invoice-summary-detail>div strong{font-size:21px}.modal-card.wide{max-width:1280px;width:min(96vw,1280px)}
@media(max-width:900px){.invoice-meta-grid{grid-template-columns:1fr 1fr}.invoice-party-grid,.invoice-bottom-grid,.invoice-summary-detail{grid-template-columns:1fr}.invoice-source-bar{grid-template-columns:1fr}.invoice-totals{width:auto}.invoice-editor-head,.invoice-detail-head{flex-direction:column}.invoice-due{text-align:left}}
@media(max-width:560px){.invoice-meta-grid{grid-template-columns:1fr}.invoice-actions{display:grid;grid-template-columns:1fr}.invoice-actions button{width:100%}}

/* eVerk 5.7 — wybór zakresu faktury z projektu */
.invoice-source-picker{margin:10px 0 16px;padding:14px;border:1px solid #d9e2ef;border-radius:12px;background:#f8fafc}
.invoice-source-picker>div:first-child p{margin:4px 0 12px;color:#667085;font-size:13px}
.source-choice{display:flex;align-items:flex-start;gap:10px;padding:10px 8px;border-top:1px solid #e6ebf2;cursor:pointer}
.source-choice input{width:auto;margin-top:3px}
.source-choice span{display:flex;flex-direction:column;gap:3px}
.source-choice small{color:#667085}
.invoice-source-bar label small{font-weight:400;color:#667085}

/* eVerk 5.8 — elastyczne jednostki i panel wyglądu faktury */
.invoice-unit-input{min-width:92px;width:100%}
.invoice-appearance-panel{margin:16px 0;border:1px solid var(--border,#dfe5ee);border-radius:12px;background:#fff;overflow:hidden}
.invoice-appearance-panel summary{cursor:pointer;padding:14px 16px;font-weight:700;background:#f7f9fc;list-style:none}
.invoice-appearance-panel summary::-webkit-details-marker{display:none}
.invoice-appearance-panel summary:after{content:'▾';float:right;color:#667085}
.invoice-appearance-panel[open] summary:after{content:'▴'}
.invoice-appearance-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px;align-items:end}
.invoice-appearance-grid .checkbox-row{min-height:42px;display:flex;align-items:center}
@media(max-width:900px){.invoice-appearance-grid{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.invoice-appearance-grid{grid-template-columns:1fr}.invoice-unit-input{min-width:110px}}

/* eVerk 5.10 — podgląd faktury w aplikacji */
.invoice-preview-overlay{position:fixed;inset:0;z-index:9999;background:rgba(15,23,42,.72);display:flex;align-items:stretch;justify-content:center;padding:18px}
.invoice-preview-shell{width:min(1180px,100%);height:100%;background:#eef2f7;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 24px 70px rgba(0,0,0,.28)}
.invoice-preview-toolbar{min-height:68px;background:#fff;border-bottom:1px solid #d8dee8;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 18px;flex:0 0 auto}
.invoice-preview-toolbar>div:first-child{display:flex;flex-direction:column;gap:3px}.invoice-preview-toolbar strong{font-size:16px}.invoice-preview-toolbar span{font-size:12px;color:#667085}
.invoice-preview-actions{display:flex;gap:10px}.invoice-preview-frame{width:100%;height:100%;border:0;background:#fff;flex:1 1 auto}
@media(max-width:640px){.invoice-preview-overlay{padding:0}.invoice-preview-shell{border-radius:0}.invoice-preview-toolbar{padding:10px;min-height:62px}.invoice-preview-toolbar span{display:none}.invoice-preview-actions{gap:6px}.invoice-preview-actions button{padding:9px 11px}}
/* eVerk 5.11 — moduł ofert */
.offer-muted{color:#64748b;margin:4px 0 0}.offer-mode-cards,.offer-start-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.offer-mode-cards button,.offer-start-strip button{border:1px solid #d9e2ef;background:#fff;border-radius:16px;padding:22px;text-align:left;display:flex;flex-direction:column;gap:9px;cursor:pointer}.offer-mode-cards button:hover,.offer-start-strip button:hover{border-color:#2563eb;box-shadow:0 8px 24px rgba(37,99,235,.1)}.offer-mode-cards strong{font-size:22px}.offer-mode-cards span,.offer-start-strip span{color:#64748b}.offer-mode-cards b{color:#1d4ed8}.offer-start-strip{margin:0 0 16px}.offer-start-strip button{padding:15px}.offer-editor-card{width:min(1740px,98vw);height:min(94vh,1050px);max-width:none;overflow:auto}.offer-sticky{position:sticky;top:0;background:#fff;z-index:20;border-bottom:1px solid #e5e7eb}.offer-head-actions{display:flex;align-items:center;gap:10px}.offer-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px;padding:18px}.offer-header-card{margin:0 0 16px}.offer-section-card{background:#fff;border:1px solid #dfe6ef;border-radius:16px;padding:16px;margin-bottom:14px}.offer-section-head{display:grid;grid-template-columns:minmax(260px,1fr) auto auto auto;align-items:start;gap:14px;padding-bottom:12px;border-bottom:1px solid #eef2f7;margin-bottom:12px}.offer-section-title input{font-size:18px;font-weight:700}.offer-section-title textarea{margin-top:6px}.offer-line-row{display:grid;grid-template-columns:minmax(260px,2fr) 85px 100px 115px 85px 85px minmax(110px,1fr) auto;gap:8px;align-items:end;padding:10px 0;border-bottom:1px solid #eef2f7}.offer-line-row:has(label:nth-of-type(7)){grid-template-columns:minmax(240px,2fr) 75px 90px 105px 75px 75px 105px 145px minmax(110px,1fr) auto}.offer-line-main textarea{margin-top:5px}.offer-line-row label{font-size:11px;color:#64748b}.offer-line-row input,.offer-line-row select,.offer-line-row textarea{width:100%}.offer-line-total{padding:0 6px 7px;white-space:nowrap}.offer-line-total small{display:block;color:#64748b}.offer-summary-sticky{position:sticky;top:92px}.offer-summary-row{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #eef2f7}.offer-summary-row.total{font-size:18px;border-bottom:2px solid #1d4ed8}.offer-summary-sticky .full{width:100%;margin-top:9px}.offer-add-section{margin:0 0 16px}.icon-btn.danger{color:#b91c1c}.offer-preview-card{width:min(1120px,96vw);max-width:none;height:min(94vh,1100px);overflow:auto}.offer-document{position:relative;background:#fff;color:#172033;max-width:920px;margin:18px auto;padding:48px;box-shadow:0 12px 35px rgba(15,23,42,.13);overflow:hidden}.offer-document header{display:flex;justify-content:space-between;gap:25px;border-bottom:3px solid var(--brand,#1d4ed8);padding-bottom:20px}.offer-document header>div:first-child{display:flex;flex-direction:column}.offer-document header img{max-width:170px;max-height:65px;object-fit:contain;object-position:left;margin-bottom:8px}.offer-doc-number{text-align:right}.offer-doc-number span{letter-spacing:.18em;font-weight:800;color:#1d4ed8}.offer-doc-client{display:flex;flex-direction:column;margin:28px 0 20px;padding:16px;background:#f7f9fc;border-radius:10px}.offer-document h1{font-size:27px;margin:18px 0 24px}.offer-doc-section{margin:22px 0}.offer-doc-section h3{font-size:18px;border-left:4px solid #1d4ed8;padding-left:10px}.offer-doc-section table{width:100%;border-collapse:collapse;margin-top:10px}.offer-doc-section th,.offer-doc-section td{padding:10px 8px;border-bottom:1px solid #e5e7eb;text-align:right}.offer-doc-section th:first-child,.offer-doc-section td:first-child{text-align:left}.offer-doc-section td small{display:block;color:#64748b;margin-top:3px}.section-sum{font-weight:700}.offer-doc-total{margin-left:auto;margin-top:24px;width:min(360px,100%);display:flex;justify-content:space-between;align-items:center;background:#172033;color:#fff;padding:18px;border-radius:10px;font-size:18px}.offer-doc-total strong{font-size:24px}.offer-doc-terms{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:30px}.offer-doc-terms>div,.offer-doc-message{background:#f7f9fc;padding:16px;border-radius:10px}.offer-document footer{margin-top:35px;padding-top:12px;border-top:1px solid #e5e7eb;text-align:center;color:#94a3b8;font-size:12px}.offer-watermark{position:absolute;top:42%;left:5%;width:90%;transform:rotate(-25deg);text-align:center;font-size:58px;line-height:1;color:rgba(190,20,20,.14);font-weight:900;letter-spacing:.05em;pointer-events:none;z-index:5}.offer-watermark small{font-size:24px}.form-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:1200px){.offer-editor-grid{grid-template-columns:1fr}.offer-summary-sticky{position:static}.offer-line-row,.offer-line-row:has(label:nth-of-type(7)){grid-template-columns:repeat(4,minmax(100px,1fr))}.offer-line-main{grid-column:1/-1}.offer-line-total{grid-column:span 2}.offer-section-head{grid-template-columns:1fr auto}.offer-section-title{grid-column:1/-1}}
@media(max-width:700px){.offer-mode-cards,.offer-start-strip,.form-grid-2,.offer-doc-terms{grid-template-columns:1fr}.offer-editor-card{width:100vw;height:100vh;border-radius:0}.offer-editor-grid{padding:10px}.offer-line-row,.offer-line-row:has(label:nth-of-type(7)){grid-template-columns:repeat(2,minmax(0,1fr))}.offer-line-main{grid-column:1/-1}.offer-document{padding:24px 16px}.offer-document header{flex-direction:column}.offer-doc-number{text-align:left}.offer-watermark{font-size:37px}.offer-section-head{grid-template-columns:1fr}}
@media print{body>*{display:none!important}#offerPreviewModal,#offerPreviewModal *{display:block!important}#offerPreviewModal{position:static!important;background:#fff!important}.offer-preview-card{box-shadow:none!important;width:auto!important;height:auto!important}.offer-preview-card>.modal-head{display:none!important}.offer-document{box-shadow:none!important;margin:0!important;max-width:none!important}}

/* eVerk 5.12 — warunki oferty i sprzedaż modułu rozszerzonego */
.offer-sales-cards{align-items:stretch}.offer-sales-card{border:1px solid #dbe4f0;border-radius:18px;padding:22px;background:#fff;display:flex;flex-direction:column;gap:12px}.offer-sales-card.addon{background:linear-gradient(145deg,#f8fbff,#eef5ff);border-color:#b9d2fb}.offer-sales-card h3{font-size:24px;margin:0}.offer-sales-card p{color:#64748b;margin:0}.offer-sales-card ul{margin:0 0 4px;padding-left:20px;color:#334155}.offer-plan-tag,.offer-mini-tag{display:inline-flex;align-self:flex-start;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:800;letter-spacing:.06em;color:#166534;background:#dcfce7}.offer-plan-tag.premium,.offer-mini-tag.premium{color:#1d4ed8;background:#dbeafe}.offer-addon-price{display:flex;align-items:end;gap:8px;margin-top:auto}.offer-addon-price strong{font-size:30px}.offer-addon-price span{color:#64748b;padding-bottom:5px}.offer-addon-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.offer-demo-notice{color:#9a3412;background:#ffedd5;border:1px solid #fed7aa;border-radius:9px;padding:7px 10px;margin:7px 0 0}.offer-product-strip button{position:relative}.offer-product-strip .offer-mini-tag{margin-bottom:2px}.offer-product-strip b{color:#1d4ed8}.offer-addon-tile:not(.enabled){background:linear-gradient(145deg,#f8fbff,#eef5ff);border-color:#b9d2fb}.offer-quick-tools{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}.offer-quick-tools button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;padding:14px 16px}.offer-quick-tools button span{font-size:12px;color:#64748b;margin-top:4px}.offer-config-panel{margin-bottom:14px;border:1px solid #bfdbfe;background:#fbfdff}.offer-config-head{display:flex;justify-content:space-between;gap:16px;align-items:start;margin-bottom:14px}.offer-condition-list{display:grid;gap:10px}.offer-condition-item{border:1px solid #e2e8f0;border-radius:12px;padding:12px;background:#fff}.offer-condition-item.enabled{border-color:#93c5fd;box-shadow:0 0 0 2px rgba(59,130,246,.06)}.offer-condition-switch{display:flex;align-items:center;gap:9px}.offer-condition-values{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin:10px 0 7px}.offer-condition-values.disabled{opacity:.45;pointer-events:none}.choice-chip{border:1px solid #cbd5e1;background:#fff;border-radius:999px;padding:7px 11px;cursor:pointer}.choice-chip.selected{background:#dbeafe;border-color:#3b82f6;color:#1d4ed8;font-weight:700}.offer-condition-custom{display:none;align-items:center;gap:7px;min-width:min(360px,100%)}.offer-condition-custom.visible{display:flex}.offer-condition-custom input{min-width:240px}.offer-condition-custom span{color:#64748b}.offer-condition-preview{display:block;color:#64748b}.offer-appearance-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}.offer-demo-watermark{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:7;background:#1d4ed8;color:#fff;padding:6px 12px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.08em}.offer-doc-conditions{margin-top:28px;border-top:1px solid #e2e8f0;padding-top:18px}.offer-doc-conditions ol{padding-left:22px}.offer-doc-conditions li{margin:7px 0}.offer-doc-totals-small{display:flex;justify-content:flex-end;gap:20px;color:#475569;margin-top:18px}.offer-acceptance{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-top:40px;padding-top:25px}.offer-acceptance span{border-top:1px solid #64748b;padding-top:6px;text-align:center;color:#64748b;font-size:12px}.offer-template-classic{font-family:Georgia,serif}.offer-template-classic header{border-bottom-color:#334155}.offer-template-construction .offer-doc-section h3{background:#eff6ff;padding:10px 12px;border-left:5px solid #1d4ed8}.offer-template-construction .offer-doc-client{border-left:5px solid #1d4ed8}
@media(max-width:900px){.offer-appearance-grid{grid-template-columns:1fr 1fr}.offer-quick-tools{grid-template-columns:1fr}}
@media(max-width:600px){.offer-addon-actions,.offer-appearance-grid{grid-template-columns:1fr}.offer-config-head{flex-direction:column}.offer-condition-custom{width:100%}.offer-condition-custom input{min-width:0;flex:1}.offer-doc-totals-small{flex-direction:column;gap:5px;align-items:flex-end}.offer-acceptance{grid-template-columns:1fr}}

/* eVerk Basic 5.14 — uproszczony interfejs */
.context-quick-links{display:none!important}.global-topbar{grid-template-columns:auto 1fr minmax(260px,420px) auto}.global-main-nav{justify-content:center}.global-main-nav button{font-weight:650}.workspace-heading small{display:none}.workspace-heading strong{font-size:14px}.global-actions .global-icon-button{font-family:Arial,sans-serif}.workspace-hero>div>span{display:none}.workspace-hero p{max-width:650px}.hub-toolbar button:last-child{display:none}.sidebar{min-width:190px}.context-nav{gap:4px}.nav-item{padding:11px 13px}.page-header-v4 .top-actions .secondary{display:none}@media(max-width:1100px){.global-search-field{display:none}.global-topbar{grid-template-columns:auto 1fr auto}}

/* eVerk Basic 5.15 — jeden system nawigacji i pulpit informacyjny */
.global-topbar{grid-template-columns:220px minmax(300px,1fr) auto}
.global-main-nav{display:none!important}
.global-search-field{max-width:720px;width:100%;justify-self:center}
.dashboard-mode .page-header-v4{display:none}
.dashboard-mode .main{padding-top:18px}
.dashboard-single-card{background:#fff;border:1px solid #dce6ef;border-radius:18px;box-shadow:0 10px 30px rgba(11,31,58,.07);padding:18px;display:grid;gap:15px;min-height:calc(100vh - 105px)}
.dashboard-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;border-bottom:1px solid #edf1f5;padding-bottom:13px}
.dashboard-card-head>div:first-child>span{font-size:10px;letter-spacing:1.6px;color:#1f67a8;font-weight:850}.dashboard-card-head h2{margin:4px 0 2px;font-size:25px;color:#0b1f3a}.dashboard-card-head p{margin:0;color:#6e7f91}
.dashboard-head-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.dashboard-head-controls input{width:155px;margin:0}
.chart-mode-switch{display:flex;background:#edf3f8;border-radius:10px;padding:3px}.chart-mode-switch button{border:0;background:transparent;padding:8px 11px;border-radius:8px;color:#53677c;cursor:pointer;font-weight:750}.chart-mode-switch button.active{background:#fff;color:#0b4e91;box-shadow:0 2px 8px rgba(11,31,58,.12)}
.dashboard-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.dashboard-kpis>div{background:#f6f9fc;border:1px solid #e6edf4;border-radius:12px;padding:11px 12px;min-width:0}.dashboard-kpis span{display:block;color:#718198;font-size:11px;margin-bottom:4px}.dashboard-kpis strong{font-size:18px;color:#132b45;white-space:nowrap}
.dashboard-chart-area{min-height:275px}.dashboard-four-charts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.dashboard-four-charts article,.dashboard-line-chart{border:1px solid #e1e9f1;background:#fbfdff;border-radius:14px;padding:13px;min-width:0}.dashboard-four-charts article>span{display:block;color:#6d7e90;font-size:12px}.dashboard-four-charts article>strong{display:block;font-size:19px;margin-top:4px}.dashboard-four-charts .finance-svg{height:145px;width:100%}.dashboard-finance-summary{display:flex;flex-direction:column;justify-content:center}.dashboard-finance-summary p{color:#718198;font-size:12px;line-height:1.5;margin:8px 0 0}
.dashboard-chart-title{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:6px}.dashboard-chart-title>div:first-child{display:grid}.dashboard-chart-title span{color:#6e7f91;font-size:12px}.dashboard-chart-title strong{font-size:17px;color:#18344f}.dashboard-line-legend{display:flex;gap:13px;flex-wrap:wrap}.dashboard-line-legend span{position:relative;padding-left:17px}.dashboard-line-legend span:before{content:"";position:absolute;left:0;top:6px;width:11px;height:3px;border-radius:4px}.invoice-line:before{background:#2468a2}.paid-line:before{background:#3c8a5a}.due-line:before{background:#c17a31}
.dashboard-curved-svg{width:100%;height:225px;overflow:visible}.dashboard-curved-svg .chart-grid-lines line{stroke:#e5ebf1;stroke-width:1}.dashboard-curved-svg text{fill:#77889a;font-size:11px}.dashboard-curved-svg path{fill:none;stroke-width:4;stroke-linecap:round}.line-invoice{stroke:#2468a2}.line-paid{stroke:#3c8a5a}.line-due{stroke:#c17a31}.point-invoice{fill:#2468a2}.point-paid{fill:#3c8a5a}.point-due{fill:#c17a31}
.dashboard-bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.dashboard-bottom-grid>div{border-top:1px solid #edf1f5;padding-top:11px}.dashboard-bottom-grid h3{font-size:14px;margin:0 0 7px;color:#18344f}.dashboard-status-list>div,.dashboard-project-list>div{display:flex;justify-content:space-between;gap:14px;padding:7px 0;border-bottom:1px solid #f0f3f6;font-size:12px}.dashboard-status-list span,.dashboard-project-list span{color:#66788a}.dashboard-status-list strong,.dashboard-project-list strong{text-align:right;color:#243e59}.dashboard-ok strong{color:#287343}
@media(max-width:1250px){.dashboard-kpis{grid-template-columns:repeat(3,1fr)}.dashboard-four-charts{grid-template-columns:repeat(2,1fr)}.global-topbar{grid-template-columns:190px 1fr auto}}
@media(max-width:760px){.dashboard-single-card{min-height:auto;padding:13px}.dashboard-card-head{flex-direction:column}.dashboard-head-controls{justify-content:flex-start}.dashboard-kpis{grid-template-columns:repeat(2,1fr)}.dashboard-four-charts,.dashboard-bottom-grid{grid-template-columns:1fr}.dashboard-chart-title{flex-direction:column}.global-topbar{grid-template-columns:1fr auto}.global-search-field{display:none}}


/* eVerk Basic 5.20 — jeden czysty system kreatorów, bez przewijania formularza */
.workspace-heading,.breadcrumb{display:none!important}
.contextual-sidebar{padding-top:18px!important}

.offer-editor-card{width:min(1480px,96vw)!important;max-width:none!important;height:min(900px,96vh)!important;max-height:96vh!important;overflow:hidden!important;display:grid!important;grid-template-rows:76px minmax(0,1fr)!important}
.offer-editor-card>.modal-head{height:76px!important;min-height:76px!important;padding:12px 22px!important}
#offerEditorBody{min-height:0!important;overflow:hidden!important}
.offer-wizard-shell{height:100%!important;display:grid!important;grid-template-rows:64px minmax(0,1fr)!important;background:#f7f9fc!important;overflow:hidden!important}
.offer-wizard-nav{height:64px!important;display:grid!important;grid-template-columns:repeat(5,minmax(125px,1fr))!important;gap:7px!important;padding:7px 12px!important;border:0!important;border-bottom:1px solid #dce4ef!important;background:#fff!important;overflow:hidden!important}
.offer-wizard-nav>button{min-width:0!important;height:49px!important;display:flex!important;align-items:center!important;gap:8px!important;padding:7px 10px!important;border:1px solid #dce4ef!important;border-radius:7px!important;background:#fff!important;color:#52627a!important;text-align:left!important;cursor:pointer!important}
.offer-wizard-nav>button span{display:grid!important;place-items:center!important;width:27px!important;height:27px!important;flex:0 0 27px!important;border-radius:6px!important;background:#edf2f8!important;font-size:12px!important}
.offer-wizard-nav>button b{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:13px!important}
.offer-wizard-nav>button.active{border-color:#1769e0!important;background:#eaf2ff!important;color:#1257c7!important;box-shadow:inset 0 -3px 0 #1769e0!important}
.offer-wizard-nav>button.active span{background:#1769e0!important;color:#fff!important}
.offer-wizard-nav>button.done{border-color:#b9dfc9!important;background:#f4fbf7!important}
.offer-wizard-nav>button.done span{background:#dff5e8!important;color:#187a45!important}
.offer-wizard-main{height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:minmax(0,1fr) 64px!important;overflow:hidden!important}
.offer-wizard-main>div:not(.offer-locked-banner){min-height:0!important;overflow:hidden!important}
.wizard-pane{height:100%!important;min-height:0!important;overflow:hidden!important;padding:14px 22px!important;box-sizing:border-box!important}
.wizard-pane h3{font-size:20px!important;margin:0 0 3px!important}.offer-muted{margin:0 0 7px!important}
.wizard-pane-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:14px!important;margin-bottom:6px!important}
.wizard-footer{height:64px!important;min-height:64px!important;position:static!important;display:grid!important;grid-template-columns:150px 1fr 150px!important;align-items:center!important;gap:12px!important;padding:8px 18px!important;border-top:1px solid #dce4ef!important;background:#fff!important}
.wizard-footer>div{text-align:center!important;display:grid!important}.wizard-footer span{font-size:12px!important;color:#718096!important}.wizard-footer button{height:44px!important}
.form-grid-2.compact-form{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px 12px!important}
.offer-wizard-main label{gap:3px!important;font-size:12px!important}.offer-wizard-main input:not([type=checkbox]):not([type=radio]),.offer-wizard-main select,.offer-wizard-main textarea{min-height:38px!important;height:38px!important;border-radius:6px!important;padding:7px 10px!important}.offer-wizard-main textarea{height:56px!important;min-height:56px!important;max-height:56px!important;resize:none!important}
.wizard-options.compact-options{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:7px!important;margin:9px 0!important;padding:8px!important;border:1px solid #dce4ef!important;border-radius:8px!important;background:#fff!important}.wizard-options .checkbox-row{min-height:38px!important;padding:6px 8px!important}
.inline-pager{height:38px!important;display:grid!important;grid-template-columns:130px 1fr 130px!important;align-items:center!important;gap:10px!important;margin:4px 0 8px!important}.inline-pager strong{text-align:center!important;font-size:12px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.inline-pager button{height:34px!important;padding:5px 10px!important}
.offer-section-card.compact-section{height:calc(100% - 84px)!important;min-height:0!important;display:grid!important;grid-template-rows:58px minmax(0,1fr) 38px!important;gap:7px!important;padding:9px!important;border:1px solid #dce4ef!important;border-radius:9px!important;background:#fff!important;overflow:hidden!important}.offer-section-head{min-height:0!important;display:grid!important;grid-template-columns:minmax(240px,1fr) auto auto auto!important;align-items:center!important;gap:9px!important}.offer-section-title{display:grid!important;grid-template-columns:1fr 1.3fr!important;gap:7px!important}.offer-section-title input{width:100%!important}.offer-section-head small{display:block!important}.offer-lines-wrap{min-height:0!important;display:grid!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:7px!important;overflow:hidden!important}.offer-line-row{min-height:0!important;display:grid!important;grid-template-columns:minmax(230px,2fr) 72px 86px 105px 82px 74px 120px 38px!important;gap:7px!important;align-items:end!important;padding:8px!important;border:1px solid #e5ebf2!important;border-radius:8px!important;background:#fbfdff!important;overflow:hidden!important}.offer-line-main{display:grid!important;gap:4px!important;min-width:0!important}.offer-line-row label{min-width:0!important}.offer-line-row input,.offer-line-row select,.offer-line-row textarea{width:100%!important;min-width:0!important}.offer-line-row textarea{height:32px!important;min-height:32px!important}.offer-line-total{align-self:center!important}.section-inline-actions{display:flex!important;align-items:center!important;justify-content:space-between!important}.section-inline-actions button{height:34px!important}.section-inline-actions small{color:#718096!important}
.offer-condition-compact{height:calc(100% - 56px)!important;display:grid!important;grid-template-rows:38px minmax(0,1fr)!important;gap:8px!important;overflow:hidden!important}.offer-condition-grid{min-height:0!important;display:grid!important;grid-template-columns:1fr 1fr!important;grid-template-rows:1fr 1fr!important;gap:8px!important;overflow:hidden!important}.offer-condition-item{min-height:0!important;padding:10px!important;border:1px solid #dce4ef!important;border-radius:8px!important;background:#fff!important;display:grid!important;grid-template-rows:auto auto 1fr!important;gap:6px!important;overflow:hidden!important}.offer-condition-item.enabled{border-color:#b8d3f5!important;background:#f8fbff!important}.offer-condition-values{display:grid!important;grid-template-columns:1fr!important;gap:5px!important}.offer-condition-values.disabled{opacity:.45!important}.offer-condition-item small{font-size:11px!important;color:#66788a!important;overflow:hidden!important}
.offer-config-panel{display:block!important;margin:8px 0!important;padding:12px!important;max-height:none!important;overflow:hidden!important}.offer-appearance-grid{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:8px!important}.offer-appearance-grid label{min-height:44px!important}.wizard-summary-grid{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:8px!important;margin:8px 0!important}.wizard-summary-grid>div{padding:8px 10px!important;border:1px solid #dce4ef!important;border-radius:8px!important;background:#fff!important;display:grid!important;gap:3px!important}.project-auto-tile{display:flex!important;align-items:center!important;gap:12px!important;margin:8px 0!important;padding:9px 12px!important;border:1px solid #bcd1ef!important;background:#f4f8ff!important;border-radius:8px!important}.project-auto-tile input{width:22px!important;height:22px!important;min-height:22px!important}.project-auto-tile span{display:grid!important;gap:2px!important}.project-auto-tile small{color:#63728a!important}.offer-lock-note{margin:7px 0 0!important;padding:8px 10px!important;border-radius:7px!important;background:#fff4e5!important;color:#8a4b00!important}.wizard-final-actions,.wizard-nav-tools{display:none!important}

/* Projekt: dwie strony, brak przewijania formularza */
.project-editor-form{height:min(700px,76vh)!important;display:grid!important;grid-template-rows:58px minmax(0,1fr) 62px!important;overflow:hidden!important}.project-wizard-nav{height:58px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;padding:6px 0!important;border-bottom:1px solid #e5e7eb!important}.project-wizard-nav button{height:45px!important;border:1px solid #dce4ef!important;border-radius:7px!important;background:#fff!important;text-align:left!important}.project-wizard-nav button.active{border-color:#1769e0!important;background:#eaf2ff!important;box-shadow:inset 0 -3px 0 #1769e0!important}.project-editor-page{display:none!important;min-height:0!important;overflow:hidden!important;padding:12px 2px!important}.project-editor-page.active{display:block!important}.project-editor-page .project-editor-grid{height:100%!important;align-content:start!important;gap:9px!important}.project-editor-form input:not([type=checkbox]),.project-editor-form select,.project-editor-form textarea{min-height:40px!important;height:40px!important;border-radius:6px!important}.project-editor-form textarea{height:74px!important;min-height:74px!important;resize:none!important}.project-wizard-footer{height:62px!important;display:grid!important;grid-template-columns:150px 1fr 150px!important;align-items:center!important;gap:12px!important;margin:0!important;padding:8px 0 0!important;border-top:1px solid #e5e7eb!important;background:#fff!important}.project-wizard-footer span{text-align:center!important;color:#64748b!important;font-size:13px!important}.project-wizard-footer button{height:44px!important}

/* Dashboard pozostaje jednym ekranem */
.dashboard-single-card{min-height:0!important;height:calc(100vh - 105px)!important;grid-template-rows:auto auto minmax(0,1fr)!important;overflow:hidden!important}.dashboard-chart-area{min-height:0!important;height:100%!important}.dashboard-line-chart,.dashboard-four-charts{height:100%!important}.dashboard-curved-svg{height:calc(100% - 62px)!important;min-height:190px!important}.dashboard-line-legend button{border:0!important;background:transparent!important;cursor:pointer!important;padding:6px 8px!important;border-radius:8px!important;font:inherit!important;color:inherit!important}.dashboard-line-legend button:hover{background:#f1f5f9!important}.dashboard-line-legend button.series-off{opacity:.3!important;text-decoration:line-through!important}

@media(max-width:1150px){.offer-line-row{grid-template-columns:minmax(210px,2fr) 65px 76px 94px 70px 66px 105px 34px!important}.offer-wizard-nav>button b{font-size:12px!important}}
@media(max-height:760px){.offer-editor-card{height:98vh!important;max-height:98vh!important}.offer-editor-card>.modal-head{height:64px!important;min-height:64px!important}.offer-wizard-shell{grid-template-rows:56px minmax(0,1fr)!important}.offer-wizard-nav{height:56px!important;padding:4px 8px!important}.offer-wizard-nav>button{height:47px!important}.wizard-pane{padding:8px 15px!important}.wizard-footer{height:56px!important;min-height:56px!important}.offer-wizard-main{grid-template-rows:minmax(0,1fr) 56px!important}.offer-section-card.compact-section{grid-template-rows:52px minmax(0,1fr) 34px!important}.offer-line-row{padding:5px!important}.offer-wizard-main input:not([type=checkbox]):not([type=radio]),.offer-wizard-main select{height:34px!important;min-height:34px!important}.offer-wizard-main textarea{height:46px!important;min-height:46px!important}.wizard-options.compact-options{margin:5px 0!important;padding:5px!important}}
@media(max-width:900px){.offer-editor-card{width:99vw!important}.offer-wizard-nav{grid-template-columns:repeat(5,145px)!important;overflow-x:auto!important}.offer-line-row{grid-template-columns:1.7fr 62px 74px 88px 65px 62px 98px 32px!important}.offer-appearance-grid{grid-template-columns:1fr 1fr!important}}

/* Faktura 5.20 — ten sam wzorzec kreatora, bez pionowego formularza */
.invoice-wizard-modal .modal-card{width:min(1500px,97vw)!important;max-width:none!important;height:min(920px,97vh)!important;max-height:97vh!important;overflow:hidden!important;display:grid!important;grid-template-rows:58px minmax(0,1fr)!important}
.invoice-wizard-modal #detailsTitle{font-size:20px!important}.invoice-wizard-modal #detailsContent{min-height:0!important;overflow:hidden!important;padding:0!important}
.invoice-wizard-head{height:68px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;padding:10px 18px!important;border-bottom:1px solid #dce4ef!important;background:#fff!important}.invoice-wizard-head h2{margin:2px 0 0!important;font-size:20px!important}.invoice-wizard-head>div:last-child{display:flex!important;align-items:center!important;gap:9px!important}
.invoice-wizard-form{height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:60px minmax(0,1fr) 64px!important;overflow:hidden!important;background:#f7f9fc!important}
.invoice-wizard-nav{height:60px!important;display:grid!important;grid-template-columns:repeat(5,minmax(120px,1fr))!important;gap:7px!important;padding:6px 12px!important;border-bottom:1px solid #dce4ef!important;background:#fff!important}.invoice-wizard-nav button{height:47px!important;display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;padding:7px 10px!important;border:1px solid #dce4ef!important;border-radius:7px!important;background:#fff!important;color:#52627a!important;text-align:left!important}.invoice-wizard-nav button span{display:grid!important;place-items:center!important;width:26px!important;height:26px!important;flex:0 0 26px!important;border-radius:6px!important;background:#edf2f8!important}.invoice-wizard-nav button b{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.invoice-wizard-nav button.active{border-color:#1769e0!important;background:#eaf2ff!important;color:#1257c7!important;box-shadow:inset 0 -3px 0 #1769e0!important}.invoice-wizard-nav button.active span{background:#1769e0!important;color:#fff!important}.invoice-wizard-nav button.done{border-color:#b9dfc9!important;background:#f4fbf7!important}.invoice-wizard-nav button.done span{background:#dff5e8!important;color:#187a45!important}
.invoice-wizard-pages{min-height:0!important;overflow:hidden!important}.invoice-step-page{display:none!important;height:100%!important;min-height:0!important;overflow:hidden!important;padding:14px 20px!important}.invoice-step-page.active{display:block!important}.invoice-step-page>h3{font-size:20px!important;margin:0 0 10px!important}.invoice-step-page input:not([type=checkbox]):not([type=color]),.invoice-step-page select{height:40px!important;min-height:40px!important;border-radius:6px!important}.invoice-step-page textarea{height:78px!important;min-height:78px!important;max-height:78px!important;resize:none!important;border-radius:6px!important}
.invoice-meta-grid{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:10px 12px!important}.invoice-party-grid{height:calc(100% - 42px)!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}.invoice-party-grid>section{min-height:0!important;padding:14px!important;border:1px solid #dce4ef!important;border-radius:9px!important;background:#fff!important;overflow:hidden!important}.invoice-party-grid h3{margin:0 0 7px!important}.invoice-party-grid p{margin:6px 0 10px!important}
.invoice-source-bar{display:grid!important;grid-template-columns:minmax(240px,1fr) auto!important;align-items:end!important;gap:10px!important;margin:0 0 8px!important}.invoice-line-pager{height:38px!important;display:grid!important;grid-template-columns:130px 1fr 130px!important;align-items:center!important;gap:10px!important;margin:0 0 7px!important}.invoice-line-pager strong{text-align:center!important;font-size:12px!important}.invoice-line-pager button{height:34px!important;padding:5px 9px!important}.invoice-table-wrap{height:calc(100% - 108px)!important;min-height:0!important;overflow:hidden!important;border:1px solid #dce4ef!important;border-radius:8px!important;background:#fff!important}.invoice-lines{height:100%!important;table-layout:fixed!important}.invoice-lines thead{height:38px!important}.invoice-lines tbody{height:calc(100% - 38px)!important}.invoice-lines tbody tr{height:calc((100% - 2px)/3)!important}.invoice-lines th,.invoice-lines td{padding:6px!important;vertical-align:middle!important}.invoice-lines th:first-child{width:27%!important}.invoice-lines th:nth-child(2){width:8%!important}.invoice-lines th:nth-child(3){width:8%!important}.invoice-lines th:nth-child(4){width:11%!important}.invoice-lines th:nth-child(5){width:8%!important}.invoice-lines th:nth-child(6){width:7%!important}.invoice-lines th:nth-child(7),.invoice-lines th:nth-child(8){width:12%!important}.invoice-lines th:last-child{width:5%!important}.invoice-lines input,.invoice-lines select{width:100%!important;min-width:0!important;height:34px!important;min-height:34px!important}.invoice-lines small{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.invoice-settings-grid{height:calc(100% - 42px)!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}.invoice-settings-grid>section{padding:14px!important;border:1px solid #dce4ef!important;border-radius:9px!important;background:#fff!important;overflow:hidden!important}.invoice-summary-screen{height:calc(100% - 42px)!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:14px!important;align-items:start!important}.invoice-summary-screen .invoice-totals{margin:0!important}.invoice-warning{margin:0!important}
.invoice-wizard-footer{height:64px!important;display:grid!important;grid-template-columns:150px 1fr minmax(150px,auto)!important;align-items:center!important;gap:12px!important;padding:8px 18px!important;border-top:1px solid #dce4ef!important;background:#fff!important}.invoice-wizard-footer>div{text-align:center!important;display:grid!important}.invoice-wizard-footer span{font-size:12px!important;color:#718096!important}.invoice-wizard-footer button{height:44px!important}.invoice-final-buttons{display:flex!important;gap:8px!important;justify-content:flex-end!important}.invoice-final-buttons button{min-width:135px!important}
@media(max-height:760px){.invoice-wizard-modal .modal-card{height:99vh!important;max-height:99vh!important}.invoice-wizard-head{height:58px!important}.invoice-wizard-form{grid-template-rows:54px minmax(0,1fr) 56px!important}.invoice-wizard-nav{height:54px!important;padding:4px 8px!important}.invoice-wizard-nav button{height:45px!important}.invoice-step-page{padding:8px 14px!important}.invoice-wizard-footer{height:56px!important}.invoice-step-page input:not([type=checkbox]):not([type=color]),.invoice-step-page select{height:35px!important;min-height:35px!important}.invoice-step-page textarea{height:58px!important;min-height:58px!important}.invoice-table-wrap{height:calc(100% - 96px)!important}}

/* Korekta układu faktury po testach 1920–1280 px */
.invoice-step-page.active{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;gap:8px!important}
.invoice-step-page[data-step="0"] .invoice-meta-grid{align-content:start!important}
.invoice-step-page[data-step="1"] .invoice-party-grid{height:auto!important;min-height:0!important}
.invoice-step-page[data-step="2"]{grid-template-rows:48px 56px 38px minmax(0,1fr)!important;gap:6px!important}
.invoice-step-page[data-step="2"]>.wizard-pane-head{margin:0!important;min-height:0!important}.invoice-step-page[data-step="2"]>.wizard-pane-head p{margin:2px 0 0!important;font-size:12px!important}
.invoice-step-page[data-step="2"] .invoice-source-bar{height:56px!important;margin:0!important}.invoice-step-page[data-step="2"] .invoice-line-pager{height:38px!important;margin:0!important}.invoice-step-page[data-step="2"] .invoice-table-wrap{height:auto!important;min-height:0!important;overflow:hidden!important}
.invoice-lines{height:100%!important}.invoice-lines thead tr{height:36px!important}.invoice-lines tbody tr{height:auto!important}.invoice-lines th,.invoice-lines td{height:auto!important;max-height:72px!important;overflow:hidden!important}
.invoice-step-page[data-step="3"] .invoice-settings-grid{height:auto!important;min-height:0!important}
.invoice-step-page[data-step="4"] .invoice-summary-screen{height:auto!important;min-height:0!important}
.invoice-wizard-footer{grid-template-columns:150px minmax(120px,1fr) 310px!important}.invoice-final-buttons{width:310px!important;flex-wrap:nowrap!important}.invoice-final-buttons button{min-width:145px!important;padding-left:10px!important;padding-right:10px!important}
@media(max-height:760px){.invoice-step-page[data-step="2"]{grid-template-rows:42px 50px 34px minmax(0,1fr)!important}.invoice-step-page[data-step="2"] .invoice-source-bar{height:50px!important}.invoice-step-page[data-step="2"] .invoice-line-pager{height:34px!important}.invoice-party-grid>section,.invoice-settings-grid>section{padding:9px!important}.invoice-party-grid p{margin:3px 0 6px!important}}
.invoice-wizard-form{gap:0!important}
.invoice-wizard-footer>.invoice-final-buttons{display:flex!important;grid-template-columns:none!important;align-items:center!important;justify-content:flex-end!important}
/* 5.21 — jedna strefa akcji kreatora */
.wizard-footer-actions,.invoice-final-buttons{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:nowrap}
.wizard-footer,.invoice-wizard-footer{min-height:68px}
@media(max-width:900px){.wizard-footer-actions,.invoice-final-buttons{gap:6px}.wizard-footer-actions button,.invoice-final-buttons button{padding-left:12px;padding-right:12px}}

/* eVerk 5.21.1 — krytyczna poprawka dostępności akcji kreatora ofert */
.offer-editor-modal{padding:10px!important;box-sizing:border-box!important}
.offer-editor-card{box-sizing:border-box!important}
.wizard-footer{grid-template-columns:minmax(220px,auto) minmax(0,1fr)!important;position:relative!important;z-index:30!important;overflow:visible!important}
.wizard-footer-left{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;min-width:0!important}
.wizard-footer-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;min-width:0!important;overflow:visible!important}
.wizard-footer button{white-space:nowrap!important;flex:0 0 auto!important}
.offer-exit-btn{display:inline-flex!important}
@media(max-width:760px){
  .offer-editor-modal{padding:0!important}
  .offer-editor-card{width:100vw!important;height:100vh!important;max-height:100vh!important;border-radius:0!important;grid-template-rows:auto minmax(0,1fr)!important}
  .offer-editor-card>.modal-head{height:auto!important;min-height:64px!important;padding:8px 10px!important}
  .offer-head-actions{gap:6px!important}
  .offer-head-actions .offer-exit-btn{display:none!important}
  .wizard-footer{height:auto!important;min-height:64px!important;grid-template-columns:auto minmax(0,1fr)!important;padding:7px 8px!important;gap:7px!important}
  .wizard-footer-left{gap:5px!important}
  .wizard-footer-left button:first-child{display:inline-flex!important}
  .wizard-footer-actions{gap:5px!important;overflow-x:auto!important;justify-content:flex-start!important;padding-bottom:1px!important}
  .wizard-footer button{height:42px!important;padding-left:10px!important;padding-right:10px!important;font-size:12px!important}
}

/* eVerk 5.21.2 — krytyczna stabilizacja kreatora ofert */
.offer-editor-card{display:flex!important;flex-direction:column!important;height:min(920px,96vh)!important;max-height:96vh!important;overflow:hidden!important}
.offer-editor-card>.modal-head{flex:0 0 auto!important}
#offerEditorBody{flex:1 1 auto!important;min-height:0!important;overflow:hidden!important}
.offer-wizard-shell{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;overflow:hidden!important}
.offer-wizard-nav{flex:0 0 auto!important}
.offer-wizard-main{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;overflow:hidden!important}
.offer-wizard-main>div:not(.offer-locked-banner){flex:1 1 auto!important;min-height:0!important;overflow:auto!important}
.wizard-footer{position:relative!important;bottom:auto!important;flex:0 0 auto!important;width:100%!important;box-sizing:border-box!important;display:flex!important;justify-content:space-between!important;align-items:center!important;gap:10px!important;min-height:72px!important;height:auto!important;overflow:visible!important;background:#fff!important;z-index:50!important}
.wizard-footer-left,.wizard-footer-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;overflow:visible!important}
.wizard-footer-actions{justify-content:flex-end!important;margin-left:auto!important}
@media(max-width:900px){.wizard-footer{align-items:flex-start!important;flex-direction:column!important}.wizard-footer-actions{width:100%!important;margin-left:0!important;justify-content:flex-start!important}.offer-editor-card{height:100vh!important;max-height:100vh!important}}
/* eVerk 5.21.3 — stabilizacja kreatorów oferty i projektu */
.offer-config-head{position:sticky;top:0;z-index:4;background:#fff;padding-bottom:12px;border-bottom:1px solid #e5e7eb}.offer-config-actions{display:flex;gap:8px;flex-wrap:wrap}.offer-config-panel{overflow:auto!important;max-height:calc(100vh - 250px)}
.project-editor-form{height:calc(100vh - 150px)!important;max-height:760px!important;min-height:500px!important}.project-editor-page{overflow:auto!important;padding:12px 6px 18px!important}.project-editor-page.active{display:block!important}.project-wizard-footer{grid-template-columns:minmax(230px,1fr) auto minmax(230px,1fr)!important;position:sticky!important;bottom:0!important;z-index:5!important}.project-wizard-footer>div{display:flex;gap:8px}.project-wizard-footer>div:last-child{justify-content:flex-end}.project-client-picker{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.project-client-picker button{white-space:nowrap}
@media(max-width:900px){.project-editor-form{height:calc(100vh - 110px)!important;min-height:0!important}.project-wizard-footer{grid-template-columns:1fr!important;height:auto!important;padding:8px!important}.project-wizard-footer span{order:-1}.project-wizard-footer>div,.project-wizard-footer>div:last-child{justify-content:stretch}.project-wizard-footer button{flex:1}.project-client-picker{grid-template-columns:1fr}}
/* 5.21.4 — centralny moduł czasu pracy */
.time-metrics{grid-template-columns:repeat(4,minmax(180px,1fr));margin-bottom:16px}.time-filter-card{margin-bottom:16px}.time-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:12px}.time-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:14px}.time-entry-desc{grid-column:1/-1}.time-work-form{display:flex;flex-direction:column;max-height:min(78vh,760px);overflow:auto;padding-right:4px}.sticky-form-actions{position:sticky;bottom:0;background:#fff;border-top:1px solid #dce4ef;padding-top:14px;margin-top:14px;z-index:3}.row-actions{display:flex;gap:6px;flex-wrap:wrap}.check-row{display:flex!important;align-items:center;gap:8px}.check-row input{width:auto!important}
@media(max-width:1100px){.time-metrics,.time-filter-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}}
@media(max-width:720px){.time-metrics,.time-filter-grid,.time-entry-grid{grid-template-columns:1fr}.time-entry-desc{grid-column:auto}.planner-actions{display:flex;flex-wrap:wrap;gap:8px}}

.time-original{margin-top:6px}.time-original summary{cursor:pointer;color:#5b6b82;font-size:12px}.time-original small{display:block;padding-top:5px;color:#6b7280}.worker-panel textarea{min-height:120px}

/* eVerk 5.22.2 — kreator projektu bez wewnętrznego przewijania */
.project-wizard-modal .modal-card{
  width:min(1040px,calc(100vw - 28px))!important;
  height:auto!important;
  max-height:calc(100vh - 24px)!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
}
.project-wizard-modal #detailsContent{
  min-height:0!important;
  overflow:hidden!important;
  padding-top:10px!important;
  padding-bottom:12px!important;
}
.project-wizard-modal .project-editor-form{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  display:grid!important;
  grid-template-rows:52px auto 56px!important;
  overflow:hidden!important;
}
.project-wizard-modal .project-wizard-nav{
  height:52px!important;
  padding:3px 0 5px!important;
}
.project-wizard-modal .project-wizard-nav button{
  height:42px!important;
  padding:6px 12px!important;
}
.project-wizard-modal .project-editor-page,
.project-wizard-modal .project-editor-page.active{
  min-height:0!important;
  overflow:hidden!important;
  padding:8px 2px!important;
}
.project-wizard-modal .project-editor-grid{
  height:auto!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px 12px!important;
  align-content:start!important;
}
.project-wizard-modal .project-editor-grid label{
  gap:3px!important;
  font-size:12px!important;
}
.project-wizard-modal .project-editor-form input:not([type=checkbox]),
.project-wizard-modal .project-editor-form select{
  height:36px!important;
  min-height:36px!important;
  padding:6px 9px!important;
}
.project-wizard-modal .project-editor-form textarea{
  height:82px!important;
  min-height:82px!important;
  max-height:82px!important;
  padding:8px 9px!important;
  resize:none!important;
}
.project-wizard-modal .project-client-picker button{
  height:36px!important;
  min-height:36px!important;
  padding:6px 12px!important;
}
.project-wizard-modal .notice{
  padding:8px 10px!important;
  margin:0!important;
  font-size:12px!important;
  line-height:1.3!important;
}
.project-wizard-modal .project-wizard-footer{
  position:static!important;
  height:56px!important;
  min-height:56px!important;
  padding:6px 0 0!important;
  grid-template-columns:minmax(210px,1fr) auto minmax(210px,1fr)!important;
  overflow:hidden!important;
}
.project-wizard-modal .project-wizard-footer button{
  height:40px!important;
  min-height:40px!important;
}
@media(max-height:720px) and (min-width:901px){
  .project-wizard-modal .modal-head{padding:10px 18px!important;min-height:52px!important}
  .project-wizard-modal #detailsContent{padding-top:6px!important;padding-bottom:7px!important}
  .project-wizard-modal .project-editor-form{grid-template-rows:46px auto 50px!important}
  .project-wizard-modal .project-wizard-nav{height:46px!important}
  .project-wizard-modal .project-wizard-nav button{height:38px!important}
  .project-wizard-modal .project-editor-grid{gap:5px 10px!important}
  .project-wizard-modal .project-editor-form input:not([type=checkbox]),
  .project-wizard-modal .project-editor-form select{height:32px!important;min-height:32px!important}
  .project-wizard-modal .project-editor-form textarea{height:64px!important;min-height:64px!important;max-height:64px!important}
  .project-wizard-modal .project-client-picker button{height:32px!important;min-height:32px!important}
  .project-wizard-modal .project-wizard-footer{height:50px!important;min-height:50px!important}
  .project-wizard-modal .project-wizard-footer button{height:36px!important;min-height:36px!important}
}
@media(max-width:900px){
  .project-wizard-modal .modal-card{max-height:100vh!important;border-radius:0!important}
  .project-wizard-modal .project-editor-grid{grid-template-columns:1fr 1fr!important}
  .project-wizard-modal .project-wizard-footer{grid-template-columns:1fr auto 1fr!important;padding:5px 0!important}
  .project-wizard-modal .project-wizard-footer>div{flex-wrap:nowrap!important}
}
