/* Dodatki dla aplikacji Godziny (bazowe style jak w BHP, Zgłoszeniach i Narzędziowni) */
button.link{background:none;border:0;color:#587897;text-decoration:underline;padding:2px 4px;font-weight:400}
button.link.danger{color:#a3271b}
.urgent{color:#a3271b}
.status{display:inline-block;white-space:nowrap}
.status.warn{background:#fff1cc;color:#8a6200}
.status.bad{background:#fde3e1;color:#a3271b}
.notice{margin-bottom:12px}
.notice.ok{background:#e9f2ed;border-color:#cfe5d6;color:#276545}
.warn-notice{background:#fff7e6;border-color:#f0d9a6;color:#6d4c00}
.login-form{max-width:420px}.login-form button{margin-top:12px}
.admin-bar{display:flex;justify-content:flex-end;margin-bottom:12px}
.inline-form{display:flex;gap:10px;align-items:center}.inline-form input,.inline-form select{margin:0;width:auto}.inline-form input{flex:1}
.row-actions{text-align:right;white-space:nowrap}.row-actions button{padding:6px 10px;font-size:11px}
tr.inactive td{color:#a0aab6}
.three{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.btns{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:16px}
label.check{display:flex;gap:8px;align-items:center;font-weight:400;font-size:14px}label.check input{width:20px;height:20px;margin:0}

/* Pasek miesiąca */
.month-bar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;padding:16px 20px}
.month-nav{display:flex;gap:8px;align-items:center}.month-nav select{width:auto;min-width:240px;margin:0}
.month-nav button{padding:10px 14px}
.month-actions{display:flex;gap:8px;flex-wrap:wrap}.month-actions button{padding:10px 14px;font-size:13px}

/* Tabela jak w Excelu */
.table-card{padding:18px}
.scroll{overflow-x:auto}
table.sheet{width:100%;border-collapse:collapse;font-size:13px;white-space:nowrap}
table.sheet th{background:#193f69;color:#fff;font-size:10.5px;font-weight:700;padding:8px 6px;text-align:center;white-space:normal;line-height:1.25;letter-spacing:0;text-transform:none;position:sticky;top:0}
table.sheet td{border-bottom:1px solid #edf0f4;padding:7px 6px;text-align:right;font-variant-numeric:tabular-nums}
table.sheet td.name{text-align:left;font-weight:600}
table.sheet td.name small{font-weight:400;color:#7b8899;font-size:11px}
table.sheet td.note{text-align:left;white-space:normal;min-width:140px;font-size:12px;color:#596b80}
table.sheet td.b{font-weight:700}
table.sheet tbody tr[data-act]{cursor:pointer}
table.sheet tbody tr[data-act]:hover td{background:#f3f8fd}
table.sheet tr.sel td{background:#e4effa!important}
table.sheet tr.todo td{background:#fffaf0}
table.sheet tr.gap td.name{color:#8a6200}
table.sheet tr.sub td{background:#eef2f7;font-weight:700;color:#193f69;border-bottom:2px solid #c9d4e1}
table.sheet tr.total td{background:#101e34;color:#fff;font-weight:700}
table.sheet tbody tr:focus-visible{outline:3px solid #8bb8e8;outline-offset:-3px}
table.year td{min-width:52px}
table.year td.hole{background:#fde3e1;color:#a3271b;font-weight:700;text-align:center}
table.year td.todo{background:#fff1cc;text-align:center}
.print-title{margin:0 0 12px;font-size:18px}.print-title small{font-weight:400;color:#7b8899;font-size:13px;margin-left:8px}
table:not(.sheet) tr.sub td{background:#eef2f7;font-weight:700;color:#193f69;font-size:12px}

/* Edycja wiersza */
.editor{border:2px solid #77b0e8}
.editor-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.editor-head h2{margin:0}.editor-head small{font-weight:400;color:#7b8899;font-size:14px;margin-left:6px}
.editor-head button{padding:8px 12px;font-size:13px}
.grid6{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;align-items:end}
.grid4{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px}
.calc{background:#f3f5f8;border-radius:8px;padding:10px 12px;margin:14px 0 0}
table.ot{width:100%;border-collapse:collapse;font-size:13px}
table.ot th{font-size:10px;text-align:left;color:#75879b;padding:6px;border-bottom:1px solid #e0e5ed}
table.ot td{padding:7px 6px;border-bottom:1px solid #edf0f4}
.ot-form{display:grid;grid-template-columns:150px 130px 100px 1fr auto;gap:10px;align-items:end;margin-top:12px}
.ot-form label{margin-top:0}
.changes{list-style:none;padding:0;margin:10px 0 0;font-size:12px}.changes li{padding:5px 0;border-bottom:1px solid #edf0f4}.changes span{color:#7b8899;margin-right:8px}
details summary{cursor:pointer;font-weight:600;color:#193f69}

@media(max-width:900px){.grid6{grid-template-columns:repeat(3,1fr)}.ot-form{grid-template-columns:1fr 1fr}.ot-form .grow{grid-column:1 / -1}}
@media(max-width:650px){
  nav button{flex:1;min-height:44px;font-size:11px}
  .grid6,.grid4,.three{grid-template-columns:1fr 1fr}
  .month-nav{width:100%}.month-nav select{min-width:0;flex:1}
  .inline-form{flex-direction:column;align-items:stretch}
}

/* Druk: sama tabela, A4 poziomo */
@page{size:A4 landscape;margin:10mm}
@media print{
  aside,header,footer,.intro,h1,.month-bar,.notice,.editor,.no-print,details{display:none!important}
  main{margin:0;width:100%}.content{padding:0;max-width:none}
  .card{border:0;box-shadow:none;padding:0;margin:0}
  .scroll{overflow:visible}
  table.sheet{font-size:9.5px}
  table.sheet th{background:#193f69!important;color:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;position:static}
  table.sheet td{padding:3px 4px;border-bottom:1px solid #c9d4e1}
  table.sheet tr.sub td,table.sheet tr.total td,table.year td.hole{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  table.sheet tr.todo td,table.sheet tr.sel td{background:none!important}
}

/* Dla właściciela: kafelki, wykres, limit nadgodzin */
.card-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.card-head h2{margin:0}.card-head select{width:auto;min-width:200px;margin:0}
.kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;margin:16px 0}
.kpi{border:1px solid #e0e5ed;border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:3px}
.kpi small{font-size:11px;color:#617088;font-weight:600}
.kpi strong{font-size:26px;color:#14253d;font-variant-numeric:tabular-nums;line-height:1.15}
.kpi .d{font-size:12px;color:#596b80}
.kpi em{font-style:normal;font-size:11px;color:#8c99aa}
.small-kpis .kpi strong{font-size:22px}
svg.chart{width:100%;height:auto;display:block;margin:4px 0 8px}
svg.chart .grid{stroke:#e9edf2;stroke-width:1}
svg.chart .base{stroke:#9aa7b6;stroke-width:1}
svg.chart .ax{font-size:10px;fill:#7b8899}
svg.chart .hit{fill:transparent}
svg.chart .mk{fill:#8fb4dc}
svg.chart .bar-g{cursor:pointer}
svg.chart .bar-g:hover .mk{fill:#5f92c8}
svg.chart .bar-g.cur .mk{fill:#193f69}
svg.chart .bar-g.prev .mk{stroke:#193f69;stroke-width:1.5}
.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.facts{margin:6px 0 10px;padding-left:18px;line-height:1.6;font-size:14px}.facts li{margin-bottom:6px}
table.limit{width:100%;border-collapse:collapse;font-size:13px}
table.limit th{font-size:10.5px;text-align:left;color:#617088;padding:8px 6px;border-bottom:1px solid #e0e5ed;font-weight:700}
table.limit th span{font-weight:400}
table.limit td{padding:7px 6px;border-bottom:1px solid #edf0f4;white-space:nowrap}
table.limit td.name small{color:#8c99aa;font-size:11px;margin-left:4px}
table.limit .barcol{width:42%;min-width:180px}
.bar{position:relative;height:12px;background:#f1f4f8;border-radius:6px}
.bar span{position:absolute;left:0;top:0;bottom:0;border-radius:6px}
.bar .fc{background:#dfe6ef}
.bar .now{background:#5f92c8}.bar .now.warn{background:#d9a21b}.bar .now.bad{background:#c0392b}
.bar i{position:absolute;top:-3px;bottom:-3px;width:2px;background:#14253d;margin-left:-1px}
.limit-form{margin-top:16px;max-width:520px}.limit-form label{margin:0;white-space:nowrap}.limit-form input{max-width:110px}
@media(max-width:800px){.two-cols{grid-template-columns:1fr}}
