/* Maadima Stays — Admin portal. Tokens taken from the Phase 1 front-end design. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #111418;
  --muted: #4A515B;
  --muted-2: #454C55;
  --line: #E2E5E9;
  --field: #D5D9DE;
  --bg: #F5F6F4;
  --head: #F7F8F7;
  --track: #F1F3F2;
  --white: #FFFFFF;
  --red: #C8102E;
  --red-dark: #A50D26;
  --red-soft: #FDF0F2;
  --red-row: #FFF8F9;
  --blue: #1F5F99;
  --nav-muted: #C9CED4;
  --nav-line: #3A4048;
  --nav-link-out: #FF8A99;
  --pill-green-bg: #E7F4E6;
  --pill-green: #1E5C1C;
  --pill-amber-bg: #FFF3D6;
  --pill-amber: #7A4F00;
  --pill-grey-bg: #EEF0F2;
  --pill-grey: #454C55;
  --pill-blue-bg: #E6F0FA;
  --pill-blue: #1F4F80;
  --pill-red-bg: #FDE8EB;
  --pill-red: #A50D26;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss03";
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
  margin: 0;
}

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

a:hover {
  color: var(--red-dark);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

[hidden] {
  display: none !important;
}

/* ── Shell ── */
.shell {
  min-height: 100vh;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  background: var(--bg);
}

.shell>.side {
  flex: 0 0 250px;
  width: 250px;
  min-width: 250px;
  display: flex;
  background: var(--ink);
}

.shell>main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 32px 24px 48px;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav {
  width: 100%;
  background: var(--ink);
  color: #fff;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.nav::-webkit-scrollbar {
  width: 4px;
}

.nav::-webkit-scrollbar-track {
  background: transparent;
}

.nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.nav .brand {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 4px;
  flex-shrink: 0;
}

.nav .brand .logo {
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  align-self: flex-start;
  display: flex;
}

.nav .brand img {
  height: 38px;
  width: auto;
}

.nav .brand small {
  font-size: 11px;
  font-weight: 700;
  color: var(--nav-muted);
  letter-spacing: .1em;
}

.nav .links {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav .links a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 12px;
  border-radius: 8px;
  min-height: 38px;
  color: #fff;
}

.nav .links a:hover {
  background: rgba(255, 255, 255, .06);
}

.nav .links a.active {
  background: var(--red);
}

.nav .links b {
  font-weight: 700;
  font-size: 13.5px;
}

.nav .links span {
  font-size: 11.5px;
  opacity: .8;
}

