/* Pagine pubbliche dell'assistenza: neutre, il colore arriva dal tema del servizio. */
:root {
  --brand: #1f4f8f;
  --brand-ink: #ffffff;
  --ink: #1d2330;
  --muted: #5b6475;
  --line: #d7dbe3;
  --surface: #ffffff;
  --page: #f4f5f7;
  --danger: #a3261b;
  --ok: #1d6b3a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  font-size: 16px;
}

.shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.narrow {
  max-width: 560px;
  padding-top: 48px;
}

main {
  flex: 1;
  padding-bottom: 40px;
}

.top {
  background: var(--surface);
  border-top: 6px solid var(--brand);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 24px;
}

.brand-logo {
  display: block;
  max-height: 40px;
  width: auto;
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
}

h1 {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

a {
  color: var(--brand);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 14px;
}

.hint {
  font-weight: 400;
  color: var(--muted);
}

input,
textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #8a93a5;
  border-radius: 8px;
}

textarea {
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
}

.check input {
  width: auto;
  margin-top: 4px;
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button {
  font: inherit;
  font-weight: 600;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--brand);
  background: var(--surface);
  color: var(--brand);
  cursor: pointer;
}

button.primary {
  background: var(--brand);
  color: var(--brand-ink);
}

button:disabled,
input:disabled,
textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.status {
  min-height: 1.5em;
  margin: 12px 0 0;
}

.status.error {
  color: var(--danger);
}

.status.done {
  color: var(--ok);
}

.notice {
  background: #fff8e1;
  border: 1px solid #e6cf7a;
  border-radius: 8px;
  padding: 12px 14px;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

details form {
  margin-top: 14px;
}

.code {
  color: var(--muted);
  margin: 0;
  font-weight: 600;
}

.messages {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.messages li {
  border-left: 4px solid var(--line);
  padding: 8px 12px;
  margin-bottom: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.messages li.support {
  border-left-color: var(--brand);
  background: #f7f9fc;
}

.messages .meta {
  display: block;
  white-space: normal;
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.services {
  list-style: none;
  padding: 0;
}

.service {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.bottom {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  color: var(--muted);
  font-size: 0.875rem;
}

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

  h1 {
    font-size: 1.35rem;
  }

  .card {
    padding: 16px;
  }

  .actions button {
    width: 100%;
  }
}
