/* =========================================================
   HAFTUJEMY.EU — PANEL KLIENTA / ADMIN / CRM / KALKULATOR
   Drugi i ostatni plik CSS. Klasy panelowe są odseparowane
   od publicznej strony z assets/css/style.css.
   ========================================================= */

:root {
  --pro-bg: #eef3f8;
  --pro-panel: #fff;
  --pro-line: #dbe4f0;
  --pro-text: #0f172a;
  --pro-muted: #64748b;
  --pro-blue: #3156c9;
  --pro-green: #166534;
  --pro-red: #be123c;
  --pro-amber: #92400e;
}

.hf-skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 9999;
  padding: 12px 18px;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  text-decoration: none;
}

.hf-skip-link:focus {
  top: 16px;
}

/* =========================================================
   GŁÓWNY SZKIELET PANELU
   ========================================================= */

.hf-pro-shell {
  min-height: calc(100vh - 99px);
  background: var(--pro-bg);
  color: var(--pro-text);
}

.pro-app {
  min-height: calc(100vh - 99px);
  display: grid;
  grid-template-columns: 260px minmax(0,1fr);
  background: var(--pro-bg);
  color: var(--pro-text);
  font-family: "Lato", Arial, sans-serif;
}

.pro-sidebar {
  position: sticky;
  top: 99px;
  height: calc(100vh - 99px);
  overflow: auto;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  background: #0b1220;
  color: #fff;
}

.pro-app--client .pro-sidebar {
  background: #111827;
}

.pro-sidebar__brand {
  padding: 0 8px;
  display: grid;
  gap: 5px;
}

.pro-sidebar__brand strong {
  font-size: 21px;
}

.pro-sidebar__brand span {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.45;
}

.pro-sidebar nav {
  display: grid;
  gap: 7px;
  scrollbar-width: thin;
}

.pro-sidebar nav button {
  width: 100%;
  min-height: 40px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  font: 800 14px "Lato", Arial, sans-serif;
  cursor: pointer;
}

.pro-sidebar nav button:hover,
.pro-sidebar nav button.is-active {
  border-color: #334155;
  background: #172033;
  color: #fff;
}

