/* Shared by the start page (index.html) and the admin page (admin.html): the account bar, buttons, dialogs, forms
   and the toast. Colours come from home.css (:root). */
.topbar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 0;
  min-height: 52px;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.acct-photo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.acct-photo.letter {
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
}
.acct-who {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 40vw;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.acct-admin,
.acct-local {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.acct-admin {
  background: var(--navy);
  color: #fff;
}
.acct-local {
  background: #fff;
  border: 1px dashed var(--muted);
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.btn:hover,
.btn:focus-visible {
  border-color: var(--orange);
  outline: none;
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.btn.pri {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}
.btn.pri:hover,
.btn.pri:focus-visible {
  background: #f0682a;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
}
.btn.sm {
  min-height: 34px;
  padding: 5px 11px;
  font-size: 14px;
}
.btn.danger {
  color: #b42318;
}
.g-signin .g {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.muted {
  color: var(--muted);
}
.sec-h {
  margin: 36px 0 6px;
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-size: 26px;
  line-height: 1.2;
  color: var(--navy);
}
.sec-sub {
  margin-bottom: 16px;
  color: var(--muted);
}

/* Dialogs */
.pm-bg {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 30, 46, 0.55);
}
.pm {
  width: min(680px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.pm-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.pm-head h2 {
  flex: 1;
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-size: 24px;
  line-height: 1.2;
  color: var(--navy);
}
.pm-x {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--bg);
  color: var(--navy);
  font-size: 16px;
  cursor: pointer;
}
.pm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* Forms */
.rq-form,
.adm-form {
  display: grid;
  gap: 12px;
}
.rq-form label,
.adm-form label {
  display: grid;
  gap: 4px;
  font-weight: 800;
  color: var(--navy);
}
input[type='text'],
input[type='email'],
input[type='search'],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--orange);
  outline: none;
}
input[readonly] {
  background: var(--bg);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  transform: translate(-50%, 140%);
  transition: transform 0.25s;
  pointer-events: none;
}
.toast.show {
  transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
  .toast,
  .btn {
    transition: none;
  }
}