.nav .me {
  margin-top: auto;
  border-top: 1px solid var(--nav-line);
  padding: 14px 6px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

.nav .me b {
  font-size: 13.5px;
  color: #fff;
}

.nav .me span {
  font-size: 11.5px;
  color: var(--nav-muted);
}

.nav .me a {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  padding-top: 4px;
  text-decoration: none;
}

.nav .me a:hover {
  text-decoration: underline;
}

.nav .me a.out {
  color: var(--nav-link-out);
  text-decoration: none;
  padding-top: 4px;
}

.nav .me .linkbtn {
  background: none;
  border: none;
  padding: 4px 0 0;
  color: var(--nav-link-out);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.nav .me .linkbtn:hover {
  text-decoration: underline;
}

/* ── Page header ── */
.head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.head h1 {
  font-size: 28px;
  font-weight: 700;
}

.head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.head .tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Cards / grid ── */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card.pad {
  padding: 20px;
}

.card h2 {
  font-size: 18px;
  font-weight: 600;
}

.card .sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.row>.grow {
  flex: 999 1 520px;
  min-width: 0;
}

.row>.aside {
  flex: 1 1 340px;
  min-width: 0;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid.sm {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.grid.charts {
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.kpi .value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kpi .value.red {
  color: var(--red);
}

.kpi .hint {
  font-size: 13px;
  color: var(--muted);
}

.grid.sm .kpi {
  padding: 14px;
}

.grid.sm .kpi .value {
  font-size: 24px;
}

/* ── Controls ── */
.btn {
  font-weight: 600;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 8px;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid var(--field);
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.btn:hover {
  background: #fafafa;
}

.btn.primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn.primary:hover {
  background: var(--red-dark);
}

.btn.danger {
  color: var(--red);
}

.btn.block {
  width: 100%;
}

.btn:disabled {
  opacity: .55;
  cursor: default;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}

.fields>.field,
.split>.field {
  flex: 1 1 160px;
  min-width: 0;
}

.split {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.input,
.field input,
.field select,
.field textarea,
select.input {
  font-size: 15px;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--field);
  border-radius: 8px;
  min-height: 44px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}

.field textarea {
  min-height: 80px;
  resize: vertical;
}

.input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(200, 16, 46, .25);
  border-color: var(--red);
}

.filters {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filters .fields {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  min-height: 36px;
  cursor: pointer;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--field);
}

.chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.chips.lg .chip {
  font-size: 14px;
  padding: 9px 14px;
  min-height: 40px;
}

.seg {
  display: inline-flex;
  background: #E9ECEA;
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}

.seg button {
  border: 0;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted-2);
}

.seg button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
}

table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}

table.t th {
  white-space: nowrap;
  background: var(--head);
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

table.t td {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

table.t tr.hl td {
  background: var(--red-row);
}

table.t tr.sel td {
  background: var(--red-soft);
}

table.t tr.click {
  cursor: pointer;
}

table.t tr.click:hover td {
  background: #FAFAF9;
}

table.t .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.t .muted {
  color: var(--muted);
}

table.t .nowrap {
  white-space: nowrap;
}

.cell-2 b {
  display: block;
  font-weight: 700;
}

.cell-2 small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.tfoot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  gap: 8px;
}

.empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
}

/* ── Pills / tags ── */
.pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-block;
}

.tag {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-block;
}

.green {
  background: var(--pill-green-bg);
  color: var(--pill-green);
}

.amber {
  background: var(--pill-amber-bg);
  color: var(--pill-amber);
}

.grey {
  background: var(--pill-grey-bg);
  color: var(--pill-grey);
}

.blue {
  background: var(--pill-blue-bg);
  color: var(--pill-blue);
}

.redp {
  background: var(--pill-red-bg);
  color: var(--pill-red);
}

/* ── Bars (charts) ── */
.hbars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.hbar {
  display: grid;
  grid-template-columns: 120px 1fr 36px;
  gap: 12px;
  align-items: center;
  font-weight: 600;
}

.hbar .track {
  height: 18px;
  background: var(--track);
  border-radius: 4px;
  overflow: hidden;
}

.hbar .fill {
  height: 100%;
  background: var(--blue);
  border-radius: 4px;
}

.hbar .n {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.vbars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 16px;
  height: 240px;
  border-bottom: 1px solid var(--line);
  margin-top: 24px;
  padding: 0 8px;
}

.vbar {
  flex: 1;
  max-width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.vbar .p {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-2);
}

.vbar .col {
  width: 100%;
  background: var(--blue);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}

.vlabels {
  display: flex;
  justify-content: space-around;
  gap: 16px;
  padding: 10px 8px 0;
  font-size: 12px;
  color: var(--muted);
}

.vlabels span {
  flex: 1;
  max-width: 64px;
  text-align: center;
}

.section-label {
  font-weight: 700;
  margin-top: 18px;
}

/* ── Side panel ── */
.panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 24px;
}

.panel h2 {
  font-size: 18px;
}

.option {
  border: 1px solid var(--field);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  background: #fff;
  width: 100%;
}

.option b {
  display: block;
  font-size: 14px;
}

.option small {
  font-size: 12px;
  color: var(--muted);
}

.option.active {
  border: 2px solid var(--red);
  background: var(--red-soft);
}

.option.active b,
.option.active small {
  color: var(--red-dark);
}

.btn-row {
  display: flex;
  gap: 8px;
}

.btn-row>* {
  flex: 1;
}