.pro-sidebar__bottom {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.pro-sidebar__bottom a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.pro-sidebar__bottom a:hover {
  background: #172033;
  color: #fff;
}

.pro-sidebar-groups {
  padding: 8px 10px 22px;
  overflow: auto;
  display: grid;
  gap: 18px;
}

.pro-nav-group {
  display: grid;
  gap: 5px;
}

.pro-nav-group > span {
  padding: 0 10px 6px;
  color: #7f91b5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.pro-nav-group button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #e6ecf8;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.pro-nav-group button:hover,
.pro-nav-group button.is-active {
  background: #182238;
  color: #fff;
  box-shadow: inset 0 0 0 1px #2d3d5e;
}

.pro-workspace {
  min-width: 0;
}

.pro-topbar {
  min-height: 112px;
  padding: 26px 34px;
  border-bottom: 1px solid var(--pro-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: #fff;
}

.pro-topbar span {
  display: block;
  color: var(--pro-blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.pro-topbar h1 {
  margin: 6px 0 0;
  color: var(--pro-text);
  font-size: 32px;
  line-height: 1.05;
}

.pro-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pro-topbar__actions button,
.pro-topbar__actions a {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--pro-line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--pro-text);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.pro-topbar__actions span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
}

.pro-content {
  padding: 28px 34px 60px;
  display: grid;
  gap: 20px;
}

.pro-loader,
.pro-empty {
  padding: 42px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #fff;
  color: var(--pro-muted);
  text-align: center;
}

.pro-empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--pro-text);
  font-size: 18px;
}

/* =========================================================
   ALERTY, STATUSY, PRZYCISKI
   ========================================================= */

.pro-alert {
  margin: 18px 34px 0;
  padding: 14px 17px;
  border-radius: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.pro-alert--ok {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.pro-alert--error {
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.pro-alert--warn {
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.pro-warning {
  margin-top: 18px;
  padding: 15px 17px;
  border: 1px solid #f5d680;
  border-radius: 15px;
  background: #fffbeb;
  color: #7c4a03;
}

.pro-warning p {
  margin: 5px 0 0;
  line-height: 1.55;
}

.pro-disclaimer {
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  line-height: 1.5;
}

.pro-hint {
  margin: 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
}

.pro-primary,
.pro-link-button,
.pro-detail-actions button,
.pro-detail-actions a {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--pro-line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--pro-text);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.pro-primary {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.pro-detail-actions,
.pro-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.pro-inline-actions button,
.pro-inline-actions a {
  padding: 9px 12px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.pro-inline-actions .is-danger,
.is-danger {
  border: 1px solid #fecdd3 !important;
  background: #fff1f2 !important;
  color: #be123c !important;
}

.pro-badge {
  display: inline-flex !important;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 10px !important;
  font-weight: 900;
  letter-spacing: .35px;
  text-transform: uppercase;
}

.pro-badge--new { background: #eff6ff; color: #1d4ed8; }
.pro-badge--analysis,
.pro-badge--pending,
.pro-badge--submitted { background: #fffbeb; color: #92400e; }
.pro-badge--waiting,
.pro-badge--changes { background: #fff7ed; color: #c2410c; }
.pro-badge--quoted { background: #f5f3ff; color: #6d28d9; }
.pro-badge--accepted,
.pro-badge--approved,
.pro-badge--ready,
.pro-badge--completed { background: #f0fdf4; color: #166534; }
.pro-badge--production,
.pro-badge--in_progress { background: #ecfeff; color: #0e7490; }
.pro-badge--rejected,
.pro-badge--cancelled { background: #fff1f2; color: #be123c; }

/* =========================================================
   KARTY, STATYSTYKI I SIATKI
   ========================================================= */

.pro-stat-grid {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 14px;
}

.pro-stat-grid--client {
  grid-template-columns: repeat(3,1fr);
}

.pro-stat {
  padding: 20px;
  border: 1px solid var(--pro-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15,23,42,.04);
}

.pro-stat span {
  display: block;
  color: var(--pro-muted);
  font-size: 12px;
  font-weight: 800;
}

.pro-stat strong {
  display: block;
  margin: 10px 0 6px;
  color: var(--pro-text);
  font-size: 30px;
}

.pro-stat small {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.35;
}

.pro-panel {
  padding: 24px;
  border: 1px solid var(--pro-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15,23,42,.035);
}

.pro-panel > header {
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.pro-panel > header span {
  display: block;
  color: var(--pro-blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.pro-panel > header h2 {
  margin: 5px 0 0;
  color: var(--pro-text);
  font-size: 22px;
}

.pro-panel > header > strong {
  font-size: 28px;
}

.pro-panel > p {
  color: var(--pro-muted);
  line-height: 1.6;
}

.pro-capacity {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.pro-capacity i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,#8ab4ff,#b38cff);
}

.pro-quick-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 14px;
}

.pro-quick-grid button {
  padding: 22px;
  border: 1px solid var(--pro-line);
  border-radius: 18px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}

.pro-quick-grid button:hover {
  transform: translateY(-1px);
  border-color: #8aa4ef;
}

.pro-quick-grid strong,
.pro-quick-grid span {
  display: block;
}

.pro-quick-grid strong {
  color: var(--pro-text);
  font-size: 16px;
}

.pro-quick-grid span {
  margin-top: 7px;
  color: var(--pro-muted);
  font-size: 12px;
  line-height: 1.5;
}

.pro-detail-grid {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(350px,.85fr);
  gap: 18px;
  align-items: start;
}

.pro-data-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}

.pro-data-grid > div {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.pro-data-grid span {
  display: block;
  color: var(--pro-muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.pro-data-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--pro-text);
  font-size: 13px;
  line-height: 1.4;
}

.pro-note {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
}

.pro-note strong {
  font-size: 12px;
}

.pro-note p {
  margin: 7px 0 0;
  color: var(--pro-muted);
  font-size: 13px;
  line-height: 1.55;
}

.pro-tags {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pro-tags span {
  padding: 7px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 10px;
  font-weight: 800;
}

.pro-health-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}

.pro-health-grid article {
  padding: 13px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pro-health-grid strong {
  font-size: 13px;
}

.pro-health {
  font-size: 11px;
  font-weight: 900;
}

.pro-health.is-ok,
.pro-ok-text { color: #15803d !important; }
.pro-health.is-error,
.pro-error-text { color: #be123c !important; }

/* =========================================================
   FORMULARZE PANELU
   ========================================================= */

.pro-toolbar {
  display: grid;
  grid-template-columns: minmax(220px,1fr) 190px auto;
  gap: 10px;
}

.pro-toolbar input,
.pro-toolbar select,
.pro-toolbar button {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--pro-text);
  font: 700 13px "Lato", Arial, sans-serif;
}

.pro-toolbar button {
  padding: 0 20px;
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
  cursor: pointer;
}

.pro-form {
  display: grid;
  gap: 13px;
}

.pro-form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 11px;
}

.pro-form label {
  display: grid;
  gap: 6px;
}

.pro-form label > span {
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}

.pro-form input,
.pro-form select,
.pro-form textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: var(--pro-text);
  font: 500 13px "Lato", Arial, sans-serif;
}

.pro-form textarea {
  resize: vertical;
}

.pro-form input:focus,
.pro-form select:focus,
.pro-form textarea:focus {
  border-color: #7c9cff;
  box-shadow: 0 0 0 3px rgba(124,156,255,.13);
}

.pro-form > button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.pro-check {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  display: flex !important;
  align-items: flex-start;
  gap: 10px !important;
  background: #f8fafc;
}

.pro-check input {
  width: 17px !important;
  height: 17px !important;
  min-height: auto !important;
  padding: 0 !important;
  margin-top: 1px;
  flex: 0 0 auto;
}

.pro-check span {
  font-size: 12px !important;
  line-height: 1.45;
}

.pro-mini-list {
  margin-top: 17px;
  display: grid;
  gap: 8px;
}

.pro-mini-list article {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pro-mini-list article > div {
  min-width: 0;
}

.pro-mini-list article.is-muted {
  opacity: .58;
}

.pro-mini-list strong,
.pro-mini-list span {
  display: block;
}

.pro-mini-list strong {
  font-size: 12px;
}

.pro-mini-list span {
  margin-top: 4px;
  color: var(--pro-muted);
  font-size: 10px;
}

.pro-mini-list p {
  margin: 7px 0 0;
  color: var(--pro-muted);
  font-size: 11px;
}

/* =========================================================
   LISTY, TABELE, LEADY
   ========================================================= */

.pro-list {
  display: grid;
  gap: 10px;
}

.pro-lead-row {
  width: 100%;
  padding: 17px;
  border: 1px solid var(--pro-line);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 150px 135px 1fr 1.15fr 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.pro-lead-row:hover {
  border-color: #9cb0e8;
  box-shadow: 0 10px 28px rgba(15,23,42,.05);
}

.pro-lead-row div {
  min-width: 0;
}

.pro-lead-row strong,
.pro-lead-row span,
.pro-lead-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pro-lead-row strong {
  color: var(--pro-text);
  font-size: 13px;
}

.pro-lead-row span,
.pro-lead-row small {
  margin-top: 4px;
  color: var(--pro-muted);
  font-size: 11px;
}

.pro-lead-row i {
  color: var(--pro-blue);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.pro-list-card {
  padding: 17px;
  border: 1px solid var(--pro-line);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1.2fr .8fr 1.2fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
}

.pro-list-card--clickable {
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}

.pro-list-card--clickable:hover {
  transform: translateY(-1px);
  border-color: #93a8ff;
}

.pro-list-card strong,
.pro-list-card small {
  display: block;
}

.pro-list-card strong {
  margin-top: 6px;
  font-size: 13px;
}

.pro-list-card small {
  margin-top: 4px;
  color: var(--pro-muted);
  font-size: 10px;
}

.pro-list-card p {
  margin: 0;
  color: var(--pro-muted);
  font-size: 12px;
  line-height: 1.5;
}

.pro-list-card > button,
.pro-list-card > a {
  padding: 9px 12px;
  border: 0;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.matrix-table,
.employee-table,
.placement-coordinate-table {
  overflow: auto;
  border: 1px solid #d9e2ef;
  border-radius: 15px;
}

.matrix-table table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e8edf5;
  text-align: left;
  vertical-align: top;
}

.matrix-table th {
  background: #f8fafc;
  color: #3156c9;
  font-size: 11px;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.matrix-table button {
  padding: 9px 12px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.employee-table > div {
  min-width: 760px;
  padding: 12px 14px;
  border-top: 1px solid #e8edf5;
  display: grid;
  grid-template-columns: 1.15fr 1.3fr 1fr 1.6fr;
  gap: 14px;
}

.employee-table > div:first-child {
  border-top: 0;
}

.employee-head {
  background: #f8fafc;
  color: #3156c9;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.employee-table span {
  color: #475569;
  font-size: 12px;
}

.placement-coordinate-table > div {
  min-width: 790px;
  padding: 11px 13px;
  border-top: 1px solid #e8edf5;
  display: grid;
  grid-template-columns: 1.2fr 1.15fr 1fr .55fr 1.6fr;
  gap: 12px;
  align-items: start;
}

.placement-coordinate-table > div:first-child {
  border-top: 0;
}

.placement-coordinate-head {
  background: #f8fafc;
  color: #3156c9;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.placement-coordinate-table strong {
  color: #0f172a;
}

.placement-coordinate-table span {
  color: #475569;
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* =========================================================
   CRM LEADÓW — ODDZIELNY WIDOK
   ========================================================= */

.leads-app {
  min-height: 100vh;
  background: #eef3f8;
  color: #0f172a;
}

.leads-app__top {
  padding: 30px 4vw;
  border-bottom: 1px solid #dbe4f0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  background: #fff;
}

.leads-app__top h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1;
}

.leads-app__top p {
  margin: 8px 0 0;
  color: #64748b;
}

.leads-app__top a {
  padding: 12px 17px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.leads-app__body {
  width: min(1680px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 60px;
}

.leads-toolbar {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 12px;
  background: #fff;
}

.leads-toolbar input,
.leads-toolbar select,
.lead-detail-card input,
.lead-detail-card select,
.lead-detail-card textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}

.leads-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe4f0;
  border-radius: 20px;
  background: #fff;
}

.leads-table {
  width: 100%;
  min-width: 1050px;
  border-collapse: collapse;
}

.leads-table th {
  padding: 14px 16px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  letter-spacing: .45px;
  text-align: left;
  text-transform: uppercase;
}

.leads-table td {
  padding: 15px 16px;
  border-top: 1px solid #edf2f7;
  color: #334155;
  font-size: 13px;
  vertical-align: top;
}

.leads-table strong {
  color: #0f172a;
}

.leads-table a {
  color: #3156c9;
  font-weight: 900;
  text-decoration: none;
}

.lead-status {
  padding: 7px 10px;
  border-radius: 999px;
  display: inline-flex;
  background: #e8efff;
  color: #3156c9;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.lead-detail-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 380px;
  gap: 20px;
  align-items: start;
}

.lead-detail-card {
  padding: 24px;
  border: 1px solid #dbe4f0;
  border-radius: 20px;
  background: #fff;
}

.lead-detail-card h2,
.lead-detail-card h3 {
  margin: 0 0 16px;
}

.lead-detail-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}

.lead-detail-list > div {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
}

.lead-detail-list span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.lead-detail-list strong,
.lead-detail-list p {
  display: block;
  margin: 7px 0 0;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.5;
}

.lead-detail-card form {
  display: grid;
  gap: 12px;
}

.lead-detail-card textarea {
  min-height: 140px;
  padding-top: 12px;
  resize: vertical;
}

.lead-detail-card button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

/* =========================================================
   KALENDARZ, TERMINY, REZERWACJE
   ========================================================= */

.pro-calendar {
  display: grid;
  gap: 16px;
}

.pro-calendar section {
  overflow: hidden;
  border: 1px solid var(--pro-line);
  border-radius: 18px;
  background: #fff;
}

.pro-calendar section > header {
  padding: 14px 17px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  background: #f8fafc;
}

.pro-calendar article {
  padding: 14px 17px;
  border-top: 1px solid #eef2f7;
  display: grid;
  grid-template-columns: 5px 1fr 220px auto;
  gap: 14px;
  align-items: center;
}

.pro-calendar article:first-of-type {
  border-top: 0;
}

.pro-calendar article div strong,
.pro-calendar article div span {
  display: block;
}

.pro-calendar article div strong {
  font-size: 13px;
}

.pro-calendar article div span {
  margin-top: 4px;
  color: var(--pro-muted);
  font-size: 11px;
}

.pro-calendar article button {
  padding: 8px 11px;
  border: 0;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 900;
  cursor: pointer;
}

.pro-priority {
  width: 5px;
  height: 44px;
  border-radius: 999px;
  background: #94a3b8;
}

.pro-priority--high { background: #f59e0b; }
.pro-priority--urgent { background: #ef4444; }
.pro-priority--low { background: #22c55e; }

.reservation-list {
  display: grid;
  gap: 12px;
}

.reservation-row {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid #d9e2ef;
  border-radius: 16px;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(240px,.9fr);
  gap: 20px;
  align-items: center;
  background: #fff;
}

.reservation-row > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.reservation-row strong,
.reservation-row span,
.reservation-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.reservation-row__lead strong,
.reservation-row__time strong {
  color: #0f172a;
  font-size: 14px;
}

.reservation-row__lead small,
.reservation-row__time small {
  color: #64748b;
  font-size: 12px;
}

.reservation-row__time {
  text-align: right;
}

.reservation-row__time > span {
  color: #3156c9;
  font-size: 12px;
  font-weight: 900;
  text-transform: capitalize;
}

.reservation-row__time button {
  justify-self: end;
  margin-top: 5px;
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  background: #fff1f2;
  color: #be123c;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

/* =========================================================
   ZAMÓWIENIA, OŚ CZASU, WIADOMOŚCI
   ========================================================= */

.order-hub-grid {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: minmax(0,1.7fr) minmax(280px,.7fr);
  gap: 18px;
}

.order-hub-main {
  min-width: 0;
}

.order-timeline {
  margin-top: 20px;
  display: grid;
  gap: 0;
}

.order-timeline article {
  position: relative;
  padding: 0 0 22px;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 14px;
}

.order-timeline article:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 13px;
  bottom: -2px;
  width: 2px;
  background: #dbe4f0;
}

.order-timeline i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg,#8ab4ff,#b38cff);
  box-shadow: 0 0 0 5px #eef3ff;
}

.order-timeline p {
  margin: 5px 0;
  color: #526179;
  line-height: 1.5;
}

.order-timeline small {
  color: #8793a8;
}

.hub-card {
  margin-bottom: 10px;
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  display: grid;
  gap: 5px;
  background: #f8fafc;
}

.order-chat,
.order-thread {
  max-height: 520px;
  overflow: auto;
  margin-bottom: 16px;
  padding-right: 5px;
  display: grid;
  gap: 12px;
}

.order-thread {
  max-height: 390px;
}

.order-chat article,
.order-thread article {
  max-width: 86%;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f1f5f9;
}

.order-chat article.is-client,
.order-thread article.is-client {
  justify-self: end;
  background: #e8efff;
}

.order-chat p,
.order-thread p {
  margin: 5px 0;
  color: #334155;
  line-height: 1.5;
}

.order-chat small,
.order-thread small {
  color: #64748b;
}

.order-stage-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.order-stage-actions > button,
.order-stage-actions .stage-jump select {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
}

.order-stage-actions > button {
  cursor: pointer;
}

.order-stage-actions > button.is-primary {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.stage-jump {
  display: grid;
  gap: 4px;
}

.stage-jump span {
  padding-left: 9px;
  color: #64748b;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.stage-jump select {
  min-width: 190px;
}

.client-stage-progress {
  margin: 18px 0 0;
  padding: 0;
  overflow-x: auto;
  display: grid;
  grid-template-columns: repeat(11,1fr);
  gap: 0;
  list-style: none;
}

.client-stage-progress li {
  position: relative;
  min-width: 90px;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #94a3b8;
  text-align: center;
}

.client-stage-progress li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 58%;
  right: -42%;
  top: 14px;
  height: 2px;
  background: #dbe3ef;
}

.client-stage-progress span {
  position: relative;
  z-index: 2;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e5eaf3;
  color: #64748b;
  font-weight: 900;
}

.client-stage-progress small {
  font-size: 10px;
}

.client-stage-progress .is-done span,
.client-stage-progress .is-current span {
  background: #3156c9;
  color: #fff;
}

.client-stage-progress .is-done:not(:last-child)::after {
  background: #3156c9;
}

.client-stage-progress .is-current {
  color: #0f172a;
  font-weight: 900;
}

/* =========================================================
   PLIKI, PRODUKCJA, KATALOG KLIENTA
   ========================================================= */

.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(170px,1fr));
  gap: 13px;
}

.file-preview-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d9e2ef;
  border-radius: 15px;
  display: grid !important;
  align-content: start !important;
  justify-content: stretch !important;
  gap: 8px !important;
  background: #fff;
}

.file-preview-card img {
  width: 100%;
  height: 130px;
  border: 1px solid #e5eaf2;
  border-radius: 10px;
  object-fit: contain;
  background: #f8fafc;
}

.file-preview-card strong,
.file-preview-card span,
.file-preview-card small {
  overflow-wrap: anywhere;
}

.file-preview-card span,
.file-preview-card small {
  color: #64748b;
  font-size: 12px;
}

.file-preview-card a {
  color: #3156c9;
  font-weight: 900;
  text-decoration: none;
}

.file-preview-icon {
  height: 130px;
  border: 1px solid #e5eaf2;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  color: #64748b;
  font-weight: 900;
}

.production-update-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(210px,1fr));
  gap: 13px;
}

.production-update-grid article {
  padding: 12px;
  border: 1px solid #d9e2ef;
  border-radius: 15px;
  background: #fff;
}

.production-update-grid img {
  width: 100%;
  height: 170px;
  margin-bottom: 10px;
  border-radius: 10px;
  object-fit: cover;
}

.client-catalog-grid,
.reorder-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(290px,1fr));
  gap: 16px;
}

.client-catalog-card,
.reorder-template-grid > article {
  padding: 18px;
  border: 1px solid #d9e2ef;
  border-radius: 18px;
  display: grid;
  gap: 10px;
  background: #fff;
}

.client-catalog-card > img {
  width: 100%;
  height: 190px;
  border-radius: 12px;
  object-fit: contain;
  background: #f8fafc;
}

.client-catalog-card h3,
.reorder-template-grid h3 {
  margin: 0;
  color: #0f172a;
}

.client-catalog-card label,
.reorder-template-grid label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.client-catalog-card input,
.client-catalog-card textarea,
.reorder-template-grid input,
.reorder-template-grid textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
}

.client-catalog-card button,
.reorder-template-grid button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.brand-logo-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}

.brand-logo-grid a {
  padding: 15px;
  border: 1px solid #d9e2ef;
  border-radius: 14px;
  display: grid;
  gap: 5px;
  color: #0f172a;
  text-decoration: none;
}

.brand-logo-grid span {
  color: #64748b;
  font-size: 12px;
}

.reorder-grid,
.budget-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
}

.reorder-grid > article,
.budget-grid > article {
  padding: 20px;
  border: 1px solid #d9e2ef;
  border-radius: 18px;
  background: #fff;
}

.reorder-grid h3 {
  margin: 8px 0;
  color: #0f172a;
}

.reorder-form {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.reorder-form label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.reorder-form input,
.reorder-form textarea {
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
}

.reorder-form button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
}

.budget-grid progress {
  width: 100%;
  height: 12px;
  margin: 12px 0;
}

.panel-size-builder {
  margin: 10px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(74px,1fr));
  gap: 8px;
}

.panel-size-builder label {
  padding: 8px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  display: grid;
  gap: 5px !important;
  background: #f8fafc;
}

.panel-size-builder input {
  min-height: 38px !important;
  text-align: center;
}

.size-total {
  display: block;
  margin: 5px 0 12px;
  color: #166534;
  font-weight: 800;
}

.size-total.is-error {
  color: #be123c;
}

.size-order-universal {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  background: #f8fafc;
}

/* =========================================================
   NICI W PANELU
   ========================================================= */

.pro-thread-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 10px;
}

.pro-thread-grid article {
  padding: 10px;
  border: 1px solid var(--pro-line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #fff;
}

.pro-thread-swatch {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(15,23,42,.15);
  border-radius: 12px;
  background: var(--thread);
}

.pro-thread-grid strong,
.pro-thread-grid span,
.pro-thread-grid small {
  display: block;
}

.pro-thread-grid strong {
  font-size: 13px;
}

.pro-thread-grid span,
.pro-thread-grid small {
  margin-top: 3px;
  color: var(--pro-muted);
  font-size: 9px;
}

.pro-thread-edit {
  border: 0;
  background: transparent;
  color: var(--pro-blue);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

/* =========================================================
   LOGOWANIE I PANEL KLIENTA
   ========================================================= */

.client-login-wrap {
  width: min(1200px, calc(100% - 36px));
  min-height: calc(100vh - 99px);
  margin: auto;
  padding: 70px 0;
  display: grid;
  grid-template-columns: 1.15fr 520px;
  gap: 60px;
  align-items: center;
}

.client-login-copy h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(42px,5vw,70px);
  line-height: .98;
}

.client-login-copy p {
  max-width: 680px;
  color: #526179;
  font-size: 17px;
  line-height: 1.7;
}

.client-feature-list {
  margin-top: 25px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.client-feature-list span {
  padding: 12px 14px;
  border: 1px solid var(--pro-line);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.client-login-help {
  font-size: 12px !important;
}

.quote-login-box {
  width: min(540px,100%);
  padding: 36px;
  border: 1px solid #d9e2ef;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15,23,42,.10);
}

.quote-login-box h1,
.quote-login-box h2 {
  margin: 0;
  color: #0f172a;
  font-size: 34px;
  line-height: 1;
}

.quote-login-box p {
  margin: 14px 0 0;
  color: #526179;
  font-size: 15px;
  line-height: 1.55;
}

.quote-pill {
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  display: inline-flex;
  background: #e8efff;
  color: #3156c9;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.quote-login-form {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

.quote-login-form label {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.quote-login-form input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
}

.quote-login-form button,
.client-passkey-login {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.client-passkey-login {
  width: 100%;
  margin-top: 10px;
}

.quote-login-error {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: #fff1f2;
  color: #be123c;
  font-size: 14px;
  font-weight: 800;
}

.client-order-list {
  display: grid;
  gap: 9px;
}

.client-order-card {
  padding: 15px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 1.2fr .8fr auto;
  gap: 14px;
  align-items: center;
}

.client-order-card strong,
.client-order-card small {
  display: block;
}

.client-order-card strong {
  margin-top: 5px;
  font-size: 13px;
}

.client-order-card small {
  margin-top: 4px;
  color: var(--pro-muted);
  font-size: 10px;
}

.client-first-order-note {
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid #b8c7ff;
  border-radius: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg,#eef3ff,#fff);
}

.client-first-order-note strong {
  color: #0f172a;
  font-size: 19px;
}

.client-first-order-note p {
  margin: 5px 0 0;
  color: #526179;
}

.client-first-order-note a {
  padding: 12px 18px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.notification-row {
  width: 100%;
  padding: 16px;
  border: 1px solid #d9e2ef;
  border-radius: 15px;
  display: grid;
  gap: 5px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.notification-row.is-read {
  opacity: .6;
}

.notification-row span,
.notification-row small {
  color: #64748b;
}

/* =========================================================
   KALKULATOR WEWNĘTRZNY — BIAŁY
   ========================================================= */

.quote-app {
  min-height: 100vh;
  background: #eef3f8;
  color: #0f172a;
}

.quote-login-page {
  min-height: calc(100vh - 99px);
  padding: 60px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(138,180,255,.22), transparent 34%),
    linear-gradient(180deg,#fff 0%,#eef3f8 100%);
}

.quote-top {
  padding: 34px 5vw;
  border-bottom: 1px solid #d9e2ef;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  background:
    radial-gradient(circle at 15% 0%, rgba(138,180,255,.22), transparent 36%),
    #fff;
}

.quote-top h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(36px,4vw,58px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1.2px;
}

.quote-top p {
  max-width: 980px;
  margin: 12px 0 0;
  color: #526179;
  font-size: 16px;
  line-height: 1.55;
}

.quote-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quote-top-actions button,
.quote-top-actions a {
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8efff;
  color: #3156c9;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.quote-top-actions a {
  background: #0f172a;
  color: #fff;
}

.quote-layout {
  width: min(1880px, calc(100% - 56px));
  margin: 0 auto;
  padding: 34px 0 60px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 430px;
  gap: 24px;
  align-items: start;
}

.quote-main {
  display: grid;
  gap: 18px;
}

.quote-card {
  overflow: hidden;
  border: 1px solid #d9e2ef;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15,23,42,.045);
}

.quote-card > header {
  padding: 18px 22px;
  border-bottom: 1px solid #e5eaf3;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: center;
  background: #f8fafc;
}

.quote-card > header > span {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#8ab4ff,#b38cff);
  color: #071225;
  font-size: 14px;
  font-weight: 900;
}

.quote-card h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.15;
}

.quote-card > header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.4;
}

.quote-card-body {
  padding: 20px 22px 22px;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.quote-grid-3 {
  margin-top: 14px;
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.quote-field-wide {
  grid-column: 1 / -1;
}

.quote-card label {
  display: grid;
  gap: 7px;
}

.quote-card label > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #243044;
  font-size: 13px;
  font-weight: 900;
}

.quote-card input,
.quote-card select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
}

.quote-card input:focus,
.quote-card select:focus {
  border-color: #7c9cff;
  box-shadow: 0 0 0 4px rgba(124,156,255,.13);
}

.quote-help {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8efff;
  color: #3156c9;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.quote-field small {
  display: none;
  padding: 9px 11px;
  border: 1px solid #cddaff;
  border-radius: 10px;
  background: #f1f5ff;
  color: #38507a;
  font-size: 12px;
  line-height: 1.45;
}

.quote-field.is-help-open small {
  display: block;
}

.quote-check {
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  background: #f8fafc;
  color: #243044;
  font-size: 14px;
  font-weight: 900;
}

.quote-check input {
  width: 17px;
  height: 17px;
  min-height: auto;
  accent-color: #3156c9;
}

.quote-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #31556f;
  font-size: 13px;
  line-height: 1.45;
}

.quote-summary {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 14px;
}

.quote-price,
.quote-costs,
.quote-status {
  border: 1px solid #d9e2ef;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15,23,42,.045);
}

.quote-price {
  padding: 22px;
}

.quote-price-main {
  border-color: #b8c7ff;
  background:
    radial-gradient(circle at 0 0, rgba(138,180,255,.25), transparent 38%),
    #fff;
}

.quote-price span {
  display: block;
  margin-bottom: 9px;
  color: #3156c9;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.quote-price strong {
  display: block;
  color: #0f172a;
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1px;
}

.quote-price small {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.quote-status {
  padding: 16px 18px;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 900;
}

.quote-status-ok { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.quote-status-warn { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.quote-status-danger { border-color: #fecdd3; background: #fff1f2; color: #be123c; }

.quote-costs {
  padding: 20px;
}

.quote-costs h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 18px;
}

.quote-costs > div {
  padding: 10px 0;
  border-top: 1px solid #e5eaf3;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.quote-costs > div:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.quote-costs span {
  color: #64748b;
  font-size: 13px;
}

.quote-costs strong {
  color: #0f172a;
  font-size: 13px;
  white-space: nowrap;
}

.quote-table-wrap {
  overflow-x: auto;
  border: 1px solid #d9e2ef;
  border-radius: 16px;
}

.quote-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.quote-table th,
.quote-table td {
  padding: 13px 14px;
  text-align: left;
}

.quote-table th {
  border-bottom: 1px solid #e5eaf3;
  background: #f8fafc;
  color: #3156c9;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.quote-table td {
  border-top: 1px solid #eef2f7;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.quote-message-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}

.quote-message-head {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.quote-copy {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.quote-message-grid textarea {
  width: 100%;
  min-height: 300px;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
}

/* =========================================================
   AKCEPTACJE, PODGLĄDY, REKLAMACJE
   ========================================================= */

.approval-page,
.review-page {
  min-height: calc(100vh - 99px);
  padding: 70px 0;
  background: #eef3f8;
  color: #0f172a;
}

.approval-card,
.review-card {
  width: min(980px, calc(100% - 32px));
  margin: auto;
  padding: 38px;
  border: 1px solid var(--pro-line);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15,23,42,.08);
}

.approval-page--advanced .approval-card {
  max-width: 1180px;
}

.approval-card h1,
.review-card h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px,4vw,54px);
  line-height: 1.03;
}

.approval-card > p,
.review-card > p {
  color: #64748b;
  line-height: 1.65;
}

.approval-note {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #31556f;
  line-height: 1.6;
}

.approval-preview {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #f8fafc;
  text-align: center;
}

.approval-preview img {
  max-height: 680px;
  margin: auto;
  border-radius: 12px;
}

.approval-form,
.review-form {
  display: grid;
  gap: 15px;
}

.approval-form label,
.review-form label {
  display: grid;
  gap: 7px;
}

.approval-form textarea,
.review-form input,
.review-form textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font: 500 14px "Lato", Arial, sans-serif;
}

.approval-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.approval-actions button,
.approval-accept {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.approval-accept {
  background: #166534;
  color: #fff;
}

.approval-changes {
  border: 1px solid #fdba74 !important;
  background: #fff7ed;
  color: #c2410c;
}

.approval-expiry {
  font-size: 12px !important;
}

.approval-final {
  padding: 20px;
  border: 1px solid #bbf7d0;
  border-radius: 15px;
  background: #f0fdf4;
  color: #166534;
}

.approval-item {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #d9e2ef;
  border-radius: 18px;
  background: #fff;
  color: #0f172a;
}

.approval-item > header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.approval-item h2 {
  color: #0f172a;
}

.approval-pin-board {
  position: relative;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #d9e2ef;
  border-radius: 16px;
  background: #f8fafc;
  cursor: crosshair;
}

.approval-pin-board img {
  width: 100%;
  max-height: 720px;
  object-fit: contain;
}

.approval-pin {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-weight: 900;
  transform: translate(-50%,-50%);
  box-shadow: 0 3px 14px rgba(0,0,0,.3);
  cursor: pointer;
}

.approval-pin.is-existing {
  background: #3156c9;
}

.approval-item-decisions {
  margin: 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.approval-item-decisions label {
  padding: 12px 14px;
  border: 1px solid #d9e2ef;
  border-radius: 999px;
  background: #f8fafc;
  font-weight: 800;
}

.approval-item-decisions span {
  color: #0f172a;
}

.approval-submit-summary {
  padding: 17px;
  border: 1px solid #b8c7ff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #eef3ff;
}

.approval-new-pins p {
  margin: 5px 0;
  color: #475569;
}

.approval-history-items {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.approval-history-items article {
  padding: 13px;
  border: 1px solid #d9e2ef;
  border-radius: 13px;
  background: #fff;
}

.approval-file-box {
  padding: 20px;
  border: 1px solid #d9e2ef;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #f8fafc;
}

.star-rating {
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.star-rating input {
  position: absolute;
  opacity: 0;
}

.star-rating label {
  color: #cbd5e1;
  font-size: 38px;
  cursor: pointer;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #f59e0b;
}

.status-deadline {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid #86efac;
  border-radius: 16px;
  background: rgba(22,101,52,.18);
}

.status-deadline span,
.status-deadline strong {
  display: block;
}

.status-deadline span {
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-deadline strong {
  margin-top: 7px;
  color: #fff;
  font-size: 27px;
}

.status-deadline--suggested {
  border-color: #fde68a;
  background: rgba(146,64,14,.18);
}

.spec-create-box {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
}

.spec-create-box summary {
  padding: 15px 17px;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}

.spec-create-box[open] summary {
  border-bottom: 1px solid #e2e8f0;
}

.spec-create-box form {
  padding: 17px;
}

.complaint-files {
  margin: 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.complaint-files a {
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #3156c9;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

/* =========================================================
   PASZPORT PRODUKTU W PANELU
   ========================================================= */

.pro-app .passport-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
}

.pro-app .passport-grid > article {
  padding: 20px;
  border: 1px solid #d9e2ef;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  background: #fff;
}

.pro-app .passport-grid img {
  width: 112px;
  aspect-ratio: 1;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  object-fit: contain;
}

.pro-app .passport-grid h3 {
  margin: 8px 0;
  color: #0f172a;
}

.pro-app .passport-grid p {
  color: #64748b;
  line-height: 1.5;
}

.pro-app .passport-grid a {
  color: #3156c9;
  font-weight: 900;
}

.passport-auth {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.passport-auth > div {
  padding: 20px;
  border: 1px solid #d9e2ef;
  border-radius: 20px;
  background: #fff;
}

.passport-auth span,
.passport-auth small {
  display: block;
  color: #64748b;
}

.passport-auth strong {
  display: block;
  margin: 6px 0;
  color: #0f172a;
  font-size: 20px;
}

.passport-history {
  margin-top: 28px;
}

.passport-history > div {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 10px;
}

.passport-history article {
  padding: 14px;
  border: 1px solid #d9e2ef;
  border-radius: 14px;
  background: #fff;
}

.passport-history span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

/* =========================================================
   DOSTĘPNOŚĆ I DROBNE NARZĘDZIA
   ========================================================= */

.accessibility-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.accessibility-controls button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}

.hf-language-switch {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 950;
}

.hf-language-switch select {
  min-height: 42px;
  padding: 0 36px 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(15,23,42,.15);
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}

/* =========================================================
   RESPONSYWNOŚĆ PANELU
   ========================================================= */

@media (max-width: 1450px) {
  .pro-stat-grid {
    grid-template-columns: repeat(3,1fr);
  }

  .pro-thread-grid {
    grid-template-columns: repeat(4,1fr);
  }

  .pro-lead-row {
    grid-template-columns: 130px 115px 1fr 1fr auto;
  }

  .pro-lead-row > div:nth-child(5) {
    display: none;
  }
}

@media (max-width: 1280px) {
  .quote-layout {
    grid-template-columns: 1fr;
  }

  .quote-summary {
    position: static;
  }
}

@media (max-width: 1180px) {
  .reorder-grid,
  .budget-grid,
  .pro-app .passport-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .order-hub-grid {
    grid-template-columns: 1fr;
  }

  .quote-top {
    grid-template-columns: 1fr;
  }

  .quote-message-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .pro-app {
    grid-template-columns: 1fr;
  }

  .pro-sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .pro-sidebar nav {
    display: flex;
    overflow-x: auto;
  }

  .pro-sidebar nav button {
    width: auto;
    white-space: nowrap;
  }

  .pro-sidebar__bottom {
    display: none;
  }

  .pro-detail-grid,
  .client-login-wrap,
  .lead-detail-grid {
    grid-template-columns: 1fr;
  }

  .pro-thread-grid {
    grid-template-columns: repeat(3,1fr);
  }

  .pro-list-card {
    grid-template-columns: 1fr 1fr;
  }

  .pro-quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pro-lead-row {
    grid-template-columns: 120px 110px 1fr auto;
  }

  .pro-lead-row > div:nth-child(4) {
    display: none;
  }
}

@media (max-width: 900px) {
  .pro-health-grid {
    grid-template-columns: 1fr;
  }

  .client-first-order-note,
  .passport-auth {
    grid-template-columns: 1fr;
  }

  .client-stage-progress {
    grid-template-columns: repeat(11,110px);
  }

  .approval-submit-summary {
    display: grid;
  }

  .file-preview-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .quote-layout {
    width: min(100% - 34px,1880px);
  }

  .quote-grid,
  .quote-grid-3 {
    grid-template-columns: 1fr;
  }

  .quote-field-wide {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .pro-topbar {
    padding: 20px;
    align-items: flex-start;
    flex-direction: column;
  }

  .pro-topbar h1 {
    font-size: 25px;
  }

  .pro-content {
    padding: 18px 16px 40px;
  }

  .pro-alert {
    margin: 12px 16px 0;
  }

  .pro-stat-grid,
  .pro-stat-grid--client,
  .pro-quick-grid {
    grid-template-columns: 1fr;
  }

  .pro-toolbar {
    grid-template-columns: 1fr;
  }

  .pro-lead-row {
    grid-template-columns: 1fr auto;
  }

  .pro-lead-row > div:nth-child(n+3) {
    display: none;
  }

  .pro-detail-grid,
  .pro-form-grid,
  .pro-data-grid,
  .approval-actions,
  .lead-detail-list {
    grid-template-columns: 1fr;
  }

  .pro-thread-grid {
    grid-template-columns: repeat(2,1fr);
  }

  .pro-thread-grid article {
    grid-template-columns: 42px 1fr;
  }

  .pro-thread-edit {
    grid-column: 1 / -1;
  }

  .pro-calendar article {
    grid-template-columns: 4px 1fr;
  }

  .pro-calendar article > div:nth-child(3),
  .pro-calendar article > button {
    grid-column: 2;
  }

  .pro-list-card {
    grid-template-columns: 1fr;
  }

  .client-login-wrap {
    width: min(100% - 28px,1200px);
    padding: 40px 0;
  }

  .client-feature-list {
    grid-template-columns: 1fr;
  }

  .client-order-card {
    grid-template-columns: 1fr;
  }

  .approval-card,
  .review-card {
    padding: 25px 20px;
    border-radius: 20px;
  }

  .reservation-row {
    grid-template-columns: 1fr;
  }

  .reservation-row__time {
    text-align: left;
  }

  .reservation-row__time button {
    justify-self: start;
  }

  .order-stage-actions {
    justify-content: flex-start;
  }

  .stage-jump,
  .stage-jump select {
    width: 100%;
  }

  .order-stage-actions > button {
    flex: 1;
  }

  .spec-create-box form {
    padding: 14px;
  }

  .quote-top {
    padding: 26px 20px;
  }

  .quote-top-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .quote-card > header {
    grid-template-columns: 1fr;
  }

  .quote-price strong {
    font-size: 30px;
  }

  .leads-app__top {
    align-items: flex-start;
    flex-direction: column;
  }

  .leads-app__body {
    width: min(100% - 28px,1680px);
  }

  .leads-toolbar {
    grid-template-columns: 1fr;
  }

  .reorder-grid,
  .budget-grid,
  .pro-app .passport-grid {
    grid-template-columns: 1fr;
  }

  .pro-app .passport-grid > article {
    grid-template-columns: 82px 1fr;
  }

  .pro-app .passport-grid img {
    width: 82px;
  }

  .brand-logo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .file-preview-grid,
  .client-catalog-grid,
  .reorder-template-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
