html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #f6f7f9;
  color: #1f2933;
}

.navbar-brand {
  font-weight: 700;
}

.work-surface,
.page-heading {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
}

.work-surface h1,
.page-heading h1 {
  font-size: clamp(1.75rem, 2vw, 2.25rem);
  margin: 0;
}

.eyebrow {
  color: #2563eb;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: .25rem;
  text-transform: uppercase;
}

.clock-panel {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.clock-actions {
  display: flex;
  gap: .75rem;
}

.stacked-form {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: grid;
  gap: .85rem;
  padding: 1rem;
}

.auth-shell {
  display: grid;
  min-height: 65vh;
  place-items: center;
}

.auth-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  max-width: 420px;
  padding: 2rem;
  width: 100%;
}

.admin-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(260px, 360px) 1fr;
}

.role-list {
  display: grid;
  gap: .35rem;
}

.user-table {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: .75rem;
}

.actions-cell,
.password-form {
  display: flex;
  gap: .5rem;
}

.password-form {
  margin-top: .5rem;
}

.role-editor-list {
  display: grid;
  gap: 1rem;
}

.role-editor {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}

.role-editor-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.role-permissions {
  display: grid;
  gap: .45rem;
}

.system-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 620px;
}

.system-status {
  display: grid;
  gap: .75rem;
  margin: 0;
}

.system-status div {
  border-bottom: 1px solid #e5e7eb;
  display: grid;
  gap: .25rem;
  padding-bottom: .65rem;
}

.system-status dt {
  color: #6b7280;
  font-size: .82rem;
  font-weight: 700;
}

.system-status dd {
  margin: 0;
}

.backup-settings-form {
  display: grid;
  gap: .85rem;
}

.entry-edit-form {
  align-items: end;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) repeat(2, minmax(180px, 2fr)) auto;
  padding: .85rem;
}

.delete-entry-form {
  align-items: end;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(220px, 1fr) auto;
  padding: .85rem;
}

.delete-entry-form .form-label {
  margin: 0;
}

.entry-edit-form .form-label {
  margin: 0;
}

.management-note {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  padding: .65rem .85rem;
}

.system-note {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e3a8a;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  padding: .65rem .85rem;
}

.deleted-entry-list {
  display: grid;
  gap: .75rem;
}

.deleted-entry-note {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #7f1d1d;
  display: grid;
  gap: .2rem;
  padding: .75rem .9rem;
}

.deleted-entry-note p {
  margin: 0;
}

.status-badge {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #1e1b4b;
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  padding: .35rem .6rem;
}

@media (max-width: 900px) {
  .admin-grid,
  .work-surface,
  .page-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .clock-panel,
  .clock-actions,
  .actions-cell,
  .password-form,
  .entry-edit-form,
  .delete-entry-form {
    align-items: stretch;
    flex-direction: column;
  }

  .entry-edit-form,
  .delete-entry-form {
    grid-template-columns: 1fr;
  }
}
