/* Panel MOTOEXPERT — własny arkusz, układ najpierw na telefon. */
:root {
  color-scheme: light;
  --red: #cc0000;
  --ink: #000;
  --muted: #595959;
  --line: #dedede;
  --paper: #fff;
  --background: #f5f5f5;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--background);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}
a {
  color: #a80000;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 3px;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: white;
  padding: 1rem;
  z-index: 10;
}
.skip-link:focus {
  top: 1rem;
}
.topbar {
  background: var(--paper);
  border-top: 5px solid var(--red);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.brand strong {
  display: block;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  max-width: 19rem;
}
.account {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.identity {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.identity small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
}
.shell {
  max-width: 1600px;
  margin: auto;
}
.sidebar {
  background: var(--paper);
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}
.sidebar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sidebar nav > a,
.nav-soon {
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  color: var(--ink);
  border-radius: 6px;
  font-weight: 600;
}
.sidebar nav > a {
  background: #f1f1f1;
  text-decoration: none;
}
.nav-soon {
  font-size: 0.85rem;
  color: var(--muted);
}
.nav-soon small {
  display: block;
  font-weight: 400;
}
.locale-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  align-items: center;
}
.locale-form label {
  width: 100%;
}
.locale-form select {
  width: auto;
  flex: 1;
}
main {
  min-width: 0;
  padding: 1.5rem 1rem 3rem;
}
h1 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 1.2rem 0 0.5rem;
}
p {
  margin: 0 0 1rem;
}
.lead,
.muted {
  color: var(--muted);
}
.lead {
  max-width: 55rem;
  margin-bottom: 1.5rem;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #a80000;
  font-weight: 750;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
}
.tiles {
  display: grid;
  gap: 1rem;
}
.tile {
  border-top: 3px solid var(--red);
}
.tile-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.module-letter {
  font-weight: 750;
  font-size: 1.2rem;
  color: var(--red);
}
.badge {
  background: #f1f1f1;
  border-radius: 30px;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  color: #4d4d4d;
  font-weight: 600;
}
.metric {
  font-size: 2.5rem;
  line-height: 1.3;
  margin: 0.75rem 0;
}
.tile p:last-child {
  margin: 0;
  font-size: 0.9rem;
}
.foundation-note {
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid #b5b5b5;
  color: var(--muted);
}
.button {
  min-height: 44px;
  padding: 0.65rem 1rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--red);
  border: 1px solid var(--red);
  color: white;
  border-radius: 6px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.button:hover {
  background: #a80000;
  color: white;
}
.button.secondary {
  background: white;
  color: var(--ink);
  border-color: #a0a0a0;
}
.button.secondary:hover {
  background: #ededed;
}
label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
}
input,
select {
  min-height: 46px;
  padding: 0.6rem 0.75rem;
  border: 1px solid #888;
  border-radius: 5px;
  width: 100%;
  background: white;
  color: var(--ink);
  min-width: 0;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.stack label:not(:first-of-type) {
  margin-top: 0.5rem;
}
.stack .button {
  margin-top: 1rem;
}
.auth-card {
  max-width: 460px;
  margin: 1rem auto;
}
.form-card {
  max-width: 620px;
}
.text-link {
  display: block;
  margin-top: 1.25rem;
  padding-block: 0.4rem;
}
.guest-languages {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 1rem;
  flex-wrap: wrap;
}
.guest-languages a {
  min-height: 44px;
  padding: 0.6rem 0.3rem;
}
.guest-languages [aria-current] {
  font-weight: 750;
  color: black;
}
.alert {
  border: 1px solid #6b6b6b;
  background: white;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}
.alert.error {
  border-color: var(--red);
  border-left-width: 5px;
}
.page-heading {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-heading .lead {
  margin-bottom: 0;
}
.table-wrap {
  overflow-x: auto;
  padding: 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
}
th,
td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead {
  background: #f0f0f0;
}
td code {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}
td a {
  display: inline-block;
  padding-block: 0.25rem;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
}
.pagination a {
  padding: 0.5rem;
}
.filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.filters label {
  margin-bottom: 0.4rem;
}
.reset-form {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
dt {
  font-weight: 650;
}
dd {
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}
dd code {
  display: block;
}
.footer {
  border-top: 1px solid var(--line);
  background: white;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.5rem 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.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;
}
/* Kostka A — formularze i czytelne progi na telefonie. */
.section {
  margin-top: 1.5rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 1rem;
}
.form-grid {
  display: grid;
  gap: 1rem;
}
.wide-form {
  max-width: 1000px;
}
.line {
  display: block;
  white-space: nowrap;
}
.pre-wrap {
  white-space: pre-wrap;
}
.message-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
.member-table {
  position: relative;
}
.member-table table {
  min-width: 56rem;
}
.member-table th,
.member-table td {
  min-width: 7.5rem;
}
.member-table select {
  min-width: 14rem;
}
.member-table .button {
  white-space: nowrap;
}
.overdue-critical {
  background: #fff0f0;
}
.overdue-critical td:first-child {
  border-left: 5px solid var(--red);
}
.overdue-critical td:nth-child(6) {
  color: #a80000;
  font-weight: 700;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-block: 1rem;
}
.checkbox input {
  width: 24px;
  min-width: 24px;
  min-height: 24px;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding-block: 0.5rem;
  font-weight: 650;
}
details form {
  margin-top: 1rem;
}
td {
  max-width: 32rem;
  overflow-wrap: anywhere;
}
textarea {
  resize: vertical;
}
@media (min-width: 700px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 600px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-heading {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }
  .filters {
    flex-direction: row;
    align-items: end;
    flex-wrap: wrap;
  }
  .filters > div {
    flex: 1;
  }
}
@media (min-width: 1000px) {
  .topbar {
    padding: 1.2rem 2rem;
  }
  .brand strong {
    font-size: 1.3rem;
  }
  .shell:not(.anonymous) {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    min-height: calc(100vh - 200px);
  }
  .sidebar {
    padding: 2rem 1rem;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .sidebar nav {
    flex-direction: column;
  }
  .locale-form {
    margin-top: 2rem;
  }
  main {
    padding: 2.5rem;
  }
  .footer {
    flex-direction: row;
    justify-content: space-between;
    padding-inline: 2rem;
  }
}

/* PANEL-P1: short public intake and mobile partner workflows. */
.intake {
  background: #f5f5f5;
  color: #000;
}
.intake-header {
  max-width: 640px;
  margin: auto;
  padding: 1rem;
}
.intake-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 1rem;
}
.intake-header a[aria-current] {
  color: #cc0000;
  font-weight: 700;
}
.intake-main {
  width: min(100% - 2rem, 600px);
  margin: 0 auto 3rem;
}
.intake-main h1 {
  font-size: clamp(1.5rem, 6vw, 2rem);
}
.intake-main .card {
  padding: 1.25rem;
}
.intake-main input,
.intake-main select,
.intake-main textarea {
  font-size: 1rem;
  min-height: 48px;
  width: 100%;
}
.intake-main .check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1.25rem 0;
}
.intake-main .check input {
  flex: 0 0 24px;
  width: 24px;
  min-height: 24px;
  margin: 0;
}
.intake-button {
  display: block;
  width: 100%;
  min-height: 52px;
  text-align: center;
  font-size: 1.1rem;
  padding: 0.9rem;
}
.honeypot {
  display: none;
}
.case-reference {
  font-size: clamp(1.25rem, 6vw, 1.8rem);
  overflow-wrap: anywhere;
  color: #cc0000;
}
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}
.partner-grid .card {
  min-width: 0;
}
.file-list {
  overflow-wrap: anywhere;
}
.partner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}
.partner-actions a,
.partner-actions button {
  min-height: 44px;
}
.partner-history {
  overflow-wrap: anywhere;
}
