/* Mosaicarte back-office: phone first, one column, 900 px wide at most. */
:root {
  --accent: #2f5bd3;
  --accent-dark: #2448a8;
  --text: #1d1f24;
  --muted: #5d6270;
  --line: #d9dce3;
  --bg: #f6f7f9;
  --ok: #1d7a3e;
  --ko: #b3261e;
  --warn: #8a5a00;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
main, .top, footer { max-width: 900px; margin: 0 auto; padding: 0 16px; }
main { padding-bottom: 32px; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 24px 0 8px; }
h2 { font-size: 1.2rem; margin: 28px 0 8px; }
h3 { font-size: 1rem; margin: 20px 0 8px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; }

.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; min-height: 56px; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.top nav a, .link { display: inline-flex; align-items: center; min-height: 44px; }
footer { color: var(--muted); font-size: 0.9rem; padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--line); }

.lead { font-size: 1.1rem; }
.sub { margin-top: 0; color: var(--muted); }
.note { color: var(--muted); }
.notice { border-left: 4px solid var(--warn); padding: 8px 12px; background: #fff7e6; }
.flash { border-left: 4px solid var(--accent); padding: 8px 12px; background: #eef2fd; }
.error { border-left: 4px solid var(--ko); padding: 8px 12px; background: #fdeeee; color: var(--ko); }
.ok { color: var(--ok); font-weight: 600; }
.ko { color: var(--ko); font-weight: 600; }
.wrap { overflow-wrap: anywhere; }

button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border: 1px solid var(--accent); border-radius: 6px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { background: var(--accent-dark); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary, .button.secondary { background: #fff; color: var(--accent); }
button.danger { background: #fff; color: var(--ko); border-color: var(--ko); }
button.link {
  border: 0; background: none; padding: 0; color: var(--accent); font-weight: 400;
  text-decoration: underline;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
form.inline { display: inline; margin: 0; }

.stack { display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.stack label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; }
input[type="email"], input[type="password"], textarea, select {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
input[type="email"], input[type="password"] { min-height: 44px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
pre {
  overflow-x: auto; padding: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 6px;
}
.list { padding-left: 20px; }
.list li { min-height: 44px; display: list-item; line-height: 44px; }
.incidents { padding-left: 20px; }
.incidents li { margin-bottom: 6px; }
.incidents li.level-error { color: var(--ko); }
.incidents small { display: block; color: var(--muted); }

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.9rem; color: var(--muted); }

@media (max-width: 639px) {
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: 8px; }
  table.stack-sm thead { display: none; }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; }
  table.stack-sm tr { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 12px; }
  table.stack-sm td { border: 0; padding: 4px 12px; }
  table.stack-sm td::before {
    content: attr(data-label); display: block; font-size: 0.85rem; color: var(--muted);
  }
}
