/*
 * System rozliczania nadgodzin nauczycieli — główne style aplikacji
 * Wydzielone z app/views/layout.php w wersji 1.3.24.70; wydruk wydzielony w 1.3.24.71, formularze rozliczeń w 1.3.24.72.
 * Cel: bez zmiany wyglądu, tylko uporządkowanie struktury plików.
 */
*{box-sizing:border-box}body{font-family:Arial,Helvetica,sans-serif;margin:0;background:#f7f7f7;color:#222}.top{position:sticky;top:0;z-index:10;background:#1f2937;color:white;padding:0 22px;display:flex;justify-content:space-between;align-items:center;min-height:54px;gap:12px}.top-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{font-weight:bold;white-space:normal;line-height:1.15;min-width:0}.menu-toggle{display:none;background:#374151;color:white;border:1px solid #4b5563;border-radius:8px;padding:8px 12px;font-size:15px;cursor:pointer}.nav{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end}.nav a{color:white;text-decoration:none;margin-left:8px;padding:17px 10px;display:inline-block;border-radius:0}.nav a:hover,.nav a.active{background:#374151}.wrap{max-width:1480px;margin:18px auto;padding:0 14px}.card{background:white;border:1px solid #d1d5db;border-radius:2px;padding:12px;margin-bottom:12px;box-shadow:none}input,select,textarea{padding:6px;border:1px solid #999;border-radius:1px;max-width:100%}button,.btn{background:#2563eb;color:white;border:0;text-decoration:none;display:inline-block;padding:5px 8px;border-radius:0;font-size:13px;cursor:pointer;margin:1px}.btn2{background:#475569}.danger{background:#dc2626}.ok{background:#16a34a}button:hover,.btn:hover{filter:brightness(0.88)}.actions{white-space:nowrap}.actions button,.actions .btn{font-size:12px;padding:4px 6px}table{border-collapse:collapse;width:100%;background:white}th,td{border:1px solid #b8b8b8;padding:4px 5px;text-align:center}th{background:#eeeeee}.left{text-align:left}.muted{color:#666;font-size:13px}.red{color:#b91c1c;background:#fee2e2;font-weight:bold}.disabled{background:#eee;color:#777}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.grid .card{text-decoration:none;color:#222;font-weight:bold}.notice{padding:8px;border:1px solid #99f6e4;border-radius:2px;background:#ecfeff}.sum{font-weight:bold;background:#f8fafc}.printdoc{background:white;color:#000}.printdoc .top,.printdoc .no-print{display:none}.table-scroll{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.compact-table{min-width:1320px;font-size:13px}.compact-table th,.compact-table td{padding:5px 4px;line-height:1.15}.compact-table th{white-space:normal}.compact-table td{white-space:nowrap}.report-card{padding:18px 14px}.report-help{margin:8px 0 12px}.empty-row td{padding:18px;text-align:left;color:#666}.filters label{display:inline-block;margin:3px 8px 3px 0;white-space:nowrap}.settings-table{min-width:760px}.admin-table{min-width:980px}.mobile-only{display:none}.desktop-only{display:inline}/* 1.3.18: nowy układ panelu admina/superadmina */
body.admin-mode{background:#eef2f7}.admin-layout{display:flex;min-height:100vh;width:100%}.admin-sidebar{width:265px;background:#111827;color:#e5e7eb;border-right:1px solid #0f172a;flex:0 0 265px;position:sticky;top:0;height:100vh;overflow-y:auto}.sidebar-brand{padding:16px 16px 12px;border-bottom:1px solid #263244}.sidebar-title{font-weight:bold;font-size:17px;line-height:1.2}.sidebar-subtitle{font-size:12px;color:#9ca3af;margin-top:4px}.sidebar-group{padding:12px 10px 6px}.sidebar-group-title{padding:8px 8px 5px;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#9ca3af}.sidebar-link{display:flex;align-items:center;gap:9px;color:#e5e7eb;text-decoration:none;padding:9px 10px;margin:2px 0;border-radius:2px;border-left:3px solid transparent;font-size:14px}.sidebar-link:hover{background:#1f2937}.sidebar-link.active{background:#243244;border-left-color:#60a5fa;color:#fff}.sidebar-link.logout{margin-top:8px;color:#fecaca}.admin-main{flex:1;min-width:0}.admin-topbar{height:52px;background:#fff;border-bottom:1px solid #d1d5db;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 18px;position:sticky;top:0;z-index:8}.admin-topbar-title{font-weight:bold;color:#111827}.admin-user-badge{font-size:12px;color:#475569;border:1px solid #cbd5e1;background:#f8fafc;padding:5px 8px;border-radius:2px}.admin-menu-toggle{display:none;background:#111827;color:white;border:0;padding:8px 10px;border-radius:2px}.admin-wrap{max-width:none;margin:0;padding:16px 18px}.admin-page-head{margin:0 0 14px}.admin-page-head h2{margin:0 0 4px}.dashboard-stats{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:10px;margin-bottom:14px}.stat-box{background:#fff;border:1px solid #d1d5db;padding:10px 12px}.stat-label{font-size:12px;color:#64748b}.stat-value{font-size:24px;font-weight:bold;margin-top:4px}.module-section{background:#fff;border:1px solid #d1d5db;margin-bottom:12px}.module-section h3{margin:0;padding:10px 12px;border-bottom:1px solid #d1d5db;background:#f8fafc}.module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:0}.module-card{display:block;padding:12px;border-right:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;text-decoration:none;color:#111827;min-height:92px}.module-card:hover{background:#f8fafc}.module-card strong{display:block;margin-bottom:5px}.module-card span{display:block;color:#64748b;font-size:13px;line-height:1.35}.admin-overlay{display:none}.admin-quick-row{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 2px}.admin-quick-row .btn{margin:0}.admin-note{background:#fff7ed;border:1px solid #fed7aa;padding:10px;margin-bottom:12px;color:#7c2d12}.status-ok{color:#166534;font-weight:bold}.status-warn{color:#92400e;font-weight:bold}.status-bad{color:#b91c1c;font-weight:bold}.mini-input{width:86px}.wide-input{min-width:160px}

/* 1.3.20: poprawa czytelności szerokich tabel w panelu admina/superadmina */
body.admin-mode .admin-sidebar{width:238px;flex-basis:238px}
body.admin-mode .admin-wrap{padding:12px 12px;overflow-x:hidden}
body.admin-mode .card{padding:10px;overflow-x:auto;-webkit-overflow-scrolling:touch}
body.admin-mode .card h2{margin-top:4px;margin-bottom:10px}
body.admin-mode table{font-size:13px}
body.admin-mode th,body.admin-mode td{padding:3px 4px;vertical-align:top}
body.admin-mode .card>table{min-width:1040px;width:max-content;max-width:none}
body.admin-mode .card>table th:nth-child(1),body.admin-mode .card>table td:nth-child(1){min-width:170px}
body.admin-mode .card>table th:nth-child(2),body.admin-mode .card>table td:nth-child(2){min-width:165px}
body.admin-mode .card>table th:nth-child(3),body.admin-mode .card>table td:nth-child(3){min-width:95px}
body.admin-mode .card>table th:nth-child(4),body.admin-mode .card>table td:nth-child(4){min-width:190px}
body.admin-mode .card>table th:nth-child(5),body.admin-mode .card>table td:nth-child(5){min-width:270px}
body.admin-mode .card>table th:nth-child(6),body.admin-mode .card>table td:nth-child(6){min-width:90px}
body.admin-mode .card>table th:nth-child(7),body.admin-mode .card>table td:nth-child(7){min-width:200px}
body.admin-mode .card table input,body.admin-mode .card table select,body.admin-mode .card table textarea{font-size:12px;min-height:0;height:25px;padding:2px 5px;border-radius:0}
body.admin-mode .card table input[type="checkbox"]{height:auto;vertical-align:middle}
body.admin-mode .card table input[type="date"]{width:106px}
body.admin-mode .card table .mini-input{width:62px}
body.admin-mode .card table .wide-input{width:170px;min-width:0}
body.admin-mode .card table button,body.admin-mode .card table .btn{font-size:12px;line-height:1.1;min-height:0;padding:5px 7px;margin:1px 0}
body.admin-mode .card table .actions{white-space:normal;min-width:190px}
body.admin-mode .card table .actions button{display:inline-block;margin:1px}
body.admin-mode .status-ok,body.admin-mode .status-warn,body.admin-mode .status-bad{display:inline-block;margin:2px 0}
@media(max-width:960px){body.admin-mode .admin-sidebar{width:265px;flex-basis:265px}body.admin-mode .card>table{min-width:980px}}

/* 1.3.23: raporty podzielone na zakładki */
.report-filter-card{padding:10px 12px}.report-filter-form{display:flex;flex-wrap:wrap;gap:8px;align-items:end}.report-filter-form label{display:flex;flex-direction:column;gap:3px;font-size:12px;color:#475569}.report-filter-form select,.report-filter-form input{min-height:31px}.report-tabs-card{padding:0;overflow:hidden}.report-tabs{display:flex;flex-wrap:wrap;gap:0;border-bottom:1px solid #d1d5db;background:#f8fafc}.report-tab{display:block;padding:10px 13px;border-right:1px solid #e5e7eb;text-decoration:none;color:#1f2937;font-weight:bold;font-size:13px}.report-tab:hover{background:#eef2ff}.report-tab.active{background:#2563eb;color:#fff}.report-tab-table{min-width:0;width:100%;font-size:12.5px}.report-tab-table th,.report-tab-table td{white-space:nowrap}.report-tab-table td.left,.report-tab-table th.left{text-align:left}.report-export-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;margin:8px 0 12px}.export-card{border:1px solid #d1d5db;background:#fff;min-height:70px}.export-card:hover{background:#f8fafc}
@media(max-width:900px){.report-filter-form{display:grid;grid-template-columns:1fr;gap:8px}.report-filter-form button{width:100%;margin:0}.report-tabs{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch}.report-tab{white-space:nowrap;flex:0 0 auto}.report-tab-table{min-width:760px}.report-export-grid{grid-template-columns:1fr}}


/* 1.3.24.9: profesjonalny, zwarty panel Nauczyciele i użytkownicy */
body.admin-mode .teachers-panel-card{padding:8px 10px;overflow-x:auto}
body.admin-mode .teachers-panel-card h2{font-size:18px;margin:2px 0 8px}
body.admin-mode .teachers-add-form{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:6px;align-items:end}
body.admin-mode .teachers-add-form input,
body.admin-mode .teachers-add-form select{height:30px;font-size:12px;padding:4px 6px}
body.admin-mode .teachers-add-form label{font-size:12px;line-height:1.2;display:flex;align-items:center;gap:5px;background:#f8fafc;border:1px solid #d1d5db;padding:5px 6px;height:30px}
body.admin-mode .teachers-add-form button{height:30px;padding:4px 10px;margin:0}
body.admin-mode .teachers-search-form{grid-template-columns:minmax(220px,1fr) 170px 85px 85px;gap:6px;align-items:end;margin-bottom:4px}
body.admin-mode .teachers-search-form input,
body.admin-mode .teachers-search-form select{height:30px;font-size:12px;padding:4px 6px}
body.admin-mode .teachers-search-form button,
body.admin-mode .teachers-search-form .btn{height:30px;line-height:20px;text-align:center;margin:0;padding:5px 8px}
body.admin-mode .teachers-table{min-width:900px!important;width:max-content!important;font-size:12px;background:#fff;border:1px solid #9ca3af}
body.admin-mode .teachers-table th{font-size:11px;text-transform:uppercase;letter-spacing:.03em;background:#e5e7eb;color:#111827;padding:5px 5px;border-color:#9ca3af;white-space:nowrap}
body.admin-mode .teachers-table td{padding:4px 5px;border-color:#c4c4c4;vertical-align:top;line-height:1.2}
body.admin-mode .teachers-table td.person-cell{min-width:230px!important;width:230px!important}
body.admin-mode .teachers-table td.limit-cell{min-width:215px!important;width:215px!important}
body.admin-mode .teachers-table td.functions-cell{min-width:215px!important;width:215px!important}
body.admin-mode .teachers-table td.status-cell{min-width:86px!important;width:86px!important;text-align:left}
body.admin-mode .teachers-table td.actions-cell{min-width:112px!important;width:112px!important}
body.admin-mode .teachers-table input,
body.admin-mode .teachers-table select{height:24px;font-size:11.5px;padding:2px 4px;border:1px solid #a3a3a3;border-radius:0;background:#fff}
body.admin-mode .teachers-table input[type="checkbox"]{height:auto;margin:0 4px 0 0}
body.admin-mode .teachers-table .person-name-input{width:215px;min-width:0!important}
body.admin-mode .teachers-table .password-input{width:142px;min-width:0!important;margin-top:3px}
body.admin-mode .person-meta{display:flex;flex-wrap:wrap;gap:3px;margin:3px 0 2px;align-items:center}
body.admin-mode .login-chip,body.admin-mode .role-chip{display:inline-block;border:1px solid #cbd5e1;background:#f8fafc;color:#334155;font-size:10.5px;line-height:1.15;padding:2px 4px}
body.admin-mode .role-chip{background:#eef2ff;color:#3730a3;border-color:#c7d2fe}
body.admin-mode .admin-account-label{display:block;font-size:12px;margin-bottom:2px}
body.admin-mode .compact-users-table th:nth-child(1),body.admin-mode .compact-users-table td:nth-child(1){min-width:230px!important}
body.admin-mode .compact-users-table th:nth-child(2),body.admin-mode .compact-users-table td:nth-child(2){min-width:215px!important}
body.admin-mode .compact-users-table th:nth-child(3),body.admin-mode .compact-users-table td:nth-child(3){min-width:215px!important}
body.admin-mode .compact-users-table th:nth-child(4),body.admin-mode .compact-users-table td:nth-child(4){min-width:86px!important}
body.admin-mode .compact-users-table th:nth-child(5),body.admin-mode .compact-users-table td:nth-child(5){min-width:112px!important}
body.admin-mode .teacher-limit-box{display:grid;grid-template-columns:68px 86px;gap:3px 5px;align-items:center}
body.admin-mode .teacher-limit-box .lbl{font-size:11px;color:#475569;text-align:right;white-space:nowrap}
body.admin-mode .teacher-limit-box .mini-input{width:70px!important;min-width:0}
body.admin-mode .teacher-limit-box .date-small{width:86px!important;min-width:0}
body.admin-mode .teacher-limit-box .wide-input{grid-column:1 / -1;width:100%!important;min-width:0!important}
body.admin-mode .teacher-limit-status{grid-column:1 / -1;border-top:1px solid #e5e7eb;margin-top:2px;padding-top:3px;font-size:11px;line-height:1.25;text-align:left}
body.admin-mode .teacher-limit-status small{display:block;color:#64748b;margin-top:1px}
body.admin-mode .teacher-functions details{border:1px solid #d1d5db;background:#f8fafc}
body.admin-mode .teacher-functions summary{cursor:pointer;padding:5px 7px;font-weight:bold;font-size:12px;list-style:none}
body.admin-mode .teacher-functions summary::-webkit-details-marker{display:none}
body.admin-mode .teacher-functions summary:after{content:' ▾';float:right;color:#64748b}
body.admin-mode .teacher-functions details[open] summary{border-bottom:1px solid #d1d5db;background:#eef2ff}
body.admin-mode .function-row{display:grid;grid-template-columns:1fr auto;gap:4px;align-items:center;padding:4px 6px;border-bottom:1px solid #e5e7eb;font-size:11.5px;text-align:left}
body.admin-mode .function-row button{padding:3px 5px;font-size:11px;height:22px;min-height:0;margin:0}
body.admin-mode .function-add{padding:5px 6px;display:grid;grid-template-columns:1fr 82px 50px;gap:3px}
body.admin-mode .function-add select,
body.admin-mode .function-add input{width:100%!important;min-width:0!important;height:23px;font-size:11px}
body.admin-mode .function-add .manual-function{grid-column:1 / -1}
body.admin-mode .function-add button{grid-column:1 / -1;height:24px;min-height:0;padding:3px 6px;margin:0;font-size:11.5px}
body.admin-mode .status-cell label{font-size:11.5px;display:flex;align-items:center;gap:2px;margin-top:3px}
body.admin-mode .user-actions{display:grid;grid-template-columns:1fr;gap:3px}
body.admin-mode .user-actions button{width:100%;margin:0;height:24px;min-height:0;padding:3px 5px;font-size:11.5px;text-align:center}
body.admin-mode .force-change-note{display:inline-block;margin-top:3px;padding:2px 4px;font-size:10.5px;line-height:1.15;background:#fee2e2;color:#991b1b;border:1px solid #fecaca;font-weight:bold}
body.admin-mode .muted.tight{font-size:12px;margin:4px 0 6px}
@media(max-width:1100px){body.admin-mode .teachers-search-form{grid-template-columns:1fr 160px 80px 80px}body.admin-mode .teachers-table{min-width:900px!important}}
@media(max-width:700px){body.admin-mode .teachers-search-form{grid-template-columns:1fr}body.admin-mode .teachers-search-form button,body.admin-mode .teachers-search-form .btn{width:100%}body.admin-mode .teachers-add-form{grid-template-columns:1fr}body.admin-mode .teachers-add-form input,body.admin-mode .teachers-add-form select,body.admin-mode .teachers-add-form button,body.admin-mode .teachers-add-form label{height:38px;font-size:14px}body.admin-mode .teachers-table{min-width:880px!important}}

@media(max-width:900px){.top{align-items:stretch;flex-direction:column;padding:0 12px;gap:0}.top-row{min-height:52px;width:100%}.menu-toggle{display:inline-block}.nav{display:none;width:100%;padding:8px 0 12px;border-top:1px solid #374151}.nav.open{display:block}.nav a{display:block;margin:0 0 4px 0;padding:12px 10px;border-radius:8px}.wrap{margin:12px auto;padding:0 10px}.card{border-radius:2px;padding:10px;margin-bottom:10px;overflow-x:auto}.grid{grid-template-columns:1fr}.grid .card{min-height:52px;display:flex;align-items:center}input,select,textarea{font-size:16px;min-height:40px}button,.btn{font-size:14px;min-height:40px;padding:8px 10px}.no-print>form>select,.no-print>form>input,.no-print>form>button,.no-print>form>.btn{width:100%;margin:4px 0}.filters{display:grid;grid-template-columns:1fr;gap:6px}.filters label{display:block;white-space:normal;padding:6px 0;margin:0}.filters button{width:100%}.actions{white-space:normal}.actions button,.actions .btn{margin:3px 2px}.compact-table{min-width:1180px;font-size:12px}.report-card{padding:14px 10px}.report-help{font-size:12px}.mobile-only{display:inline}.desktop-only{display:none}h2{font-size:22px}h3{font-size:18px}.form-actions{display:block}.form-actions button,.form-actions .btn{width:100%;margin:4px 0}}
@media(max-width:960px){body.admin-mode{background:#f7f7f7}.admin-layout{display:block}.admin-sidebar{position:fixed;left:-280px;top:0;bottom:0;height:100vh;z-index:30;transition:left .18s ease}.admin-sidebar.open{left:0}.admin-overlay.open{display:block;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:20}.admin-menu-toggle{display:inline-block}.admin-topbar{padding:0 10px}.admin-user-badge{display:none}.admin-wrap{padding:12px 10px}.dashboard-stats{grid-template-columns:repeat(2,minmax(120px,1fr))}.module-grid{grid-template-columns:1fr}.module-card{min-height:auto;border-right:0}.admin-page-head h2{font-size:22px}}
@media(max-width:520px){.brand{font-size:16px}.wrap{padding:0 8px}.card{padding:12px}th,td{padding:5px 4px;font-size:12px}.week-table{min-width:660px}.week-table input{min-width:52px}.week-table select{min-width:115px}.compact-table{font-size:11px;min-width:1080px}button,.btn{width:auto}.no-print>form button,.no-print>form .btn{width:100%}input[style],select[style]{max-width:100%}.dashboard-stats{grid-template-columns:1fr}.stat-value{font-size:22px}}
.site-footer{max-width:1480px;margin:14px auto 18px;padding:10px 14px;color:#64748b;font-size:12px;text-align:center;border-top:1px solid #d1d5db}body.admin-mode .site-footer{max-width:none;margin:0 18px 16px;padding:10px 0}@media(max-width:900px){.site-footer{margin:10px auto 14px;padding:9px 10px}}

/* 1.3.24.71: style wydruku przeniesione do public/assets/css/print.css */
/* 1.3.24.72: style formularzy rozliczeń przeniesione do public/assets/css/forms.css */


/* 1.3.34.14 — profesjonalny, kompaktowy widok stanowisk specjalnych */
body.admin-mode .teachers-table th:nth-child(3),
body.admin-mode .teachers-table td.special-position-cell{width:330px!important;min-width:330px!important;max-width:330px!important;vertical-align:top!important}
body.admin-mode .teacher-special-position-card.compact-special-position{display:flex;flex-direction:column;gap:8px;border:1px solid #dbe3ef;background:linear-gradient(180deg,#ffffff,#f8fafc);padding:10px;border-radius:10px;box-shadow:0 1px 2px rgba(15,23,42,.05);line-height:1.25;box-sizing:border-box;max-width:100%}
body.admin-mode .compact-special-position .sp-row-main{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}
body.admin-mode .compact-special-position .sp-field{display:flex;flex-direction:column;gap:4px;font-size:11px;font-weight:700;color:#334155;min-width:0;margin:0}
body.admin-mode .compact-special-position .sp-field span{letter-spacing:.01em;text-transform:none;color:#475569}
body.admin-mode .compact-special-position select,
body.admin-mode .compact-special-position textarea{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#0f172a;font-size:12px}
body.admin-mode .compact-special-position select{height:30px;padding:3px 7px}
body.admin-mode .compact-special-position textarea{padding:6px 7px;resize:vertical;line-height:1.25;min-height:42px}
body.admin-mode .compact-special-position .sp-badge{display:inline-flex;align-items:center;justify-content:center;height:22px;padding:0 8px;border-radius:999px;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}
body.admin-mode .compact-special-position .sp-badge.ok{background:#e8f7ee;color:#166534;border:1px solid #bbf7d0}
body.admin-mode .compact-special-position .sp-badge.warn{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}
body.admin-mode .compact-special-position .sp-details{border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;overflow:hidden}
body.admin-mode .compact-special-position .sp-details summary{cursor:pointer;list-style:none;padding:7px 9px;font-size:12px;font-weight:700;color:#0f172a;background:#eef4ff;display:flex;align-items:center;justify-content:space-between}
body.admin-mode .compact-special-position .sp-details summary::-webkit-details-marker{display:none}
body.admin-mode .compact-special-position .sp-details summary:after{content:'rozwiń';font-size:10.5px;color:#64748b;font-weight:600}
body.admin-mode .compact-special-position .sp-details[open] summary:after{content:'zwiń'}
body.admin-mode .compact-special-position .sp-details-grid{padding:8px;display:grid;grid-template-columns:1fr;gap:8px}
body.admin-mode .compact-special-position .sp-check{display:flex;align-items:center;gap:7px;margin:0;font-size:12px;font-weight:600;color:#334155;line-height:1.25}
body.admin-mode .compact-special-position .sp-check input{width:15px;height:15px;flex:0 0 15px;margin:0}
body.admin-mode .compact-special-position .sp-muted{font-size:11px;color:#64748b;line-height:1.25;display:block}
@media(max-width:1100px){body.admin-mode .teachers-table th:nth-child(3),body.admin-mode .teachers-table td.special-position-cell{width:280px!important;min-width:280px!important}}


/* 1.3.34.15 — profesjonalna przebudowa listy Użytkownicy */
body.admin-mode .users-pro-panel{padding:12px 14px;overflow-x:auto;background:#fff}
body.admin-mode .users-pro-table{min-width:1180px!important;width:100%!important;border-collapse:separate;border-spacing:0 8px;border:0;background:transparent;font-size:12px}
body.admin-mode .users-pro-table th{background:#f1f5f9;color:#334155;border:0;border-bottom:1px solid #cbd5e1;padding:8px 10px;text-transform:uppercase;font-size:11px;letter-spacing:.04em}
body.admin-mode .users-pro-table td{background:#fff;border-top:1px solid #dbe3ef;border-bottom:1px solid #dbe3ef;padding:10px;vertical-align:top;line-height:1.25}
body.admin-mode .users-pro-table td:first-child{border-left:1px solid #dbe3ef;border-radius:10px 0 0 10px}
body.admin-mode .users-pro-table td:last-child{border-right:1px solid #dbe3ef;border-radius:0 10px 10px 0}
body.admin-mode .users-pro-table tr.inactive-user-row td{background:#fff7f7;opacity:.85}
body.admin-mode .users-pro-table .person-cell{width:260px!important;min-width:260px!important}
body.admin-mode .users-pro-table .pro-limit-cell{width:430px!important;min-width:430px!important}
body.admin-mode .users-pro-table .special-position-cell{width:310px!important;min-width:310px!important;max-width:310px!important}
body.admin-mode .users-pro-table .status-cell{width:105px!important;min-width:105px!important}
body.admin-mode .users-pro-table .actions-cell{width:130px!important;min-width:130px!important}
body.admin-mode .users-pro-table input,body.admin-mode .users-pro-table select,body.admin-mode .users-pro-table textarea{border:1px solid #cbd5e1;border-radius:7px;height:31px;padding:4px 8px;font-size:12px;background:#fff;box-sizing:border-box}
body.admin-mode .users-pro-table input[type="checkbox"]{height:15px;width:15px;padding:0;border-radius:3px;vertical-align:middle}
body.admin-mode .users-pro-table .person-name-input{width:100%!important;height:34px;font-weight:700;font-size:13px;border-color:#cbd5e1;background:#f8fafc}
body.admin-mode .users-pro-table .account-details{margin-top:6px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;overflow:hidden}
body.admin-mode .users-pro-table .account-details summary{cursor:pointer;padding:6px 8px;font-size:11.5px;font-weight:700;color:#334155;list-style:none}
body.admin-mode .users-pro-table .account-details summary::-webkit-details-marker{display:none}
body.admin-mode .users-pro-table .account-details .password-input{width:calc(100% - 12px)!important;margin:0 6px 6px 6px}
body.admin-mode .teacher-admin-summary{border:1px solid #dbe3ef;border-radius:10px;background:linear-gradient(180deg,#ffffff,#f8fafc);padding:10px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
body.admin-mode .summary-metrics{display:grid;grid-template-columns:repeat(4,minmax(78px,1fr));gap:7px;margin-bottom:8px}
body.admin-mode .summary-metrics span{display:block;border:1px solid #e2e8f0;background:#fff;border-radius:8px;padding:7px 8px;color:#0f172a;font-weight:700;text-align:center;min-height:38px}
body.admin-mode .summary-metrics b{display:block;color:#64748b;font-size:10.5px;text-transform:uppercase;letter-spacing:.03em;margin-bottom:3px;font-weight:800}
body.admin-mode .summary-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px;font-size:12px;color:#475569}
body.admin-mode .teacher-edit-details{border:1px solid #e2e8f0;border-radius:8px;background:#fff;overflow:hidden;margin-top:8px}
body.admin-mode .teacher-edit-details summary{cursor:pointer;padding:8px 10px;background:#eef4ff;color:#1e3a8a;font-weight:800;font-size:12px;list-style:none;display:flex;align-items:center;justify-content:space-between}
body.admin-mode .teacher-edit-details summary::-webkit-details-marker{display:none}
body.admin-mode .teacher-edit-details summary:after{content:'rozwiń';font-size:10.5px;color:#64748b;font-weight:600}
body.admin-mode .teacher-edit-details[open] summary:after{content:'zwiń'}
body.admin-mode .teacher-edit-grid{padding:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;align-items:end}
body.admin-mode .teacher-edit-grid label{display:flex;flex-direction:column;gap:3px;font-size:11.5px;font-weight:700;color:#334155;margin:0}
body.admin-mode .teacher-edit-grid label span{color:#475569}
body.admin-mode .teacher-edit-grid input,body.admin-mode .teacher-edit-grid select{width:100%!important;min-width:0!important}
body.admin-mode .teacher-edit-grid .check-row{display:flex;flex-direction:row;align-items:center;gap:7px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:7px 8px;min-height:31px}
body.admin-mode .teacher-edit-grid .span2{grid-column:1 / -1}
body.admin-mode .teacher-edit-grid p.span2{margin:0;color:#64748b;font-size:11.5px;line-height:1.35;background:#f8fafc;border-radius:8px;padding:8px;border:1px solid #e2e8f0}
body.admin-mode .users-pro-table .compact-special-position{box-shadow:none!important;border-color:#dbe3ef!important}
body.admin-mode .users-pro-table .compact-special-position .sp-row-main{grid-template-columns:1fr auto}
body.admin-mode .users-pro-table .compact-special-position .sp-details:not([open]){background:#f8fafc}
body.admin-mode .users-pro-table .user-actions{gap:5px}
body.admin-mode .users-pro-table .user-actions button,body.admin-mode .users-pro-table .user-actions .btn{height:29px;border-radius:7px;font-size:12px;font-weight:700}
@media(max-width:1300px){body.admin-mode .users-pro-table{min-width:1100px!important}body.admin-mode .summary-metrics{grid-template-columns:repeat(2,minmax(78px,1fr))}body.admin-mode .users-pro-table .pro-limit-cell{width:360px!important;min-width:360px!important}}
@media(max-width:760px){body.admin-mode .users-pro-panel{padding:10px;overflow-x:auto}body.admin-mode .users-pro-table{min-width:980px!important}body.admin-mode .teacher-edit-grid{grid-template-columns:1fr}}

/* 1.3.34.16 — proporcje i wyrównanie profesjonalnego panelu Użytkownicy */
body.admin-mode .users-pro-panel{width:100%;box-sizing:border-box;padding:14px 14px 18px;overflow-x:auto;background:#fff}
body.admin-mode .users-pro-table{width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:separate;border-spacing:0 10px;background:transparent}
body.admin-mode .users-pro-table th:nth-child(1){width:23%!important}
body.admin-mode .users-pro-table th:nth-child(2){width:38%!important}
body.admin-mode .users-pro-table th:nth-child(3){width:24%!important}
body.admin-mode .users-pro-table th:nth-child(4){width:7%!important}
body.admin-mode .users-pro-table th:nth-child(5){width:8%!important}
body.admin-mode .users-pro-table .person-cell{width:auto!important;min-width:0!important;max-width:none!important}
body.admin-mode .users-pro-table .pro-limit-cell{width:auto!important;min-width:0!important;max-width:none!important}
body.admin-mode .users-pro-table .special-position-cell{width:auto!important;min-width:0!important;max-width:none!important}
body.admin-mode .users-pro-table .status-cell{width:auto!important;min-width:0!important;max-width:none!important;text-align:center}
body.admin-mode .users-pro-table .actions-cell{width:auto!important;min-width:0!important;max-width:none!important}
body.admin-mode .users-pro-table td{padding:12px 12px;vertical-align:top;overflow:hidden}
body.admin-mode .users-pro-table input,body.admin-mode .users-pro-table select,body.admin-mode .users-pro-table textarea{max-width:100%!important}
body.admin-mode .users-pro-table .person-name-input{height:34px;font-size:13px;border-radius:8px}
body.admin-mode .teacher-admin-summary{padding:12px;border-radius:12px}
body.admin-mode .summary-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:10px}
body.admin-mode .summary-metrics span{min-width:0;min-height:42px;padding:8px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;word-break:break-word}
body.admin-mode .summary-metrics b{font-size:10px;line-height:1.05;margin-bottom:4px}
body.admin-mode .summary-line{border-top:1px solid #e2e8f0;padding-top:8px;margin-top:2px;margin-bottom:8px;line-height:1.35}
body.admin-mode .teacher-edit-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end}
body.admin-mode .teacher-edit-grid .span2{grid-column:1 / -1}
body.admin-mode .teacher-edit-details summary{border-radius:0;font-size:12.5px}
body.admin-mode .users-pro-table .compact-special-position{padding:12px;border-radius:12px;min-height:0;gap:9px}
body.admin-mode .users-pro-table .compact-special-position .sp-row-main{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;align-items:stretch!important}
body.admin-mode .users-pro-table .compact-special-position .sp-badge{align-self:flex-start;height:21px;min-width:70px}
body.admin-mode .users-pro-table .compact-special-position .sp-position select{height:34px;font-size:12.5px}
body.admin-mode .users-pro-table .compact-special-position .sp-details summary{padding:8px 10px;border-radius:0}
body.admin-mode .users-pro-table .compact-special-position .sp-muted{margin-top:0;line-height:1.35}
body.admin-mode .users-pro-table .user-actions{display:flex;flex-direction:column;gap:6px;align-items:stretch}
body.admin-mode .users-pro-table .user-actions button,body.admin-mode .users-pro-table .user-actions .btn{width:100%!important;display:block;text-align:center;height:31px;line-height:20px;margin:0;box-sizing:border-box;border-radius:8px;white-space:nowrap}
body.admin-mode .users-pro-table .account-details{margin-top:8px}
body.admin-mode .users-pro-table .person-meta{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
body.admin-mode .users-pro-table .login-chip,body.admin-mode .users-pro-table .role-chip{display:inline-flex;align-items:center;border:1px solid #dbe3ef;background:#f8fafc;border-radius:999px;padding:2px 7px;font-size:11px;color:#334155}
@media(max-width:1450px){body.admin-mode .summary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}body.admin-mode .teacher-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1050px){body.admin-mode .users-pro-table{min-width:980px!important;table-layout:fixed!important}body.admin-mode .summary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}body.admin-mode .teacher-edit-grid{grid-template-columns:1fr}}

/* 1.3.34.17 — krótkie podpowiedzi i prostszy, kanciasty styl panelu admina */
body.admin-mode .users-pro-panel,
body.admin-mode .users-pro-panel *,
body.admin-mode .users-pro-table,
body.admin-mode .users-pro-table *,
body.admin-mode .teacher-admin-summary,
body.admin-mode .teacher-edit-details,
body.admin-mode .teacher-edit-details summary,
body.admin-mode .teacher-edit-grid .check-row,
body.admin-mode .compact-special-position,
body.admin-mode .sp-details,
body.admin-mode .sp-details summary,
body.admin-mode .account-details,
body.admin-mode .login-chip,
body.admin-mode .role-chip{border-radius:0!important}
body.admin-mode .admin-help{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;margin-left:3px;border:1px solid #94a3b8;background:#f8fafc;color:#334155;font-size:10px;font-weight:800;line-height:1;vertical-align:middle;cursor:help}
body.admin-mode .summary-metrics .admin-help{width:12px;height:12px;font-size:9px;margin-left:2px}
body.admin-mode .teacher-edit-details summary .admin-help,
body.admin-mode .sp-details summary .admin-help{margin-left:5px}
body.admin-mode .admin-help:hover{background:#e0f2fe;border-color:#2563eb;color:#1d4ed8}
body.admin-mode .users-pro-table .summary-metrics b{white-space:nowrap}
body.admin-mode .users-pro-table .teacher-edit-grid label span{display:inline-flex;align-items:center;gap:2px;flex-wrap:wrap}
body.admin-mode .users-pro-table .check-row .admin-help{flex:0 0 auto}


/* 1.3.34.18 — brak znaków zapytania i całkowicie kanciasty panel Użytkownicy */
body.admin-mode .users-pro-panel,
body.admin-mode .users-pro-panel *,
body.admin-mode .users-pro-table,
body.admin-mode .users-pro-table *,
body.admin-mode .teacher-admin-summary,
body.admin-mode .teacher-admin-summary *,
body.admin-mode .teacher-edit-details,
body.admin-mode .teacher-edit-details *,
body.admin-mode .compact-special-position,
body.admin-mode .compact-special-position *,
body.admin-mode .account-details,
body.admin-mode .account-details *,
body.admin-mode .user-actions button,
body.admin-mode .user-actions .btn,
body.admin-mode .login-chip,
body.admin-mode .role-chip {
  border-radius: 0 !important;
}
body.admin-mode .admin-help{display:none!important}
body.admin-mode .summary-metrics b{white-space:normal!important}
body.admin-mode .summary-metrics span{gap:0!important}
body.admin-mode .teacher-edit-details summary,
body.admin-mode .sp-details summary{cursor:pointer}
body.admin-mode .teacher-edit-details summary[title],
body.admin-mode .sp-details summary[title],
body.admin-mode .compact-special-position .sp-badge[title],
body.admin-mode .users-pro-table input[title],
body.admin-mode .users-pro-table select[title]{cursor:help}
body.admin-mode .users-pro-table .teacher-admin-summary,
body.admin-mode .users-pro-table .compact-special-position{
  background:#fff!important;
  box-shadow:none!important;
}
body.admin-mode .users-pro-table .summary-metrics span{
  background:#f8fafc!important;
  border:1px solid #d7dee8!important;
}
body.admin-mode .teacher-edit-details summary,
body.admin-mode .sp-details summary{
  background:#eef4ff!important;
  border:0!important;
}

/* 1.3.34.19 — finalne ostre narożniki w panelu Użytkownicy */
body.admin-mode .users-pro-panel,
body.admin-mode .users-pro-panel *,
body.admin-mode .users-pro-table,
body.admin-mode .users-pro-table *,
body.admin-mode .users-pro-table td,
body.admin-mode .users-pro-table th,
body.admin-mode .users-pro-table input,
body.admin-mode .users-pro-table select,
body.admin-mode .users-pro-table textarea,
body.admin-mode .users-pro-table button,
body.admin-mode .users-pro-table .btn,
body.admin-mode .users-pro-table .person-name-input,
body.admin-mode .users-pro-table .account-details,
body.admin-mode .users-pro-table .login-chip,
body.admin-mode .users-pro-table .role-chip,
body.admin-mode .teacher-admin-summary,
body.admin-mode .teacher-admin-summary *,
body.admin-mode .summary-metrics,
body.admin-mode .summary-metrics *,
body.admin-mode .teacher-edit-details,
body.admin-mode .teacher-edit-details *,
body.admin-mode .teacher-edit-grid,
body.admin-mode .teacher-edit-grid *,
body.admin-mode .compact-special-position,
body.admin-mode .compact-special-position *,
body.admin-mode .special-position-cell,
body.admin-mode .special-position-cell *,
body.admin-mode .sp-details,
body.admin-mode .sp-details *,
body.admin-mode .sp-badge,
body.admin-mode .user-actions,
body.admin-mode .user-actions * {
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
}
body.admin-mode .users-pro-table{
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}
body.admin-mode .users-pro-table td:first-child,
body.admin-mode .users-pro-table td:last-child{
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
}
body.admin-mode .users-pro-table td{
  border-top:1px solid #dbe3ef !important;
  border-bottom:1px solid #dbe3ef !important;
}
body.admin-mode .users-pro-table tr + tr td{
  border-top:0 !important;
}

/* 1.3.34.20 — płaski panel użytkowników: bez kafelków, bez cieni, pełna szerokość */
body.admin-mode .users-pro-panel{
  background:#fff!important;
  padding:12px!important;
  overflow-x:auto!important;
}
body.admin-mode .users-pro-table{
  width:100%!important;
  min-width:1180px!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
  border-spacing:0!important;
  background:#fff!important;
}
body.admin-mode .users-pro-table th{
  background:#eef2f7!important;
  border:1px solid #cbd5e1!important;
  padding:7px 8px!important;
  font-size:11px!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
  color:#0f172a!important;
  text-align:center!important;
}
body.admin-mode .users-pro-table td{
  background:#fff!important;
  border:1px solid #cbd5e1!important;
  padding:10px!important;
  vertical-align:top!important;
}
body.admin-mode .users-pro-table tr + tr td{border-top:1px solid #cbd5e1!important}
body.admin-mode .users-pro-table th:nth-child(1){width:23%!important}
body.admin-mode .users-pro-table th:nth-child(2){width:39%!important}
body.admin-mode .users-pro-table th:nth-child(3){width:24%!important}
body.admin-mode .users-pro-table th:nth-child(4){width:6%!important}
body.admin-mode .users-pro-table th:nth-child(5){width:8%!important}
body.admin-mode .users-pro-table,
body.admin-mode .users-pro-table *,
body.admin-mode .users-pro-panel,
body.admin-mode .users-pro-panel *{
  border-radius:0!important;
  -webkit-border-radius:0!important;
  box-shadow:none!important;
}
body.admin-mode .users-pro-table .person-name-input{
  background:#fff!important;
  border:1px solid #cbd5e1!important;
  height:30px!important;
  padding:4px 7px!important;
  font-weight:700!important;
}
body.admin-mode .users-pro-table .person-meta{margin-top:6px!important;gap:4px!important}
body.admin-mode .users-pro-table .login-chip,
body.admin-mode .users-pro-table .role-chip{
  background:#f8fafc!important;
  border:1px solid #cbd5e1!important;
  padding:2px 6px!important;
  color:#334155!important;
}
body.admin-mode .users-pro-table .account-details{
  border:1px solid #dbe3ef!important;
  background:#fff!important;
  margin-top:8px!important;
}
body.admin-mode .users-pro-table .account-details summary{
  background:#f8fafc!important;
  padding:6px 8px!important;
  color:#0f172a!important;
}
/* Rozliczenie jako płaska tabela zamiast kafelków */
body.admin-mode .teacher-admin-summary{
  border:0!important;
  background:#fff!important;
  padding:0!important;
}
body.admin-mode .summary-metrics{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:0!important;
  margin:0 0 8px 0!important;
  border:1px solid #cbd5e1!important;
  border-right:0!important;
  background:#fff!important;
}
body.admin-mode .summary-metrics span{
  display:block!important;
  min-height:0!important;
  padding:7px 8px!important;
  background:#fff!important;
  border:0!important;
  border-right:1px solid #cbd5e1!important;
  text-align:center!important;
  font-weight:700!important;
  color:#0f172a!important;
}
body.admin-mode .summary-metrics b{
  display:block!important;
  margin:0 0 3px 0!important;
  color:#475569!important;
  font-size:10px!important;
  line-height:1.1!important;
  text-transform:uppercase!important;
  letter-spacing:.04em!important;
}
body.admin-mode .summary-line{
  border-top:1px solid #e2e8f0!important;
  padding:6px 0 0 0!important;
  margin:0 0 8px 0!important;
  color:#334155!important;
  font-size:12px!important;
  line-height:1.35!important;
}
body.admin-mode .teacher-edit-details{
  border:1px solid #cbd5e1!important;
  background:#fff!important;
  margin-top:8px!important;
}
body.admin-mode .teacher-edit-details summary{
  background:#eef4ff!important;
  border:0!important;
  padding:7px 9px!important;
  color:#0f172a!important;
  font-weight:800!important;
}
body.admin-mode .teacher-edit-details summary:after{
  color:#475569!important;
}
body.admin-mode .teacher-edit-grid{
  padding:10px!important;
  gap:8px 10px!important;
}
body.admin-mode .teacher-edit-grid .check-row,
body.admin-mode .teacher-edit-grid p.span2{
  background:#fff!important;
  border:1px solid #cbd5e1!important;
}
/* Stanowisko jako płaski blok, bez wewnętrznych kart */
body.admin-mode .users-pro-table .compact-special-position{
  border:0!important;
  background:#fff!important;
  padding:0!important;
  min-height:0!important;
}
body.admin-mode .users-pro-table .compact-special-position .sp-row-main{
  display:block!important;
}
body.admin-mode .users-pro-table .compact-special-position .sp-position label,
body.admin-mode .users-pro-table .compact-special-position .sp-position-label{
  display:block!important;
  margin-bottom:4px!important;
  color:#334155!important;
  font-weight:700!important;
  font-size:11.5px!important;
}
body.admin-mode .users-pro-table .compact-special-position select{
  width:100%!important;
  height:31px!important;
  border:1px solid #cbd5e1!important;
  background:#fff!important;
}
body.admin-mode .users-pro-table .compact-special-position .sp-badge{
  display:block!important;
  width:100%!important;
  margin:7px 0!important;
  height:auto!important;
  padding:4px 8px!important;
  border:1px solid #86efac!important;
  background:#ecfdf3!important;
  color:#166534!important;
  text-align:center!important;
  font-weight:800!important;
}
body.admin-mode .users-pro-table .compact-special-position .sp-details{
  border:1px solid #cbd5e1!important;
  background:#fff!important;
  margin-top:7px!important;
}
body.admin-mode .users-pro-table .compact-special-position .sp-details summary{
  background:#eef4ff!important;
  color:#0f172a!important;
  padding:7px 9px!important;
  font-weight:800!important;
}
body.admin-mode .users-pro-table .compact-special-position .sp-muted{
  margin-top:7px!important;
  color:#475569!important;
  font-size:11.5px!important;
  text-align:center!important;
}
body.admin-mode .users-pro-table .status-cell{
  text-align:left!important;
  white-space:nowrap!important;
}
body.admin-mode .users-pro-table .actions-cell{padding:8px!important}
body.admin-mode .users-pro-table .user-actions{gap:5px!important}
body.admin-mode .users-pro-table .user-actions button,
body.admin-mode .users-pro-table .user-actions .btn{
  height:29px!important;
  width:100%!important;
  border:0!important;
  font-weight:800!important;
}
@media(max-width:1450px){
  body.admin-mode .summary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.admin-mode .summary-metrics span:nth-child(2n){border-right:0!important}
  body.admin-mode .summary-metrics span:nth-child(n+3){border-top:1px solid #cbd5e1!important}
}


/* 1.3.35.40 — lepsze proporcje i lżejsze opcje w panelu Użytkownicy */
body.admin-mode .users-pro-table th:nth-child(1){width:21%!important}
body.admin-mode .users-pro-table th:nth-child(2){width:45%!important}
body.admin-mode .users-pro-table th:nth-child(3){width:19%!important}
body.admin-mode .users-pro-table th:nth-child(4){width:6%!important}
body.admin-mode .users-pro-table th:nth-child(5){width:9%!important}
body.admin-mode .teacher-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px 12px!important;align-items:start!important}
body.admin-mode .teacher-edit-grid > label{align-self:end}
body.admin-mode .teacher-edit-toggles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px;align-items:center;padding:2px 0 0 0}
body.admin-mode .teacher-edit-toggles .inline-check{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;font-weight:700;color:#334155;line-height:1.3}
body.admin-mode .teacher-edit-toggles .inline-check input{width:15px!important;height:15px!important;flex:0 0 15px;margin:0}
body.admin-mode .teacher-edit-toggles .inline-check span{display:inline;color:#334155}
body.admin-mode .teacher-edit-grid .check-row{background:transparent!important;border:0!important;padding:0!important;min-height:0!important}
body.admin-mode .users-pro-table .compact-special-position .sp-badge{display:inline-block!important;width:auto!important;min-width:0!important}
body.admin-mode .users-pro-table .compact-special-position .sp-muted{text-align:left!important}
body.admin-mode .users-pro-table .special-position-cell{padding-right:8px!important}
body.admin-mode .users-pro-table .status-cell label{display:flex;align-items:center;gap:6px;font-weight:700}
@media(max-width:1450px){
  body.admin-mode .users-pro-table th:nth-child(1){width:22%!important}
  body.admin-mode .users-pro-table th:nth-child(2){width:43%!important}
  body.admin-mode .users-pro-table th:nth-child(3){width:20%!important}
  body.admin-mode .users-pro-table th:nth-child(4){width:6%!important}
  body.admin-mode .users-pro-table th:nth-child(5){width:9%!important}
}
@media(max-width:1200px){
  body.admin-mode .teacher-edit-toggles{grid-template-columns:1fr}
}

/* 1.3.35.42 — sortowanie tabeli Terminy rozliczeń */
.deadline-sort-link{display:inline-flex;align-items:center;justify-content:center;gap:4px;color:#0f172a;text-decoration:none;font-weight:800;width:100%;min-height:24px}
.deadline-sort-link:hover{text-decoration:underline;color:#1d4ed8}
.deadline-sort-link.active{color:#1d4ed8}
.deadline-sort-help{margin:2px 0 8px 0}
.settlement-deadlines-table th{vertical-align:middle;white-space:normal}
.settlement-deadlines-table td{vertical-align:middle}

/* 1.3.35.43 — neutralny wygląd klikalnych nagłówków w terminach rozliczeń */
.settlement-deadlines-table th .deadline-sort-link,
.settlement-deadlines-table th .deadline-sort-link:link,
.settlement-deadlines-table th .deadline-sort-link:visited,
.settlement-deadlines-table th .deadline-sort-link:hover,
.settlement-deadlines-table th .deadline-sort-link:active,
.settlement-deadlines-table th .deadline-sort-link:focus{
  color:#0f172a!important;
  text-decoration:none!important;
  border-bottom:0!important;
}
.settlement-deadlines-table th .deadline-sort-link{
  padding:3px 4px!important;
  cursor:pointer!important;
}
.settlement-deadlines-table th .deadline-sort-link:hover{
  background:#e2e8f0!important;
}
.settlement-deadlines-table th .deadline-sort-link.active{
  background:#dbe3ef!important;
  color:#0f172a!important;
  text-decoration:none!important;
}
.settlement-deadlines-table th .deadline-sort-link:focus-visible{
  outline:2px solid #64748b!important;
  outline-offset:2px!important;
}


/* 1.3.35.44 — mocniejsze usunięcie niebieskich linków sortowania + cache bust */
.admin-table.settlement-deadlines-table th a.deadline-sort-link,
.admin-table.settlement-deadlines-table th a.deadline-sort-link:link,
.admin-table.settlement-deadlines-table th a.deadline-sort-link:visited,
.admin-table.settlement-deadlines-table th a.deadline-sort-link:hover,
.admin-table.settlement-deadlines-table th a.deadline-sort-link:active,
.admin-table.settlement-deadlines-table th a.deadline-sort-link:focus,
body.admin-mode .admin-table.settlement-deadlines-table th a.deadline-sort-link,
body.admin-mode .admin-table.settlement-deadlines-table th a.deadline-sort-link:link,
body.admin-mode .admin-table.settlement-deadlines-table th a.deadline-sort-link:visited,
body.admin-mode .admin-table.settlement-deadlines-table th a.deadline-sort-link:hover,
body.admin-mode .admin-table.settlement-deadlines-table th a.deadline-sort-link:active,
body.admin-mode .admin-table.settlement-deadlines-table th a.deadline-sort-link:focus{
  color:inherit!important;
  text-decoration:none!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
body.admin-mode .admin-table.settlement-deadlines-table th a.deadline-sort-link{
  display:inline-flex!important;
  width:100%!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  padding:3px 4px!important;
  cursor:pointer!important;
  font-weight:800!important;
}
body.admin-mode .admin-table.settlement-deadlines-table th a.deadline-sort-link:hover{
  background:#e2e8f0!important;
  color:inherit!important;
  text-decoration:none!important;
}
body.admin-mode .admin-table.settlement-deadlines-table th a.deadline-sort-link.active{
  background:#dbe3ef!important;
  color:inherit!important;
  text-decoration:none!important;
}

/* 1.3.35.56 — powiadomienia admina */
body.admin-mode .admin-notification-link{display:inline-flex;align-items:center;gap:6px;text-decoration:none!important;color:#0f172a!important;background:#f8fafc;border:1px solid #cbd5e1;padding:5px 8px;font-size:12px;font-weight:800;white-space:nowrap}
body.admin-mode .admin-notification-link:hover{background:#eef2f7;text-decoration:none!important}
body.admin-mode .admin-notification-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;background:#dc2626;color:#fff;font-size:11px;font-weight:900}
body.admin-mode .admin-notifications-table tr.notification-unread td{background:#fff7ed!important}

/* 1.3.35.59 — profesjonalny układ panelu CUW */
body.cuw-mode{background:#f3f6fb;color:#172033}
body.cuw-mode .wrap{max-width:1240px;margin:0 auto;padding:18px 18px 24px}
body.cuw-mode .top{box-shadow:0 1px 0 rgba(15,23,42,.08)}
body.cuw-mode .card{border:1px solid #d8e0ec;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04);padding:22px;margin-bottom:14px}
body.cuw-mode .cuw-dashboard-card{padding:0;overflow:hidden}
body.cuw-mode .cuw-hero{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:24px 26px 18px;border-bottom:1px solid #e2e8f0;background:linear-gradient(180deg,#ffffff,#f8fafc)}
body.cuw-mode .cuw-hero h2{margin:2px 0 8px;font-size:28px;line-height:1.15;color:#111827}
body.cuw-mode .cuw-kicker{text-transform:uppercase;letter-spacing:.08em;font-size:11px;font-weight:900;color:#2563eb}
body.cuw-mode .cuw-hero .muted{max-width:820px;line-height:1.5;color:#475569;margin:0}
body.cuw-mode .cuw-hero-badge{white-space:nowrap;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;font-weight:900;font-size:11px;text-transform:uppercase;letter-spacing:.06em;padding:7px 10px;margin-top:4px}
body.cuw-mode .alert{margin:14px 26px 0;padding:11px 12px;border:1px solid #dbe3ef;font-weight:700}
body.cuw-mode .alert.success{background:#ecfdf3;color:#166534;border-color:#bbf7d0}
body.cuw-mode .alert.error{background:#fef2f2;color:#991b1b;border-color:#fecaca}
body.cuw-mode .cuw-actions-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:18px 26px 4px}
body.cuw-mode .cuw-action-card{border:1px solid #d8e0ec;background:#fff;margin:0;overflow:hidden}
body.cuw-mode .cuw-action-card summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0;color:#111827}
body.cuw-mode .cuw-action-card summary::-webkit-details-marker{display:none}
body.cuw-mode .cuw-action-card summary:after{content:'rozwiń';font-size:11px;font-weight:800;color:#64748b;text-transform:uppercase;letter-spacing:.04em}
body.cuw-mode .cuw-action-card[open] summary:after{content:'zwiń'}
body.cuw-mode .cuw-action-card summary b{display:block;font-size:15px;line-height:1.2}
body.cuw-mode .cuw-action-card summary small{display:block;margin-top:3px;color:#64748b;font-size:12px;font-weight:600}
body.cuw-mode .cuw-form{display:grid;gap:12px;padding:16px;background:#fff}
body.cuw-mode .cuw-message-form{grid-template-columns:minmax(220px,.9fr) minmax(360px,1.6fr) auto;align-items:end}
body.cuw-mode .cuw-template-form{grid-template-columns:150px 120px 260px minmax(260px,1fr) auto;align-items:end}
body.cuw-mode .cuw-form input[type="hidden"]{display:none!important}
body.cuw-mode .cuw-form label{display:flex;flex-direction:column;gap:6px;margin:0;font-size:12px;font-weight:800;color:#334155}
body.cuw-mode .cuw-form input,
body.cuw-mode .cuw-form select,
body.cuw-mode .cuw-form textarea{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;background:#fff;color:#0f172a;min-height:36px;padding:7px 9px;font:inherit;font-size:13px;font-weight:500}
body.cuw-mode .cuw-form textarea{min-height:82px;resize:vertical;line-height:1.35}
body.cuw-mode .cuw-form input[type="file"]{padding:6px;background:#f8fafc}
body.cuw-mode .cuw-form-action{display:flex;align-items:flex-end;justify-content:flex-start}
body.cuw-mode button,
body.cuw-mode .btn{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 12px;border:1px solid #1d4ed8;background:#2563eb;color:#fff!important;text-decoration:none!important;font-weight:900;font-size:13px;line-height:1.2;cursor:pointer;white-space:nowrap}
body.cuw-mode button:hover,
body.cuw-mode .btn:hover{background:#1d4ed8;text-decoration:none!important}
body.cuw-mode .btn2{background:#f8fafc!important;color:#0f172a!important;border-color:#cbd5e1!important}
body.cuw-mode .btn2:hover{background:#eef2f7!important}
body.cuw-mode .cuw-note{padding:0 16px 14px;margin:0;color:#64748b;line-height:1.4}
body.cuw-mode .cuw-section-title{padding:16px 26px 8px}
body.cuw-mode .cuw-section-title h3{margin:0 0 4px;font-size:18px;color:#111827}
body.cuw-mode .cuw-section-title .muted{margin:0;color:#64748b}
body.cuw-mode .cuw-table-scroll{margin:0 26px 24px;border:1px solid #d8e0ec;background:#fff;overflow:auto}
body.cuw-mode table.cuw-files-table{width:100%;border-collapse:collapse;margin:0;background:#fff}
body.cuw-mode table.cuw-files-table th{background:#f1f5f9;color:#0f172a;border:1px solid #d8e0ec;padding:9px 10px;text-transform:uppercase;font-size:11px;letter-spacing:.04em;text-align:center}
body.cuw-mode table.cuw-files-table td{border:1px solid #e2e8f0;padding:10px;text-align:center;vertical-align:middle;font-size:13px}
body.cuw-mode table.cuw-files-table td.left{text-align:left}
body.cuw-mode table.cuw-files-table tr:nth-child(even) td{background:#fbfdff}
body.cuw-mode h3{color:#111827}
body.cuw-mode .badge{display:inline-flex;align-items:center;justify-content:center;padding:3px 7px;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.03em;border:1px solid #cbd5e1;background:#f8fafc;color:#334155}
body.cuw-mode .badge.ok{border-color:#bbf7d0;background:#ecfdf3;color:#166534}
body.cuw-mode .badge.warn{border-color:#fed7aa;background:#fff7ed;color:#9a3412}
body.cuw-mode .badge.bad{border-color:#fecaca;background:#fef2f2;color:#991b1b}
body.cuw-mode details:focus,
body.cuw-mode summary:focus{outline:0}
body.cuw-mode summary:focus-visible{outline:2px solid #93c5fd;outline-offset:2px}
@media(max-width:1100px){
  body.cuw-mode .cuw-actions-grid{grid-template-columns:1fr}
  body.cuw-mode .cuw-message-form,
  body.cuw-mode .cuw-template-form{grid-template-columns:1fr}
  body.cuw-mode .cuw-form-action{justify-content:flex-start}
}
@media(max-width:720px){
  body.cuw-mode .wrap{padding:12px}
  body.cuw-mode .cuw-hero{flex-direction:column;padding:18px}
  body.cuw-mode .cuw-actions-grid{padding:14px 18px 4px}
  body.cuw-mode .cuw-section-title{padding:14px 18px 8px}
  body.cuw-mode .cuw-table-scroll{margin:0 18px 18px}
  body.cuw-mode .cuw-hero h2{font-size:23px}
}


/* 1.3.35.60 — CUW portal micro-layout cleanup */
body.cuw-mode .cuw-message-form{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:
  "subject action"
  "message action";align-items:end}
body.cuw-mode .cuw-message-form .cuw-field-subject{grid-area:subject}
body.cuw-mode .cuw-message-form .cuw-field-message{grid-area:message}
body.cuw-mode .cuw-message-form .cuw-form-action{grid-area:action;align-self:end;justify-content:flex-end}
body.cuw-mode table.cuw-files-table{table-layout:fixed}
body.cuw-mode table.cuw-files-table th:nth-child(1), body.cuw-mode table.cuw-files-table td:nth-child(1){width:12%}
body.cuw-mode table.cuw-files-table th:nth-child(2), body.cuw-mode table.cuw-files-table td:nth-child(2){width:34%}
body.cuw-mode table.cuw-files-table th:nth-child(3), body.cuw-mode table.cuw-files-table td:nth-child(3){width:22%}
body.cuw-mode table.cuw-files-table th:nth-child(4), body.cuw-mode table.cuw-files-table td:nth-child(4){width:10%}
body.cuw-mode table.cuw-files-table th:nth-child(5), body.cuw-mode table.cuw-files-table td:nth-child(5){width:22%}
body.cuw-mode table.cuw-files-table td:nth-child(2){overflow-wrap:anywhere;word-break:break-word}
body.cuw-mode table.cuw-files-table td:nth-child(5) .btn{width:100%;max-width:160px}
@media(max-width:900px){
  body.cuw-mode .cuw-message-form{grid-template-columns:1fr;grid-template-areas:
    "subject"
    "message"
    "action"}
  body.cuw-mode .cuw-message-form .cuw-form-action{justify-content:flex-start}
}


/* 1.3.35.61 — CUW portal instruction and account administration */
body.cuw-mode .cuw-help-card{margin:14px 26px 0;border:1px solid #d8e0ec;background:#fff}
body.cuw-mode .cuw-help-card summary{cursor:pointer;list-style:none;padding:12px 14px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-weight:900;color:#0f172a}
body.cuw-mode .cuw-help-card summary::-webkit-details-marker{display:none}
body.cuw-mode .cuw-help-card summary:after{content:'rozwiń';float:right;font-size:11px;font-weight:900;color:#64748b;text-transform:uppercase;letter-spacing:.04em}
body.cuw-mode .cuw-help-card[open] summary:after{content:'zwiń'}
body.cuw-mode .cuw-help-card div{padding:12px 16px;color:#334155;line-height:1.5}
body.cuw-mode .cuw-help-card ol{margin:0 0 0 18px;padding:0}
body.cuw-mode .cuw-help-card li{margin:5px 0}
body.admin-mode .cuw-admin-users-table td{vertical-align:top}
body.admin-mode .cuw-account-actions{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
body.admin-mode .cuw-account-actions .inline-form{display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin:0}
body.admin-mode .cuw-account-actions input[type="password"]{height:29px;max-width:170px;padding:4px 7px;border:1px solid #cbd5e1}
body.admin-mode .cuw-account-actions button{min-height:28px;padding:5px 9px;font-size:12px}
body.admin-mode .cuw-admin-users-card .badge{white-space:nowrap}


/* 1.3.35.62 — konta CUW przeniesione do panelu superadmina */
body.admin-mode .cuw-admin-users-card h2{margin-top:0}
body.admin-mode .cuw-admin-users-card .notice code{font-size:14px;font-weight:800}


/* 1.3.35.63 — widoczna informacja po cofnięciu rozliczenia do poprawy */
.teacher-return-alert{border:1px solid #f3c37a;background:#fff8ed;border-left:5px solid #d98d1f;padding:14px 16px;margin:0 0 14px 0}
.teacher-return-alert h3{margin:0 0 6px;color:#7c3f00}
.teacher-return-alert p{margin:0 0 10px;line-height:1.45}
.teacher-return-alert-list{display:grid;gap:8px}
.teacher-return-alert-item{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid #f4d8ad;padding:10px 12px}
.teacher-return-alert-item.active{background:#fff3dc}
.teacher-return-current{border-left:5px solid #d98d1f!important;background:#fff8ed!important;border-color:#f3c37a!important}
@media(max-width:700px){.teacher-return-alert-item{align-items:flex-start;flex-direction:column}.teacher-return-alert-item .btn{width:100%;box-sizing:border-box}}

/* 1.3.35.64 — teacher return notice read button + CUW portal cleanup */
.teacher-return-alert-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.teacher-return-read-form{display:inline-flex;margin:0}
.teacher-return-current .btn2{margin-top:4px}
body.cuw-mode .cuw-instruction-card ol{margin-top:6px;padding-left:22px;line-height:1.55}
body.cuw-mode .cuw-instruction-card h3{margin:16px 0 6px}
body.cuw-mode .nav a{font-weight:700}
body.admin-mode .cuw-preview-note{border-left:4px solid #2563eb;background:#eff6ff;padding:10px 12px}
@media(max-width:700px){.teacher-return-alert-actions{width:100%;justify-content:stretch}.teacher-return-alert-actions .btn,.teacher-return-alert-actions button{width:100%}.teacher-return-read-form{width:100%;display:block}}


/* 1.3.35.71 — professional login page */
body.guest-mode{min-height:100vh;background:#eef1f5;color:#1f2937}
body.guest-mode .top{min-height:58px;background:#ffffff;border-bottom:1px solid #d8dee8;box-shadow:none;padding:0 24px}
body.guest-mode .top-row{min-height:58px}
body.guest-mode .brand{color:#1f2937;font-size:14px;font-weight:700;letter-spacing:.01em}
body.guest-mode .teacher-app-short{display:none}
body.guest-mode .teacher-app-long{display:inline}
body.guest-mode .menu-toggle,body.guest-mode .nav{display:none!important}
body.guest-mode .wrap{max-width:1180px;min-height:calc(100vh - 129px);margin:0 auto;padding:56px 24px 32px;display:flex;align-items:flex-start;justify-content:center;box-sizing:border-box}
body.guest-mode .login-shell{width:100%;max-width:460px;margin:0 auto}
body.guest-mode .login-card{background:#fff;border:1px solid #cfd6df;border-top:4px solid #1d4f7a;padding:30px 32px 28px;box-shadow:0 8px 28px rgba(15,23,42,.08);box-sizing:border-box}
body.guest-mode .login-school{display:flex;align-items:center;gap:14px;padding-bottom:22px;border-bottom:1px solid #e1e6ec}
body.guest-mode .login-school-code{display:flex;align-items:center;justify-content:center;flex:0 0 58px;height:42px;border:1px solid #1d4f7a;color:#1d4f7a;background:#fff;font-size:15px;font-weight:800;letter-spacing:.08em}
body.guest-mode .login-school-name{display:flex;flex-direction:column;gap:2px;min-width:0;color:#263445;line-height:1.25}
body.guest-mode .login-school-name strong{font-size:13px;font-weight:700}
body.guest-mode .login-school-name span{font-size:12px;color:#667085}
body.guest-mode .login-heading{padding:24px 0 20px}
body.guest-mode .login-heading h1{margin:0;color:#162232;font-size:24px;line-height:1.25;font-weight:700;letter-spacing:-.015em}
body.guest-mode .login-heading p{margin:8px 0 0;color:#667085;font-size:14px;line-height:1.45}
body.guest-mode .login-alert{display:flex;flex-direction:column;gap:3px;margin:0 0 18px;padding:11px 12px;border:1px solid #e1b6b6;border-left:3px solid #a43d3d;background:#fff8f8;color:#7f1d1d;font-size:13px;line-height:1.4}
body.guest-mode .login-alert strong{font-size:13px}
body.guest-mode .login-alert span{color:#8b3434}
body.guest-mode .login-form{display:grid;grid-template-columns:1fr;gap:0}
body.guest-mode .login-form label{display:block;margin:0 0 6px;color:#344054;font-size:13px;font-weight:700}
body.guest-mode .login-form input{width:100%;height:44px;min-height:44px;margin:0 0 17px;padding:9px 11px;border:1px solid #b9c3cf;border-radius:2px;background:#fff;color:#111827;font-size:15px;line-height:1.2;box-shadow:none;box-sizing:border-box;outline:none}
body.guest-mode .login-form input:focus{border-color:#1d4f7a;box-shadow:0 0 0 2px rgba(29,79,122,.12)}
body.guest-mode .login-form input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fff inset;-webkit-text-fill-color:#111827}
body.guest-mode .login-submit{width:100%;height:44px;min-height:44px;margin:3px 0 0;padding:9px 16px;border:1px solid #173f63;border-radius:2px;background:#1d4f7a;color:#fff;font-size:14px;font-weight:700;letter-spacing:.01em;cursor:pointer;box-shadow:none}
body.guest-mode .login-submit:hover{background:#173f63}
body.guest-mode .login-submit:focus-visible{outline:2px solid #7fa7c7;outline-offset:2px}
body.guest-mode .login-support{margin-top:22px;padding-top:17px;border-top:1px solid #e1e6ec;color:#667085;font-size:12px;line-height:1.45}
body.guest-mode .login-support p{margin:0 0 4px}
body.guest-mode .site-footer{width:100%;max-width:none;margin:0;padding:13px 20px 15px;border-top:1px solid #d8dee8;background:#eef1f5;color:#778191;font-size:11px;box-sizing:border-box}
@media(max-width:900px){
  body.guest-mode .top{padding:0 18px}
  body.guest-mode .top-row{min-height:56px}
  body.guest-mode .wrap{min-height:calc(100vh - 127px);padding:36px 18px 26px}
  body.guest-mode .teacher-app-long{display:inline}
}
@media(max-width:520px){
  body.guest-mode .top{padding:0 14px}
  body.guest-mode .brand{font-size:12.5px;line-height:1.25}
  body.guest-mode .wrap{padding:24px 12px 22px}
  body.guest-mode .login-card{padding:24px 20px 22px}
  body.guest-mode .login-school{gap:11px;padding-bottom:18px}
  body.guest-mode .login-school-code{flex-basis:52px;height:38px;font-size:13px}
  body.guest-mode .login-school-name strong{font-size:12px}
  body.guest-mode .login-heading{padding:20px 0 18px}
  body.guest-mode .login-heading h1{font-size:21px}
  body.guest-mode .login-form input{font-size:16px}
}


/* 1.3.35.73 — login footer with discreet logo */
body.guest-mode .login-meta{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-top:18px;padding-top:14px;border-top:1px solid #edf1f5}
body.guest-mode .login-meta-text{font-size:11px;line-height:1.35;color:#8a94a6;letter-spacing:.01em;max-width:260px}
body.guest-mode .login-meta-logo{flex:0 0 auto;display:flex;align-items:center;justify-content:flex-end}
body.guest-mode .login-meta-logo img{display:block;width:54px;height:54px;object-fit:contain;opacity:.7;filter:saturate(.96)}
@media(max-width:640px){
  body.guest-mode .login-meta{align-items:center;gap:10px;margin-top:16px;padding-top:12px}
  body.guest-mode .login-meta-text{font-size:10.5px;max-width:210px}
  body.guest-mode .login-meta-logo img{width:46px;height:46px}
}


/* 1.3.35.74 — login header logo and single footer text */
body.guest-mode .login-school-logo{display:flex;align-items:center;justify-content:center;flex:0 0 58px;height:58px}
body.guest-mode .login-school-logo img{display:block;width:58px;height:58px;object-fit:contain;opacity:.92}
body.guest-mode .login-meta{justify-content:flex-start}
body.guest-mode .login-meta-text{max-width:none}
body.guest-mode .login-meta-logo{display:none !important}
@media(max-width:640px){
  body.guest-mode .login-school-logo{flex-basis:50px;height:50px}
  body.guest-mode .login-school-logo img{width:50px;height:50px}
}


/* 1.3.35.75 — hard limit login logo dimensions + cache fix */
body.guest-mode .login-school-logo{width:58px;max-width:58px;min-width:58px;overflow:hidden}
body.guest-mode .login-school-logo img{width:58px!important;height:58px!important;max-width:58px!important;max-height:58px!important;min-width:0!important;object-fit:contain!important}
@media(max-width:640px){
  body.guest-mode .login-school-logo{width:50px;max-width:50px;min-width:50px}
  body.guest-mode .login-school-logo img{width:50px!important;height:50px!important;max-width:50px!important;max-height:50px!important}
}

/* 1.3.35.78 — czytelność panelu Użytkownicy / Nauczyciele
   Wyłącznie warstwa prezentacji: bez zmian formularzy POST, bazy i obliczeń. */
body.admin-mode .teachers-panel-card{
  padding:14px!important;
}
body.admin-mode .teachers-panel-card h2{
  margin:0 0 12px!important;
  font-size:18px!important;
  line-height:1.25!important;
}
body.admin-mode .notice{
  line-height:1.45!important;
  padding:10px 12px!important;
  overflow-wrap:anywhere;
}

/* Formularz dodawania: koniec z bardzo wąskimi polami i etykietami nachodzącymi na kontrolki. */
body.admin-mode .teachers-add-form{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px 12px!important;
  align-items:end!important;
}
body.admin-mode .teachers-add-form > input:not([type="hidden"]),
body.admin-mode .teachers-add-form > select,
body.admin-mode .teachers-add-form > button,
body.admin-mode .teachers-add-form > label{
  min-width:0!important;
  width:100%!important;
  box-sizing:border-box!important;
}
body.admin-mode .teachers-add-form input:not([type="checkbox"]),
body.admin-mode .teachers-add-form select,
body.admin-mode .teachers-add-form button{
  height:36px!important;
  min-height:36px!important;
  padding:6px 8px!important;
  font-size:12.5px!important;
  line-height:1.25!important;
}
body.admin-mode .teachers-add-form > label{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-end!important;
  gap:5px!important;
  height:auto!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#334155!important;
  font-size:11.5px!important;
  font-weight:700!important;
  line-height:1.25!important;
  white-space:normal!important;
}
body.admin-mode .teachers-add-form > label > br{display:none!important}
body.admin-mode .teachers-add-form > label > select{width:100%!important}
body.admin-mode .teachers-add-form > label:has(> input[type="checkbox"]){
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  min-height:36px!important;
  padding:7px 9px!important;
  border:1px solid #d7dee8!important;
  background:#f8fafc!important;
  font-weight:700!important;
}
body.admin-mode .teachers-add-form input[type="checkbox"]{
  width:16px!important;
  height:16px!important;
  flex:0 0 16px!important;
  margin:0!important;
}
body.admin-mode .teachers-add-form small[data-overtime-preview]{
  display:block!important;
  min-height:18px!important;
  line-height:1.35!important;
  overflow-wrap:anywhere!important;
}
body.admin-mode .teachers-panel-card > p.tight{
  margin:10px 0 0!important;
  line-height:1.45!important;
  overflow-wrap:anywhere!important;
}

/* Filtry: w trybie superadmin jest pięć elementów; wcześniej piąty wpadał do nowego wiersza. */
body.admin-mode .teachers-search-form{
  display:grid!important;
  grid-template-columns:minmax(280px,1fr) minmax(150px,180px) minmax(125px,150px) 90px 90px!important;
  gap:8px!important;
  align-items:stretch!important;
  margin-bottom:8px!important;
}
body.admin-mode .teachers-search-form input,
body.admin-mode .teachers-search-form select,
body.admin-mode .teachers-search-form button,
body.admin-mode .teachers-search-form .btn{
  width:100%!important;
  min-width:0!important;
  height:34px!important;
  min-height:34px!important;
  box-sizing:border-box!important;
  margin:0!important;
}
body.admin-mode .teachers-search-form .btn{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1.1!important;
}

/* Lista użytkowników: jeśli miejsca brakuje, przewijamy tabelę zamiast ściskać tekst. */
body.admin-mode .users-pro-panel{
  overflow-x:auto!important;
}
body.admin-mode .users-pro-table{
  min-width:1220px!important;
  table-layout:fixed!important;
}
body.admin-mode .users-pro-table th:nth-child(1){width:20%!important}
body.admin-mode .users-pro-table th:nth-child(2){width:42%!important}
body.admin-mode .users-pro-table th:nth-child(3){width:19%!important}
body.admin-mode .users-pro-table th:nth-child(4){width:8%!important}
body.admin-mode .users-pro-table th:nth-child(5){width:11%!important}
body.admin-mode .users-pro-table th,
body.admin-mode .users-pro-table td{
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
body.admin-mode .users-pro-table td{
  overflow:visible!important;
}
body.admin-mode .users-pro-table .status-cell{
  white-space:normal!important;
  text-align:left!important;
}
body.admin-mode .users-pro-table .status-cell label{
  align-items:flex-start!important;
  line-height:1.3!important;
}
body.admin-mode .users-pro-table .actions-cell{
  min-width:128px!important;
  padding:8px!important;
}
body.admin-mode .users-pro-table .user-actions button,
body.admin-mode .users-pro-table .user-actions .btn{
  min-height:31px!important;
  height:auto!important;
  padding:6px 7px!important;
  line-height:1.2!important;
  white-space:normal!important;
}

/* Parametry rozliczenia: etykieta ma własny wiersz, a dłuższy tekst może się łamać. */
body.admin-mode .teacher-edit-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:11px 14px!important;
  align-items:start!important;
}
body.admin-mode .teacher-edit-grid > label{
  min-width:0!important;
  align-self:stretch!important;
  justify-content:flex-end!important;
  line-height:1.3!important;
}
body.admin-mode .teacher-edit-grid > label > span{
  display:block!important;
  min-height:30px!important;
  margin-bottom:4px!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
body.admin-mode .teacher-edit-grid input,
body.admin-mode .teacher-edit-grid select{
  height:34px!important;
  min-height:34px!important;
  font-size:12px!important;
}
body.admin-mode .teacher-edit-toggles{
  gap:8px 16px!important;
  padding:4px 0!important;
}
body.admin-mode .teacher-edit-toggles .inline-check{
  min-width:0!important;
  align-items:flex-start!important;
  white-space:normal!important;
}
body.admin-mode .teacher-edit-grid p.span2{
  line-height:1.45!important;
  overflow-wrap:anywhere!important;
}
body.admin-mode .summary-metrics span{
  overflow-wrap:anywhere!important;
}
body.admin-mode .summary-line{
  overflow-wrap:anywhere!important;
}

@media(max-width:1450px){
  body.admin-mode .teachers-add-form{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.admin-mode .teachers-search-form{grid-template-columns:minmax(240px,1fr) 160px 135px 82px 82px!important}
  body.admin-mode .users-pro-table{min-width:1180px!important}
}
@media(max-width:1180px){
  body.admin-mode .teachers-add-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.admin-mode .teachers-search-form{grid-template-columns:minmax(220px,1fr) 150px 130px!important}
  body.admin-mode .teachers-search-form button,
  body.admin-mode .teachers-search-form .btn{width:100%!important}
}
@media(max-width:760px){
  body.admin-mode .teachers-add-form{grid-template-columns:1fr!important}
  body.admin-mode .teachers-search-form{grid-template-columns:1fr!important}
  body.admin-mode .teacher-edit-grid{grid-template-columns:1fr!important}
  body.admin-mode .teacher-edit-grid > label > span{min-height:0!important}
}
