:root {
  color-scheme: light;
  --ink: #17243b;
  --blue: #3977ef;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 10% 16%, rgba(126, 192, 255, 0.24), transparent 36%),
    radial-gradient(ellipse at 83% 79%, rgba(166, 146, 255, 0.2), transparent 34%),
    linear-gradient(132deg, #f2f8ff 0%, #f8faff 49%, #f4f4ff 100%);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  display: flex;
  width: min(1240px, 100%);
  min-height: 100vh;
  flex-direction: column;
  margin: 0 auto;
  padding: 28px 56px 22px;
}

.topbar,
.brand,
.footer {
  display: flex;
  align-items: center;
}

.topbar,
.footer {
  justify-content: space-between;
}

.brand {
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 13px;
  background: linear-gradient(145deg, #4b8af9, #42c1dd);
  box-shadow: 0 7px 18px rgba(52, 121, 229, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: white;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark span {
  transform: translateY(-1px);
}

.brand-name {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.topbar-link {
  color: #74829a;
  font-size: 12px;
  font-weight: 600;
}

.welcome-label {
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.admin-page {
  min-height: 100vh;
}

.admin-page > .topbar {
  flex: 0 0 auto;
}

.admin-card {
  display: flex;
  width: min(480px, 100%);
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 50px auto;
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 22px 70px rgba(44, 63, 105, 0.12), inset 0 1px 0 white;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.admin-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  background: linear-gradient(145deg, #4b8af9, #42c1dd);
  box-shadow: 0 7px 18px rgba(52, 121, 229, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: white;
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.admin-card h1 {
  margin: 12px 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: -0.05em;
}

.admin-description {
  max-width: 360px;
  margin: 0 auto 18px;
  color: #71809a;
  font-size: 13px;
  line-height: 1.65;
}

.admin-status {
  max-width: 360px;
  margin: 0 0 18px;
  color: #536787;
  font-size: 12px;
  line-height: 1.6;
}

.admin-sign-in {
  width: min(320px, 100%);
}

.admin-sign-in button {
  width: 100%;
  min-height: 47px;
  border: 1px solid rgba(157, 174, 202, 0.33);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  color: #526078;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.admin-sign-in button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.admin-authorized {
  width: 100%;
  margin-top: 20px;
  text-align: left;
}

.admin-card.is-authorized {
  width: min(1100px, 100%);
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
}

.admin-card.is-authorized > .admin-icon,
.admin-card.is-authorized > .welcome-label,
.admin-card.is-authorized > h1,
.admin-card.is-authorized > .admin-description,
.admin-card.is-authorized > #admin-status {
  display: none;
}

.admin-dashboard-header,
.admin-users-toolbar,
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-dashboard-header {
  margin-bottom: 20px;
}

.admin-dashboard-header h2 {
  margin: 8px 0 4px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.04em;
}

.admin-account-line {
  margin: 0;
  color: #71809a;
  font-size: 12px;
}

.admin-dashboard-header .text-action {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid rgba(142, 164, 197, 0.28);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
}

.admin-users-toolbar {
  margin-bottom: 10px;
}

.admin-users-toolbar input {
  width: min(480px, 100%);
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(157, 174, 202, 0.35);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.admin-users-toolbar input:focus {
  border-color: rgba(57, 119, 239, 0.65);
  box-shadow: 0 0 0 3px rgba(57, 119, 239, 0.1);
}

.admin-refresh-button {
  min-height: 39px;
  padding: 0 13px;
  border: 1px solid rgba(142, 164, 197, 0.3);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.75);
  color: #536582;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.admin-refresh-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.admin-users-summary,
.admin-users-status,
.admin-users-note {
  margin: 0 0 10px;
  color: #71809a;
  font-size: 11px;
  line-height: 1.5;
}

.admin-users-status {
  color: #a43c4b;
}

.admin-users-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(142, 164, 197, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}

.admin-users-table th,
.admin-users-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(142, 164, 197, 0.17);
  white-space: nowrap;
}

.admin-users-table th {
  background: rgba(238, 244, 253, 0.78);
  color: #71809a;
  font-size: 10px;
  font-weight: 700;
}

.admin-users-table td {
  color: #43516a;
}

.admin-users-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-users-empty {
  padding: 24px !important;
  color: #71809a !important;
  text-align: center;
}

.admin-pagination {
  justify-content: center;
  margin: 14px 0;
  color: #71809a;
  font-size: 11px;
}

.admin-users-note {
  margin-bottom: 0;
  text-align: center;
}

.admin-authorized strong {
  color: #267c61;
  font-size: 13px;
}

.admin-authorized p {
  margin: 8px 0 12px;
  color: #536787;
  font-size: 12px;
}

.footer {
  color: #94a0b2;
  font-size: 10px;
}

.footer-tagline {
  color: #a1acbd;
}

@media (max-width: 700px) {
  .page-shell {
    padding: 18px 22px;
  }

  .admin-card {
    margin: 28px auto;
    padding: 32px 24px;
  }

  .admin-card.is-authorized {
    padding: 22px 14px;
  }

  .admin-dashboard-header {
    align-items: flex-start;
  }

  .admin-users-toolbar input {
    min-width: 0;
  }

  .admin-users-table th,
  .admin-users-table td {
    padding: 10px;
  }
}
