* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Tahoma, Arial;
  background: #f4f8f7;
  color: #102a2a;
}
button,
input,
select {
  font: inherit;
}
.center {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.card {
  background: #fff;
  border: 1px solid #dce9e6;
  border-radius: 22px;
  padding: 28px;
  width: min(420px, 92vw);
  box-shadow: 0 18px 55px #153b3418;
}
.logo {
  width: 130px;
  display: block;
  margin: auto;
  opacity: 0.7;
}
.card h1 {
  text-align: center;
}
.creator {
  margin: -6px 0 20px;
  text-align: center;
  direction: ltr;
  color: #6a7d7a;
  font-size: 14px;
}
.creator strong {
  color: #102a2a;
  font-weight: 800;
}
.field {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}
.field input,
.field select {
  padding: 13px;
  border: 1px solid #dce9e6;
  border-radius: 11px;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  width: 100%;
  padding-left: 50px;
}
.password-toggle {
  position: absolute;
  left: 7px;
  top: 50%;
  width: 40px;
  height: 40px;
  padding: 8px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #47615d;
  cursor: pointer;
}
.password-toggle:hover {
  background: #eaf3f1;
}
.password-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.password-toggle.shown::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 19px;
  width: 24px;
  height: 2px;
  background: currentColor;
  transform: rotate(-45deg);
}
.primary {
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 13px;
  background: #087565;
  color: #fff;
}
.error {
  color: #b42318;
  text-align: center;
}
.shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}
.side {
  background: #073f3b;
  color: #fff;
  padding: 25px 18px;
}
.menu,
.close-menu,
.backdrop {
  display: none;
}
.side h1 {
  font-size: 28px;
}
.side button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 14px;
  text-align: right;
  border-radius: 10px;
}
.side button:hover {
  background: #ffffff18;
}
.side img {
  width: 150px;
  filter: invert(1);
  opacity: 0.15;
  margin: 30px auto;
  display: block;
}
.main {
  padding: 28px;
}
.top {
  display: flex;
  justify-content: space-between;
}
.page-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.back-home {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 11px;
  background: #e2f1ee;
  color: #087565;
  font-size: 25px;
  cursor: pointer;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat,
.panel {
  background: #fff;
  border: 1px solid #dce9e6;
  border-radius: 16px;
  padding: 18px;
  margin-top: 16px;
}
.stat b {
  display: block;
  font-size: 25px;
}
.actions {
  display: flex;
  gap: 10px;
}
.actions button {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  background: #087565;
  color: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
th,
td {
  padding: 12px;
  border-bottom: 1px solid #e9f0ee;
  text-align: right;
}
.table {
  overflow: auto;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #0008;
  display: grid;
  place-items: center;
  padding: 12px;
}
.modal .card {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}
.hidden {
  display: none;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.small-primary,
.user-actions button {
  border: 0;
  border-radius: 9px;
  padding: 10px 14px;
  background: #087565;
  color: #fff;
}
.users-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.user-card {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr auto 1.4fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #dce9e6;
  border-radius: 13px;
  padding: 14px;
}
.user-card small {
  display: block;
  color: #6a7d7a;
  margin-top: 5px;
}
.user-card label {
  display: grid;
  gap: 5px;
}
.user-card select,
.reset-field input {
  padding: 9px;
  border: 1px solid #dce9e6;
  border-radius: 8px;
}
.user-card .active-check {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.user-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
.user-actions .danger {
  background: #b42318;
}
.protected-user {
  color: #087565;
  font-size: 13px;
}
.role-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 8px;
  border: 1px solid #dce9e6;
  border-radius: 10px;
  padding: 10px;
}
.role-checks legend {
  padding: 0 6px;
  color: #47615d;
}
.role-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.reset-field {
  min-width: 190px;
}
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  top: 22px;
  max-width: calc(100vw - 28px);
  padding: 13px 20px;
  border-radius: 12px;
  background: #087565;
  color: #fff;
  box-shadow: 0 12px 35px #0004;
  opacity: 0;
  transform: translate(-50%, -18px);
  transition: 0.22s ease;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.error {
  background: #b42318;
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .side {
    display: block;
    position: fixed;
    z-index: 31;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(82vw, 310px);
    overflow-y: auto;
    transform: translateX(105%);
    transition: transform 0.22s ease;
    box-shadow: -16px 0 40px #0003;
  }
  .side.open {
    transform: translateX(0);
  }
  .menu {
    display: block;
    position: fixed;
    z-index: 20;
    top: 14px;
    left: 14px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: #087565;
    color: #fff;
    font-size: 26px;
  }
  .close-menu {
    display: block !important;
    width: 44px !important;
    padding: 4px !important;
    font-size: 34px;
    line-height: 1;
    text-align: center !important;
  }
  .backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: #0007;
  }
  .backdrop.open {
    display: block;
  }
  .main {
    padding: 16px 12px 100px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f4f8f7;
    padding: 12px;
    z-index: 10;
  }
  .actions button {
    flex: 1;
  }
  .top h1 {
    font-size: 23px;
  }
  .page-title {
    width: 100%;
    justify-content: space-between;
    padding-left: 56px;
  }
  .section-title,
  .user-card {
    display: grid;
    grid-template-columns: 1fr;
  }
  .small-primary,
  .user-actions button {
    width: 100%;
  }
  .user-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .role-checks {
    grid-template-columns: 1fr;
  }
  .modal {
    align-items: start;
  }
  .modal .card {
    margin-top: 0;
  }
}
