/* ============================================================
   Logo w nagłówku, modal ustawień, logowanie administratora
   ============================================================ */

/* Obraz nie ma linii bazowej tekstu — przy logo wyrównujemy całą grupę
   do środka, żeby tytuł i podtytuł nie "spadały" pod znak. */
.brand:has(.brand__logo:not([hidden])) { align-items: center; }

/* Logo przylega do tytułu projektu, dopiero potem idzie separator */
.brand:has(.brand__logo:not([hidden])) .brand__mark { margin-left: 2px; }

.brand__logo {
  display: block;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

/* ---------------- Modal ---------------- */
.wp-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--s-8) var(--s-6);
  background: rgba(22, 23, 26, 0.18);
  overflow-y: auto;
  animation: layer-in var(--t-mid) var(--e-out);
}

.wp-modal__box {
  width: 100%;
  max-width: 520px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  overflow: hidden;
}

.wp-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--c-line);
}

.wp-modal__title {
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: var(--ls-tight);
}

.wp-modal__body {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

/* ---------------- Sekcje i pola ---------------- */
.wp-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.wp-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wp-note {
  font-size: var(--fs-12);
  line-height: 1.6;
  color: var(--c-ink-muted);
}

.wp-error {
  font-size: var(--fs-12);
  color: var(--c-ink);
  font-weight: 550;
}

.wp-inline {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.wp-inline .cms-input { flex: 1 1 auto; }

.wp-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s-2);
}

.wp-actions--start { justify-content: flex-start; flex-wrap: wrap; }

.wp-toggles {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.wp-toggle {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-13);
  color: var(--c-ink-soft);
  cursor: pointer;
}

.wp-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--c-accent);
  cursor: pointer;
}

/* ---------------- Logo ---------------- */
.wp-logo {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.wp-logo__preview {
  flex: 1 1 160px;
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: var(--s-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-surface-sunk);
}

.wp-logo__preview img { display: block; width: auto; }

.wp-logo__empty {
  font-size: var(--fs-13);
  font-weight: 650;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-ink-faint);
}

/* ---------------- Lista projektów ---------------- */
.wp-projects {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.wp-project {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-surface);
}

.wp-project--active {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px var(--c-accent);
}

.wp-project__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wp-project__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.cms-input--sub {
  height: 28px;
  font-size: var(--fs-12);
  color: var(--c-ink-soft);
}

.cms-input--mono {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  height: 26px;
  color: var(--c-ink-muted);
}

/* ---------------- Zatwierdzenia klienta ---------------- */
.wp-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-surface-sunk);
  max-height: 220px;
  overflow-y: auto;
}

.wp-summary__row {
  font-size: var(--fs-12);
  color: var(--c-ink-soft);
  letter-spacing: var(--ls-tight);
}

.wp-textarea {
  height: auto;
  padding: 8px;
  line-height: 1.5;
  resize: vertical;
}

.wp-confirmations {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.wp-confirm {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--s-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-surface-sunk);
}

.wp-confirm__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  font-size: var(--fs-13);
}

.wp-confirm__date {
  font-size: var(--fs-11);
  color: var(--c-ink-faint);
  white-space: nowrap;
}

.wp-confirm__by {
  font-size: var(--fs-12);
  color: var(--c-ink-muted);
}

.wp-confirm__note {
  margin-top: 4px;
  font-size: var(--fs-12);
  font-style: italic;
  color: var(--c-ink-soft);
}

/* ---------------- Strony pośrednie widoku klienta ---------------- */
.landing {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-8);
  background: var(--c-canvas);
  text-align: center;
}

.landing__title {
  font-size: var(--fs-18);
  font-weight: 600;
  letter-spacing: var(--ls-tight);
}

.landing__note {
  font-size: var(--fs-13);
  color: var(--c-ink-muted);
  max-width: 42ch;
  line-height: 1.6;
}

.landing__id {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--c-ink-faint);
}

.landing__list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-4);
  min-width: 260px;
}

.landing__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  text-decoration: none;
  color: var(--c-ink);
  text-align: left;
  transition: border-color var(--t-fast) var(--e-out), box-shadow var(--t-fast) var(--e-out);
}

.landing__item:hover {
  border-color: var(--c-accent);
  box-shadow: var(--sh-2);
}

.landing__item span {
  font-size: var(--fs-12);
  color: var(--c-ink-muted);
}
