* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #0f172a;
  background:
    linear-gradient(rgba(244, 247, 251, 0.72), rgba(244, 247, 251, 0.72)),
    url("/background.png"),
    url("/background.svg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.siteHeader {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 28px;
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.siteLogo {
  height: clamp(54px, 7vw, 92px);
  width: auto;
  max-width: 220px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand h1 {
  margin: 0;
  font-size: 30px;
}

.brand p {
  margin: 4px 0 0;
  color: #64748b;
}

main {
  max-width: 1180px;
  margin: auto;
  padding: 28px;
}

.panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  padding: 28px;
}

.authPanel {
  position: fixed;
  left: 28px;
  bottom: 28px;
  z-index: 1000;
  width: min(520px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.authPanel::-webkit-scrollbar {
  width: 8px;
}

.authPanel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.formGrid {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
}

textarea {
  resize: vertical;
}

.roleSwitch {
  display: flex;
  gap: 20px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
}

.roleSwitch label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.primaryBtn,
.secondaryBtn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
}

.primaryBtn {
  background: #16a34a;
  color: #ffffff;
}

.primaryBtn:hover {
  background: #15803d;
}

.secondaryBtn {
  background: #e2e8f0;
  color: #0f172a;
}

.secondaryBtn:hover {
  background: #cbd5e1;
}

.message {
  min-height: 22px;
  color: #b91c1c;
  font-weight: 700;
}

.muted {
  color: #64748b;
}

.appView {
  display: grid;
  gap: 18px;
  margin-left: 560px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.filters {
  display: flex;
  gap: 12px;
  align-items: center;
}

.profileGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.profileCard {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-weight: 800;
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.smallBtn {
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 700;
}

@media (max-width: 980px) {
  .appView {
    margin-left: 0;
    margin-top: calc(100vh - 170px);
  }
}

@media (max-width: 760px) {
  main {
    padding: 16px;
  }

  .siteHeader {
    padding: 12px 16px;
  }

  .brand h1 {
    font-size: 24px;
  }

  .brand p {
    font-size: 14px;
  }

  .authPanel {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    max-height: calc(100vh - 32px);
  }

  .toolbar,
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
}
