/* Desktop layout for the admin page. It reuses the tokens in styles.css. */

body.admin {
  padding-bottom: 40px;
}

.abar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.abar h1 { font-size: 17px; margin: 0; flex: 1; }
.abar-right { display: flex; align-items: center; gap: 10px; }
.abar a.ghost { display: inline-flex; align-items: center; text-decoration: none; }
.who { font-size: 13px; color: var(--ink-soft); }

.awrap { max-width: 1280px; margin: 0 auto; padding: 24px; }

.cols {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

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

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

.card.narrow { max-width: 400px; margin: 40px auto; }

.roombar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.roombar .field { min-width: 220px; }
.roombar button { min-height: 40px; }
.roombar .hint { margin-left: auto; align-self: center; }
.roombar .hint a { color: var(--accent); }
.card h2 { font-size: 16px; margin: 0 0 14px; }
.card h3 { font-size: 14px; margin: 24px 0 6px; }

.hint { font-size: 12px; color: var(--ink-soft); margin: 4px 0 0; }
.hint code { font-size: 12px; }

.grid { display: grid; gap: 14px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.wide { grid-column: span 2; }

label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.row { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.row.spread { justify-content: space-between; margin: 18px 0 8px; }
.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; color: var(--ink); font-size: 13px; }
.inline input { width: auto; min-height: 0; }

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

.days-pick label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.days-pick input { position: absolute; opacity: 0; pointer-events: none; }
.days-pick label.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.payload {
  margin: 8px 0 10px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}

.addbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.addbar .field.wide { grid-column: span 2; }
.addbar button { min-height: 40px; }

@media (max-width: 1100px) {
  .addbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .addbar button { grid-column: span 2; }
}

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.gone td { opacity: 0.45; }
.table td:last-child { text-align: right; width: 1%; white-space: nowrap; }
.table td.when { white-space: nowrap; font-variant-numeric: tabular-nums; }

button.danger {
  min-height: 34px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--busy);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

button.danger:hover { border-color: var(--busy); }

input[readonly] { color: var(--ink-soft); background: var(--taken-bg); }

#signInForm { display: grid; gap: 6px; }
#signInForm button { margin-top: 12px; }

.mark { font-size: 12px; color: var(--ink-soft); }
