@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root{--ink:#152e3b;--muted:#66808d;--line:#e0e9ec;--teal:#087e82;--mint:#dff4ee;--paper:#f4f8f8;--white:#fff;--orange:#c36c20;--red:#bb4c47;--shadow:0 12px 36px #153c5010}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--paper);font:15px 'DM Sans',sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}.loading{padding:60px;text-align:center}.auth{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;background:white}.hero{padding:9vh 9vw;background:linear-gradient(145deg,#103845,#087e82);color:white;display:flex;flex-direction:column;justify-content:space-between}.brand{font:800 23px Manrope}.hero h1{font:800 clamp(36px,5vw,62px)/1.06 Manrope;max-width:560px}.hero p{color:#d1e9e7;max-width:500px;line-height:1.7}.auth-side{display:grid;place-items:center;padding:32px}.auth-card{width:min(410px,100%)}h1,h2,h3{font-family:Manrope}.auth-card h2{font-size:30px;margin-bottom:4px}.muted,.hint{color:var(--muted)}.auth-card label,.field{display:block;margin:18px 0;font-weight:600}.auth-card input,.field input,.field select,.field textarea,.toolbar select,.toolbar input{display:block;width:100%;margin-top:7px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink)}input:focus,select:focus,textarea:focus{outline:3px solid #bfe9df;border-color:var(--teal)}.btn{border:0;border-radius:10px;padding:11px 16px;background:var(--teal);color:#fff;font-weight:700}.btn:hover{filter:brightness(.94)}.btn.secondary{color:var(--teal);background:#e4f4f0}.btn.ghost{background:#fff;color:var(--ink);border:1px solid var(--line)}.btn.danger{background:#fff0ee;color:var(--red)}.full{width:100%}.link{border:0;background:none;color:var(--teal);font-weight:700;padding:10px 0}.demo{margin-top:24px;padding:14px;background:var(--paper);border-radius:10px;color:var(--muted);font-size:13px;line-height:1.7}.shell{min-height:100vh;display:grid;grid-template-columns:250px 1fr}.sidebar{background:#fff;border-right:1px solid var(--line);padding:26px 18px;display:flex;flex-direction:column}.sidebar .brand{padding:6px 12px 30px}.nav button{width:100%;border:0;background:none;text-align:left;padding:12px;border-radius:9px;color:var(--muted);font-weight:600;margin:3px 0}.nav button.active,.nav button:hover{background:var(--mint);color:var(--teal)}.side-bottom{margin-top:auto;border-top:1px solid var(--line);padding:18px 10px 0}.side-bottom b{display:block}.main{padding:28px clamp(18px,4vw,56px);max-width:1500px;width:100%;margin:auto}.top{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:28px}.top h1{font-size:28px;margin:0}.top p{margin:5px 0;color:var(--muted)}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}.stat,.panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;box-shadow:var(--shadow)}.stat span{color:var(--muted);font-size:13px}.stat strong{display:block;font:700 28px Manrope;margin-top:9px}.toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}.toolbar input{max-width:320px;margin:0}.toolbar select{width:auto;margin:0}.table-wrap{overflow:auto}.tickets{width:100%;border-collapse:collapse;min-width:730px}.tickets th,.tickets td{text-align:left;padding:14px 12px;border-bottom:1px solid var(--line)}.tickets th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}.tickets tr[data-id]{cursor:pointer}.tickets tr[data-id]:hover{background:#f8fbfa}.subject{font-weight:700}.subline{font-size:12px;color:var(--muted);margin-top:4px}.badge{display:inline-flex;padding:5px 9px;border-radius:20px;background:#edf2f4;color:#536b76;font-size:12px;font-weight:700}.badge.critical,.badge.overdue{background:#ffebe8;color:var(--red)}.badge.high{background:#fff1df;color:var(--orange)}.badge.ok{background:var(--mint);color:#287462}.empty{text-align:center;padding:52px;color:var(--muted)}.modal-bg{position:fixed;inset:0;background:#0c2938aa;display:grid;place-items:center;padding:20px;z-index:3}.modal{background:white;border-radius:16px;padding:26px;width:min(740px,100%);max-height:92vh;overflow:auto;box-shadow:0 30px 80px #102a3850}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.modal-head h2{margin:0}.close{border:0;background:#eff4f5;border-radius:50%;width:36px;height:36px;font-size:20px}.field textarea{min-height:118px;resize:vertical}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.comments{display:grid;gap:10px;margin:18px 0}.comment{background:#f4f8f8;padding:12px 14px;border-radius:10px;line-height:1.5}.comment time{font-size:12px;color:var(--muted)}.timeline{border-left:2px solid var(--line);padding:2px 0 2px 14px;color:var(--muted);font-size:13px}.timeline p{margin:8px 0}.toast{position:fixed;right:22px;bottom:22px;background:#173b48;color:#fff;padding:14px 18px;border-radius:10px;z-index:5;box-shadow:var(--shadow)}.sla{font-size:12px;color:var(--muted)}.detail-cols{display:grid;grid-template-columns:1.4fr .8fr;gap:18px}.file{font-size:13px;color:var(--teal)}@media(max-width:880px){.shell{grid-template-columns:1fr}.sidebar{position:sticky;top:0;z-index:2;padding:12px 16px;flex-direction:row;align-items:center;border-right:0;border-bottom:1px solid var(--line)}.sidebar .brand{padding:0 14px 0 0}.nav{display:flex;flex:1}.nav button{width:auto;margin:0 3px;padding:9px}.side-bottom{border:0;padding:0;margin:0}.side-bottom .user-mini{display:none}.cards{grid-template-columns:repeat(2,1fr)}}@media(max-width:620px){.auth{grid-template-columns:1fr}.hero{display:none}.auth-side{min-height:100vh}.main{padding:22px 14px}.top{align-items:flex-start}.top h1{font-size:23px}.cards{gap:8px}.stat{padding:14px}.stat strong{font-size:23px}.toolbar{flex-wrap:wrap}.toolbar input{max-width:none;flex:1}.form-grid,.detail-cols{grid-template-columns:1fr}.side-bottom{display:none}.nav button{font-size:13px}}

.hero .company-name{display:block;font-size:.45em;line-height:1.4;margin-top:24px;font-family:system-ui,sans-serif;font-weight:500}

.accounts-menu-heading{display:flex;align-items:center}.accounts-menu-heading>[data-page]{flex:1;min-width:0}.nav #toggleAccounts{width:36px;flex:none;text-align:center}.accounts-submenu{padding-left:28px}.accounts-submenu[hidden]{display:none}.accounts-menu{min-width:170px}
.project-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.membership{border:1px solid var(--line);border-radius:10px;padding:16px;margin:18px 0;max-height:240px;overflow:auto}.membership legend{font-weight:700}.membership label{display:block;padding:7px 0}.notification-card{padding:18px;border-radius:12px;background:var(--paper);margin:18px 0}

.member-dropdown{margin:18px 0;border:1px solid var(--line);border-radius:10px;background:#fff}.member-dropdown summary{padding:13px 16px;cursor:pointer;list-style:none;position:relative;padding-right:38px}.member-dropdown summary::-webkit-details-marker{display:none}.member-dropdown summary::after{content:'▾';position:absolute;right:16px;top:16px;color:var(--teal)}.member-dropdown[open] summary::after{content:'▴'}.member-dropdown summary:focus-visible{outline:3px solid #bfe9df;border-radius:10px}.member-label{display:block;font-weight:700}.member-selection{display:block;font-size:13px;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}.member-options{border-top:1px solid var(--line);max-height:230px;overflow:auto;padding:8px}.member-options label{display:flex;align-items:center;gap:10px;padding:10px 8px;cursor:pointer;border-radius:6px}.member-options label:hover{background:var(--mint)}.member-options input{accent-color:var(--teal);width:17px;height:17px;flex:none}.member-options small{display:block}

.ticket-project-dropdown{border:1px solid var(--line);border-radius:10px;background:#fff}.ticket-project-dropdown summary{padding:12px 14px;cursor:pointer;list-style:none;position:relative;padding-right:38px;font-weight:500}.ticket-project-dropdown summary::-webkit-details-marker{display:none}.ticket-project-dropdown summary::after{content:'▾';position:absolute;right:14px;top:12px;color:var(--teal)}.ticket-project-dropdown[open] summary::after{content:'▴'}.ticket-project-dropdown summary:focus-visible{outline:3px solid #bfe9df;border-radius:10px}.project-choice-list{border-top:1px solid var(--line);max-height:180px;overflow:auto;padding:8px}.project-choice-list label{display:flex;align-items:center;gap:10px;padding:10px 8px;cursor:pointer;border-radius:6px;font-weight:400}.project-choice-list label:hover{background:var(--mint)}.project-choice-list input{accent-color:var(--teal);width:17px;height:17px;flex:none}.field-label{display:block;margin-bottom:7px}

.project-cards{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}.project-cards .panel{padding:10px}.project-cards .panel h2{font-size:16px;margin:0 0 7px}.project-cards .panel p{font-size:12px;line-height:1.35;margin:7px 0}.project-cards .badge{font-size:10px;padding:4px 7px}.project-cards .btn{font-size:12px;padding:7px 10px}.project-cards .empty{padding:20px}
:root{--ink:#17253d;--muted:#64748b;--line:#e1e8f0;--teal:#2563eb;--mint:#eaf2ff;--paper:#f4f7fb;--white:#fff;--orange:#b45309;--red:#c2413b;--shadow:0 3px 14px #0f172a0a}
body{font:14px Inter,'Segoe UI',Arial,sans-serif;color:var(--ink);background:var(--paper)}
h1,h2,h3,.brand{font-family:Inter,'Segoe UI',Arial,sans-serif;letter-spacing:-.025em}
h1,h2,h3{color:#17253d}
.brand{font-weight:750}
.auth{background:#fff}.hero{background:linear-gradient(145deg,#14233b,#1d4ed8)}
.sidebar{background:#111c31;color:#f8fafc;border-color:#29364d}.sidebar .brand{color:#fff}.nav button{color:#aab7cb}.nav button.active,.nav button:hover{background:#1d3c70;color:#fff}.nav button.active{box-shadow:inset 3px 0 #60a5fa}.side-bottom{border-color:#29364d}.side-bottom .muted{color:#aab7cb}.side-bottom .link{color:#93c5fd}
.main{max-width:1680px;padding:26px clamp(18px,3vw,44px)}
.top{margin-bottom:22px}.top h1{font-size:27px;font-weight:700}.top p{font-size:13px}
.stat,.panel{border-color:#e3e9f1;border-radius:12px;box-shadow:0 2px 10px #0f172a08}.stat{padding:16px}.stat strong{font:700 26px Inter,'Segoe UI',Arial,sans-serif}
.btn{background:#2563eb;border-radius:8px;font-weight:650}.btn.secondary{background:#eff6ff;color:#1d4ed8}.btn.ghost{border-radius:8px}
.field,.auth-card label{font-weight:600;color:#334155}.field{margin:14px 0}.field input,.field select,.field textarea,.auth-card input,.toolbar input,.toolbar select{border-color:#d7e0eb;border-radius:8px;padding:10px 12px;min-height:42px;color:#17253d}.field textarea{min-height:112px}.form-grid{align-items:start;gap:0 18px}
.sla-settings[hidden]{display:none}
.sla-targets{margin:12px 0;padding:12px;border:1px solid #cfe3ee;border-radius:10px;background:#f2f8fc;color:#26455a;line-height:1.6}.operator-sla-clock{padding:10px 12px;border-left:3px solid var(--teal);background:#f1f8f7;border-radius:6px;line-height:1.6}.sla-countdown{font-variant-numeric:tabular-nums;font-weight:700;color:var(--teal);white-space:nowrap}.sla-countdown.sla-clock-overdue{color:var(--red)}
.mail-error{padding:10px;background:#fff0ee;border-radius:8px;color:var(--red);overflow-wrap:anywhere}
input:focus,select:focus,textarea:focus{outline:3px solid #dbeafe;border-color:#3b82f6}
.toolbar{justify-content:flex-start;gap:10px}.toolbar input{max-width:360px}.toolbar select{min-width:150px}
.table-wrap{border-radius:12px}.tickets{min-width:850px}.tickets th,.tickets td{padding:11px 12px;border-bottom:1px solid #edf1f6;vertical-align:middle}.tickets th{position:sticky;top:0;z-index:1;background:#f8fafc;color:#52627a;font-size:11px;letter-spacing:.035em}.tickets tbody tr:nth-child(even){background:#fbfcfe}.tickets tbody tr[data-id]:hover{background:#edf4ff}.tickets td:first-child{min-width:220px}.tickets td:nth-child(2){min-width:130px}.subject{font-size:13px;font-weight:650}.subline{font-size:11px}.badge{border-radius:7px;background:#eef2f7;color:#475569;font-size:11px;padding:5px 8px}.badge.ok{background:#dcfce7;color:#166534}.badge.high{background:#fff7ed;color:#c2410c}.badge.critical,.badge.overdue{background:#fee2e2;color:#b91c1c}.sla{font-size:11px}
.modal-bg{background:#0f172a88;backdrop-filter:blur(3px)}.modal{border:1px solid #e5eaf1;border-radius:14px;box-shadow:0 24px 64px #0f172a30}.modal-head h2{font-size:22px}.close{border-radius:8px;color:#334155}.comment{background:#f5f8fc;border:1px solid #e8edf4}.timeline{border-color:#d7e2f0}.toast{background:#17253d;border-radius:8px}
.project-table{min-width:760px}.project-table td:first-child{min-width:145px}.project-table td:nth-child(2){min-width:250px;max-width:480px}.project-table .btn{white-space:nowrap}.project-cards{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}.project-cards .panel{padding:14px}.project-cards .panel h2{font-size:17px}.project-cards .panel p{font-size:13px}.project-cards .badge{font-size:11px}
.member-dropdown,.ticket-project-dropdown{border-color:#d7e0eb;border-radius:8px}.member-dropdown summary::after,.ticket-project-dropdown summary::after{color:#2563eb}.member-options label:hover,.project-choice-list label:hover{background:#eff6ff}.member-dropdown input,.project-choice-list input{accent-color:#2563eb}
@media(max-width:880px){.sidebar{background:#111c31;color:#fff}.sidebar .brand{color:#fff}.nav{overflow-x:auto}.nav button.active,.nav button:hover{background:#1d3c70;color:#fff}.side-bottom .user-mini{display:none}}
@media(max-width:620px){.main{padding:18px 12px}.top h1{font-size:23px}.toolbar{align-items:stretch}.toolbar select{min-width:130px}.tickets{min-width:800px}.form-grid{grid-template-columns:1fr}}

.hero h1,.hero h2,.hero h3{font-family:Inter,'Segoe UI',Arial,sans-serif;font-weight:700;color:#fff;text-shadow:0 1px 2px #0b183044}.hero p{color:#e2ebff}.hero .company-name{color:#dbeafe;font-family:Inter,'Segoe UI',Arial,sans-serif;font-weight:500}

.hero h1{font-family:inherit;font-weight:700;color:#fff}.hero .company-name{display:block;font-family:inherit;font-size:.4em;font-weight:500;line-height:1.45;margin-top:18px;color:#dbeafe}.hero .company-name sup{font-size:.72em;line-height:0;vertical-align:super}

.accounts-table{min-width:1500px}.accounts-table td{vertical-align:top}.accounts-table td:nth-child(7){min-width:220px}.accounts-table td:nth-child(8){min-width:110px}.account-project{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:5px 8px;margin:-2px -8px;border-radius:7px}.account-project+.account-project{margin-top:4px}.account-project b{font-weight:600}.account-actions{display:flex;gap:6px;flex-wrap:wrap}.account-actions .btn{padding:7px 9px;font-size:12px;white-space:nowrap}.account-actions .btn:disabled{opacity:.45;cursor:not-allowed}.service-expiring{display:inline-block;padding:3px 7px;border-radius:6px;color:#1d4ed8;background:#dbeafe;font-weight:700;animation:service-glow 2.4s ease-in-out infinite}.service-expired{display:inline-block;padding:3px 7px;border-radius:6px;color:#b91c1c;background:#fee2e2;font-weight:700}.service-validity{align-items:start}.service-validity .field{margin:0}.service-validity .field>input[type=date]{height:54px}.auth-card #resetMessage{line-height:1.55}@keyframes service-glow{0%,100%{box-shadow:0 0 0 0 #60a5fa24;background:#e0edff}50%{box-shadow:0 0 0 5px #60a5fa20;background:#cfe2ff}}@media(prefers-reduced-motion:reduce){.service-expiring{animation:none}}

/* Zamknięte zgłoszenia są wyciszone, ale status zachowuje zielone oznaczenie. */
.tickets tbody tr[data-closed="true"],.tickets tbody tr[data-closed="true"]:nth-child(even){background:#f1f3f5;color:#77808c}.tickets tbody tr[data-closed="true"] .subject{color:#66717e}.tickets tbody tr[data-closed="true"] .subline,.tickets tbody tr[data-closed="true"] .sla{color:#89929d}.tickets tbody tr[data-closed="true"][data-id]:hover{background:#e8ecef}.tickets tbody tr[data-closed="true"] .badge.ok{background:#dcfce7;color:#166534}

.accounts-table{width:100%;min-width:0;table-layout:fixed}.accounts-table th,.accounts-table td{overflow-wrap:anywhere}.accounts-table td:nth-child(7){min-width:0}.accounts-table .account-project{flex-wrap:wrap;justify-content:flex-start;gap:4px 8px}.accounts-table .account-actions{min-width:0}.accounts-table .account-actions .btn{white-space:normal}
@media(max-width:1250px){.accounts-table th:nth-child(9),.accounts-table td:nth-child(9){display:none}}
@media(max-width:980px){.accounts-table th:nth-child(5),.accounts-table td:nth-child(5),.accounts-table th:nth-child(6),.accounts-table td:nth-child(6){display:none}.accounts-table.filtered-role th:nth-child(3),.accounts-table.filtered-role td:nth-child(3){display:none}}
@media(max-width:680px){.accounts-table th:nth-child(3),.accounts-table td:nth-child(3){display:none}.accounts-table th,.accounts-table td{padding:8px 5px;font-size:12px}.accounts-table .account-actions{display:grid;grid-template-columns:1fr}.accounts-table .account-actions .btn{width:100%;padding:6px 4px}}

.notify-requester-option{display:block;margin:9px 0;color:var(--teal);font-weight:600}.notify-requester-option input{accent-color:var(--teal)}

/* Keep ticket lists inside the viewport while preserving assignment and SLA data. */
.ticket-list-table{width:100%;min-width:0;table-layout:fixed}
.ticket-list-table th,.ticket-list-table td{padding:9px 7px;overflow-wrap:anywhere}
.ticket-list-table td:first-child{min-width:0}
@media(max-width:1150px){.ticket-list-table th:nth-child(4),.ticket-list-table td:nth-child(4),.ticket-list-table th:nth-child(5),.ticket-list-table td:nth-child(5){display:none}}
@media(max-width:700px){.ticket-list-table th:nth-child(2),.ticket-list-table td:nth-child(2){display:none}.ticket-list-table.requester th:nth-child(4),.ticket-list-table.requester td:nth-child(4){display:none}.ticket-list-table th,.ticket-list-table td{padding:7px 5px;font-size:12px}}
@media(max-width:480px){.ticket-list-table.admin th:nth-child(6),.ticket-list-table.admin td:nth-child(6),.ticket-list-table.admin th:nth-child(7),.ticket-list-table.admin td:nth-child(7){display:none}.ticket-list-table.operator th:nth-child(7),.ticket-list-table.operator td:nth-child(7){display:none}}

.membership{max-height:none;overflow:visible}.project-multiselect{position:relative;margin-top:10px}.project-multiselect summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px;padding:10px 13px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:pointer;list-style:none}.project-multiselect summary::-webkit-details-marker{display:none}.project-multiselect summary:focus-visible{outline:3px solid #bfe9df;border-color:var(--teal)}.project-selection-label{min-width:0;overflow-wrap:anywhere;font-weight:500}.project-chevron{flex:none;color:var(--muted);transition:transform .15s}.project-multiselect[open] .project-chevron{transform:rotate(180deg)}.project-options{display:grid;gap:2px;max-height:190px;overflow:auto;margin-top:6px;padding:7px;border:1px solid var(--line);border-radius:9px;background:#fff;box-shadow:0 8px 20px #153c5012}.membership .project-options label{display:flex;align-items:center;gap:9px;margin:0;padding:8px;border-radius:6px;cursor:pointer}.membership .project-options label:hover{background:var(--paper)}.project-options input{flex:none;accent-color:var(--teal)}
.account-notification-option{margin:0 0 16px}.account-notification-option label{display:flex;align-items:flex-start;gap:9px;font-weight:700}.account-notification-option input{flex:none;margin-top:3px;accent-color:var(--teal)}.account-notification-option .hint{margin:7px 0 0 25px}

.sla-matrix{overflow-x:auto;margin:.5rem 0}.sla-matrix table{width:100%;border-collapse:collapse}.sla-matrix th,.sla-matrix td{padding:.4rem;border-bottom:1px solid #ddd;text-align:left;white-space:normal}.sla-matrix input{width:100%;min-width:5em;box-sizing:border-box}
.expiry-choice{margin:8px 0 16px}.expiry-choice label{display:inline-flex;align-items:center;gap:8px;cursor:pointer}.expiry-choice input{width:17px;height:17px;margin:0}
