:root {
  color-scheme: light;
  --orange: #ff6a00;
  --orange-deep: #e94f00;
  --ink: #111214;
  --muted: #68707c;
  --line: rgba(17, 18, 20, 0.09);
  --glass: rgba(255, 255, 255, 0.78);
  --danger: #d92d20;
  --success: #078f5b;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 106, 0, 0.13), transparent 34%),
    radial-gradient(circle at 88% 78%, rgba(17, 18, 20, 0.09), transparent 36%),
    linear-gradient(145deg, #f8f8f6, #eef1f5);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-card {
  width: min(970px, 100%);
  min-height: 590px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 34px;
  box-shadow: 0 28px 80px rgba(15, 20, 30, 0.18);
  backdrop-filter: blur(30px) saturate(1.35);
  -webkit-backdrop-filter: blur(30px) saturate(1.35);
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 46px;
  color: white;
  background:
    linear-gradient(155deg, rgba(255, 118, 25, 0.95), rgba(225, 65, 0, 0.96) 58%, #161616);
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 12% -35% auto auto;
  width: 330px;
  aspect-ratio: 1;
  border: 40px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
}

.brand-logo {
  position: relative;
  z-index: 1;
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 27px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.brand-copy {
  position: relative;
  z-index: 1;
}

.brand-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 50px);
  letter-spacing: -0.05em;
}

.brand-copy p {
  margin: 0;
  max-width: 330px;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
}

.form-panel {
  display: grid;
  align-content: center;
  padding: 52px 60px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange-deep);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.form-panel h2,
.admin-title h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.form-panel h2 {
  font-size: 34px;
}

.subtitle {
  margin: 10px 0 28px;
  color: var(--muted);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 14px;
  font-weight: 750;
}

.field input,
.field select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(17, 18, 20, 0.13);
  border-radius: 15px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.13);
}

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

.primary-button,
.secondary-button,
.danger-button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  box-shadow: 0 12px 28px rgba(255, 91, 0, 0.26);
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(17, 18, 20, 0.12);
}

.danger-button {
  color: var(--danger);
  background: rgba(217, 45, 32, 0.08);
  border-color: rgba(217, 45, 32, 0.14);
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
}

.registration-footer {
  margin-top: 18px;
  padding-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  border-top: 1px solid var(--line);
}

.registration-footer a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 160ms ease;
}

.registration-footer a:hover,
.registration-footer a:focus-visible {
  color: var(--orange-deep);
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

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

.admin-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.admin-header,
.glass-card {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(20, 26, 34, 0.09);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 26px;
  border-radius: 24px;
}

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

.admin-title img {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: cover;
}

.admin-title h1 {
  font-size: 27px;
}

.admin-title p {
  margin: 5px 0 0;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(520px, 1.28fr);
  gap: 20px;
  margin-top: 20px;
}

.glass-card {
  padding: 26px;
  border-radius: 24px;
}

.glass-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.card-note {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.user-list,
.audit-list {
  display: grid;
  gap: 12px;
}

.user-row,
.audit-row {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.66);
}

.user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.user-main strong {
  display: block;
  font-size: 16px;
}

.user-main small,
.audit-row small {
  color: var(--muted);
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.row-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--success);
  background: rgba(7, 143, 91, 0.09);
  font-size: 12px;
  font-weight: 800;
}

.status.disabled {
  color: var(--danger);
  background: rgba(217, 45, 32, 0.08);
}

.audit-card {
  grid-column: 1 / -1;
}

.audit-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.empty-state {
  padding: 30px 16px;
  color: var(--muted);
  text-align: center;
}

dialog {
  width: min(460px, calc(100% - 34px));
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 0;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

dialog::backdrop {
  background: rgba(10, 13, 18, 0.42);
  backdrop-filter: blur(6px);
}

.dialog-body {
  padding: 26px;
}

.dialog-body h2 {
  margin: 0 0 20px;
}

@media (max-width: 780px) {
  .page-shell {
    padding: 14px;
  }

  .login-card {
    grid-template-columns: 1fr;
    border-radius: 26px;
  }

  .brand-panel {
    min-height: 210px;
    padding: 28px;
  }

  .brand-logo {
    width: 72px;
    height: 72px;
    border-radius: 20px;
  }

  .brand-copy h1 {
    margin-top: 30px;
    font-size: 34px;
  }

  .brand-copy p {
    display: none;
  }

  .form-panel {
    padding: 34px 26px 38px;
  }

  .registration-footer {
    margin-top: 16px;
    padding-top: 13px;
    font-size: 11px;
  }

  .admin-page {
    padding: 14px;
  }

  .admin-header,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-grid {
    display: grid;
  }

  .user-row,
  .audit-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .row-actions {
    justify-content: flex-start;
  }
}
