/* Login page, user menu, password dialog and the owner page (Beheer).
   Loaded after app.css: reuses its colour variables (light + dark) and button/input styles. */

/* ---------- login page ---------- */
body.page-login { overflow-y: auto; }
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 26px 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
}
.auth-card h1 { font-size: 17px; }
.auth-card h2 { font-size: 14px; color: var(--muted); font-weight: 500; margin-top: -8px; }
.auth-card p { margin: 0; }
.auth-card .primary { padding: 7px 10px; margin-top: 4px; }
.field { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
.field input { font-size: 13px; padding: 6px 8px; width: 100%; }
.field input[type=password] {
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.msg-err {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--err);
  background: var(--err-bg);
  color: var(--err);
}
.msg-ok {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--ok);
  background: var(--ok-bg);
  color: var(--ok);
}

/* ---------- user menu (top bar of index.html + beheer.html) ---------- */
.umenu { position: relative; }
.umenu-btn { display: inline-flex; align-items: center; gap: 6px; }
.umenu-btn::after { content: "\25BE"; font-size: 10px; color: var(--muted); }
.umenu-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 70;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}
.umenu-list a, .umenu-list button {
  display: block;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.umenu-list a:hover, .umenu-list button:hover, .umenu-list a:focus-visible, .umenu-list button:focus-visible { background: var(--hover); }
.umenu-who { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; color: var(--muted); font-size: 11px; }

/* ---------- small modal dialog (password change) ---------- */
.dlg {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .35);
}
.dlg-panel {
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  background: var(--panel);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- owner page (beheer.html) ---------- */
body.page-admin { overflow-y: auto; }
.back-link { color: var(--accent); text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.admin { width: 100%; max-width: 1180px; margin: 0 auto; padding: 14px 16px 40px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  padding: 7px 12px;
  color: var(--muted);
  font-weight: 500;
}
.tabs button:hover { color: var(--text); background: none; }
.tabs button[aria-selected=true] { color: var(--accent); border-bottom-color: var(--accent); }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; }
.form-row .field input, .form-row .field select { min-width: 160px; }
.form-row .field select { font-size: 13px; padding: 5px 7px; }
.table-wrap { overflow-x: auto; }
.admin table.grid th { position: static; }
.admin table.grid td { vertical-align: middle; }
.admin table.grid tfoot td { font-weight: 600; border-top: 2px solid var(--line); border-bottom: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.row-actions button { padding: 2px 8px; }
tr.inactive td:not(.keep) { color: var(--muted); }
.temp-pw {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--warn);
  border-radius: 8px;
  background: var(--warn-bg);
}
.temp-pw .pw {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--panel);
  user-select: all;
}
.temp-pw .note { flex-basis: 100%; color: var(--warn); }
.month-pick { display: inline-flex; align-items: center; gap: 4px; }
.month-pick input { width: 130px; }
.models { margin-top: 10px; }
.settings-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.settings-list dt { color: var(--muted); }
.settings-list dd { margin: 0; overflow-wrap: anywhere; }
.settings-list dd div + div { margin-top: 2px; }
.denied { max-width: 520px; margin: 40px auto; text-align: center; }
@media (max-width: 640px) {
  .settings-list { grid-template-columns: 1fr; gap: 2px; }
  .settings-list dd { margin-bottom: 8px; }
}
