/*
 * IT SERWIS — NAVY / ELECTRIC BLUE v6.3 | LOGO
 * Aktualizacja logo i motywu kolorystycznego. Bez bibliotek, czcionek online ani JavaScript.
 * Brak zaokrągleń w CAŁYM panelu (również w komponentach przeglądarki).
 */
:root {
  color-scheme: light;
  --bg: #f2f6fb;
  --card: #ffffff;
  --ink: #14263e;
  --muted: #63768c;
  --line: #dbe5ef;
  --line-strong: #bbcbdc;
  --brand: #086fcb;
  --brand-dark: #04549f;
  --brand-pale: #e9f5ff;
  --nav: #061631;
  --nav-border: #164476;
  --shadow: none;
  --radius: 0px;
  --electric: #15baff;
  --electric-soft: #65d4ff;
}
*, *::before, *::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}
html { font-size: 15px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .52; cursor: not-allowed; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
:focus-visible { outline: 2px solid #0b91e3; outline-offset: 2px; }
::selection { background: #b8e5fd; color: #0c2546; }
.container { width: min(100% - 60px, 1400px); margin-inline: auto; padding-inline: 0; }

/* Główna nawigacja — grafit, cienka linia i prostokątne aktywne zakładki */
.topbar {
  position: relative;
  z-index: 10;
  background: var(--nav);
  border-bottom: 2px solid var(--electric);
  box-shadow: none;
}
.navinner { display: flex; gap: 23px; align-items: center; min-height: 78px; }
.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 13px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.brand:hover { color: #fff; text-decoration: none; }
.brandlogo {
  display: block;
  height: 44px;
  width: 49px;
  flex: 0 0 49px;
  object-fit: cover;
  object-position: center center;
  background: #061631;
  border: 1px solid #1b4c78;
  box-shadow: none;
}
.brand:hover .brandlogo { border-color: #37bfff; }

.topbar nav { display: flex; align-items: stretch; gap: 1px; flex: 1 1 auto; flex-wrap: wrap; }
.topbar nav a {
  display: inline-flex;
  align-items: center;
  padding: 12px 10px;
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #b8cbe0;
  font-size: 12.7px;
  font-weight: 610;
  line-height: 1.25;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.topbar nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.topbar nav a.selected { background: rgba(255,255,255,.075); color: #fff; border-bottom-color: #23bdff; }
.account {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
  padding-left: 17px;
  border-left: 1px solid #1e426a;
  white-space: nowrap;
  font-size: 12px;
  color: #fff;
}
.account span { font-weight: 700; }
.account small { display: block; margin-top: 1px; text-align: right; color: #8fb1d2; font-weight: 450; }
.account a { color: #64d4ff; font-weight: 700; }
.account a:hover { color: #fff; }

/* Typografia, nagłówki i kompozycja */
.page-title { margin: 32px 0 24px; }
.page-title::before {
  content: "PANEL SERWISOWY";
  display: block;
  margin-bottom: 5px;
  color: #637f9a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}
.page-title h1 { margin: 0; font-size: clamp(23px, 2.6vw, 30px); font-weight: 770; line-height: 1.25; letter-spacing: -.045em; }
h2 { margin: 0 0 17px; font-size: 19px; font-weight: 750; letter-spacing: -.025em; line-height: 1.35; }
h3 { margin: 0 0 16px; font-size: 15px; font-weight: 730; line-height: 1.4; }
p { margin-top: 0; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 12px; margin: 10px 0 0; }

/* Karty i panele — płaskie, ostre narożniki */
.panel {
  padding: 26px 28px;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: none;
}
.panel h2:not(:first-child) { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; }
.panel h3:not(:first-child) { margin-top: 25px; }
.panel.narrow { max-width: 480px; margin: 42px auto; padding: 36px; border-top: 3px solid var(--brand); }
.panel.narrow p { margin-bottom: 22px; }
.narrow-settings { max-width: 860px; }
.actionbar, .section-title, .form-actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.actionbar { margin-bottom: 21px; }
.actionbar h2 { font-size: 21px; margin: 9px 0; }
.actionbar p { margin: 0; }
.actionbuttons, .badge-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.section-title { margin-bottom: 10px; }
.section-title h2 { margin-bottom: 4px; }

/* KPI — spójne prostokąty i jedna pozioma linia akcentu */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; margin: 19px 0 24px; }
.stats-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat {
  display: block;
  position: relative;
  padding: 18px 21px 20px;
  min-width: 0;
  min-height: 118px;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid #158ed9;
  box-shadow: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.stat:hover { background: #f4faff; border-color: #9bc9ec; text-decoration: none; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 600; display: block; }
.stat strong { display: block; margin-top: 4px; font-size: 34px; letter-spacing: -.05em; font-weight: 790; color: var(--ink); line-height: 1.32; }
.stat strong.money-figure { font-size: 24px; }

/* Przyciski i formularze */
.button, .mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #23415e;
  box-shadow: none;
  font-size: 13px;
  font-weight: 670;
  line-height: 1.35;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.button:hover, .mini-button:hover { background: #f2f6fa; border-color: #96bad8; text-decoration: none; color: #1e3449; }
.button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.button.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.button.ghost { background: transparent; }
.button.wide { width: 100%; }
.mini-button { min-height: 31px; padding: 6px 10px; font-size: 11.5px; }
label { display: block; margin: 0 0 17px; color: #3e4e60; font-size: 12.5px; font-weight: 690; }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  min-height: 41px;
  color: var(--ink);
  border: 1px solid #c0cfdf;
  background: #fff;
  box-shadow: none;
  outline: 0;
}
input:hover, select:hover, textarea:hover { border-color: #91b1d1; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(7,130,214,.13); }
input::placeholder, textarea::placeholder { color: #9aa6b3; }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: var(--brand); }
input[type="file"] { height: auto; }
label.checkbox { display: flex; gap: 9px; align-items: center; margin: 0; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 24px; }
.form-grid .span2 { grid-column: span 2; }
.form-actions { justify-content: flex-start; margin-top: 26px; }
.form-stack { display: flex; flex-direction: column; align-items: stretch; gap: 5px; }
.form-stack .button { align-self: flex-start; }
.form-stack label { margin-bottom: 10px; }
.inline-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  margin-top: 20px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.inline-form label { flex: 1 1 140px; margin: 0; }
.inline-form label:first-of-type { flex: 2 1 210px; }
.inline-form input { min-height: 41px; }
.filters { display: flex; align-items: end; gap: 11px; flex-wrap: wrap; margin-bottom: 23px; }
.filters label { min-width: 160px; margin: 0; }
.filters label:first-child { flex: 1; min-width: 180px; }
.filters .button { flex-shrink: 0; }
.filters label select, .filters label input { min-height: 41px; }
.tiny-form { min-width: 230px; margin-top: 10px; padding: 12px; background: #f8fafc; border: 1px solid var(--line); }
.tiny-form label { margin-bottom: 6px; }
.tiny-form input { min-width: 170px; }

/* Tabele — ciche linie i czytelna siatka zamiast kart w kartach */
.table-wrap { overflow-x: auto; overflow-y: visible; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; min-width: 600px; text-align: left; }
th, td { padding: 13px 14px; border-bottom: 1px solid #e6ebf0; vertical-align: middle; }
th {
  color: #526378;
  background: #f0f6fc;
  font-size: 10.6px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .075em;
  text-transform: uppercase;
}
td { background: #fff; font-size: 12.7px; }
tr:last-child > td { border-bottom: none; }
tbody tr:hover > td { background: #f0f9ff; }
td small { display: block; color: var(--muted); margin-top: 3px; }
.strong-link { font-weight: 760; }
.empty { padding: 33px; color: var(--muted); text-align: center; }

/* Statusy — zachowują rozróżnienie, ale BEZ obłych etykiet */
.status, .pill {
  display: inline-block;
  padding: 4px 8px;
  background: #eef1f4;
  border: 1px solid transparent;
  color: #506276;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.35;
  white-space: nowrap;
}
.status-new { background: #eaf2fd; color: #225c98; border-color: #dae8f9; }
.status-in_progress { background: #e5f4fc; color: #1d738f; border-color: #d2eaf5; }
.status-waiting { background: #fff4df; color: #8d640f; border-color: #f4e7c6; }
.status-done { background: #e7f6ee; color: #28764b; border-color: #d2ecdd; }
.status-closed { background: #edf0f4; color: #526071; border-color: #e0e5ec; }
.status-cancelled { background: #fff0ed; color: #a24240; border-color: #f6dbd7; }
.pill.green { background: #e7f6ee; color: #28764b; }
.pill.amber { background: #fff4df; color: #8d640f; }

/* Zgłoszenia, oś czasu i metadane */
.layout-two { display: grid; grid-template-columns: minmax(0,2fr) minmax(260px,1fr); gap: 21px; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.details span { display: block; font-size: 11px; color: var(--muted); }
.details strong { display: block; margin-top: 3px; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 0; }
.meta dt { color: var(--muted); font-size: 12px; }
.meta dd { margin: 0; text-align: right; font-size: 12px; font-weight: 700; }
.timeline { margin: 5px 0 18px 6px; border-left: 1px solid #c8d8e6; }
.event { position: relative; padding: 0 0 19px 19px; }
.event-dot { width: 8px; height: 8px; position: absolute; left: -4.5px; top: 6px; background: var(--brand); }
.event small { color: var(--muted); }
.event p { margin: 5px 0 0; font-size: 13px; }
.costs { display: flex; justify-content: flex-end; gap: 23px; flex-wrap: wrap; padding-top: 18px; margin-top: 12px; border-top: 1px solid var(--line); }
.costs .total { font-size: 17px; font-weight: 800; }
.payment-cell { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
details { margin-top: 8px; font-size: 12px; }
summary { color: var(--brand); font-weight: 700; cursor: pointer; }
.small-form { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.small-form input { flex: 1; min-width: 130px; width: auto; margin: 0; padding: 7px; }

/* Informacje, błędy, powiadomienia i raport płatności */
.alert { padding: 13px 16px; margin: 0 0 19px; border: 1px solid; border-left-width: 3px; }
.alert.success { background: #eff9f2; border-color: #bcdcc6; border-left-color: #297649; color: #205c38; }
.alert.error { background: #fff2f1; border-color: #f0cbca; border-left-color: #b54442; color: #813131; }
.br-stat { background: #f7fafc; border: 1px solid var(--line); border-top: 2px solid #2b6f9e; }
.br-info { background: #eaf6ff; border: 1px solid #b2daf4; }
.br-error { border: 1px solid #f0cbca; border-left: 3px solid #b54442; }
.br-total > td { background: #e8f5fc; }
hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }
.footer { padding: 31px 0 34px; margin-top: 18px; font-size: 11px; color: #8794a4; text-align: center; }

@media (max-width: 1150px) {
  .navinner { flex-wrap: wrap; gap: 8px 18px; padding-block: 12px; }
  .topbar nav { order: 3; flex-basis: 100%; }
  .account { margin-left: auto; }
  .stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .layout-two { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .container { width: min(100% - 28px, 1400px); }
  .navinner { gap: 8px 10px; }
  .brand { font-size: 17px; }
  .brandlogo { width: 40px; height: 36px; flex-basis: 40px; }
  .account { padding-left: 10px; gap: 8px; font-size: 11px; }
  .topbar nav { gap: 0; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .topbar nav a { padding: 9px 11px; font-size: 12px; flex: 0 0 auto; }
  .page-title { margin: 23px 0 17px; }
  .panel { padding: 18px; }
  .panel.narrow { margin: 14px auto; padding: 24px 19px; }
  .stats, .stats-three { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .stat { padding: 14px; min-height: 100px; }
  .stat strong { font-size: 28px; }
  .stat strong.money-figure { font-size: 19px; }
  .form-grid, .details { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
  .filters label, .filters label:first-child { flex: 1 1 100%; min-width: 0; }
  .filters .button { flex: 1; }
  .actionbar { align-items: flex-start; }
  .actionbuttons { width: 100%; }
  .actionbuttons .button { flex: 1; }
  .inline-form label { flex-basis: 100%; }
  .costs { justify-content: flex-start; gap: 13px; }
  .br-stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 380px) {
  .stats, .stats-three { grid-template-columns: 1fr 1fr; }
  .account small { display: none; }
  .brand { font-size: 15px; }
  .topbar nav a { padding-inline: 8px; }
}
/* Druk raportów bez ciemnego paska i z zachowaniem prawidłowej szerokości tabel */
@media print {
  .topbar { background: #fff; border: 0; }
  .page-title::before { display: none; }
  .panel, .stat, .table-wrap { box-shadow: none; }
  .table-wrap { border: 0; }
  .button { display: none; }
}


/* Brand accents: inspired by the supplied neon-blue on navy artwork. */
.brand { text-shadow: 0 0 0 transparent; }
.topbar nav a.selected {
  box-shadow: inset 0 -1px 0 rgba(25,188,255,.18);
}
.page-title::before { color: #357aa9; }
.page-title h1 { color: #09294d; }
.stat:nth-child(2n) { border-top-color: #149fea; }
.stat strong { color: #0c2e54; }
.button.primary { background: #0677d1; border-color: #0677d1; color: #fff; }
.button.primary:hover { background: #055aa6; border-color: #055aa6; }
.strong-link:hover { color: #055aa6; }
.panel.narrow { border-top: 3px solid #16a4ee; }
/* Force square UI throughout (original logo artwork is preserved). */
*, *::before, *::after { border-radius: 0 !important; }

/* IT SERWIS v6.6 — kompaktowa karta zgłoszenia, tylko ticket.php.
   Bez zaokrągleń i bez wpływu na wygląd pozostałych modułów. */
.ticket-jump {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0;
  margin: 0 0 12px; padding: 0 10px;
  border: 1px solid var(--line); background: #fff;
}
.ticket-jump a {
  display: inline-block; padding: 9px 13px; color: #33536f;
  font-size: 12px; font-weight: 650; border-bottom: 2px solid transparent;
}
.ticket-jump a:hover { color: var(--brand); background: #f1f8fe; border-bottom-color: var(--brand); text-decoration: none; }
.ticket-strip {
  display: grid; grid-template-columns: 1fr 1.5fr 1.4fr 1fr 1fr;
  gap: 0; background: #fff; border: 1px solid var(--line);
  margin-bottom: 15px;
}
.ticket-strip > div { padding: 10px 14px; min-width: 0; border-right: 1px solid var(--line); }
.ticket-strip > div:last-child { border-right: 0; }
.ticket-strip span { display: block; font-size: 10px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ticket-strip strong { display: block; overflow-wrap: anywhere; margin-top: 2px; font-size: 12px; font-weight: 730; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 15px; align-items: start; }
.ticket-primary { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ticket-sidebar { display: flex; flex-direction: column; gap: 12px; min-width: 0; position: sticky; top: 15px; }
.ticket-overview { padding: 16px 19px; border-left: 3px solid var(--brand); }
.ticket-overview h3 { margin-bottom: 7px; }
.ticket-overview h3:not(:first-child) { font-size: 13px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ticket-overview p { margin: 0; font-size: 13px; }
.ticket-accordion { display: block; background: #fff; border: 1px solid var(--line); margin: 0; font-size: inherit; min-width: 0; }
.ticket-accordion > summary {
  display: flex; align-items: center; padding: 12px 14px; min-height: 63px;
  gap: 12px; color: var(--ink); cursor: pointer; list-style: none;
}
.ticket-accordion > summary::-webkit-details-marker { display: none; }
.ticket-accordion[open] > summary { border-bottom: 1px solid var(--line); background: #f8fbff; }
.ticket-accordion > summary:hover { background: #f3f8ff; }
.ticket-acc-index {
  display: flex; align-items: center; justify-content: center; flex: 0 0 34px; height: 34px;
  background: #eef6fc; color: #1579bd; border: 1px solid #cfdfed; font-size: 11px; font-weight: 800;
}
.ticket-acc-text { display: block; flex: 1 1 auto; min-width: 0; }
.ticket-acc-text strong { font-size: 13px; display: block; line-height: 1.35; }
.ticket-acc-text small { font-size: 11px; display: block; color: var(--muted); font-weight: 400; margin-top: 1px; }
.ticket-acc-count { display: inline-flex; min-width: 21px; color: var(--muted); justify-content: flex-end; font-size: 12px; }
.ticket-acc-count:empty { display: none; }
.ticket-acc-toggle { width: 9px; height: 9px; flex: 0 0 9px; border-right: 2px solid #5b7895; border-bottom: 2px solid #5b7895; transform: rotate(45deg); margin: -4px 6px 0; }
.ticket-accordion[open] .ticket-acc-toggle { transform: rotate(225deg); margin-top: 5px; }
.ticket-acc-body { padding: 14px 17px 17px; min-width: 0; }
.ticket-acc-body > .panel { border: 0; padding: 0; background: none; box-shadow: none; }
.ticket-acc-body > .panel + .panel { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.ticket-acc-body > .panel h3 { font-size: 12.5px; margin-bottom: 10px; }
.ticket-acc-body > .panel h3:not(:first-child) { margin-top: 15px; padding-top: 12px; }
.ticket-acc-body > .panel .hint { font-size: 11.5px; margin-top: 6px; }
.ticket-acc-body .details { gap: 9px 12px; }
.ticket-acc-body .details > div { padding: 0 0 8px; border-bottom: 1px solid #edf2f6; }
.ticket-acc-body .table-wrap { max-width: 100%; }
.ticket-acc-body .table-wrap table { font-size: 12px; }
.ticket-acc-body .table-wrap td, .ticket-acc-body .table-wrap th { padding-top: 8px; padding-bottom: 8px; }
.ticket-acc-body .inline-form { gap: 9px; margin-top: 12px; }
.ticket-acc-body .inline-form .button { align-self: flex-end; }
.ticket-acc-body .form-stack textarea { min-height: 70px; }
.ticket-sidebar > .panel { padding: 16px 17px; }
.ticket-sidebar > .panel h3 { margin-bottom: 11px; }
.ticket-sidebar .form-stack label { font-size: 12px; }
.ticket-sidebar .form-stack .button { width: 100%; }
.ticket-sidebar .meta { gap: 8px; }
.ticket-sidebar .meta dt, .ticket-sidebar .meta dd { font-size: 11.5px; }
@media (max-width: 1130px) {
  .ticket-strip { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ticket-strip > div { border-bottom: 1px solid var(--line); }
  .ticket-layout { grid-template-columns: minmax(0,1fr) 290px; }
}
@media (max-width: 850px) {
  .ticket-layout { grid-template-columns: minmax(0,1fr); }
  .ticket-sidebar { position: static; order: -1; }
  .ticket-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 480px) {
  .ticket-jump { padding: 0; }
  .ticket-jump a { padding: 9px 10px; font-size: 11px; }
  .ticket-strip { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .ticket-strip > div { padding: 8px; }
  .ticket-accordion > summary { padding: 10px; gap: 8px; }
  .ticket-acc-body { padding: 12px; }
  .ticket-acc-index { flex-basis: 28px; height: 28px; }
}
@media print {
  .ticket-accordion { break-inside: avoid; }
  .ticket-accordion > summary { background: #fff; }
  .ticket-jump { display: none; }
}