.quote {
  border-left: 4px solid var(--red);
  background: var(--bg);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline li {
  position: relative;
  padding-left: 20px;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.timeline b {
  display: block;
  font-weight: 600;
}

.timeline small {
  color: var(--muted);
  font-size: 12px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: .04em;
}

/* ── Units ── */
.units {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.unit {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.unit.sel {
  border: 2px solid var(--red);
}

.unit .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.unit h3 {
  font-size: 18px;
  font-weight: 700;
}

.unit .b {
  color: var(--muted);
  font-size: 13px;
}

.unit dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 4px;
  margin: 0;
  font-size: 14px;
}

.unit dt {
  color: var(--muted);
}

.unit dd {
  margin: 0;
  font-weight: 600;
}

.qr-card {
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.qr-card img.l {
  height: 40px;
}

.qr-card img.q {
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
}

.qr-card b {
  font-size: 18px;
}

.qr-card small {
  font-size: 12px;
  color: var(--muted);
  max-width: 220px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 15px;
  padding: 6px 0;
}

.check input {
  width: 20px;
  height: 20px;
  accent-color: #1A73E8;
}

/* ── Settings ── */
.note {
  background: var(--pill-amber-bg);
  color: var(--pill-amber);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.pins {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.pinbox {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.pinbox .code {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .12em;
}

.pinbox small {
  color: var(--muted);
  font-size: 12px;
}

.pinbox .st {
  font-size: 12px;
  font-weight: 700;
}

.pinbox .st.free {
  color: var(--pill-green);
}

.pinbox .st.busy {
  color: var(--pill-amber);
}

.pinbox .x {
  position: absolute;
  right: 8px;
  top: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
}

.msg-row {
  display: grid;
  grid-template-columns: 1fr 220px 80px 70px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.msg-row small {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-block;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  background: #C9CED4;
  border-radius: 999px;
  cursor: pointer;
  transition: .15s;
}

.switch span::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: .15s;
}

.switch input:checked+span {
  background: var(--pill-green);
}

.switch input:checked+span::after {
  transform: translateX(20px);
}

.kv {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 8px 16px;
  font-size: 14px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-weight: 600;
  word-break: break-all;
}

/* ── Sign in ── */
.signin {
  min-height: 100vh;
  padding: 48px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background-color: #0B0D11;
  background-image: linear-gradient(rgba(11, 13, 17, .55) 0%, rgba(11, 13, 17, .35) 45%, rgba(11, 13, 17, .9) 100%), url('../img/signin-bg.svg');
  background-size: cover;
  background-position: center;
}

.signin form {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, .97);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: rgba(0, 0, 0, .45) 0 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.signin .top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.signin .top img {
  height: 64px;
}

.signin .badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
}

.signin h1 {
  font-size: 28px;
  font-weight: 800;
}

.signin .top p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.signin .help {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 8px;
  padding: 12px;
}

.signin .foot {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .72);
  letter-spacing: .04em;
}

.signin .alt {
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  padding: 8px;
}

.error {
  background: var(--pill-red-bg);
  color: var(--pill-red);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
}

/* ── Toast / modal ── */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  z-index: 100;
  max-width: 420px;
}

.toast.err {
  background: var(--red-dark);
}

dialog {
  border: 0;
  border-radius: 14px;
  padding: 24px;
  width: min(480px, 92vw);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}

dialog::backdrop {
  background: rgba(17, 20, 24, .5);
}

dialog form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loading {
  color: var(--muted);
  padding: 24px;
}

@media (max-width: 720px) {
  .shell {
    flex-wrap: wrap;
  }

  .shell>.side {
    width: 100%;
    max-width: none;
    flex: 1 1 100%;
  }

  .nav {
    position: static;
    max-height: none;
  }

  .hbar {
    grid-template-columns: 100px 1fr 30px;
  }

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

@media print {

  .shell>.side,
  .head .tools,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }
}

/* ── Server-rendered views additions ── */
a.chip,
.seg a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.seg a {
  border: 0;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--muted-2);
}

.seg a.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

a.btn {
  color: var(--ink);
}

a.btn.primary {
  color: #fff;
}

.option {
  display: block;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option:has(input:checked) {
  border: 2px solid var(--red);
  background: var(--red-soft);
}

.option:has(input:checked) b,
.option:has(input:checked) small {
  color: var(--red-dark);
}

.option:focus-within {
  outline: 2px solid rgba(200, 16, 46, .25);
}

.linkbtn {
  background: none;
  border: 0;
  padding: 4px 0 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--nav-link-out);
  cursor: pointer;
  text-align: left;
}

.flash {
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.flash.success {
  background: var(--pill-green-bg);
  color: var(--pill-green);
}

.flash.error {
  background: var(--pill-red-bg);
  color: var(--pill-red);
}

.flash.secret {
  background: var(--pill-amber-bg);
  color: var(--pill-amber);
}

.flash code {
  font-family: ui-monospace, monospace;
  font-size: 16px;
  background: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--ink);
}

.flash .btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

tr.click a.rowlink {
  color: inherit;
  text-decoration: none;
  display: block;
}

details.add {
  border: 1px dashed var(--field);
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff;
}

details.add summary {
  cursor: pointer;
  font-weight: 600;
}

details.add form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.inline {
  display: inline;
  margin: 0;
}

.pinbox form {
  position: absolute;
  right: 6px;
  top: 4px;
}

.pinbox form .x {
  position: static;
}

.msg-row form {
  display: contents;
}

.err-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.err-page .card {
  max-width: 460px;
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.err-page .code {
  font-size: 48px;
  font-weight: 800;
  color: var(--red);
}

@media print {
  body.print-qr * {
    visibility: hidden;
  }

  body.print-qr #qrCard,
  body.print-qr #qrCard * {
    visibility: visible;
  }

  body.print-qr #qrCard {
    position: fixed;
    left: 50%;
    top: 40px;
    transform: translateX(-50%);
    width: 360px;
  }
}

.field .check input,
.check input {
  width: 20px;
  height: 20px;
  min-height: 0;
  padding: 0;
  flex: none;
}

.panel .split>.field {
  flex: 1 1 120px;
}

.card.wide {
  grid-column: span 2;
}

@media (max-width: 1100px) {
  .card.wide {
    grid-column: auto;
  }
}