:root {
  --navy: #0d1930;
  --navy-soft: #172640;
  --ink: #14243a;
  --muted: #6b788c;
  --line: #e1e8ef;
  --canvas: #f4f7fb;
  --white: #ffffff;
  --accent: #2478d4;
  --accent-dark: #1762b4;
  --green: #159470;
  --shadow: 0 6px 24px rgba(17, 44, 77, .035);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
input, textarea, select { width: 100%; padding: 11px 13px; border: 1px solid #d5dfea; border-radius: 9px; background: white; color: var(--ink); outline: none; }
input:focus, textarea:focus, select:focus { border-color: #3687dd; box-shadow: 0 0 0 3px rgba(43, 121, 209, .13); }
textarea { resize: vertical; min-height: 110px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%2364788f' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 35px; }
label { display: block; font-size: .92rem; font-weight: 650; color: #3a4c64; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.18; letter-spacing: -.035em; margin-bottom: 10px; }
h2 { font-size: 1.2rem; letter-spacing: -.015em; }
h3 { font-size: 1rem; }
small, .muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.eyebrow { color: #3275b3; font-size: .72rem; font-weight: 800; letter-spacing: .15em; margin-bottom: 11px; }
.btn { border: 1px solid transparent; border-radius: 9px; padding: 11px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn-primary { background: var(--accent); color: white; box-shadow: 0 2px 5px rgba(36,120,212,.15); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: white; border-color: #cdd9e6; color: #31465f; }
.btn-outline:hover { background: #f5f8fc; border-color: #9fb4ce; }
.btn-small { font-size: .86rem; padding: 7px 11px; }
.btn-wide { width: 100%; }
.brand-icon { width: 41px; height: 41px; border-radius: 12px; display: inline-grid; flex-shrink: 0; place-items: center; color: white; background: linear-gradient(150deg,#38a5ee,#1856aa); box-shadow: 0 5px 15px rgba(30,122,207,.22); font-size: 1.55rem; font-weight: 850; line-height: 1; }
.brand-icon-big { width: 56px; height: 56px; font-size: 2rem; margin-bottom: 23px; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 258px; padding: 30px 19px 20px; background: var(--navy); color: #dde7f4; flex: 0 0 258px; min-height: 100vh; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: inline-flex; gap: 11px; align-items: center; padding: 0 6px; }
.brand strong { display: block; color: white; font-size: 1.22rem; letter-spacing: .06em; line-height: 1.15; }
.brand small { display: block; color: #92a6c2; font-size: .63rem; letter-spacing: .105em; font-weight: 750; margin-top: 4px; }
.sidebar-label { margin: 47px 12px 13px; color: #8297b3; font-size: .66rem; font-weight: 800; letter-spacing: .14em; }
.menu { display: grid; gap: 5px; }
.menu a { padding: 12px 15px; border-radius: 10px; color: #bbcbdf; font-size: .91rem; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.menu a:hover { background: #182b48; color: white; }
.menu a.selected { background: #213c5e; color: white; box-shadow: inset 3px 0 #4ca7ef; }
.menu-icon { font-size: 1.3rem; width: 21px; text-align: center; line-height: 1; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #2c3e58; padding-top: 0; }
.sidebar-bottom .sidebar-label { margin: 20px 12px 12px; }
.profile { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 10px; }
.profile:hover { background: #192b45; }
.profile strong, .profile small { display: block; font-size: .86rem; }
.profile small { font-size: .74rem; margin-top: 2px; color: #9bacc3; }
.avatar { width: 37px; height: 37px; border-radius: 11px; background: #d5e7fb; color: #1b62a2; display: inline-grid; place-items: center; font-weight: 850; flex-shrink: 0; }
.sidebar .avatar { background: #224c77; color: #c7eaff; }
.avatar-small { width: 30px; height: 30px; border-radius: 9px; font-size: .83rem; }
.logout-form { margin: 14px 10px 5px; }
.logout-form button { border: 0; background: transparent; color: #b8cce3; padding: 5px 0; text-align: left; }
.logout-form button:hover { color: white; }
.session-note { font-size: .67rem; display: block; margin: 15px 10px 0; color: #7e92ae; }
.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mobile-head { display: none; }
.mobile-actions { display: flex; align-items: center; gap: 12px; }
.mobile-actions form { margin: 0; }
.mobile-link { border: none; background: transparent; color: #d2e5fa; font-size: .8rem; font-weight: 650; padding: 4px 0; }
.main-content { width: min(1360px, 100%); padding: 44px clamp(20px, 4.2vw, 70px) 60px; margin: 0 auto; flex: 1; }
.app-footer { text-align: center; padding: 20px 12px 26px; color: #96a2b2; font-size: .72rem; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.page-header p { color: var(--muted); margin: 0; }
.page-header .badge { font-size: .86rem; }
.page-header .back-link { margin-bottom: 15px; }
.back-link { display: inline-block; color: #2b78c1; font-size: .89rem; font-weight: 650; }
.back-link:hover { text-decoration: underline; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 25px; }
.stat { background: white; padding: 22px 23px; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.stat > span { display: block; color: #6a7b91; font-weight: 650; font-size: .86rem; }
.stat strong { display: block; font-size: 2.25rem; letter-spacing: -.04em; margin: 6px 0 2px; line-height: 1.2; }
.stat small { font-size: .72rem; }
.panel { background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-title h2 { margin: 0; }
.panel-title > .muted { font-size: .78rem; }
.panel > .panel-title { padding: 24px 26px 18px; }
.filters { padding: 0 25px 20px; display: grid; grid-template-columns: minmax(190px, 2fr) minmax(155px,1fr) minmax(155px,1fr) auto; gap: 9px; }
.filters input, .filters select { font-size: .86rem; }
.ticket-list { border-top: 1px solid var(--line); }
.ticket-row { display: flex; gap: 19px; align-items: center; padding: 20px 25px; border-bottom: 1px solid #edf1f6; transition: background .14s; }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: #f8fbff; }
.ticket-number { color: #5d7899; font-size: .81rem; font-weight: 800; flex: 0 0 49px; }
.ticket-main { min-width: 0; flex: 1; }
.ticket-main strong { font-size: .96rem; display: block; line-height: 1.4; overflow-wrap: anywhere; }
.ticket-main small { display: block; font-size: .78rem; margin-top: 6px; }
.ticket-meta { display: flex; width: 137px; flex: 0 0 137px; align-items: flex-end; flex-direction: column; gap: 6px; }
.ticket-meta small { font-size: .72rem; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 7px; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.badge-dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.badge-blue { color: #2762b1; background: #e9f1fd; }
.badge-purple { color: #734aae; background: #f0ebfa; }
.badge-amber { color: #9a6a15; background: #fef4d9; }
.badge-cyan { color: #147e98; background: #e5f7fb; }
.badge-gray { color: #67788e; background: #eaf0f5; }
.badge-green { color: #0d8d65; background: #e0f8ef; }
.badge-red { color: #aa434d; background: #fcebee; }
.empty-state { padding: 55px 20px; text-align: center; }
.empty-state > div { font-size: 2.6rem; color: #8eabc7; }
.empty-state h3 { margin-bottom: 5px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }
.form-panel { padding: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 21px; }
.form-field { min-width: 0; }
.form-field label { margin-bottom: 8px; }
.form-field small { display: block; font-size: .77rem; margin-top: 7px; }
.form-field.wide, .wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 305px; gap: 22px; align-items: start; }
.detail-main { min-width: 0; display: grid; gap: 20px; }
.detail-side { position: sticky; top: 30px; }
.detail-card { padding: 25px 27px; margin-bottom: 20px; }
.detail-main .detail-card { margin: 0; }
.detail-card h2 { margin-bottom: 18px; }
.long-text { white-space: normal; color: #34465d; overflow-wrap: anywhere; line-height: 1.7; }
.attachments { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 15px; display: grid; gap: 9px; }
.attachments h3 { margin-bottom: 3px; }
.attachment { border: 1px solid #dbe5ef; background: #f7faff; color: #266cb4; font-size: .85rem; border-radius: 8px; padding: 9px 12px; display: flex; justify-content: space-between; gap: 10px; overflow-wrap: anywhere; }
.attachment:hover { background: #eaf3fe; }
.attachment small { white-space: nowrap; }
.inline-attachments { margin-top: 13px; padding-top: 10px; }
.comment { padding: 20px 0; border-top: 1px solid #e9eef4; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.comment-head time { color: var(--muted); margin-left: auto; font-size: .78rem; }
.comment .long-text { padding-left: 40px; }
.comment .inline-attachments { margin-left: 40px; }
.comment-form { background: #f6f9fc; padding: 22px; margin-top: 16px; border: 1px solid #e8eef5; border-radius: 12px; }
.comment-form h3 { margin-bottom: 12px; }
.comment-form textarea { margin-bottom: 12px; }
.attach-button { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; font-size: .85rem; color: #356eab; cursor: pointer; }
.attach-button input { display: block; font-size: .7rem; padding: 5px; max-width: 225px; border: 0; background: transparent; }
.timeline { display: grid; gap: 16px; border-left: 2px solid #dbe7f4; margin-left: 6px; padding: 4px 0 0 19px; }
.timeline-item { position: relative; }
.timeline-item:before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #4c95d7; position: absolute; left: -25px; top: 7px; border: 2px solid white; }
.timeline-item strong { display: block; font-weight: 600; font-size: .86rem; }
.timeline-item span { font-size: .76rem; color: var(--muted); }
.key-value { display: flex; justify-content: space-between; gap: 10px; font-size: .83rem; border-bottom: 1px solid #e9eef4; padding: 11px 0; }
.key-value span { color: var(--muted); }
.key-value strong { text-align: right; font-weight: 650; }
.side-form { padding-top: 21px; display: grid; gap: 9px; }
.side-form label { margin-bottom: 0; }
.side-form small { font-size: .72rem; }
.user-list { display: grid; padding: 0 25px 12px; }
.user-row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid #edf1f6; flex-wrap: wrap; }
.user-details { flex: 1; min-width: 180px; }
.user-details strong { display: block; font-size: .9rem; }
.user-details small { display: block; font-size: .77rem; margin-top: 4px; }
.user-actions { display: flex; align-items: center; gap: 8px; }
.user-actions details { position: relative; }
.user-actions summary { font-size: .82rem; color: #226bb2; cursor: pointer; list-style: none; }
.reset-form { display: grid; gap: 8px; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 9px; position: absolute; right: 0; top: 23px; z-index: 5; width: 240px; box-shadow: 0 10px 24px #243d5730; }
.reset-form label { font-size: .75rem; }
.reset-form input { margin-top: 5px; }
.mail-stats { display: flex; flex-wrap: wrap; gap: 18px; padding: 13px 0; font-size: .86rem; }
.settings-form { display: flex; align-items: flex-end; gap: 10px; margin: 14px 0 18px; }
.settings-form label { flex: 1; }
.settings-form input { margin-top: 7px; }
.settings-form button { margin-bottom: 0; }
.narrow-panel { max-width: 610px; }
.stack-form { display: grid; gap: 12px; }
.stack-form button { margin-top: 9px; justify-self: start; }
.alert { border: 1px solid; border-radius: 10px; padding: 13px 16px; font-size: .89rem; margin-bottom: 19px; }
.alert-ok { background: #eaf8f1; color: #19704f; border-color: #bcebd4; }
.alert-error { background: #fff0f0; color: #9e353d; border-color: #f5c8cc; }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 0%,#1b365a,#0b1529 66%); padding: 24px; }
.auth-card { background: white; border-radius: 19px; padding: 40px; width: min(100%, 450px); box-shadow: 0 25px 65px rgba(3, 10, 25, .26); }
.auth-card h1 { font-size: 2rem; margin-top: 0; }
.auth-card .muted { font-size: .91rem; margin-bottom: 27px; }
.auth-form { display: grid; gap: 9px; }
.auth-form label { margin-top: 7px; }
.auth-form input { margin-bottom: 6px; }
.turnstile-wrap { margin: 11px 0; min-height: 65px; }
.auth-foot { font-size: .75rem; color: #8593a5; text-align: center; margin: 23px 0 0; }
.install-card { width: min(100%, 700px); margin: 25px auto; }
.install-card .form-grid { gap: 13px; }
.install-card code { font-size: .77rem; }
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-grid { grid-template-columns: minmax(0,1fr); }
  .detail-side { position: static; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { width: auto; height: auto; min-height: auto; position: static; padding: 0; }
  .sidebar > .brand, .sidebar-label, .sidebar-bottom { display: none; }
  .menu { display: flex; gap: 4px; padding: 8px 10px; overflow-x: auto; }
  .menu a { padding: 9px 11px; font-size: .82rem; white-space: nowrap; }
  .menu-icon { display: none; }
  .mobile-head { display: flex; justify-content: space-between; align-items: center; background: var(--navy); padding: 15px 17px 10px; }
  .mobile-head .brand-icon { width: 31px; height: 31px; border-radius: 8px; font-size: 1rem; }
  .mobile-head .brand strong { font-size: 1rem; }
  .mobile-actions { gap: 9px; }
  .main-content { padding: 29px 17px 45px; }
  .page-header { align-items: flex-start; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
  .page-header h1 { font-size: 1.7rem; }
  .desktop-only { display: none; }
  .panel > .panel-title { padding: 20px; }
  .ticket-row { padding: 16px; gap: 12px; flex-wrap: wrap; }
  .ticket-number { flex: 0 0 50px; }
  .ticket-meta { width: auto; flex: 1 1 100%; flex-direction: row; align-items: center; justify-content: space-between; padding-left: 62px; }
  .form-panel, .detail-card { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .form-field.wide, .wide { grid-column: 1; }
  .settings-form { flex-direction: column; align-items: stretch; }
  .auth-card { padding: 28px 22px; }
}
@media (max-width: 460px) {
  .mobile-head .brand { gap: 5px; padding: 0; }
  .mobile-actions { gap: 7px; }
  .mobile-link { font-size: .72rem; }
  .mobile-actions .btn { font-size: .73rem; padding: 7px; }
  .stats-grid { gap: 9px; }
  .stat { padding: 16px; }
  .stat strong { font-size: 1.9rem; }
  .stat small { display: none; }
  .filters { grid-template-columns: 1fr; padding: 0 17px 17px; }
  .filters .btn { width: 100%; }
  .comment-form { padding: 15px; }
  .comment-head time { font-size: .69rem; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1; }
  .user-row .badge { margin-left: auto; }
}

/* Skyway Go 1.0.5 – autentyczna paleta ciemnego motywu. */
:root {
  color-scheme: dark;
  --bg: #071120;
  --bg-soft: #101f38;
  --bg-card: #0d1b30;
  --blue: #2884ff;
  --blue-light: #65a8ff;
  --white: #f3f5fb;
  --muted: #b2c1d6;
  --line: #254161;
  --input: #142e50;
  --navy: var(--bg);
  --navy-soft: var(--bg-soft);
  --ink: var(--white);
  --canvas: var(--bg);
  --accent: var(--blue);
  --accent-dark: #1768e0;
  --green: #39c49a;
  --shadow: 0 22px 65px #0006;
}

html { color-scheme: dark; }
body { color: var(--white); background: var(--bg); }
::selection { background: #2568b3; color: #fff; }
:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; }
small, .muted { color: var(--muted); }
label, .field-label { color: #dae7fa; }
.eyebrow { color: var(--blue-light); }
h1, h2, h3 { color: var(--white); }
h1 { letter-spacing: -.03em; }
input, textarea, select {
  background-color: var(--input);
  color: var(--white);
  border: 1px solid var(--line);
  caret-color: var(--blue-light);
}
input::placeholder, textarea::placeholder { color: #9aafcb; opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--blue-light); box-shadow: 0 0 0 3px #2884ff30; }
select { background-color: var(--input); }
option { background: var(--input); color: var(--white); }
input[type=file] { color: var(--muted); }
input[type=file]::file-selector-button { border: 1px solid var(--line); border-radius: 7px; background: #213e62; color: var(--white); padding: 6px 9px; cursor: pointer; }
.btn-primary { color: #fff; background: var(--blue); box-shadow: 0 7px 25px #09478b50; }
.btn-primary:hover { background: #4397ff; }
.btn-outline { color: #d7eaff; background: #152b47; border-color: #365679; }
.btn-outline:hover { color: #fff; background: #1b385e; border-color: var(--blue-light); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.app-shell { background: radial-gradient(ellipse at 70% -20%, #133358 0, transparent 48%), var(--bg); }
.sidebar { background: linear-gradient(160deg,#09172b,#071120 74%); border-right: 1px solid var(--line); }
.brand { gap: 12px; }
.brand-logo { display: block; height: 43px; width: 43px; object-fit: contain; flex: 0 0 auto; }
.brand strong { font-size: 1.04rem; font-weight: 850; color: var(--white); letter-spacing: .035em; }
.brand strong em { color: var(--blue-light); font-style: normal; }
.brand small { font-size: .83rem; font-weight: 650; letter-spacing: .025em; color: var(--muted); margin-top: 2px; }
.sidebar .menu { margin-top: 39px; }
.menu a { color: #becde2; }
.menu a:hover { background: #172b48; color: var(--white); }
.menu a.selected { background: #183859; box-shadow: inset 3px 0 var(--blue); color: #fff; }
.sidebar-bottom { border-top-color: var(--line); padding-top: 15px; }
.sidebar .avatar { background: #173e69; color: #c8e5ff; }
.avatar { background: #21486d; color: #e3f4ff; }
.profile:hover { background: #142c4a; }
.profile small, .logout-form button { color: #b5c9e1; }
.logout-form button:hover { color: var(--blue-light); }
.session-note { font-size: .77rem; color: #94b6df; margin-top: 12px; font-variant-numeric: tabular-nums; }
.session-note.session-warning { color: #ffd084; }
.main-content { padding-top: 49px; }
.app-footer { color: #6f8ba9; }
.page-header { margin-bottom: 28px; }
.page-header h1 { max-width: 850px; }
.page-header p, .empty-state p { color: var(--muted); }
.back-link { color: var(--blue-light); }
.stat, .panel, .auth-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.stat { position: relative; overflow: hidden; }
.stat:before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: #2884ff95; }
.stat > span { color: #d4e0f3; }
.stat strong { color: var(--white); }
.stat small { color: #a4b9d2; }
.ticket-list { border-top-color: var(--line); }
.ticket-row { border-bottom: 1px solid #213b59; }
.ticket-row:hover, .ticket-row:focus-visible { background: #142b49; }
.ticket-number { color: #85baff; }
.ticket-main strong { color: #f4f7fc; }
.ticket-main small { color: #b7c7dc; }
.ticket-meta { position: relative; }
.row-arrow { position: absolute; right: -16px; top: -3px; opacity: 0; color: var(--blue-light); font-size: 1.2rem; transition: opacity .12s; }
.ticket-row:hover .row-arrow, .ticket-row:focus-visible .row-arrow { opacity: 1; }
.badge { border: 1px solid transparent; }
.badge-blue { color: #9cc8ff; background: #17375d; border-color: #295787; }
.badge-purple { color: #d5bdff; background: #352755; border-color: #544079; }
.badge-amber { color: #ffe0a1; background: #4a351d; border-color: #765831; }
.badge-cyan { color: #9ee6f7; background: #153d4d; border-color: #2e6c7b; }
.badge-gray { color: #c2d0df; background: #293b50; border-color: #3b4c61; }
.badge-green { color: #9df6d6; background: #164639; border-color: #256f55; }
.badge-red { color: #ffb6c2; background: #4c2531; border-color: #7c394b; }
.long-text { color: #e3edfa; }
.comment { border-top-color: var(--line); }
.comment-form { background: #101f38; border: 1px solid var(--line); }
.attachments { border-top-color: var(--line); }
.key-value, .user-row { border-bottom-color: var(--line); border-top-color: var(--line); }
.timeline { border-left-color: #355476; }
.timeline-item:before { background: var(--blue); border-color: var(--bg-card); }
.user-actions summary { color: var(--blue-light); }
.reset-form { background: #10213a; border-color: var(--line); box-shadow: var(--shadow); }
.attach-button { color: var(--blue-light); }
.attach-button input { background: transparent; }
.alert-ok { color: #aff4d3; background: #133e32; border-color: #2b7756; }
.alert-error { color: #ffd1d7; background: #4b2633; border-color: #8b4758; }
.auth-page { background: radial-gradient(circle at 40% -12%,#193d68,#071120 68%); }
.auth-card { border-radius: 17px; }
.auth-logo { width: 75px; height: 75px; object-fit: contain; display: block; margin: 0 0 21px; }
.auth-foot { color: #9db1ca; }
.turnstile-wrap { min-height: 70px; }
.mobile-head { background: #09182c; border-bottom: 1px solid var(--line); }

/* Załączniki: kliknięcie miniatury pokazuje podgląd, pobranie jest oddzielne. */
.attachment-card { display: flex; align-items: stretch; min-width: 0; gap: 8px; padding: 8px; background: #122640; border: 1px solid #274361; border-radius: 11px; }
.attachment-preview { min-width: 0; width: 100%; flex: 1; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; color: var(--white); text-align: left; cursor: zoom-in; }
.attachment-card:hover { background: #193450; border-color: #426c96; }
.attachment-thumb { height: 65px; width: 82px; flex: 0 0 82px; border-radius: 7px; background: #0a1728; display: grid; place-items: center; overflow: hidden; border: 1px solid #314966; }
.attachment-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.file-symbol { color: #a8cfff; font-size: .73rem; font-weight: 850; letter-spacing: .07em; }
.attachment-info { min-width: 0; display: grid; gap: 3px; flex: 1; }
.attachment-info strong { font-size: .84rem; line-height: 1.35; overflow-wrap: anywhere; }
.attachment-info small { color: #a0b8d5; font-size: .73rem; line-height: 1.35; overflow-wrap: anywhere; }
.preview-hint { font-size: .72rem; white-space: nowrap; color: #90bbef; }
.attachment-download { align-self: center; flex: 0 0 auto; padding: 8px 10px; border-radius: 7px; font-size: .78rem; font-weight: 750; background: #1e405f; border: 1px solid #41688d; color: #cde7ff; }
.attachment-download:hover { background: #28547d; color: #fff; }
.gallery-panel { padding: 20px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.gallery-card { flex-direction: column; padding: 10px; gap: 10px; }
.gallery-card .attachment-preview { display: grid; gap: 10px; align-content: start; }
.gallery-card .attachment-thumb { width: 100%; height: 175px; }
.gallery-card .attachment-info { gap: 6px; }
.gallery-card .attachment-download { align-self: stretch; text-align: center; }
.gallery-card .preview-hint { font-size: .75rem; }
.gallery-card .file-symbol { font-size: 1.2rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 20px; color: var(--muted); font-size: .88rem; }
.pagination > div { display: flex; gap: 10px; }
.history-trigger { display: flex; justify-content: flex-start; }

/* Okna dialogowe – wszystkie na ciemnym tle. */
[hidden] { display: none !important; }
.app-dialog { box-sizing: border-box; width: min(740px, calc(100vw - 28px)); max-height: min(88vh, 980px); margin: auto; padding: 23px 26px; overflow: auto; background: #0d1b30; color: var(--white); border: 1px solid #3a6088; border-radius: 17px; box-shadow: 0 25px 110px #000e; }
.app-dialog::backdrop { background: #020712da; backdrop-filter: blur(5px); }
.app-dialog .dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.app-dialog .dialog-head h2 { margin: 0; overflow-wrap: anywhere; }
.dialog-x { background: #193657; color: #dceeff; border: 1px solid #345779; border-radius: 8px; height: 37px; width: 37px; flex: 0 0 auto; font-size: 1.5rem; line-height: 1; }
.dialog-x:hover { background: #264b73; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 20px; margin-top: 17px; border-top: 1px solid var(--line); }
.dialog-scroll { overflow: auto; max-height: 55vh; padding: 7px 4px 15px; }
.history-dialog { max-width: 620px; }
.status-dialog { max-width: 570px; }
.status-dialog form > label { margin: 12px 0 8px; }
.status-dialog select { margin-bottom: 10px; }
.confirm-check { display: flex; gap: 11px; align-items: flex-start; padding: 12px 13px; border: 1px solid var(--line); border-radius: 9px; background: #122743; cursor: pointer; font-weight: 500; font-size: .87rem; }
.confirm-check input { width: 18px; height: 18px; padding: 0; flex: 0 0 auto; accent-color: var(--blue); margin: 3px 0 0; }
.final-check { background: #46301f; border-color: #8c6539; }
.preview-dialog { width: min(960px, calc(100vw - 28px)); }
.preview-area { background: #081423; border: 1px solid var(--line); border-radius: 10px; min-height: 220px; display: grid; place-items: center; overflow: hidden; }
.preview-image { display: block; max-width: 100%; max-height: 64vh; object-fit: contain; }
.preview-frame { display: block; width: 100%; height: min(65vh, 680px); border: 0; background: var(--bg); }
.mobile-session { display: none; }
.no-preview { color: var(--muted); text-align: center; padding: 30px; margin: 0; }

@media (max-width: 1100px) {
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .sidebar .menu { margin-top: 0; }
  .mobile-head .brand-logo { width: 31px; height: 31px; }
  .mobile-session { display: block; padding: 5px 18px; font-size: .75rem; color: #a4c4e7; background: #09182c; font-variant-numeric: tabular-nums; }
  .mobile-session.session-warning { color: #ffd084; }
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .attachment-info strong { font-size: .82rem; }
  .app-dialog { padding: 17px; }
}
@media (max-width: 500px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card .attachment-thumb { height: 150px; }
  .preview-hint { display: none; }
  .attachment-card:not(.gallery-card) { flex-wrap: wrap; }
  .attachment-card:not(.gallery-card) .attachment-download { margin-left: 94px; }
  .pagination { align-items: flex-start; flex-direction: column; }
  .dialog-actions .btn { flex: 1; }
}

/* 0.1.3: filtry i przykładowe dane. */
.filter-actions { display: flex; align-items: stretch; gap: 8px; white-space: nowrap; }
.btn-clear { border-color: #345779; background: #10243d; color: #b9d3f1; font-size: .85rem; }
.btn-clear:hover { background: #1a3a5d; border-color: #65a8ff; color: #fff; }
.demo-callout { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 15px 19px; margin-bottom: 23px; background: #102944; border: 1px dashed #4a82b9; border-radius: 12px; }
.demo-callout strong, .demo-callout small { display: block; }
.demo-callout strong { color: #e0efff; margin-bottom: 3px; }
.demo-callout small { color: #a9c5e4; font-size: .8rem; }

/* Załącznik nie jest przyciskiem; tylko dwa wyraźne działania. */
.attachment-card { display: grid; grid-template-columns: 82px minmax(0,1fr) auto; align-items: center; gap: 12px; }
.attachment-preview, .attachment-download { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: auto; flex: 0 0 auto; padding: 8px 12px; border: 1px solid #41688d; border-radius: 7px; font-size: .8rem; font-weight: 750; white-space: nowrap; text-align: center; cursor: pointer; }
.attachment-preview { background: #183f66; color: #cfe9ff; }
.attachment-preview:hover { background: #27649c; color: #fff; }
.attachment-download { background: #122e4d; color: #cfe9ff; }
.attachment-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.gallery-card { display: flex; flex-direction: column; align-items: stretch; }
.gallery-card .attachment-thumb { flex: 0 0 175px; }
.gallery-card .attachment-info { flex: 1; width: 100%; }
.gallery-card .attachment-actions { justify-content: stretch; width: 100%; }
.gallery-card .attachment-preview, .gallery-card .attachment-download { flex: 1 1 0; align-self: stretch; }

/* Szczegóły – stały temat i kontrolowane przewijanie komentarzy. */
.ticket-heading { position: sticky; top: 0; background: var(--bg); z-index: 2; }
.ticket-bottom-bar { display: flex; justify-content: flex-end; align-items: center; gap: 20px; padding: 12px 0 6px; }
.ticket-bottom-bar > .muted { font-size: .74rem; }
.comments-scroll { min-height: 0; scrollbar-color: #315f8c #0b1b2f; }
.comments-scroll:focus-visible { outline-offset: -3px; }
.ticket-page .detail-side .detail-card { margin-bottom: 0; }
.ticket-page .detail-side { margin-left: 18px; }

@media (min-width: 1101px) {
  .ticket-page .main-wrap { height: 100vh; overflow: hidden; }
  .ticket-page .app-footer { padding: 6px 10px; flex: 0 0 auto; }
  .ticket-workspace { height: 100%; min-height: 0; padding: 20px 24px 12px 32px; display: flex; flex-direction: column; overflow: hidden; }
  .ticket-workspace .ticket-heading { flex: 0 0 auto; padding-bottom: 5px; margin-bottom: 14px; }
  .ticket-workspace .ticket-heading h1 { font-size: clamp(1.55rem,2vw,2rem); }
  .ticket-workspace .detail-grid { grid-template-columns: minmax(0,1fr) 305px; gap: 34px; flex: 1 1 0; min-height: 0; overflow: hidden; }
  .ticket-workspace .detail-main { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
  .ticket-workspace .description-card { flex: 0 1 auto; max-height: 36%; min-height: 100px; padding: 16px 20px; overflow-y: auto; }
  .ticket-workspace .description-card h2 { margin-bottom: 8px; }
  .ticket-workspace .comments-panel { flex: 1 1 0; min-height: 140px; padding: 16px 20px; overflow: hidden; display: flex; flex-direction: column; }
  .ticket-workspace .comments-panel .panel-title { flex: 0 0 auto; }
  .ticket-workspace .comments-scroll { flex: 1 1 0; overflow-y: auto; margin-top: 8px; padding-right: 11px; }
  .ticket-workspace .comment { padding: 13px 0; }
  .ticket-workspace .comment-form { flex: 0 0 auto; margin-top: 9px; padding: 11px 14px; }
  .ticket-workspace .comment-form h3 { margin-bottom: 7px; }
  .ticket-workspace .comment-form textarea { min-height: 62px; height: 62px; margin-bottom: 5px; }
  .ticket-workspace .comment-form .form-actions { gap: 9px; }
  .ticket-workspace .history-trigger { flex: 0 0 auto; }
  .ticket-workspace .detail-side { position: static; overflow-y: auto; min-height: 0; margin-left: 14px; }
  .ticket-workspace .detail-side .detail-card { padding: 18px 20px; }
  .ticket-workspace .ticket-bottom-bar { flex: 0 0 auto; }
}

@media (max-width: 1100px) {
  .ticket-heading { top: 0; padding: 10px 0; }
  .ticket-page .detail-side { margin-left: 0; }
  .comments-scroll { max-height: 48vh; overflow-y: auto; padding-right: 9px; }
  .ticket-bottom-bar { position: sticky; bottom: 0; z-index: 3; padding: 10px; margin: 0 -10px; background: #0d1b30; border-top: 1px solid var(--line); }
  .filter-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .attachment-card:not(.gallery-card) { display: grid; grid-template-columns: 65px minmax(0,1fr); }
  .attachment-card:not(.gallery-card) .attachment-thumb { width: 65px; height: 58px; flex: auto; }
  .attachment-card:not(.gallery-card) .attachment-actions { grid-column: 1 / -1; }
  .attachment-card:not(.gallery-card) .attachment-download { margin-left: 0; }
  .filter-actions { flex-wrap: wrap; }
  .filter-actions .btn { flex: 1; }
  .ticket-bottom-bar > .muted { display: none; }
}

/* 0.1.4 – nieruchome kafle/filtry, przewijana wyłącznie lista. */
.dashboard-page .main-wrap { height: 100vh; overflow: hidden; }
.dashboard-page .app-footer { display: none; }
.dashboard-workspace { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding-top: 24px; padding-bottom: 18px; }
.dashboard-workspace .page-header, .dashboard-workspace .stats-grid, .dashboard-workspace .demo-callout { flex: 0 0 auto; }
.dashboard-workspace .page-header { margin-bottom: 18px; }
.dashboard-workspace .stats-grid { margin-bottom: 18px; }
.dashboard-workspace .dashboard-panel { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.dashboard-workspace .dashboard-panel > .panel-title, .dashboard-workspace .dashboard-panel > .filters { flex: 0 0 auto; }
.dashboard-workspace .dashboard-panel > .ticket-list { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #396087 #0d1b30; }
.dashboard-workspace .filters { grid-template-columns: minmax(140px,2fr) repeat(3, minmax(110px,1fr)) auto; }
.dashboard-workspace .filter-actions { align-items: stretch; }

/* Subtelne ramki zamiast pasków z lewej. */
.stat { border: 1px solid #315071; box-shadow: none; }
.stat::before { content: none; display: none; }
.menu a { border: 1px solid transparent; }
.menu a.selected { box-shadow: none; border-color: #345979; background: #122d4a; }
.menu a.selected:hover { border-color: #4a7298; background: #193956; }

/* Jednolite, wycentrowane serdelki bez kropek. */
.badge { width: 154px; min-width: 154px; max-width: 154px; justify-content: center; text-align: center; border-radius: 999px; padding: 6px 12px; }
.badge-dot { display: none; }
.ticket-row .ticket-meta { width: 164px; flex: 0 0 164px; }
.row-arrow { display: none; }

/* Logowanie: tylko pola, przycisk i dyskretny Turnstile. */
.auth-logo { margin-left: auto; margin-right: auto; }
.auth-card .eyebrow { text-align: center; }
.auth-card h1 { text-align: center; margin-bottom: 28px; }
.auth-form { gap: 11px; }
.turnstile-wrap { min-height: 0; margin: 10px 0 0; display: flex; justify-content: center; }
.turnstile-wrap > div { max-width: 100%; }

/* Komentarze: jedno okno z własnym przewijaniem, formularz stale u dołu. */
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-start; }
.comments-dialog { width: min(900px, calc(100vw - 28px)); height: min(88vh, 900px); max-height: calc(100dvh - 24px); overflow: hidden; }
.comments-dialog[open] { display: flex; flex-direction: column; }
.comments-dialog > .dialog-head { flex: 0 0 auto; margin-bottom: 7px; }
.comments-dialog-list { flex: 1 1 0; min-height: 100px; overflow-y: auto; padding: 4px 13px 8px 2px; scrollbar-color: #396087 #0d1b30; overscroll-behavior: contain; }
.comments-dialog-list .comment { padding: 15px 0; }
.comments-dialog .comment-form { flex: 0 0 auto; max-height: 36vh; overflow-y: auto; margin-top: 10px; padding: 14px; }
.comments-dialog .comment-form h3 { margin-bottom: 7px; }
.comments-dialog .comment-form textarea { min-height: 65px; height: 70px; margin-bottom: 7px; }
.comments-dialog > .dialog-actions { flex: 0 0 auto; padding-top: 9px; margin-top: 8px; }
.comments-dialog .comment .long-text { padding-left: 40px; }
.ticket-workspace .detail-main { justify-content: stretch; }
.ticket-workspace .description-card { flex: 1 1 auto; max-height: none; min-height: 130px; }
.ticket-workspace .detail-actions { flex: 0 0 auto; }
.ticket-workspace .ticket-bottom-bar { justify-content: flex-end; }

@media (max-width: 1100px) {
  .dashboard-workspace .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ticket-workspace .description-card { min-height: 0; }
}
@media (max-width: 760px) {
  .dashboard-page .main-wrap { height: calc(100dvh - 54px); overflow: hidden; }
  .dashboard-workspace { padding-top: 14px; padding-bottom: 9px; }
  .dashboard-workspace .page-header { margin-bottom: 9px; }
  .dashboard-workspace .stats-grid { margin-bottom: 10px; gap: 8px; }
  .dashboard-workspace .stat { padding: 12px; }
  .dashboard-workspace .panel > .panel-title { padding: 12px 16px; }
  .dashboard-workspace .filters { padding: 0 12px 12px; }
  .ticket-row .ticket-meta { width: auto; flex: 1 1 100%; }
  .comments-dialog { height: min(92dvh, 900px); }
  .comments-dialog .comment-form { max-height: 42vh; }
}
@media (max-width: 460px) {
  .dashboard-workspace .filters { grid-template-columns: 1fr; gap: 7px; }
  .dashboard-workspace .stat strong { font-size: 1.5rem; }
  .dashboard-workspace .panel > .panel-title { padding: 9px 12px; }
  .comments-dialog .comment-form { padding: 9px; }
  .comments-dialog-list .comment-head { flex-wrap: wrap; }
  .comments-dialog-list .comment-head time { margin-left: 40px; }
  .detail-actions .btn { flex: 1; }
}

/* 0.1.5 – jeden standard sterowania, jak Podgląd/Pobierz w galerii. */
.btn, .btn-small, .btn-clear {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #41688d;
  border-radius: 7px;
  font-size: .8rem;
  font-weight: 750;
  line-height: 1.35;
  box-shadow: none;
  transition: background-color .13s, border-color .13s, color .13s;
}
.btn-primary { background: #183f66; color: #cfe9ff; box-shadow: none; }
.btn-primary:hover { background: #27649c; color: #fff; border-color: #5185b4; }
.btn-outline, .btn-clear { background: #122e4d; border-color: #41688d; color: #cfe9ff; }
.btn-outline:hover, .btn-clear:hover { background: #28547d; border-color: #5185b4; color: #fff; }
.detail-actions { gap: 8px; }
.detail-actions .btn { flex: 0 0 auto; }
.dialog-actions .btn, .form-actions .btn { flex: 0 0 auto; }

/* Fokus dyskretny, ale nadal czytelny z klawiatury. */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #5981a6;
  box-shadow: 0 0 0 1px #4b719455;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
  border-color: #5981a6;
  box-shadow: 0 0 0 1px #4b719455;
}
.btn:focus-visible, .attachment-preview:focus-visible, .attachment-download:focus-visible, .dialog-x:focus-visible {
  outline: 1px solid #86a7c7;
  outline-offset: 2px;
}

/* Potwierdza wyłącznie kliknięcie w kwadracik, nie w tekst. */
.confirm-check, .final-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: default;
  font-size: .86rem;
  font-weight: 500;
  color: #dce9f9;
}
.confirm-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  padding: 0;
  flex: 0 0 17px;
  cursor: pointer;
  box-shadow: none;
}
.confirm-check input[type="checkbox"]:focus-visible {
  outline: 1px solid #86a7c7;
  outline-offset: 2px;
}
.confirm-check span { pointer-events: none; }

/* Prostokątny Turnstile w rozmiarze standardowym, wyśrodkowany. */
.turnstile-wrap { display: flex; justify-content: center; margin: 14px 0 0; min-height: 65px; }
.turnstile-wrap .cf-turnstile { max-width: 100%; }

/* 0.1.6 – stałe nagłówki zarządzania, przewijają się tylko zawartości paneli. */
.management-page .main-wrap { height: 100vh; min-height: 0; overflow: hidden; }
.management-page .app-footer { display: none; }
.management-workspace { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 24px clamp(18px, 3vw, 42px) 18px; }
.management-workspace > .page-header { flex: 0 0 auto; margin-bottom: 18px; }
.management-workspace > .alert { flex: 0 0 auto; }
.management-grid { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: minmax(0,1.55fr) minmax(335px,1fr); gap: 18px; }
.management-list-panel, .management-form-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.management-list-panel > .panel-title, .management-form-panel > .panel-title { flex: 0 0 auto; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.management-scroll { min-height: 0; flex: 1 1 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #396087 #0d1b30; }
.user-list.management-scroll { display: block; padding: 0 18px 15px; }
.management-workspace .user-row { align-items: center; padding: 14px 0; gap: 10px; }
.management-workspace .user-row .avatar { width: 32px; height: 32px; }
.management-workspace .user-details { min-width: 165px; }
.management-workspace .user-details strong { overflow-wrap: anywhere; }
.management-workspace .user-row .badge { min-width: 91px; max-width: 91px; width: 91px; font-size: .72rem; }
.management-workspace .user-actions { display: flex; gap: 7px; margin-left: auto; flex-wrap: wrap; }
.management-workspace .user-actions form { margin: 0; }
.new-user-form, .admin-settings-body { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 18px 20px 22px; display: grid; align-content: start; gap: 12px; }
.new-user-form .form-field label, .admin-mail-form label, .status-dialog .form-field label { display: block; margin-bottom: 5px; }
.new-user-form > .btn { justify-self: start; }
.secret-input-row { display: flex; align-items: stretch; gap: 7px; }
.secret-input-row > input { min-width: 0; flex: 1 1 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .02em; }
.secret-input-row > .btn { min-width: 42px; font-size: 1.1rem; padding: 6px; flex: 0 0 auto; }
.secret-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.secret-actions small { flex: 1 1 100%; color: #a9c8e8; }
.secret-actions small:empty { display: none; }
.status-dialog .form-field { margin-bottom: 12px; }
.sidebar-presence { margin-top: 34px; min-height: 0; max-height: 28vh; overflow-y: auto; padding: 0 11px; scrollbar-color: #2d506d transparent; }
.sidebar-presence .sidebar-label { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: #9eb7d4; }
.sidebar-presence p { margin: 0 0 6px; color: #91a9c5; font-size: .78rem; }
.sidebar-presence ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.sidebar-presence li { display: flex; align-items: center; gap: 8px; color: #c8d8eb; font-size: .8rem; overflow-wrap: anywhere; }
.online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4bd1a2; box-shadow: 0 0 0 2px #153b38; flex: 0 0 auto; }
.session-list { padding: 2px 20px 18px; }
.session-row { display: grid; grid-template-columns: minmax(140px,1fr) minmax(210px,1.4fr) auto; gap: 8px 15px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); font-size: .81rem; }
.session-row-main strong, .session-row-main small { display: block; }
.session-row-main strong { font-size: .88rem; }
.session-row-main small { margin-top: 4px; font-size: .76rem; }
.session-row-detail { display: grid; gap: 3px; color: #b8cce4; overflow-wrap: anywhere; }
.session-row-detail strong { font-weight: 600; color: #e0edfc; }
.session-state { justify-self: end; border: 1px solid #496178; border-radius: 999px; padding: 4px 9px; color: #c5d2e4; font-size: .72rem; }
.session-state.online { border-color: #337d66; color: #9df6d6; }
.session-agent { grid-column: 1 / -1; color: #8eafce; font-size: .74rem; }
.session-agent summary { cursor: pointer; width: max-content; max-width: 100%; }
.session-agent code { display: block; padding-top: 7px; max-width: 100%; overflow-wrap: anywhere; color: #b0cce8; }
.admin-mail-form { display: grid; gap: 10px; }
.admin-mail-form .btn { justify-self: start; }
.admin-settings-body > form > .btn { max-width: 100%; white-space: normal; }
.admin-settings-body .mail-stats { margin: 0; padding: 5px 0; gap: 8px 16px; }
.empty-audit { margin: 25px 0; }

@media (max-width: 1180px) {
  .management-grid { display: block; overflow-y: auto; padding-right: 4px; }
  .management-list-panel { height: min(54vh, 650px); min-height: 240px; margin-bottom: 16px; }
  .management-form-panel { min-height: 360px; margin-bottom: 16px; }
  .management-form-panel .new-user-form, .management-form-panel .admin-settings-body { overflow: visible; }
}
@media (max-width: 760px) {
  .management-page .main-wrap { height: calc(100dvh - 80px); }
  .management-workspace { padding-top: 12px; padding-bottom: 8px; }
  .management-workspace > .page-header { margin-bottom: 10px; }
  .session-row { grid-template-columns: minmax(0,1fr) auto; }
  .session-row-detail { grid-column: 1 / -1; }
  .user-list.management-scroll { padding: 0 11px 10px; }
}

/* 0.1.7 – spójne komunikaty i stała, dyskretna stopka. */
.alert {
  display: table;
  width: max-content;
  max-width: min(100%, 760px);
  margin: 0 auto 16px;
  padding: 9px 15px;
  border-radius: 999px;
  text-align: center;
  font-size: .84rem;
  line-height: 1.45;
  transition: opacity .3s ease;
}
.alert.alert-fading { opacity: 0; pointer-events: none; }
.auth-card .alert { max-width: 100%; border-radius: 13px; font-size: .78rem; margin-bottom: 18px; }
.app-footer { flex: 0 0 auto; padding: 7px 12px 12px; line-height: 1.3; font-size: .72rem; color: #7994b3; }
.app-footer a { color: #a8caff; font-weight: 750; border-bottom: 1px solid transparent; transition: color .14s,border-color .14s; }
.app-footer a:hover, .app-footer a:focus-visible { color: #fff; border-bottom-color: #72afff; }
.dashboard-page .app-footer, .management-page .app-footer { display: block; }
.dashboard-workspace, .management-workspace { height: auto; flex: 1 1 0; }
@media (min-width: 1101px) { .ticket-workspace { height: auto; flex: 1 1 0; } }
.auth-page { position: relative; padding-bottom: 50px; }
.auth-footer { position: absolute; bottom: 5px; left: 0; right: 0; }

/* Każdy użytkownik osobno widzi nowe zmiany w zgłoszeniu. */
.ticket-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.ticket-title-line > strong { flex: 0 1 auto; min-width: 0; }
.unseen-pill { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: auto; max-width: 100%; padding: 3px 10px; background: #173f61; border: 1px solid #477da8; border-radius: 999px; color: #bbdeff; font-size: .73rem; font-weight: 750; line-height: 1.4; }

/* Lista użytkowników ma wysokość zawartości; tworzenie konta w popupie. */
.users-list-wrap { display: flex; flex: 0 1 auto; min-height: 0; max-height: 100%; width: min(100%, 1160px); }
.users-list-panel { width: 100%; min-height: 0; height: max-content; max-height: 100%; }
.users-list-panel .management-scroll { flex: 0 1 auto; min-height: 0; max-height: calc(100dvh - 235px); overflow-y: auto; }
.users-create-dialog { width: min(560px, calc(100vw - 28px)); max-height: min(90dvh, 810px); overflow: hidden; }
.users-create-dialog[open] { display: flex; flex-direction: column; }
.users-create-dialog > .dialog-head { flex: 0 0 auto; margin-bottom: 9px; }
.users-create-dialog .new-user-form { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 4px 10px; }
.users-create-dialog .new-user-form .dialog-actions { margin-top: 5px; padding-top: 13px; }

/* Numer prowadzi bezpośrednio do zgłoszenia z galerii. */
.gallery-ticket-link { color: #92c8ff; font-weight: 800; border-bottom: 1px solid transparent; }
.gallery-ticket-link:hover { color: #fff; border-bottom-color: #8bc0f5; }

/* 0.1.8 – kafle filtrują zgłoszenia, a etykiety statusów zajmują tylko tyle miejsca, ile potrzebują. */
.stat-link { display: block; color: inherit; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.stat-link:hover, .stat-link:focus-visible { color: inherit; background: #142b47; border-color: #527da7; outline: none; }
.stat-link.stat-active { border-color: #527da7; }
.badge { width: auto; min-width: 0; max-width: none; padding: 4px 10px; font-size: .73rem; line-height: 1.35; }

/* 0.1.9 – ONLINE przy profilu, dyskretne hasła i jednolite statusy. */
.sidebar-presence { margin-top: auto; margin-bottom: 16px; }
.sidebar-bottom { margin-top: 0; }
.sidebar-presence .sidebar-label { display: block; }
.password-input-row { position: relative; width: 100%; }
.password-input-row > input { padding-right: 48px; }
.auth-form .password-input-row { margin-bottom: 6px; }
.auth-form .password-input-row > input { margin-bottom: 0; }
.password-input-row > .password-toggle {
  position: absolute; top: 50%; right: 7px; transform: translateY(-50%);
  display: grid; place-items: center; width: 36px; height: 34px;
  margin: 0; padding: 0; border: 0; border-radius: 7px;
  background: transparent; color: #bdd6f3; font-size: 1.1rem; cursor: pointer;
}
.password-input-row > .password-toggle:hover,
.password-input-row > .password-toggle:focus-visible { background: #254363; color: #fff; outline: none; }
.badge { width: 126px; min-width: 126px; max-width: 126px; justify-content: center; text-align: center; }
.ticket-heading .badge { font-size: .73rem; }
.unseen-pill { color: #ffccd5; background: #4c202c; border-color: #9d4457; }
.ticket-workspace .ticket-heading { background: transparent; }
@media (max-width: 1100px) {
  .ticket-workspace .ticket-heading { backdrop-filter: blur(16px); }
}

/* 0.1.10 – czerwone zmiany po lewej od statusu, w tym samym wierszu. */
.ticket-badges { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.ticket-row .ticket-meta-unread { width: 260px; flex: 0 0 260px; }
@media (max-width: 760px) {
  .ticket-row .ticket-meta-unread { width: auto; flex: 1 1 100%; }
}

/* 0.1.11 – generator własnego hasła bez dodatkowego odstępu przy przyciskach. */
.stack-form .secret-actions button { margin-top: 0; }

@media (max-width: 760px) {
  .management-workspace .users-list-wrap { max-height: calc(100% - 5px); }
  .management-workspace .users-list-panel { margin: 0; }
  .users-list-panel .management-scroll { max-height: calc(100dvh - 210px); }
  .app-footer { font-size: .67rem; padding: 5px 7px 8px; }
}

/* 0.1.12 – pomoc zespołowa w formie książki; pozostałe ekrany bez zmian. */
.menu .menu-help {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 15px;
  border: 1px solid transparent; border-radius: 10px; background: transparent;
  color: #becde2; font: inherit; font-size: .91rem; font-weight: 600;
  text-align: left; cursor: pointer;
}
.menu .menu-help:hover, .menu .menu-help:focus-visible {
  background: #172b48; color: #fff; border-color: #345979; outline: none;
}
.help-dialog { width: min(1160px, calc(100vw - 28px)); height: min(91dvh, 920px); max-height: none; padding: 20px 22px 15px; overflow: hidden; }
.help-dialog[open] { display: flex; flex-direction: column; }
.help-dialog > .help-head { flex: 0 0 auto; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.help-dialog > .help-head .eyebrow { display: block; margin-bottom: 3px; }
.help-book { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 22px; flex: 1 1 0; min-height: 0; }
.help-toc { display: block; overflow-y: auto; min-height: 0; padding: 6px 12px 12px 0; border-right: 1px solid var(--line); scrollbar-color: #396087 transparent; }
.help-toc-title { display: block; margin: 1px 9px 12px; color: #91a9c5; font-size: .68rem; letter-spacing: .12em; font-weight: 800; }
.help-toc button {
  display: block; width: 100%; padding: 9px 10px; margin: 2px 0;
  border: 1px solid transparent; border-radius: 8px; background: transparent;
  color: #becfe5; font-size: .84rem; font-weight: 600; text-align: left; cursor: pointer;
}
.help-toc button:hover, .help-toc button:focus-visible { background: #152d4a; color: #fff; outline: none; }
.help-toc button.help-toc-current { border-color: #36597d; background: #183758; color: #fff; }
.help-pages { position: relative; min-width: 0; min-height: 0; overflow-y: auto; padding: 4px 16px 12px 0; overscroll-behavior: contain; scrollbar-color: #396087 #0d1b30; }
.help-chapter { margin: 0 0 33px; padding: 0 0 24px; border-bottom: 1px solid #294360; scroll-margin-top: 8px; }
.help-chapter:last-child { margin-bottom: 0; border-bottom: 0; }
.help-chapter-number { display: block; margin-bottom: 7px; font-size: .68rem; letter-spacing: .11em; color: #83b9ff; font-weight: 850; }
.help-chapter h3 { margin: 0 0 15px; font-size: 1.4rem; letter-spacing: -.02em; color: #f4f8ff; }
.help-chapter p { margin: 0 0 13px; font-size: .91rem; line-height: 1.65; color: #d6e4f5; }
.help-chapter strong { color: #f0f7ff; font-weight: 750; }
.help-chapter ul { margin: 14px 0 18px; padding-left: 21px; color: #d6e4f5; font-size: .89rem; line-height: 1.65; }
.help-chapter li { margin-bottom: 8px; }
.help-chapter .help-signoff { margin-top: 19px; color: #97c2f3; font-weight: 800; }
.help-figure { margin: 17px 0 15px; padding: 8px; background: #081525; border: 1px solid #315273; border-radius: 12px; }
.help-figure img { display: block; width: 100%; height: auto; max-height: 350px; object-fit: contain; border-radius: 7px; }
.help-figure figcaption { padding: 8px 4px 2px; color: #9cb4d1; font-size: .74rem; line-height: 1.45; }
.help-dialog > .help-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 12px; }
.help-footer > span { font-size: .73rem; color: #7da4cf; }
@media (max-width: 760px) {
  .menu .menu-help { width: auto; padding: 9px 11px; font-size: .82rem; white-space: nowrap; flex: 0 0 auto; }
  .help-dialog { width: calc(100vw - 14px); height: calc(100dvh - 14px); padding: 14px 12px 10px; }
  .help-dialog > .help-head { margin-bottom: 9px; padding-bottom: 9px; }
  .help-book { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); gap: 9px; }
  .help-toc { display: flex; gap: 5px; overflow-x: auto; overflow-y: hidden; padding: 0 0 9px; border-right: 0; border-bottom: 1px solid var(--line); }
  .help-toc-title { display: none; }
  .help-toc button { flex: 0 0 auto; width: auto; white-space: nowrap; margin: 0; padding: 7px 10px; font-size: .78rem; }
  .help-pages { padding: 4px 5px 10px 0; }
  .help-chapter h3 { font-size: 1.2rem; }
  .help-chapter p, .help-chapter ul { font-size: .86rem; }
  .help-figure { padding: 4px; }
  .help-dialog > .help-footer { padding-top: 8px; }
}

/* 0.1.13 – czytelne pochodzenie zgłoszeń historycznych z WhatsApp. */
.ticket-source-badge { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 2px 9px; border: 1px solid #477a9d; border-radius: 999px; color: #bfe6ff; background: #193a55; font-size: .67rem; font-weight: 750; line-height: 1.5; }
.whatsapp-provenance { margin: -2px 0 16px; padding: 9px 16px; border: 1px solid #4d7e9d; border-radius: 11px; background: #12324a; color: #d8efff; text-align: center; font-size: .84rem; font-weight: 700; line-height: 1.45; }
.comment-source { display: inline-flex; padding: 1px 8px; border: 1px solid #396382; border-radius: 999px; background: #143451; color: #a9d9fa; font-size: .65rem; font-weight: 700; }
.whatsapp-import-panel { padding: 18px 21px; margin-bottom: 16px; max-width: 1080px; }
.whatsapp-import-panel h2 { margin: 0 0 6px; }
.whatsapp-import-panel p { margin: 0 0 14px; font-size: .86rem; line-height: 1.55; color: #b9cce2; }
.whatsapp-import-panel form { display: grid; justify-items: start; gap: 12px; }
.whatsapp-import-panel .confirm-check { background: none; border: 0; padding: 2px 0; }
.import-login-note { color: #b2d9ff; font-size: .8rem; text-align: center; margin-top: 13px; }
@media (max-width: 760px) {
  .whatsapp-provenance { margin: 0 0 10px; padding: 10px 12px; font-size: .77rem; }
  .ticket-source-badge { font-size: .62rem; }
}

/* 0.1.14 – stałe nagłówki, przewijanie długich zgłoszeń i sortowanie. */
.ticket-detail-scroll { min-height: 0; scrollbar-color: #5686b2 #0d2137; scrollbar-width: auto; }
.ticket-detail-scroll:focus-visible { outline: 1px solid #47799f; outline-offset: -1px; border-radius: 5px; }
.ticket-detail-scroll::-webkit-scrollbar { width: 12px; }
.ticket-detail-scroll::-webkit-scrollbar-track { background: #0d2137; border-radius: 9px; }
.ticket-detail-scroll::-webkit-scrollbar-thumb { background: #5686b2; border-radius: 9px; border: 2px solid #0d2137; }
@media (min-width: 1101px) {
  .ticket-workspace .description-card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  .ticket-workspace .description-card > h2 { flex: 0 0 auto; }
  .ticket-workspace .ticket-detail-scroll { flex: 1 1 0; min-height: 0; overflow-y: scroll; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 1px 7px 7px 0; }
}

/* 0.1.15: niezależnie przewijane załączniki wewnątrz komentarzy. */
.comments-dialog-list { min-height: 0; overflow-y: auto; }
.comments-dialog .comment-files-scroll { display: grid; max-height: min(42vh, 390px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: auto; scrollbar-color: #5686b2 #0d2137; padding-right: 10px; }
.comments-dialog .comment-files-scroll::-webkit-scrollbar { width: 12px; }
.comments-dialog .comment-files-scroll::-webkit-scrollbar-thumb { background: #5686b2; border-radius: 8px; }
.comments-dialog .comment-files-scroll::-webkit-scrollbar-track { background: #0d2137; }
.comments-dialog .comment-file-label { margin: 12px 0 0 40px; font-weight: 700; color: #d8efff; }
.comments-dialog .comment-files-scroll:focus-visible { outline: 2px solid #5686b2; outline-offset: 2px; }
@media (max-width: 600px) { .comments-dialog .comment-files-scroll { max-height: 38dvh; } .comments-dialog .comment-file-label { margin-left: 0; } .comment .inline-attachments { margin-left: 0; } }

/* 0.1.16: pojedynczy rozdział pomocy, bez sąsiednich rozdziałów. */
.help-pages > .help-chapter[hidden] { display: none !important; }
.help-pages > .help-chapter:not([hidden]) { margin: 0; padding-bottom: 30px; border-bottom: 0; }

/* 0.1.17 — pełna czytelność opisu zgłoszenia; bez ściskania panelu. */
@media (min-width: 1101px) {
  .ticket-page .main-wrap { height: 100dvh; min-height: 0; overflow-y: auto; overflow-x: hidden; }
  .ticket-workspace { height: auto; min-height: 100%; overflow: visible; flex: 0 0 auto; }
  .ticket-workspace .ticket-heading { position: static; }
  .ticket-workspace .detail-grid { flex: 0 0 auto; min-height: 0; overflow: visible; align-items: start; }
  .ticket-workspace .detail-main { min-height: 0; overflow: visible; }
  .ticket-workspace .description-card {
    display: block; flex: 0 0 auto; min-height: 260px; max-height: none;
    height: auto; overflow: visible; padding: 24px 27px;
  }
  .ticket-workspace .description-card > h2 { margin-bottom: 16px; }
  .ticket-workspace .ticket-detail-scroll {
    display: block; min-height: 0; max-height: none; height: auto;
    overflow: visible; padding: 0; scrollbar-gutter: auto;
  }
  .ticket-workspace .detail-side { overflow: visible; min-height: 0; }
}

/* 0.1.19 — wyłącznie wiersz filtrów zgłoszeń. */
.dashboard-workspace .filters #q { width: 286px; min-width: 286px; }
.dashboard-workspace .filters #project { width: 182px; }
.dashboard-workspace .filters #status { width: 177px; }
.dashboard-workspace .filters #sort { width: 114px; }
.dashboard-workspace .priority-filter {
  display: flex; align-items: center; gap: 7px; width: 173px;
  color: #dae7fa; font-size: .83rem; font-weight: 600; white-space: nowrap;
}
.dashboard-workspace .priority-choice { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.dashboard-workspace .priority-choice input[type="checkbox"] {
  appearance: auto; width: 15px; min-width: 15px; height: 15px; margin: 0; padding: 0;
  flex: 0 0 15px; border-radius: 3px; box-shadow: none; accent-color: #4a96f5;
}
.dashboard-workspace .priority-choice input[type="checkbox"]:focus-visible {
  outline: 1px solid #77b3ff; outline-offset: 2px; box-shadow: none;
}
@media (min-width: 1560px) {
  .dashboard-workspace .filters {
    grid-template-columns: 286px 182px 177px 114px 173px max-content;
    justify-content: space-between; column-gap: 8px;
  }
}
@media (min-width: 1101px) and (max-width: 1559px) {
  .dashboard-workspace .filters {
    grid-template-columns: minmax(286px, 1fr) 182px 177px;
  }
  .dashboard-workspace .filters #sort { justify-self: end; }
  .dashboard-workspace .filters .filter-actions { justify-content: flex-start; }
}
@media (max-width: 1100px) {
  .dashboard-workspace .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .dashboard-workspace .filters { grid-template-columns: 1fr; }
  .dashboard-workspace .filters #q { width: 100%; min-width: 0; }
}
