/* Farm Manager PRO Enterprise 5.6.0 — desktop SaaS shell */
:root{
  --fm-sidebar-width:268px;
  --fm-sidebar-collapsed:82px;
  --fm-topbar-height:76px;
  --fm-desktop-bg:#f7f8fc;
  --fm-surface:#fff;
  --fm-border:#e7e9f1;
  --fm-purple:#6038e8;
  --fm-purple-strong:#4f2bd2;
  --fm-purple-soft:#f2efff;
  --fm-text:#172033;
  --fm-muted:#6f7890;
}

.enterprise-sidebar,.desktop-account-chip{display:none}

@media (min-width:1100px){
  body.authenticated{
    padding-left:var(--fm-sidebar-width);
    background:var(--fm-desktop-bg);
    transition:padding-left .2s ease;
  }
  body.authenticated.desktop-sidebar-collapsed{padding-left:var(--fm-sidebar-collapsed)}

  .enterprise-sidebar{
    display:flex;
    position:fixed;
    inset:0 auto 0 0;
    z-index:95;
    width:var(--fm-sidebar-width);
    flex-direction:column;
    overflow:hidden;
    border-right:1px solid var(--fm-border);
    background:#fff;
    box-shadow:4px 0 28px rgba(31,38,69,.035);
    transition:width .2s ease;
  }
  body.desktop-sidebar-collapsed .enterprise-sidebar{width:var(--fm-sidebar-collapsed)}
  body:not(.authenticated) .enterprise-sidebar{display:none!important}

  .desktop-brand{
    display:flex;align-items:center;gap:11px;height:var(--fm-topbar-height);
    flex:0 0 var(--fm-topbar-height);padding:0 16px;border-bottom:1px solid var(--fm-border);
  }
  .desktop-brand-mark{
    display:grid;place-items:center;width:40px;height:40px;flex:0 0 40px;
    border-radius:12px;background:linear-gradient(145deg,#7047ef,#4b28d0);color:#fff;
    font-size:21px;box-shadow:0 8px 18px rgba(96,56,232,.22)
  }
  .desktop-brand-copy{display:flex;flex-direction:column;min-width:0;line-height:1.05}
  .desktop-brand-copy b{font-size:17px;white-space:nowrap;color:#151c2d}
  .desktop-brand-copy span{font-size:10px;color:var(--fm-purple);font-weight:900;letter-spacing:.12em;margin-top:5px;white-space:nowrap}
  .desktop-sidebar-toggle{
    display:grid;place-items:center;width:31px;height:31px;flex:0 0 31px;margin-left:auto;
    border:1px solid var(--fm-border);border-radius:10px;background:#fff;color:#6c7488
  }
  .desktop-sidebar-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s ease}
  body.desktop-sidebar-collapsed .desktop-sidebar-toggle svg{transform:rotate(180deg)}

  .desktop-nav{flex:1;overflow-y:auto;overflow-x:hidden;padding:12px 10px 18px;scrollbar-width:thin}
  .desktop-nav-group{margin-top:17px}
  .desktop-nav-group-label{
    padding:0 11px 6px;color:#a1a8b8;font-size:10px;font-weight:900;letter-spacing:.11em;white-space:nowrap
  }
  .desktop-nav-group-items{display:flex;flex-direction:column;gap:3px}
  .desktop-nav-item{
    position:relative;display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:9px 11px;
    border:0;border-radius:11px;background:transparent;color:#313a50;text-align:left;font-weight:760;font-size:13px;
    transition:background .15s ease,color .15s ease,transform .15s ease
  }
  .desktop-nav-item:hover{background:#f6f4ff;color:var(--fm-purple-strong)}
  .desktop-nav-item.active,.desktop-nav-item.active-context{background:linear-gradient(90deg,#f0ecff,#f8f7ff);color:var(--fm-purple-strong)}
  .desktop-nav-item.active::before,.desktop-nav-item.active-context::before{
    content:"";position:absolute;left:-10px;top:9px;bottom:9px;width:3px;border-radius:0 4px 4px 0;background:var(--fm-purple)
  }
  .desktop-nav-icon{display:grid;place-items:center;width:22px;height:22px;flex:0 0 22px;color:#687188}
  .desktop-nav-item.active .desktop-nav-icon,.desktop-nav-item:hover .desktop-nav-icon,.desktop-nav-item.active-context .desktop-nav-icon{color:var(--fm-purple)}
  .desktop-nav-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .desktop-nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  .desktop-sidebar-footer{padding:10px;border-top:1px solid var(--fm-border);background:#fff}
  .desktop-sync-card{
    display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;padding:10px;
    border:1px solid var(--fm-border);border-radius:12px;background:#fafbfe;color:var(--fm-text);text-align:left
  }
  .desktop-sync-card:hover{border-color:#d8d1ff;background:#f8f6ff}
  .desktop-sync-dot{width:9px;height:9px;border-radius:50%;background:#18a85b;box-shadow:0 0 0 4px #dcfae9}
  .desktop-sync-copy{display:flex;flex-direction:column;min-width:0}
  .desktop-sync-copy b{font-size:11px}.desktop-sync-copy small{font-size:9px;color:var(--fm-muted);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .desktop-sync-arrow svg{width:14px;height:14px;fill:none;stroke:#9299aa;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .desktop-version{text-align:center;color:#a0a7b7;font-size:9px;margin-top:7px}
  body.desktop-sync-warning .desktop-sync-dot{background:#f59e0b;box-shadow:0 0 0 4px #fff3d7}

  body.desktop-sidebar-collapsed .desktop-brand{justify-content:center;padding:0 10px}
  body.desktop-sidebar-collapsed .desktop-brand-copy,
  body.desktop-sidebar-collapsed .desktop-nav-label,
  body.desktop-sidebar-collapsed .desktop-nav-group-label,
  body.desktop-sidebar-collapsed .desktop-sync-copy,
  body.desktop-sidebar-collapsed .desktop-sync-arrow,
  body.desktop-sidebar-collapsed .desktop-version{display:none}
  body.desktop-sidebar-collapsed .desktop-sidebar-toggle{position:absolute;top:59px;right:-15px;background:#fff;box-shadow:0 5px 16px rgba(35,40,70,.12)}
  body.desktop-sidebar-collapsed .desktop-nav{padding-left:10px;padding-right:10px;padding-top:25px}
  body.desktop-sidebar-collapsed .desktop-nav-item{justify-content:center;padding:9px}
  body.desktop-sidebar-collapsed .desktop-nav-item.active::before,body.desktop-sidebar-collapsed .desktop-nav-item.active-context::before{left:-10px}
  body.desktop-sidebar-collapsed .desktop-sync-card{display:flex;justify-content:center;padding:12px}

  .app-header{
    position:sticky;top:0;z-index:80;height:var(--fm-topbar-height);background:rgba(255,255,255,.96);color:var(--fm-text);
    box-shadow:none;border-bottom:1px solid var(--fm-border);backdrop-filter:blur(16px)
  }
  .header-inner{max-width:none;height:100%;padding:0 24px;gap:16px;justify-content:flex-start}
  body.authenticated .app-header .brand-wrap{display:none}
  #openGlobalSearchBtn{
    order:1;display:flex!important;justify-content:flex-start;min-width:270px;max-width:410px;height:42px;padding:0 14px;
    border:1px solid #e1e4ed;background:#f9fafc;color:#687188;border-radius:12px;font-weight:700;box-shadow:none
  }
  #openGlobalSearchBtn:hover{border-color:#cdc5ff;background:#f7f5ff;color:var(--fm-purple)}
  #openGlobalSearchBtn .header-search-label::after{content:" w systemie…";font-weight:600;color:#9299aa}
  .app-header #scopeBar.desktop-scope-inline{order:2;display:block;position:static;background:transparent;border:0;box-shadow:none;margin-left:auto;color:var(--fm-text)}
  body.authenticated .app-header #scopeBar.desktop-scope-inline.hidden-permission-safe{display:block}
  body:not(.authenticated) .app-header #scopeBar.desktop-scope-inline{display:none!important}
  body:not(.authenticated) #openGlobalSearchBtn,body:not(.authenticated) .desktop-account-chip{display:none!important}
  .app-header #scopeBar .scope-bar-inner{max-width:none;padding:0;display:flex;align-items:center;gap:9px}
  .app-header #scopeBar label{display:flex;align-items:center;gap:7px;margin:0;padding:0}
  .app-header #scopeBar label>span{display:none}
  .app-header #scopeBar select{
    width:auto;min-width:142px;max-width:200px;height:42px;padding:0 34px 0 12px;border:1px solid #e1e4ed;border-radius:11px;background:#fff;color:#273047;font-size:12px;font-weight:750
  }
  .app-header #scopeBar .active-scope-chip{display:none}
  .header-actions{order:3;display:flex;align-items:center;gap:8px;margin-left:2px}
  .header-actions #installBtn{display:none!important}
  .desktop-account-chip{display:flex;align-items:center;gap:8px;padding:4px 8px 4px 4px;min-width:0;border-radius:12px}
  .desktop-account-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#f0edff;color:var(--fm-purple);font-size:11px;font-weight:900}
  .desktop-account-copy{display:flex;flex-direction:column;max-width:150px;min-width:0}
  .desktop-account-copy b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .desktop-account-copy small{font-size:9px;color:#8b93a6;margin-top:2px}
  #logoutBtn{width:38px;height:38px;padding:0;border:1px solid #e5e7ee;background:#fff;color:#667085;font-size:0}
  #logoutBtn::before{content:"↪";font-size:18px;display:grid;place-items:center;height:100%}

  #appMain{max-width:none;margin:0;padding:24px 28px 46px;min-height:calc(100vh - var(--fm-topbar-height))}
  .bottom-nav{display:none!important}
  .more-menu{display:none!important}

  .page-heading{align-items:center;margin:2px 0 16px}
  .page-heading h2{font-size:28px;line-height:1.15;color:#171e2f;letter-spacing:-.02em}
  .page-description{font-size:12px;max-width:680px;color:#7b8497}
  .eyebrow{font-size:9px;letter-spacing:.14em;color:#8c7de4}

  .card{
    border:1px solid var(--fm-border);border-radius:14px;padding:16px;background:#fff;
    box-shadow:0 7px 22px rgba(33,40,70,.045);margin:10px 0
  }
  .stat{border-color:var(--fm-border);border-radius:14px;padding:15px;background:#fff;box-shadow:0 5px 18px rgba(33,40,70,.035)}
  .stat b{font-size:21px;color:#31275e}.stat span{font-size:10px;color:#7d8598}.stat small{font-size:10px}
  .stats{gap:10px}
  #dashboard .stats-six{grid-template-columns:repeat(6,minmax(0,1fr))}
  .sales-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ops-stats{grid-template-columns:repeat(6,minmax(0,1fr))}
  .dashboard-grid{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:12px}
  .scanner-layout{grid-template-columns:minmax(330px,.72fr) minmax(520px,1.28fr);gap:14px}
  .finance-layout{grid-template-columns:minmax(330px,.68fr) minmax(560px,1.32fr);gap:14px}
  .settings-grid{gap:14px}

  .dashboard-quick-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 14px}
  .dashboard-quick-actions button{min-height:62px;border-color:var(--fm-border);border-radius:14px;box-shadow:0 5px 18px rgba(33,40,70,.035)}
  .dashboard-quick-actions button:hover{border-color:#cdc5ff;background:#faf9ff;transform:translateY(-1px)}
  .dashboard-quick-actions button span{background:linear-gradient(145deg,#7047ef,#5430dc);color:#fff;border-radius:11px;box-shadow:0 7px 14px rgba(96,56,232,.18)}

  .organized-section-title{
    margin:22px 0 8px;padding:0 2px 9px;border-radius:0;background:transparent;color:var(--fm-text);border-bottom:1px solid var(--fm-border)
  }
  .organized-section-title .eyebrow{color:#8c7de4}.organized-section-title h2{font-size:20px;color:#1a2234}
  .section-jumpbar{padding:2px 0 8px;margin-bottom:3px}
  .section-jumpbar button{border-color:#e1e4ed;border-radius:10px;padding:8px 11px;color:#566079;font-size:11px;background:#fff}
  .section-jumpbar button:hover{border-color:#cfc8ff;color:var(--fm-purple);background:#f9f7ff}

  input,select,textarea{border-color:#dfe3ec;border-radius:10px;background:#fff;padding:10px 11px;font-size:12px}
  label{font-size:11px;color:#3f485d;margin-top:10px}
  .primary,.secondary,.success,.scan-button,.link-button{border-radius:10px;padding:11px 13px;font-size:12px}
  .primary{background:linear-gradient(135deg,#6640e9,#4c28d0);box-shadow:0 6px 14px rgba(96,56,232,.15)}
  .secondary{border-color:#cfc8ff;background:#fff;color:#5836d9}

  table{font-size:11px;min-width:720px}
  th{font-size:9px;color:#8b93a6;background:#fafbfc;position:sticky;top:0;z-index:1}
  th,td{padding:10px 9px;border-bottom-color:#edf0f5}
  tbody tr:hover{background:#faf9ff}
  .table-scroll{border:1px solid #eef0f5;border-radius:12px;background:#fff}

  .more-menu-panel,.global-search-panel{border:1px solid #e4e6ed}
  .global-search-panel{box-shadow:0 30px 80px rgba(20,24,44,.28)}
  .global-search-result{box-shadow:none}

  .sticky-form{top:calc(var(--fm-topbar-height) + 14px)}
  #documentsCard,#costsCard,#fieldsCard,#workCard,#batchesCard,#warehousesCard,#systemSafetyCard,.backup-pro-card,.enterprise-offline-panel{scroll-margin-top:calc(var(--fm-topbar-height) + 18px)}

  .toast{bottom:22px}
}

@media (min-width:1450px){
  #appMain{padding-left:34px;padding-right:34px}
  #openGlobalSearchBtn{min-width:340px}
}

@media print{
  .enterprise-sidebar,.desktop-account-chip{display:none!important}
  body.authenticated{padding-left:0!important}
}

/* Farm Manager PRO Enterprise 5.6.3 — dopracowany pulpit SaaS */
.dashboard-desktop-v561{display:none}
@media (min-width:1100px){
  #dashboard{padding-top:0}
  #dashboard>.page-heading.dashboard-hero-heading{
    position:relative;min-height:174px;margin:-24px -28px 0;padding:31px 34px 56px;
    align-items:flex-start;overflow:hidden;border:0;border-radius:0;background:
      linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.93) 23%,rgba(255,255,255,.42) 45%,rgba(255,255,255,0) 68%),
      url('../assets/dashboard-blueberry-tractor.webp') center right/cover no-repeat;
  }
  #dashboard>.page-heading.dashboard-hero-heading::after{
    content:"";position:absolute;inset:auto 0 0;height:24px;background:linear-gradient(180deg,transparent,var(--fm-desktop-bg));pointer-events:none
  }
  #dashboard>.page-heading.dashboard-hero-heading>div:first-child{position:relative;z-index:2;max-width:520px}
  #dashboard>.page-heading.dashboard-hero-heading .eyebrow{display:none}
  #dashboard>.page-heading.dashboard-hero-heading h2{font-size:30px;margin:3px 0 7px;color:#111a31;text-shadow:0 1px 0 rgba(255,255,255,.5)}
  #dashboard>.page-heading.dashboard-hero-heading .page-description{max-width:470px;margin:0;color:#62708b;font-size:13px;font-weight:600}
  #dashboard>.page-heading.dashboard-hero-heading .date-chip{
    position:absolute;left:34px;bottom:28px;z-index:3;max-width:620px;padding:7px 11px;border:1px solid rgba(222,226,238,.88);background:rgba(255,255,255,.84);
    color:#46516b;border-radius:10px;box-shadow:0 3px 10px rgba(26,34,61,.05);backdrop-filter:blur(8px);font-size:10px;font-weight:750
  }

  #dashboardQuickActions.dashboard-quick-actions{
    position:relative;z-index:4;margin:-35px 0 16px;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px
  }
  #dashboardQuickActions.dashboard-quick-actions button{
    position:relative;display:grid;grid-template-columns:42px minmax(0,1fr);grid-template-rows:auto auto;column-gap:12px;align-items:center;text-align:left;
    min-height:74px;padding:12px 15px;border:1px solid #e5e7ef;border-radius:14px;background:#fff;box-shadow:0 9px 22px rgba(36,43,73,.07);color:#172033
  }
  #dashboardQuickActions.dashboard-quick-actions button span{grid-row:1/3;width:38px;height:38px;display:grid;place-items:center;font-size:21px}
  #dashboardQuickActions.dashboard-quick-actions button b{font-size:12px;line-height:1.2;color:#1d263a}
  #dashboardQuickActions.dashboard-quick-actions button small{display:block;font-size:9px;color:#8b93a6;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #dashboardQuickActions.dashboard-quick-actions button:last-child{border-color:#ddd6fe;background:linear-gradient(180deg,#fff,#fbfaff)}
  #dashboardQuickActions.dashboard-quick-actions button:last-child span{background:#f3efff;color:#6038e8;border-radius:10px}

  .dashboard-desktop-v561{display:block}
  .dashboard-mobile-legacy{display:none!important}
  #dashboard>#managementSummaryHeading,#dashboard>.ops-stats{display:none!important}

  .dashboard-kpi-grid-v561{display:grid;grid-template-columns:1.02fr 1.1fr .9fr 1.05fr .92fr;gap:11px;margin-bottom:13px}
  .dashboard-kpi-v561{
    position:relative;display:grid;grid-template-columns:38px minmax(0,1fr);gap:11px;min-height:112px;padding:15px 15px 13px;border:1px solid var(--fm-border);border-radius:14px;background:#fff;
    box-shadow:0 6px 20px rgba(33,40,70,.04);overflow:hidden
  }
  .dashboard-kpi-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#f2efff;color:#6038e8;font-size:18px;font-weight:900}
  .dashboard-kpi-v561>div{display:flex;flex-direction:column;min-width:0;padding-top:1px}
  .dashboard-kpi-v561 small{color:#6f7890;font-size:9px;font-weight:800}
  .dashboard-kpi-v561 strong{font-size:21px;letter-spacing:-.03em;color:#151d31;margin-top:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .dashboard-kpi-v561 em{font-style:normal;font-size:9px;color:#8992a6;margin-top:8px}
  .kpi-revenue .dashboard-kpi-icon{background:#e9f8ef;color:#149454}.kpi-documents .dashboard-kpi-icon{background:#edf4ff;color:#2974ee}.kpi-costs .dashboard-kpi-icon{background:#fff1e7;color:#f97316}
  .dashboard-sparkline{position:absolute;right:12px;bottom:16px;width:82px;height:26px;opacity:.95}
  .dashboard-sparkline::before{content:"";position:absolute;inset:6px 0 0;border-bottom:2px solid currentColor;transform:skewY(-9deg);clip-path:polygon(0 64%,15% 44%,31% 58%,47% 35%,62% 47%,76% 24%,100% 5%,100% 18%,76% 39%,62% 60%,47% 48%,31% 71%,15% 57%,0 78%)}
  .dashboard-sparkline.purple{color:#6842ea}.dashboard-sparkline.green{color:#19a15b}.dashboard-sparkline.blue{color:#3478f6}.dashboard-sparkline.orange{color:#f97316}

  .dashboard-core-grid-v561{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.06fr) minmax(325px,.9fr);gap:12px;align-items:stretch}
  .dashboard-panel-v561{min-width:0;border:1px solid var(--fm-border);border-radius:14px;background:#fff;box-shadow:0 6px 20px rgba(33,40,70,.04);padding:15px}
  .dashboard-panel-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
  .dashboard-panel-title h3{margin:0;color:#1b2437;font-size:14px;letter-spacing:-.01em}
  .dashboard-panel-title button{border:0;background:#f7f5ff;color:#6440dc;border-radius:8px;padding:7px 9px;font-size:9px;font-weight:850}
  .dashboard-panel-title button:hover{background:#eeeaff}

  .dashboard-activity-list{display:flex;flex-direction:column}
  .dashboard-activity-row{display:grid;grid-template-columns:31px minmax(0,1fr) auto 8px;gap:10px;align-items:center;min-height:48px;border-bottom:1px solid #f0f1f5}
  .dashboard-activity-row:last-child{border-bottom:0}.dashboard-activity-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#f1efff;color:#6540e5;font-weight:900}
  .dashboard-activity-row>div{display:flex;flex-direction:column;min-width:0}.dashboard-activity-row b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-activity-row small{font-size:8px;color:#8a93a7;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .dashboard-activity-row time{font-size:8px;color:#7f899d}.dashboard-activity-row i{width:7px;height:7px;border-radius:50%;background:#17a45a}

  .dashboard-donut-layout{display:grid;grid-template-columns:minmax(145px,.82fr) minmax(170px,1.18fr);gap:18px;align-items:center;padding:3px 4px 7px}
  .dashboard-donut{position:relative;width:154px;height:154px;margin:auto;border-radius:50%;background:conic-gradient(#6038e8 0 100%);box-shadow:inset 0 0 0 1px rgba(0,0,0,.02)}
  .dashboard-donut::after{content:"";position:absolute;inset:29px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px #f0f1f5}
  .dashboard-donut>span{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center}
  .dashboard-donut b{font-size:18px;color:#182033}.dashboard-donut small{font-size:9px;color:#8992a6;margin-top:3px}
  .dashboard-crop-legend{display:flex;flex-direction:column;gap:11px}.dashboard-crop-legend>div{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:7px;min-width:0}
  .dashboard-crop-legend span{width:7px;height:7px;border-radius:50%}.dashboard-crop-legend b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-crop-legend em{font-size:8px;font-style:normal;color:#758097;white-space:nowrap}

  .dashboard-system-v561{grid-column:3;grid-row:1 / span 2;display:flex;flex-direction:column}
  .dashboard-system-v561 .dashboard-panel-title{margin-bottom:11px}.dashboard-health-ok,.dashboard-health-warn{font-size:8px;font-weight:850}.dashboard-health-ok{color:#159553}.dashboard-health-warn{color:#d97706}
  .dashboard-system-stat{display:flex;flex-direction:column;padding:12px;border:1px solid #e8eaf0;border-radius:12px;margin-bottom:8px;background:#fff}
  .dashboard-system-stat small{font-size:8px;color:#7c869a;font-weight:800}.dashboard-system-stat strong{font-size:17px;color:#6038e8;margin-top:5px}.dashboard-system-stat span{font-size:8px;color:#939bae;margin-top:3px}
  .dashboard-cloud-list{margin-top:4px}.dashboard-cloud-list h4{margin:8px 0 7px;font-size:9px;color:#68738b}.dashboard-cloud-list>div{display:flex;justify-content:space-between;gap:10px;padding:9px 4px;border-bottom:1px solid #eef0f4}.dashboard-cloud-list b{font-size:9px}.dashboard-cloud-list span{font-size:8px;color:#168f50;font-weight:850;text-align:right}
  .dashboard-system-primary,.dashboard-system-secondary{width:100%;min-height:36px;border-radius:9px;font-size:9px;font-weight:850;margin-top:9px}.dashboard-system-primary{border:0;color:#fff;background:linear-gradient(135deg,#6841e9,#522ed8)}.dashboard-system-secondary{border:1px solid #6841e9;background:#fff;color:#6038e8;margin-top:6px}

  .dashboard-documents-v561{grid-column:1;grid-row:2}.dashboard-workers-v561{grid-column:2;grid-row:2}
  .dashboard-mini-table{display:flex;flex-direction:column}.dashboard-doc-row{display:grid;grid-template-columns:70px 112px 110px minmax(110px,1fr) 92px 74px;gap:7px;align-items:center;min-height:40px;border-bottom:1px solid #f0f1f5;font-size:8px;color:#667085}.dashboard-doc-row:last-child{border-bottom:0}.dashboard-doc-row b{color:#374159;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-doc-row strong{color:#485269;text-align:right;white-space:nowrap}.dash-doc-status{font-style:normal;text-align:center;padding:4px 5px;border-radius:999px;font-weight:850;font-size:7px}.dash-doc-status.ok{background:#e9f9ef;color:#118749}.dash-doc-status.warn{background:#fff3e6;color:#e26b09}.dash-doc-status.partial{background:#eef4ff;color:#2c6fea}.dash-doc-status.danger{background:#fff0ee;color:#d34235}.dash-doc-status.neutral{background:#f1f3f7;color:#667085}

  .dashboard-top-workers{display:flex;flex-direction:column;gap:7px}.dashboard-worker-row{display:grid;grid-template-columns:18px 26px minmax(0,1fr) auto;align-items:center;gap:7px}.dashboard-worker-row>span{font-size:9px;font-weight:900;color:#40495d}.dashboard-worker-row>i{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#f0edff;color:#6038e8;font-size:8px;font-style:normal;font-weight:900}.dashboard-worker-row>div{display:flex;flex-direction:column;gap:4px;min-width:0}.dashboard-worker-row b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-worker-row u{height:4px;border-radius:99px;background:#eeedf4;overflow:hidden;text-decoration:none}.dashboard-worker-row s{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#6038e8,#7a49ef);text-decoration:none}.dashboard-worker-row strong{font-size:8px;color:#657086;white-space:nowrap}

  @media (max-width:1500px){
    #dashboardQuickActions.dashboard-quick-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
    #dashboardQuickActions.dashboard-quick-actions button:last-child{grid-column:auto}
  }

  @media (max-width:1360px){
    .dashboard-kpi-grid-v561{grid-template-columns:repeat(5,minmax(0,1fr))}.dashboard-kpi-v561{grid-template-columns:32px minmax(0,1fr);padding:13px 12px}.dashboard-kpi-icon{width:31px;height:31px}.dashboard-kpi-v561 strong{font-size:18px}.dashboard-sparkline{display:none}
    .dashboard-core-grid-v561{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(285px,.86fr)}
    .dashboard-doc-row{grid-template-columns:62px 92px 84px minmax(90px,1fr) 78px}.dashboard-doc-row>span:nth-child(3){display:none}
  }
}

@media (max-width:1099px){
  .dashboard-desktop-v561{display:none!important}
  .dashboard-mobile-legacy{display:block}
}

/* Farm Manager PRO Enterprise 5.6.3 — pulpit wzorcowy + żywe wykresy */
@media (min-width:1100px){
  #dashboard>.page-heading.dashboard-hero-heading{
    min-height:clamp(184px,calc((100vw - var(--fm-sidebar-width,260px)) * .142),212px);
    padding:27px 34px 67px;
    background-image:
      linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.91) 22%,rgba(255,255,255,.38) 41%,rgba(255,255,255,0) 62%),
      url('../assets/dashboard-blueberry-tractor.webp');
    background-position:center center,center center;
    background-size:cover,100% auto;
    background-repeat:no-repeat;
  }
  #dashboard>.page-heading.dashboard-hero-heading h2{
    margin-top:0;font-size:31px;line-height:1.05;letter-spacing:-.035em
  }
  #dashboard>.page-heading.dashboard-hero-heading .page-description{
    margin-top:7px;color:#5f6d86;font-size:12px
  }
  #dashboard>.page-heading.dashboard-hero-heading .date-chip{
    left:34px;bottom:30px;padding:7px 12px;border-radius:11px;background:rgba(255,255,255,.9)
  }
  #dashboardQuickActions.dashboard-quick-actions{
    margin:-41px 0 16px;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px
  }
  #dashboardQuickActions.dashboard-quick-actions button{
    min-height:70px;padding:11px 14px;border-radius:13px
  }
  #dashboardQuickActions.dashboard-quick-actions button span{
    width:38px;height:38px;border-radius:50%;font-size:20px
  }
  #dashboardQuickActions.dashboard-quick-actions button:last-child span{
    border-radius:50%;background:linear-gradient(145deg,#7047ef,#5430dc);color:#fff
  }

  .dashboard-kpi-grid-v561{
    grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;margin-bottom:13px
  }
  .dashboard-kpi-v561{
    grid-template-columns:38px minmax(0,1fr);min-height:114px;padding:15px 14px 13px
  }
  .dashboard-kpi-v561 strong{font-size:21px}
  .dashboard-kpi-v561 em{max-width:calc(100% - 88px)}

  .dashboard-sparkline{
    display:block!important;position:absolute;right:12px;bottom:13px;width:92px;height:34px;opacity:1;color:#6842ea;pointer-events:none
  }
  .dashboard-sparkline::before{display:none!important;content:none!important}
  .dashboard-sparkline svg{display:block;width:100%;height:100%;overflow:visible}
  .dashboard-spark-line{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
  .dashboard-spark-area{fill:currentColor;opacity:.07;stroke:none}
  .dashboard-spark-dot{fill:#fff;stroke:currentColor;stroke-width:1.7;vector-effect:non-scaling-stroke}
  .dashboard-sparkline.purple{color:#6842ea}.dashboard-sparkline.green{color:#18a35b}.dashboard-sparkline.blue{color:#3478f6}.dashboard-sparkline.orange{color:#f97316}

  .dashboard-core-grid-v561{
    grid-template-columns:minmax(0,1.03fr) minmax(0,1.06fr) minmax(315px,.9fr);gap:12px
  }
  .dashboard-panel-v561{border-radius:14px;padding:15px}
  .dashboard-activity-v561,.dashboard-crops-v561{min-height:260px}
  .dashboard-system-v561{min-height:100%;padding:15px}
  .dashboard-documents-v561,.dashboard-workers-v561{min-height:176px}
  .dashboard-donut{width:158px;height:158px}
  .dashboard-donut::after{inset:30px}
  .dashboard-donut b{font-size:18px}

  .dashboard-doc-row{min-height:39px}
  .dashboard-worker-row{min-height:27px}
}

@media (min-width:1100px) and (max-width:1360px){
  .dashboard-sparkline{display:block!important;width:68px;height:28px;right:8px;bottom:10px}
  .dashboard-kpi-v561 em{max-width:calc(100% - 62px);font-size:8px}
  #dashboardQuickActions.dashboard-quick-actions{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
  #dashboardQuickActions.dashboard-quick-actions button{grid-template-columns:34px minmax(0,1fr);column-gap:8px;padding:10px}
  #dashboardQuickActions.dashboard-quick-actions button span{width:32px;height:32px;font-size:17px}
  #dashboardQuickActions.dashboard-quick-actions button b{font-size:10px}
  #dashboardQuickActions.dashboard-quick-actions button small{font-size:8px}
}

/* Farm Manager PRO Enterprise 5.6.4 — pixel polish pulpitu wzorcowego */
@media (min-width:1100px){
  /* Topbar ma być stale widoczny, tak jak w docelowym widoku SaaS. */
  body.authenticated{padding-top:var(--fm-topbar-height)}
  body.authenticated .app-header{
    display:block!important;position:fixed!important;top:0;left:var(--fm-sidebar-width);right:0;width:auto;
    z-index:90;background:rgba(255,255,255,.985);border-bottom:1px solid #e9ebf2;
    box-shadow:0 1px 0 rgba(22,31,52,.02);backdrop-filter:blur(18px)
  }
  body.authenticated.desktop-sidebar-collapsed .app-header{left:var(--fm-sidebar-collapsed)}
  .header-inner{padding:0 28px;gap:14px}
  #openGlobalSearchBtn{min-width:330px;max-width:455px;height:44px;background:#fafbfe}
  .app-header #scopeBar select{height:44px;min-width:154px}
  .desktop-account-chip{padding-right:10px}

  /* Hero: zachowujemy dokładnie tę samą grafikę, poprawiamy wyłącznie kompozycję UI. */
  #dashboard>.page-heading.dashboard-hero-heading{
    min-height:205px;margin:-24px -28px 0;padding:29px 34px 42px;
    background-image:
      linear-gradient(90deg,rgba(255,255,255,.99) 0%,rgba(255,255,255,.95) 19%,rgba(255,255,255,.50) 36%,rgba(255,255,255,.10) 54%,rgba(255,255,255,0) 70%),
      url('../assets/dashboard-blueberry-tractor.webp');
    background-position:center center,center center;background-size:cover,100% auto;background-repeat:no-repeat
  }
  #dashboard>.page-heading.dashboard-hero-heading::after{height:18px}
  #dashboard>.page-heading.dashboard-hero-heading>div:first-child{max-width:520px;padding-top:1px}
  #dashboard>.page-heading.dashboard-hero-heading h2{font-size:31px;line-height:1.06;margin:0 0 8px;letter-spacing:-.035em}
  #dashboard>.page-heading.dashboard-hero-heading .page-description{font-size:12px;line-height:1.5;color:#62708a;max-width:460px}
  #dashboard>.page-heading.dashboard-hero-heading .date-chip{display:none!important}

  /* Pięć akcji dokładnie w jednym rzędzie. */
  #dashboardQuickActions.dashboard-quick-actions{
    margin:-32px 0 16px;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px
  }
  #dashboardQuickActions.dashboard-quick-actions button{
    min-height:78px;padding:13px 15px;border-radius:14px;grid-template-columns:44px minmax(0,1fr);column-gap:12px;
    box-shadow:0 9px 24px rgba(36,43,73,.065)
  }
  #dashboardQuickActions.dashboard-quick-actions button span{width:40px;height:40px;font-size:20px}
  #dashboardQuickActions.dashboard-quick-actions button b{font-size:11px;letter-spacing:-.005em}
  #dashboardQuickActions.dashboard-quick-actions button small{font-size:8.5px;margin-top:4px;color:#9299aa}

  /* KPI: bardziej przestronne i z czytelnymi, żywymi wykresami. */
  .dashboard-kpi-grid-v561{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:14px}
  .dashboard-kpi-v561{
    min-height:116px;padding:15px 15px 14px;border-radius:15px;
    box-shadow:0 6px 20px rgba(33,40,70,.035)
  }
  .dashboard-kpi-icon{width:36px;height:36px;border-radius:11px}
  .dashboard-kpi-v561 small{font-size:9px;letter-spacing:.01em}
  .dashboard-kpi-v561 strong{font-size:21px;margin-top:7px}
  .dashboard-kpi-v561 em{font-size:8.5px;margin-top:7px;max-width:calc(100% - 98px)}
  .dashboard-sparkline{right:12px;bottom:12px;width:98px;height:36px}
  .dashboard-spark-line{stroke-width:1.9}
  .dashboard-spark-area{opacity:.075}
  .dashboard-spark-dot{r:2}

  /* Główna siatka zgodna z makietą: 2 moduły + wysoki panel systemowy. */
  .dashboard-core-grid-v561{
    grid-template-columns:minmax(0,1.02fr) minmax(0,1.06fr) minmax(330px,.92fr);gap:13px;align-items:stretch
  }
  .dashboard-panel-v561{padding:16px;border-radius:15px;box-shadow:0 6px 20px rgba(33,40,70,.035)}
  .dashboard-panel-title{margin-bottom:12px}
  .dashboard-panel-title h3{font-size:14px}
  .dashboard-panel-title button{padding:7px 10px}
  .dashboard-activity-v561,.dashboard-crops-v561{min-height:278px}
  .dashboard-documents-v561,.dashboard-workers-v561{min-height:194px}
  .dashboard-system-v561{min-height:485px;padding:16px}

  .dashboard-activity-row{min-height:47px;grid-template-columns:31px minmax(0,1fr) auto 8px}
  .dashboard-activity-row b{font-size:9.5px}.dashboard-activity-row small{font-size:8px}

  .dashboard-donut-layout{grid-template-columns:minmax(155px,.85fr) minmax(180px,1.15fr);gap:20px;padding:5px 4px 8px}
  .dashboard-donut{width:164px;height:164px}.dashboard-donut::after{inset:31px}
  .dashboard-donut b{font-size:18px}.dashboard-crop-legend{gap:12px}

  .dashboard-system-stat{padding:13px;border-radius:12px;margin-bottom:9px}
  .dashboard-system-stat small{font-size:8.5px}.dashboard-system-stat strong{font-size:18px;margin-top:5px}
  .dashboard-cloud-list{margin-top:7px}.dashboard-cloud-list h4{font-size:9px;margin:10px 0 7px}
  .dashboard-cloud-list>div{padding:10px 5px}.dashboard-cloud-list b{font-size:9px}.dashboard-cloud-list span{font-size:8px}
  .dashboard-system-primary,.dashboard-system-secondary{min-height:39px;font-size:9px;border-radius:9px}

  .dashboard-doc-row{min-height:41px;font-size:8px}
  .dashboard-top-workers{gap:8px}.dashboard-worker-row{min-height:29px}
  .dashboard-worker-row u{height:5px}.dashboard-worker-row b{font-size:9px}

  /* Mniej agresywne breakpointy — na typowym desktopie nadal 5 akcji i wykresy. */
  @media (max-width:1500px){
    #dashboardQuickActions.dashboard-quick-actions{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
    #dashboardQuickActions.dashboard-quick-actions button{padding:11px 10px;grid-template-columns:36px minmax(0,1fr);column-gap:9px}
    #dashboardQuickActions.dashboard-quick-actions button span{width:34px;height:34px;font-size:17px}
    #dashboardQuickActions.dashboard-quick-actions button b{font-size:10px}
    #dashboardQuickActions.dashboard-quick-actions button small{font-size:8px}
  }
}

@media (min-width:1450px){
  body.authenticated .app-header{left:var(--fm-sidebar-width)}
  body.authenticated.desktop-sidebar-collapsed .app-header{left:var(--fm-sidebar-collapsed)}
  #dashboard>.page-heading.dashboard-hero-heading{margin-left:-34px;margin-right:-34px;padding-left:40px;padding-right:40px}
}


/* Farm Manager PRO Enterprise 5.6.5 — FINAL HERO 1:1
   Źródło: zaakceptowany zrzut użytkownika. Nie generujemy ani nie reinterpretujemy grafiki. */
@media (min-width:1100px){
  #dashboard>.page-heading.dashboard-hero-heading{
    min-height:0!important;
    height:auto!important;
    aspect-ratio:2048 / 276;
    padding:0!important;
    background-image:url('../assets/dashboard-hero-approved-1to1.png')!important;
    background-position:center center!important;
    background-size:100% 100%!important;
    background-repeat:no-repeat!important;
  }
  #dashboard>.page-heading.dashboard-hero-heading::after{display:none!important;content:none!important}
  #dashboard>.page-heading.dashboard-hero-heading>div:first-child{
    opacity:0!important;
    pointer-events:none!important;
    user-select:none!important;
  }
  #dashboard>.page-heading.dashboard-hero-heading .date-chip{display:none!important}
}


/* Farm Manager PRO Enterprise 5.6.7 — czytelny tekst hero
   Zachowujemy dokładnie zatwierdzony obraz 1:1. Rasteryzowany napis z obrazu jest
   przykrywany miękką białą poświatą, a właściwy nagłówek jest renderowany przez HTML/CSS. */
@media (min-width:1100px){
  #dashboard>.page-heading.dashboard-hero-heading{
    isolation:isolate;
  }
  #dashboard>.page-heading.dashboard-hero-heading::before{
    content:"";
    position:absolute;
    z-index:1;
    left:0;
    top:0;
    width:38%;
    height:58%;
    pointer-events:none;
    background:linear-gradient(90deg,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,.99) 48%,
      rgba(255,255,255,.94) 68%,
      rgba(255,255,255,.70) 82%,
      rgba(255,255,255,0) 100%);
  }
  #dashboard>.page-heading.dashboard-hero-heading>div:first-child{
    opacity:1!important;
    display:block!important;
    position:absolute!important;
    z-index:2!important;
    left:3.35%!important;
    top:13.2%!important;
    width:auto!important;
    max-width:520px!important;
    padding:0!important;
    margin:0!important;
    pointer-events:auto!important;
    user-select:auto!important;
    filter:none!important;
    transform:none!important;
  }
  #dashboard>.page-heading.dashboard-hero-heading .eyebrow{display:none!important}
  #dashboard>.page-heading.dashboard-hero-heading h2{
    margin:0 0 10px!important;
    color:#11182d!important;
    font-size:31px!important;
    line-height:1.05!important;
    font-weight:850!important;
    letter-spacing:-.035em!important;
    text-shadow:none!important;
    filter:none!important;
    opacity:1!important;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
  }
  #dashboard>.page-heading.dashboard-hero-heading .page-description{
    margin:0!important;
    color:#53627b!important;
    font-size:12px!important;
    line-height:1.45!important;
    font-weight:650!important;
    letter-spacing:0!important;
    text-shadow:none!important;
    filter:none!important;
    opacity:1!important;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
  }
}


/* Farm Manager PRO Enterprise 5.6.8 — spójne moduły robocze desktop
   Sprzedaż, Dokumenty, Magazyn i Pracownicy otrzymują ten sam język wizualny co pulpit. */
@media (min-width:1100px){
  /* Wspólny nagłówek modułów */
  #sales>.page-heading,
  #inventory>.page-heading,
  #employees>.page-heading{
    position:relative;
    min-height:94px;
    align-items:center;
    margin:0 0 13px;
    padding:18px 20px;
    overflow:hidden;
    border:1px solid #e7e9f1;
    border-radius:16px;
    background:
      radial-gradient(circle at 92% 18%,rgba(103,65,233,.13),transparent 26%),
      linear-gradient(135deg,#fff 0%,#fbfaff 58%,#f5f2ff 100%);
    box-shadow:0 7px 22px rgba(33,40,70,.035)
  }
  #sales>.page-heading::before,
  #inventory>.page-heading::before,
  #employees>.page-heading::before{
    content:"";position:absolute;left:0;top:17px;bottom:17px;width:4px;border-radius:0 8px 8px 0;
    background:linear-gradient(180deg,#7650f1,#5430d9)
  }
  #sales>.page-heading h2,
  #inventory>.page-heading h2,
  #employees>.page-heading h2{font-size:24px;letter-spacing:-.025em;margin:0 0 5px;color:#172033}
  #sales>.page-heading .page-description,
  #inventory>.page-heading .page-description,
  #employees>.page-heading .page-description{font-size:11px;line-height:1.45;color:#758097;max-width:720px;margin:0}
  #sales>.page-heading .eyebrow,
  #inventory>.page-heading .eyebrow,
  #employees>.page-heading .eyebrow{font-size:8px;color:#7050df;margin-bottom:5px}
  #sales>.page-heading>.secondary{align-self:center;min-height:38px;border-color:#d9d3ff;background:#fff;box-shadow:0 3px 12px rgba(83,52,190,.05)}

  /* Nawigacja wewnątrz modułu jak w panelach SaaS */
  #sales>.section-jumpbar,
  #inventory>.section-jumpbar{
    position:sticky;top:calc(var(--fm-topbar-height) + 9px);z-index:20;
    display:flex;gap:7px;align-items:center;padding:7px;margin:0 0 13px;
    border:1px solid #e7e9f1;border-radius:13px;background:rgba(255,255,255,.94);
    box-shadow:0 5px 16px rgba(33,40,70,.04);backdrop-filter:blur(12px)
  }
  #sales>.section-jumpbar button,
  #inventory>.section-jumpbar button{
    padding:8px 11px;border:0;border-radius:9px;background:#f8f7fc;color:#596277;font-size:10px;font-weight:800
  }
  #sales>.section-jumpbar button:hover,
  #inventory>.section-jumpbar button:hover{background:#efebff;color:#6038e8}

  /* SPRZEDAŻ — toolbar + KPI */
  #sales .sales-summary-controls{
    grid-template-columns:210px 210px minmax(280px,1fr);gap:10px;align-items:end;
    padding:13px 15px;margin:0 0 12px;border-radius:14px;background:#fff;box-shadow:0 5px 18px rgba(33,40,70,.035)
  }
  #sales .sales-summary-controls label{margin-top:0;font-size:9px;color:#6f7890}
  #sales .sales-summary-controls input{height:40px;background:#fbfcfe}
  #sales .sales-summary-controls p{align-self:center;font-size:9px;line-height:1.45;color:#8a93a7;padding-left:3px}
  #sales .sales-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin:0 0 13px}
  #sales .sales-stats .stat{
    position:relative;min-height:104px;padding:16px 17px;border-radius:15px;overflow:hidden;
    box-shadow:0 6px 20px rgba(33,40,70,.035)
  }
  #sales .sales-stats .stat::after{
    content:"";position:absolute;right:-16px;bottom:-24px;width:90px;height:90px;border-radius:50%;
    background:radial-gradient(circle,rgba(103,65,233,.11),rgba(103,65,233,0) 68%);pointer-events:none
  }
  #sales .sales-stats .stat span{font-size:9px;letter-spacing:.01em}
  #sales .sales-stats .stat b{font-size:24px;margin-top:9px;color:#24205a}
  #sales .sales-stats .stat small{font-size:9px;margin-top:7px}

  #sales .sales-layout{grid-template-columns:minmax(360px,.78fr) minmax(520px,1.22fr);gap:13px;align-items:start}
  #sales .sales-layout>.card{margin:0;border-radius:15px;box-shadow:0 6px 20px rgba(33,40,70,.035)}
  #sales .sales-layout>.sticky-form{padding:17px}
  #sales .sales-layout>.sticky-form .section-title{padding-bottom:10px;margin-bottom:8px;border-bottom:1px solid #eef0f5}
  #sales .sales-total-preview{min-height:42px;border-color:#dfe3ec;background:linear-gradient(135deg,#f7fff9,#f1fbf5);font-size:18px}
  #sales .sales-package-fields{margin-top:10px;padding:11px;border:1px solid #e7e9ef;border-radius:12px;background:#fbfcfe}
  #sales #contractorsCard{border-radius:15px}
  #sales #contractorsCard>.section-title{padding-bottom:10px;border-bottom:1px solid #eef0f5;margin-bottom:9px}
  #sales #salesRanking{padding-top:3px}
  #sales .list-filter-panel,
  #sales .compact-filters{border:1px solid #eceef3;border-radius:12px;background:#fbfcfe;padding:10px;margin:9px 0 11px}
  #sales .history-quick-ranges button{border:1px solid #e0e3eb;background:#fff;color:#687188;border-radius:8px;padding:7px 9px;font-size:9px;font-weight:800}
  #sales .history-quick-ranges button:hover{border-color:#d1c7ff;color:#6038e8;background:#f7f5ff}

  /* DOKUMENTY — centrum rozrachunków */
  #salesDocumentsHeading{
    display:flex;align-items:end;justify-content:space-between;margin:22px 0 9px;padding:0 2px 10px;border-bottom:1px solid #e7e9f0
  }
  #salesDocumentsHeading h2{font-size:19px;margin:0;color:#1b2437}
  #documentsCard{
    padding:17px;border-radius:16px;border-color:#e5e7ef;background:#fff;
    box-shadow:0 7px 22px rgba(33,40,70,.04)
  }
  #documentsCard>.section-title{align-items:flex-start;padding-bottom:12px;margin-bottom:11px;border-bottom:1px solid #edf0f4}
  #documentsCard>.section-title h3{font-size:16px;margin:0}
  #documentsCard .summary-chips{gap:7px;justify-content:flex-end}
  #documentsCard .summary-chips span{
    display:flex;flex-direction:column;gap:3px;min-width:116px;padding:9px 11px;border-radius:11px;background:#faf9ff;color:#7c8598;font-size:8px
  }
  #documentsCard .summary-chips b{font-size:13px;color:#5d39dc}
  #documentsCard .ops-notice{margin:0 0 12px;padding:10px 12px;border-color:#f0dfae;background:#fffaf0;color:#746030;font-size:10px;line-height:1.45}
  #documentsCard .contractor-packaging-ledger{
    margin:0 0 13px;padding:13px;border:1px solid #e8eaf0;border-radius:13px;background:#fbfcfe
  }
  #documentsCard .contractor-packaging-ledger .section-title{margin-bottom:9px}
  #documentsCard .ops-form-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:0 10px}
  #documentsCard .ops-form-grid label{font-size:9px;color:#606a80}
  #documentsCard .ops-form-grid input,#documentsCard .ops-form-grid select{min-height:40px;padding:9px 10px}
  #documentPackagingCard{margin:12px 0;padding:13px;border-radius:13px;border:1px solid #dfd8ff;background:linear-gradient(135deg,#fbfaff,#f7f5ff)}
  #documentsCard .document-preview-grid{gap:9px;margin:12px 0}
  #documentsCard .document-preview-grid div{padding:12px;border-color:#e7e9ef;background:#fbfcfe}
  #documentsCard .document-preview-grid span{font-size:9px}
  #documentsCard .document-preview-grid b{font-size:17px}
  #documentsCard>.button-row{justify-content:flex-end;margin:11px 0 14px}
  #documentsCard>.button-row>*{flex:0 0 auto;min-width:150px}
  #documentsCard .table-scroll{margin-top:10px;border-radius:12px}
  #documentsCard table{min-width:930px}
  #documentsCard th{background:#f8f9fc}

  /* MAGAZYN — stany i ruchy */
  #inventory #inventoryStock{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin-bottom:13px}
  #inventory #inventoryStock .stat{
    min-height:98px;padding:15px;border-radius:15px;box-shadow:0 6px 20px rgba(33,40,70,.035)
  }
  #inventory #inventoryStock .stat span{font-size:9px}
  #inventory #inventoryStock .stat b{font-size:21px;margin-top:8px;color:#2b245f}
  #inventory .finance-layout{grid-template-columns:minmax(340px,.75fr) minmax(560px,1.25fr);gap:13px;align-items:start}
  #inventory .finance-layout>.card{margin:0;border-radius:15px;box-shadow:0 6px 20px rgba(33,40,70,.035)}
  #inventory .finance-layout>.card:first-child{padding:17px}
  #inventory .finance-layout>.card:first-child h3{padding-bottom:10px;margin-bottom:8px;border-bottom:1px solid #eef0f5}
  #inventory .inventory-history-filters{
    grid-template-columns:minmax(190px,1.5fr) minmax(130px,.8fr) repeat(2,130px) minmax(135px,.8fr) minmax(125px,.7fr);
    gap:8px;margin:8px 0 7px
  }
  #inventory .inventory-history-filters input,#inventory .inventory-history-filters select{height:38px;padding:8px 9px;font-size:10px}
  #inventory .history-quick-ranges{margin:0 0 9px}
  #inventory .history-quick-ranges button{border:1px solid #e0e3eb;background:#fff;color:#687188;border-radius:8px;padding:7px 9px;font-size:9px;font-weight:800}
  #inventory #warehousesCard{padding:17px;border-radius:16px;box-shadow:0 7px 22px rgba(33,40,70,.04)}
  #inventory #warehousesCard>.section-title{padding-bottom:11px;margin-bottom:11px;border-bottom:1px solid #edf0f4}
  #inventory #warehousesCard .ops-notice{font-size:10px;line-height:1.45}
  #inventory #warehousesCard .ops-two-column{grid-template-columns:minmax(300px,.78fr) minmax(520px,1.22fr);gap:12px}
  #inventory #warehousesCard .ops-subcard{padding:14px;border-color:#e7e9ef;background:#fbfcfe;border-radius:13px}
  #inventory #warehousesCard>h4{margin:18px 0 8px;font-size:12px;color:#30394d}
  #inventory #warehousesCard .table-scroll{border-radius:12px}

  /* PRACOWNICY — karta pracownika jak panel SaaS */
  #employees>.page-heading .summary-chips span{
    min-width:112px;padding:9px 12px;border-radius:11px;background:#fff;box-shadow:0 3px 12px rgba(33,40,70,.035);font-size:9px
  }
  #employees>.page-heading .summary-chips b{display:block;font-size:15px;margin-bottom:1px}
  #employees .employees-layout{grid-template-columns:minmax(340px,.72fr) minmax(560px,1.28fr);gap:13px;align-items:start}
  #employees .employees-layout>.card{margin:0;border-radius:15px;box-shadow:0 6px 20px rgba(33,40,70,.035)}
  #employees .employees-layout>.sticky-form{padding:17px}
  #employees #employeeFormTitle{padding-bottom:10px;margin-bottom:8px;border-bottom:1px solid #eef0f5;font-size:15px}
  #employees .employee-filters{
    grid-template-columns:minmax(260px,1fr) 170px;gap:8px;padding-bottom:12px;margin-bottom:2px;border-bottom:1px solid #eef0f5
  }
  #employees .employee-filters input,#employees .employee-filters select{height:40px;background:#fbfcfe}
  #employees #employeeList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding-top:10px}
  #employees .employee-card{
    margin:0;padding:13px;border-color:#e7e9ef;border-radius:14px;background:#fff;
    box-shadow:0 4px 14px rgba(33,40,70,.025);transition:border-color .16s ease,transform .16s ease,box-shadow .16s ease
  }
  #employees .employee-card:hover{transform:translateY(-1px);border-color:#d6ceff;box-shadow:0 8px 18px rgba(64,48,140,.06)}
  #employees .employee-card .avatar{width:48px;height:48px}
  #employees .employee-info .title-line h3{font-size:12px;color:#1e2638}
  #employees .employee-info{font-size:9px;color:#687188}
  #employees .employee-info small{font-size:8px}
  #employees .employee-card .pill{font-size:8px;padding:3px 6px}
  #employees .employee-card .status{font-size:8px;padding:4px 7px}
  #employees .employee-card .mini-stats{gap:6px;margin-top:10px}
  #employees .employee-card .mini-stats div{padding:8px 5px;border:1px solid #eef0f4;background:#fafbfc}
  #employees .employee-card .mini-stats span{font-size:8px}
  #employees .employee-card .mini-stats b{font-size:11px}
  #employees .employee-card .card-actions{gap:6px;margin-top:9px}
  #employees .employee-card .card-actions button{padding:7px 6px;border:1px solid #e2ddff;background:#f8f6ff;font-size:8px}

  /* Wspólna elegancja tabel i filtrów w czterech modułach */
  #sales .table-scroll,#inventory .table-scroll,#documentsCard .table-scroll{
    border:1px solid #eceef3;background:#fff;box-shadow:none
  }
  #sales table,#inventory table,#documentsCard table{font-size:10px}
  #sales th,#inventory th,#documentsCard th{font-size:8px;letter-spacing:.045em;padding:10px 9px}
  #sales td,#inventory td,#documentsCard td{padding:10px 9px}
  #sales .history-pager,#inventory .history-pager,#documentsCard .history-pager{padding-top:10px}
  #sales .history-pager button,#inventory .history-pager button,#documentsCard .history-pager button{
    border:1px solid #e1e4ec;background:#fff;color:#616a80;border-radius:8px;padding:7px 10px;font-size:9px;font-weight:800
  }
}

@media (min-width:1100px) and (max-width:1370px){
  #sales .sales-layout,#employees .employees-layout,#inventory .finance-layout{grid-template-columns:minmax(310px,.82fr) minmax(470px,1.18fr)}
  #employees #employeeList{grid-template-columns:1fr}
  #documentsCard .ops-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  #inventory .inventory-history-filters{grid-template-columns:repeat(3,minmax(150px,1fr))}
  #inventory #warehousesCard .ops-two-column{grid-template-columns:1fr}
}


/* Farm Manager PRO Enterprise 5.6.9 — kosmetyka modułów, KPI magazynu i wykresy sprzedaży */
@media (min-width:1100px){
  /* Sprzedaż: rzeczywiste miniwykresy z danych aplikacji */
  #sales .sales-stats .stat{padding-right:170px;min-height:112px}
  #sales .sales-stats .stat b{position:relative;z-index:2}
  #sales .sales-stats .stat small{position:relative;z-index:2;max-width:165px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .sales-module-sparkline{position:absolute;right:15px;bottom:15px;width:145px;height:43px;z-index:1;opacity:.96}
  .sales-module-sparkline svg{display:block;width:100%;height:100%;overflow:visible}
  .sales-module-sparkline .module-sparkline-line{stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  .sales-module-sparkline .module-sparkline-dot{fill:#fff;stroke:currentColor;stroke-width:1.5}
  .sales-module-sparkline.spark-purple{color:#6b43ef}
  .sales-module-sparkline.spark-green{color:#16a15a}
  .sales-module-sparkline.spark-blue{color:#3478f6}

  /* Magazyn: zamiast pustej przestrzeni — cztery czytelne KPI */
  #inventoryKpiStrip569.inventory-kpi-strip569{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin:0 0 13px}
  #inventoryKpiStrip569 article{display:grid;grid-template-columns:40px minmax(0,1fr);gap:11px;align-items:start;min-height:102px;padding:15px;border:1px solid #e6e8ef;border-radius:15px;background:#fff;box-shadow:0 6px 20px rgba(33,40,70,.035)}
  #inventoryKpiStrip569 .inventory-kpi-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#f1edff;color:#6038e8;font-size:18px;font-weight:900}
  #inventoryKpiStrip569 article:nth-child(2) .inventory-kpi-icon{background:#edf6ff;color:#2474e9}
  #inventoryKpiStrip569 article:nth-child(3) .inventory-kpi-icon{background:#eaf9f0;color:#159553}
  #inventoryKpiStrip569 article:nth-child(4) .inventory-kpi-icon{background:#fff2e8;color:#ef7418}
  #inventoryKpiStrip569 article>div{display:flex;flex-direction:column;min-width:0}
  #inventoryKpiStrip569 small{font-size:9px;font-weight:800;color:#707a90}
  #inventoryKpiStrip569 strong{margin-top:8px;font-size:21px;line-height:1;color:#27215c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #inventoryKpiStrip569 em{margin-top:8px;font-size:8px;font-style:normal;color:#939bae;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #inventory #inventoryStock.inventory-stock-empty569{display:block;margin:-2px 0 13px}
  #inventory #inventoryStock.inventory-stock-empty569 .empty-state{min-height:0;padding:10px 13px;border:1px dashed #dfe2eb;border-radius:11px;background:#fbfcfe;color:#7d879b;font-size:10px;text-align:left}

  /* Dokumenty: rzadziej używane pola w eleganckiej sekcji rozwijanej */
  #documentsCard .document-advanced569{margin:10px 0 12px;border:1px solid #e7e9ef;border-radius:12px;background:#fbfcfe;overflow:hidden}
  #documentsCard .document-advanced569>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;cursor:pointer;list-style:none;color:#3b4459;font-size:10px;font-weight:850;user-select:none}
  #documentsCard .document-advanced569>summary::-webkit-details-marker{display:none}
  #documentsCard .document-advanced569>summary::after{content:"+";display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:#f0edff;color:#6038e8;font-size:15px}
  #documentsCard .document-advanced569[open]>summary::after{content:"−"}
  #documentsCard .document-advanced569>summary small{margin-left:auto;color:#8b93a6;font-size:8px;font-weight:650}
  #documentsCard .document-advanced-grid569{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 10px;padding:0 13px 13px;border-top:1px solid #eceef3}
  #documentsCard .document-advanced-grid569 label{font-size:9px;color:#606a80}
  #documentsCard .document-advanced-grid569 input,#documentsCard .document-advanced-grid569 select{min-height:40px;padding:9px 10px}

  /* Pracownicy: cała karta otwiera historię, przyciski zachowują własne działanie */
  #employees .employee-card[data-card-open569="1"]{cursor:pointer;outline:none}
  #employees .employee-card[data-card-open569="1"]:focus{border-color:#bfb2ff;box-shadow:0 0 0 3px rgba(96,56,232,.10),0 8px 18px rgba(64,48,140,.06)}
  #employees .employee-card[data-card-open569="1"] .employee-main{position:relative}
  #employees .employee-card[data-card-open569="1"] .employee-main::after{content:"Otwórz kartę";position:absolute;right:0;bottom:-1px;color:#8d83bb;font-size:7px;font-weight:800;opacity:0;transform:translateY(2px);transition:.15s ease}
  #employees .employee-card[data-card-open569="1"]:hover .employee-main::after{opacity:1;transform:none}
}

@media (min-width:1100px) and (max-width:1370px){
  #sales .sales-stats .stat{padding-right:125px}
  .sales-module-sparkline{width:105px}
  #inventoryKpiStrip569.inventory-kpi-strip569{grid-template-columns:repeat(2,minmax(0,1fr))}
  #documentsCard .document-advanced-grid569{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Farm Manager PRO Enterprise 5.7.0 — workflow, raporty i ergonomia */
@media (min-width:1100px){
  .workflow-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
  .workflow-section-heading h3{margin:3px 0 0;font-size:17px;letter-spacing:-.02em;color:#192238}
  .workflow-heading-actions{display:flex;gap:8px;align-items:center}
  .workflow-executive-panel,.workflow-farm-panel{margin:0 0 14px;padding:16px;border:1px solid #e7e8ef;border-radius:15px;background:#fff;box-shadow:0 7px 22px rgba(33,40,70,.04)}
  .workflow-kpi-grid{display:grid;gap:10px;margin-bottom:14px}
  .workflow-kpi-grid-6{grid-template-columns:repeat(6,minmax(0,1fr))}
  .workflow-finance-kpis{grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 14px}
  .workflow-kpi{position:relative;min-height:92px;padding:13px 14px;border:1px solid #eceef3;border-radius:13px;background:linear-gradient(155deg,#fff,#fbfbfe);overflow:hidden}
  .workflow-kpi::after{content:"";position:absolute;right:-18px;bottom:-22px;width:70px;height:70px;border-radius:50%;background:currentColor;opacity:.055}
  .workflow-kpi small{display:block;font-size:9px;font-weight:850;color:#778198;letter-spacing:.02em}
  .workflow-kpi strong{display:block;margin-top:8px;font-size:18px;color:#1a2235;letter-spacing:-.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .workflow-kpi span{display:block;margin-top:6px;font-size:8px;color:#929aad;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .workflow-kpi-purple{color:#653deb}.workflow-kpi-green{color:#159653}.workflow-kpi-orange{color:#f07717}.workflow-kpi-blue{color:#3478f6}.workflow-kpi-red{color:#dc4638}
  .workflow-trend-card{padding:13px 14px 10px;border:1px solid #eceef3;border-radius:13px;background:#fcfcfe}
  .workflow-trend-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:7px}.workflow-trend-title>div:first-child{display:flex;flex-direction:column}.workflow-trend-title b{font-size:11px}.workflow-trend-title small{font-size:8px;color:#8d96a8;margin-top:2px}
  .workflow-legend{display:flex;gap:14px;font-size:8px;font-weight:800;color:#747d91}.workflow-legend span::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px}.workflow-legend .kg::before{background:#653deb}.workflow-legend .revenue::before{background:#18a45a}
  .workflow-trend-svg{width:100%;height:112px;display:block}.workflow-grid-line{stroke:#e9ebf1;stroke-width:1}.workflow-line{stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.workflow-line-kg{stroke:#653deb}.workflow-line-revenue{stroke:#18a45a}.workflow-trend-labels{display:flex;justify-content:space-between;color:#9aa1b1;font-size:7px;margin-top:2px}
  .workflow-pay570{white-space:nowrap}.workflow-pay570:disabled{opacity:.45;cursor:default}
  .workflow-scope-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:13px}.workflow-scope-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:13px;border:1px solid #e8eaf0;border-radius:13px;background:#fff}.workflow-scope-card.active{border-color:#cfc6ff;background:#faf8ff;box-shadow:inset 3px 0 0 #633be9}.workflow-scope-card>div:first-child{grid-column:1}.workflow-scope-card small{display:block;font-size:7px;color:#8d96a9;font-weight:900;letter-spacing:.12em}.workflow-scope-card b{display:block;margin-top:3px;font-size:12px}.workflow-scope-card span{font-size:8px;color:#8b94a6}.workflow-scope-metrics{grid-column:1;display:flex;gap:12px}.workflow-scope-metrics span{display:flex;flex-direction:column;font-size:7px}.workflow-scope-metrics b{font-size:10px;margin:0;color:#3b4356}.workflow-scope-card button{grid-column:2;grid-row:1 / span 2}
  .workflow-season-list{border:1px solid #eceef3;border-radius:12px;overflow:hidden}.workflow-season-head,.workflow-season-row{display:grid;grid-template-columns:minmax(160px,1.4fr) .7fr .8fr 90px;gap:10px;align-items:center;padding:9px 11px}.workflow-season-head{background:#fafbfc;color:#8a93a6;font-size:8px;font-weight:850}.workflow-season-row{border-top:1px solid #eef0f4;font-size:9px}.workflow-season-row.active{background:#faf8ff}.workflow-season-row>div{display:flex;flex-direction:column}.workflow-season-row b{font-size:10px}.workflow-season-row small{font-size:7px;color:#9199aa;margin-top:2px}
  .workflow-document-shortcuts{display:grid;grid-template-columns:1.35fr .65fr;gap:12px;margin:0 0 12px;padding:11px;border:1px solid #ece8ff;border-radius:12px;background:linear-gradient(135deg,#fcfbff,#f8f6ff)}.workflow-document-shortcuts>div{min-width:0}.workflow-document-shortcuts small{display:block;margin-bottom:6px;color:#7e719f;font-size:8px;font-weight:850}.workflow-shortcut-buttons{display:flex;flex-wrap:wrap;gap:6px}.workflow-shortcut-buttons button{border:1px solid #ddd6ff;border-radius:8px;background:#fff;color:#5d3bd8;padding:7px 9px;font-size:8px;font-weight:850}.workflow-shortcut-buttons button:hover{background:#f0ecff;border-color:#bfb2ff}
  .workflow-repeat-sale570{white-space:nowrap}
}
@media (min-width:1100px) and (max-width:1350px){
  .workflow-kpi-grid-6{grid-template-columns:repeat(3,minmax(0,1fr))}
  .workflow-scope-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* Farm Manager PRO Enterprise 5.7.1 — Android/iOS / mobile parity
   Funkcje 5.6.8–5.7.0 są dostępne także na telefonie, ale układ pozostaje mobilny:
   dolna nawigacja, karty dotykowe i brak desktopowego sidebara. */
@media (max-width:1099px){
  /* Wspólny język wizualny modułów na telefonie i tablecie */
  #sales>.page-heading,
  #inventory>.page-heading,
  #employees>.page-heading,
  #finance>.page-heading,
  #reports>.page-heading,
  #plantations>.page-heading{
    position:relative;
    margin:3px 0 12px;
    padding:14px 14px 14px 17px;
    overflow:hidden;
    border:1px solid #e8e9f1;
    border-radius:15px;
    background:linear-gradient(135deg,#fff 0%,#fbfaff 62%,#f5f2ff 100%);
    box-shadow:0 5px 16px rgba(33,40,70,.035)
  }
  #sales>.page-heading::before,
  #inventory>.page-heading::before,
  #employees>.page-heading::before,
  #finance>.page-heading::before,
  #reports>.page-heading::before,
  #plantations>.page-heading::before{
    content:"";position:absolute;left:0;top:13px;bottom:13px;width:4px;border-radius:0 7px 7px 0;
    background:linear-gradient(180deg,#7650f1,#5430d9)
  }
  #sales>.page-heading h2,#inventory>.page-heading h2,#employees>.page-heading h2,
  #finance>.page-heading h2,#reports>.page-heading h2,#plantations>.page-heading h2{
    font-size:22px!important;letter-spacing:-.025em;margin:0 0 4px;color:#172033
  }
  #sales>.page-heading .page-description,#inventory>.page-heading .page-description,#employees>.page-heading .page-description,
  #finance>.page-heading .page-description,#reports>.page-heading .page-description,#plantations>.page-heading .page-description{
    font-size:11px;line-height:1.4;color:#758097;margin:0
  }

  /* KPI i raport zarządczy */
  .workflow-executive-panel,.workflow-farm-panel{
    margin:0 0 12px;padding:12px;border:1px solid #e7e8ef;border-radius:15px;background:#fff;
    box-shadow:0 5px 17px rgba(33,40,70,.035)
  }
  .workflow-section-heading{display:flex;flex-direction:column;align-items:stretch;gap:9px;margin-bottom:11px}
  .workflow-section-heading h3{margin:3px 0 0;font-size:16px;line-height:1.2;color:#192238}
  .workflow-heading-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .workflow-heading-actions button{width:100%;min-height:40px}
  .workflow-kpi-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:11px}
  .workflow-kpi-grid-6,.workflow-finance-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .workflow-finance-kpis{margin:0 0 12px}
  .workflow-kpi{position:relative;min-height:92px;padding:12px;border:1px solid #eceef3;border-radius:13px;background:linear-gradient(155deg,#fff,#fbfbfe);overflow:hidden}
  .workflow-kpi::after{content:"";position:absolute;right:-18px;bottom:-22px;width:70px;height:70px;border-radius:50%;background:currentColor;opacity:.055}
  .workflow-kpi small{display:block;font-size:9px;font-weight:850;color:#778198}
  .workflow-kpi strong{display:block;margin-top:7px;font-size:17px;line-height:1.08;color:#1a2235;letter-spacing:-.025em;overflow-wrap:anywhere}
  .workflow-kpi span{display:block;margin-top:6px;font-size:8px;line-height:1.3;color:#929aad}
  .workflow-kpi-purple{color:#653deb}.workflow-kpi-green{color:#159653}.workflow-kpi-orange{color:#f07717}.workflow-kpi-blue{color:#3478f6}.workflow-kpi-red{color:#dc4638}
  .workflow-trend-card{padding:11px;border:1px solid #eceef3;border-radius:13px;background:#fcfcfe;overflow:hidden}
  .workflow-trend-title{display:flex;flex-direction:column;align-items:flex-start;gap:7px;margin-bottom:5px}
  .workflow-trend-title>div:first-child{display:flex;flex-direction:column}.workflow-trend-title b{font-size:11px}.workflow-trend-title small{font-size:8px;color:#8d96a8;margin-top:2px}
  .workflow-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:8px;font-weight:800;color:#747d91}
  .workflow-legend span::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px}.workflow-legend .kg::before{background:#653deb}.workflow-legend .revenue::before{background:#18a45a}
  .workflow-trend-svg{display:block;width:100%;height:118px}.workflow-grid-line{stroke:#e9ebf1;stroke-width:1}.workflow-line{stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}.workflow-line-kg{stroke:#653deb}.workflow-line-revenue{stroke:#18a45a}.workflow-trend-labels{display:flex;justify-content:space-between;color:#9aa1b1;font-size:8px;margin-top:2px}

  /* Plantacje/sezony — jedna kolumna, duże cele dotykowe */
  .workflow-scope-grid{display:grid;grid-template-columns:1fr;gap:8px;margin-bottom:10px}
  .workflow-scope-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:center;padding:12px;border:1px solid #e8eaf0;border-radius:13px;background:#fff}
  .workflow-scope-card.active{border-color:#cfc6ff;background:#faf8ff;box-shadow:inset 3px 0 0 #633be9}
  .workflow-scope-card>div:first-child{grid-column:1}.workflow-scope-card small{display:block;font-size:8px;color:#8d96a9;font-weight:900;letter-spacing:.1em}.workflow-scope-card b{display:block;margin-top:3px;font-size:13px}.workflow-scope-card span{font-size:9px;color:#8b94a6}.workflow-scope-metrics{grid-column:1;display:flex;gap:12px;flex-wrap:wrap}.workflow-scope-metrics span{display:flex;flex-direction:column;font-size:8px}.workflow-scope-metrics b{font-size:11px;margin:0;color:#3b4356}.workflow-scope-card button{grid-column:2;grid-row:1 / span 2;min-height:42px}
  .workflow-season-list{border:1px solid #eceef3;border-radius:12px;overflow:hidden}.workflow-season-head{display:none}
  .workflow-season-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;align-items:center;padding:11px;border-top:1px solid #eef0f4;font-size:9px}
  .workflow-season-row:first-of-type{border-top:0}.workflow-season-row.active{background:#faf8ff}.workflow-season-row>div{grid-column:1;display:flex;flex-direction:column}.workflow-season-row>span{grid-column:1;color:#667085}.workflow-season-row>span+span{margin-left:0}.workflow-season-row button{grid-column:2;grid-row:1 / span 3;min-height:42px}.workflow-season-row b{font-size:11px}.workflow-season-row small{font-size:8px;color:#9199aa;margin-top:2px}

  /* Skróty dokumentów */
  .workflow-document-shortcuts{display:grid;grid-template-columns:1fr;gap:10px;margin:0 0 11px;padding:10px;border:1px solid #ece8ff;border-radius:12px;background:linear-gradient(135deg,#fcfbff,#f8f6ff)}
  .workflow-document-shortcuts small{display:block;margin-bottom:6px;color:#7e719f;font-size:9px;font-weight:850}
  .workflow-shortcut-buttons{display:flex;flex-wrap:wrap;gap:6px}.workflow-shortcut-buttons button{min-height:40px;border:1px solid #ddd6ff;border-radius:9px;background:#fff;color:#5d3bd8;padding:8px 10px;font-size:10px;font-weight:850}
  .workflow-repeat-sale570{min-height:38px;white-space:nowrap}
  .workflow-pay570{min-height:38px;white-space:nowrap}.workflow-pay570:disabled{opacity:.45}

  /* Sprzedaż — mini wykresy również na telefonie */
  #sales .sales-stats .stat{position:relative;min-height:104px;overflow:hidden;padding-right:86px!important}
  .sales-module-sparkline{position:absolute;right:9px;bottom:12px;width:72px;height:34px;opacity:.96;pointer-events:none}
  .sales-module-sparkline svg{display:block;width:100%;height:100%;overflow:visible}.sales-module-sparkline .module-sparkline-line{stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sales-module-sparkline .module-sparkline-dot{fill:#fff;stroke:currentColor;stroke-width:1.5}.sales-module-sparkline.spark-purple{color:#6b43ef}.sales-module-sparkline.spark-green{color:#16a15a}.sales-module-sparkline.spark-blue{color:#3478f6}

  /* Magazyn — KPI zamiast pustego obszaru */
  #inventoryKpiStrip569.inventory-kpi-strip569{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 11px}
  #inventoryKpiStrip569 article{display:grid;grid-template-columns:35px minmax(0,1fr);gap:9px;align-items:start;min-height:92px;padding:11px;border:1px solid #e6e8ef;border-radius:13px;background:#fff;box-shadow:0 4px 14px rgba(33,40,70,.03)}
  #inventoryKpiStrip569 .inventory-kpi-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#f1edff;color:#6038e8;font-size:16px;font-weight:900}
  #inventoryKpiStrip569 article:nth-child(2) .inventory-kpi-icon{background:#edf6ff;color:#2474e9}#inventoryKpiStrip569 article:nth-child(3) .inventory-kpi-icon{background:#eaf9f0;color:#159553}#inventoryKpiStrip569 article:nth-child(4) .inventory-kpi-icon{background:#fff2e8;color:#ef7418}
  #inventoryKpiStrip569 article>div{display:flex;flex-direction:column;min-width:0}#inventoryKpiStrip569 small{font-size:8px;font-weight:800;color:#707a90}#inventoryKpiStrip569 strong{margin-top:7px;font-size:17px;line-height:1;color:#27215c;overflow-wrap:anywhere}#inventoryKpiStrip569 em{margin-top:6px;font-size:8px;font-style:normal;color:#939bae;line-height:1.25}
  #inventory #inventoryStock.inventory-stock-empty569{display:block;margin:-1px 0 11px}#inventory #inventoryStock.inventory-stock-empty569 .empty-state{min-height:0;padding:10px;border:1px dashed #dfe2eb;border-radius:11px;background:#fbfcfe;color:#7d879b;font-size:10px;text-align:left}

  /* Dokumenty — zaawansowane pola pozostają zwinięte i czytelne */
  #documentsCard .document-advanced569{margin:9px 0 11px;border:1px solid #e7e9ef;border-radius:12px;background:#fbfcfe;overflow:hidden;padding:0}
  #documentsCard .document-advanced569>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px;cursor:pointer;list-style:none;color:#3b4459;font-size:11px;font-weight:850}
  #documentsCard .document-advanced569>summary::-webkit-details-marker{display:none}#documentsCard .document-advanced569>summary::after{content:"+";display:grid;place-items:center;width:26px;height:26px;flex:0 0 auto;border-radius:8px;background:#f0edff;color:#6038e8;font-size:17px}#documentsCard .document-advanced569[open]>summary::after{content:"−"}#documentsCard .document-advanced569>summary small{margin-left:auto;color:#8b93a6;font-size:8px;font-weight:650;text-align:right}
  #documentsCard .document-advanced-grid569{display:grid;grid-template-columns:1fr;gap:0;padding:0 11px 11px;border-top:1px solid #eceef3}

  /* Karta pracownika jako bezpieczny cel dotykowy */
  #employees .employee-card[data-card-open569="1"]{cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent}
  #employees .employee-card[data-card-open569="1"]:active{border-color:#cfc6ff;background:#fbfaff}

  /* W tabelach przyciski mają minimalny rozmiar dotykowy */
  .sales-actions button,.card-actions button,.workflow-pay570,.workflow-repeat-sale570{min-height:40px}
  #payoutTable .table-scroll,#documentsCard .table-scroll{overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
}

@media (max-width:520px){
  .workflow-kpi-grid,.workflow-kpi-grid-6,.workflow-finance-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .workflow-heading-actions{grid-template-columns:1fr 1fr}
  .workflow-shortcut-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .workflow-shortcut-buttons button{width:100%;padding:8px 5px}
  #inventoryKpiStrip569.inventory-kpi-strip569{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:370px){
  .workflow-kpi-grid,.workflow-kpi-grid-6,.workflow-finance-kpis,#inventoryKpiStrip569.inventory-kpi-strip569{grid-template-columns:1fr}
  .workflow-heading-actions{grid-template-columns:1fr}
  .workflow-shortcut-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
  #sales .sales-stats .stat{padding-right:11px!important}.sales-module-sparkline{position:relative;right:auto;bottom:auto;width:100%;height:32px;margin-top:6px}
}

/* 5.8.0 — sprzedaż 2026: RHD, zgodność, wagi i fiskalizacja */
.compliance-sales-card{margin-top:16px}.compliance-sales-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.compliance-sales-grid>div,.compliance-settings-card h4{margin-top:12px}.compliance-sales-grid>div{border:1px solid var(--border,#dce6e1);border-radius:14px;padding:14px;background:rgba(255,255,255,.72)}.compliance-score{display:inline-flex;gap:6px;align-items:center;padding:7px 10px;border-radius:999px;background:#eef7f1}.compliance-checklist{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:14px}.compliance-check{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;background:#f4f6f5;font-size:12px}.compliance-check span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;font-weight:800}.compliance-check.ok span{background:#dff5e6}.compliance-check.missing span{background:#fff1cf}.rhd-threshold>div:first-child,.device-live{display:flex;align-items:center;justify-content:space-between;gap:10px}.rhd-bar{height:8px;background:#e9efec;border-radius:999px;overflow:hidden;margin:8px 0}.rhd-bar i{display:block;height:100%;width:0;background:currentColor;border-radius:999px}.device-live strong{font-size:24px}.sales-compliance-fields{margin-top:10px}.rhd-sale-fields{margin:10px 0}.nip-verify-row{display:flex;gap:8px;align-items:center}.nip-verify-row input{flex:1}.vat-check-result{margin-top:7px;padding:9px;border-radius:10px;background:#f6f8f7;line-height:1.45}.compliance-settings-card .ops-notice{margin-top:8px}.status.active{white-space:nowrap}
@media (max-width:1000px){.compliance-sales-grid{grid-template-columns:1fr}.compliance-checklist{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:620px){.compliance-checklist{grid-template-columns:1fr}.nip-verify-row{align-items:stretch;flex-direction:column}}

/* 5.9.0 RC readiness */
.readiness-list{display:grid;gap:8px;margin:12px 0}.readiness-row{display:flex;justify-content:space-between;gap:16px;padding:10px 12px;border:1px solid var(--border,#e5e7eb);border-radius:12px}.readiness-row small{color:var(--muted,#667085);text-align:right;max-width:65%}.commercial-readiness-card{padding:16px 0 20px}
