/* Tempo – poprawki wyglądu z 2026-11-24
 * Dopisz w index.html PO styles.css:
 *   <link rel="stylesheet" href="fixes.css?v=20261130" />
 */

/* Kafelki: link „Przejdź do…” nie nachodzi już na tekst pod liczbą */
.stat-card { display: flex; flex-direction: column; }
.stat-card .inline-link { position: static; margin-top: auto; padding-top: 12px; align-self: flex-start; }

/* Wąski panel boczny (≤ 820 px): z karty firmy zostaje sama ikona */
@media (max-width: 820px) {
  .company-switch { width: 44px; height: 44px; padding: 4px; justify-content: center; margin-bottom: 20px; }
  .company-switch > span:not(.company-icon) { display: none; }
  .company-switch .company-icon { font-size: 14px; }
}

/* Święta w kalendarzach */
.calendar-day.holidaymark:not(.today) { color: #c0563f; font-weight: 600; }
.full-day.is-holiday:not(.dim) { background: #fdf6f4; }
.cal-entry.holiday { background: #fde8e3; color: #a3452f; }
.cal-entry.more { background: transparent; color: var(--muted, #8a918c); }

/* Przycisk „Zatwierdź wszystkie” */
.panel-heading .button-bulk { margin-left: auto; margin-right: 8px; height: 34px; padding: 0 14px; font-size: 12px; }
.panel-heading .button-bulk[hidden] { display: none; }

/* Przycisk „Wyloguj” w górnym pasku */
.logout-button { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line, #e6eae7); border-radius: 8px; background: #fff; color: #5f6863; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.logout-button:hover { color: #b4442f; border-color: #f0c9c0; background: #fff8f6; }
.logout-button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 560px) { .logout-button { padding: 0 9px; } .logout-button .logout-label { display: none; } }

/* Niezakończona praca */
.clock-alert { margin: 0 0 18px; padding: 14px 16px; border: 1px solid #f1b7ab; border-left: 5px solid #d23f2a; border-radius: 10px; background: #fff1ee; color: #7d2416; display: flex; flex-direction: column; gap: 12px; }
.clock-alert[hidden] { display: none; }
.clock-alert-text { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.45; }
.clock-alert-text > b { font-size: 15px; color: #b3261e; }
.clock-alert ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.clock-alert-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.clock-alert-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: #7d2416; }
.clock-alert-form input { height: 38px; border: 1px solid #f1b7ab; border-radius: 7px; padding: 0 9px; font: inherit; background: #fff; }
.clock-alert-form .button { height: 38px; }
@media (max-width: 560px) { .clock-alert-form { flex-direction: column; align-items: stretch; } .clock-alert-form .button { width: 100%; } }

/* Karta ewidencji czasu pracy */
#kecp-dialog { width: min(1120px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.kecp-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.kecp-controls label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: #606b64; }
.kecp-controls label[hidden] { display: none; }
.kecp-controls select { height: 38px; min-width: 200px; border: 1px solid #e1e7e3; border-radius: 7px; padding: 0 9px; font: inherit; background: #fff; }
.kecp-controls .button { height: 38px; }
.kecp-preview { overflow: auto; border: 1px solid #eceeec; border-radius: 8px; padding: 14px; background: #fff; }
.kecp-open { margin-right: 8px; }
#settlement-body tr { cursor: pointer; }
#settlement-body tr:hover td { background: #f6faf7; }
.kecp { font-size: 11px; color: #1f2723; min-width: 860px; }
.kecp-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.kecp-title { font-size: 15px; font-weight: 800; letter-spacing: .3px; }
.kecp-company { font-weight: 700; font-size: 13px; }
.kecp-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px 16px; margin-bottom: 10px; }
.kecp-table { width: 100%; border-collapse: collapse; }
.kecp-table th, .kecp-table td { border: 1px solid #9aa39d; padding: 3px 5px; text-align: center; vertical-align: middle; }
.kecp-table th { background: #eef3f0; font-size: 10px; font-weight: 700; }
.kecp-table td.kecp-times { text-align: left; font-size: 10px; }
.kecp-table tr.kecp-N td, .kecp-table tr.kecp-Ś td { background: #fdeeea; }
.kecp-table tr.kecp-W td { background: #f3f5f4; }
.kecp-table tfoot td { font-weight: 800; background: #eef3f0; }
.kecp-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px 16px; margin-top: 10px; }
.kecp-warning { margin-top: 8px; padding: 6px 8px; border: 1px solid #f1b7ab; background: #fff1ee; color: #7d2416; border-radius: 6px; }
.kecp-legend { margin-top: 8px; font-size: 9.5px; color: #4d5650; line-height: 1.4; }
.kecp-signatures { display: flex; justify-content: space-between; gap: 40px; margin-top: 34px; }
.kecp-signatures div { flex: 1; border-top: 1px dotted #555; padding-top: 4px; text-align: center; font-size: 10px; }
.kecp-generated { margin-top: 10px; font-size: 9px; color: #7d857f; text-align: right; }
#kecp-print { display: none; }
@media print {
  @page { size: A4 landscape; margin: 9mm; }
  html.printing-kecp body > *:not(#kecp-print) { display: none !important; }
  html.printing-kecp #kecp-print { display: block; }
  html.printing-kecp .kecp { min-width: 0; }
  html.printing-kecp .kecp-table tr { break-inside: avoid; }
  html.printing-kecp * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Ustawienia: pola tylko do odczytu */
.settings-panel input[readonly], .settings-panel select:disabled { background: #f5f7f6; color: #59625d; cursor: default; }

/* Historia zmian i podpowiedzi RODO */
.entry-history { margin: 0 0 16px; padding: 10px 12px; border-radius: 8px; background: #f6f8f7; font-size: 12px; color: #4d5650; }
.entry-history:empty { display: none; }
.entry-history ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.5; }
.form-hint { display: block; margin-top: 4px; font-size: 11px; font-weight: 500; color: #8a5a12; }

/* Szczegóły wpisu */
#entry-details-dialog { width: min(460px, calc(100vw - 32px)); }
.entry-details { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; margin: 6px 0 18px; font-size: 13px; }
.entry-details dt { color: var(--muted, #8a918c); }
.entry-details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .entry-details { grid-template-columns: 1fr; gap: 2px; } .entry-details dd { margin-bottom: 8px; } }

/* 21. Akceptacja dokumentów */
.terms-check { display: flex !important; gap: 10px; align-items: flex-start; flex-direction: row !important; font-weight: 500; font-size: .9rem; line-height: 1.4; margin: 6px 0 12px; }
.terms-check input { width: 18px !important; height: 18px; flex: 0 0 18px; margin-top: 2px; }
.terms-check a, .auth-foot a { color: inherit; text-decoration: underline; }
#terms-dialog { width: min(520px, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: 0; }
#terms-dialog::backdrop { background: rgba(15, 20, 35, .55); }
#terms-dialog .terms-box { padding: 24px; }
#terms-dialog h2 { margin: 0 0 10px; font-size: 1.2rem; }
#terms-dialog ul { margin: 8px 0 14px; padding-left: 20px; }
.terms-error { color: #c92a2a; font-size: .9rem; margin: 0 0 10px; }
.terms-actions { display: flex; gap: 10px; justify-content: flex-end; }


/* 22. Logowanie dwuetapowe */
.kc2fa-dialog { width: min(440px, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: 0; }
.kc2fa-dialog::backdrop { background: rgba(15, 20, 35, .55); }
.kc2fa-box { padding: 24px; }
.kc2fa-box h2 { margin: 0 0 10px; font-size: 1.2rem; }
.kc2fa-box input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; }
.kc2fa-error { color: #c92a2a; font-size: .9rem; margin: 8px 0 0; }
.kc2fa-actions, .kc2fa-choice { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.kc2fa-choice { justify-content: flex-start; }
.kc2fa-secret { display: inline-block; margin: 8px 0; padding: 6px 10px; background: #f1f3f8; border-radius: 6px; font-size: 1.05rem; letter-spacing: .08em; user-select: all; }
.kc2fa-on { color: #1e6b3c; font-weight: 600; }
.link-button { background: none; border: 0; padding: 0; color: #3b5bdb; text-decoration: underline; cursor: pointer; }

/* 23. Wyłączanie 2FA pracownikowi */
.kc2fa-reset { margin-left: 6px; padding: 4px 10px; font-size: .8rem; }

/* 25. Edycja pracownika */
.kc-emp-dialog { width: min(560px, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: 0; }
.kc-emp-dialog::backdrop { background: rgba(15, 20, 35, .55); }
.kc-emp-box { padding: 24px; }
.kc-emp-hint { font-size: .85rem; color: #667; margin: 8px 0 0; }
.kc-emp-edit { margin-right: 6px; }
.kc-emp-box .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kc-emp-box label { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; font-weight: 600; font-size: .85rem; }
.kc-emp-box input, .kc-emp-box select { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d9dce5; border-radius: 10px; font: inherit; font-weight: 400; }
.kc-emp-box select:disabled { background: #f1f3f8; color: #667; }
.kc-emp-box .dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.kc-emp-box .dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
@media (max-width: 520px) { .kc-emp-box .form-row { grid-template-columns: 1fr; gap: 0; } }
