:root {
  --bg: #eef2f5;
  --surface: #ffffff;
  --ink: #17212b;
  --muted: #647484;
  --line: #dce4ea;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
  --shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

.hidden {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(145deg, #162029 0%, #0f766e 100%);
}

.auth-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(460px, 100%);
  padding: 40px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

p,
.form-status,
.brand span,
.session-actions span {
  color: var(--muted);
}

.auth-form,
.admin-user-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle.is-visible {
  background: #eef2f5;
  color: var(--accent-dark);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  padding: 11px 14px;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
}

.support-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.support-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}

.brand,
.session-actions,
.panel-heading {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand strong,
.brand span {
  display: block;
}

.session-actions,
.panel-heading {
  justify-content: space-between;
}

.hero {
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 40px;
  margin-bottom: 8px;
}

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.admin-user-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.admin-user-form .wide {
  grid-column: span 2;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.user-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.user-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.pill {
  border-radius: 999px;
  background: #e6f7f4;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.notes {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  margin-top: 14px;
  padding: 10px;
}

.edit-user {
  margin-top: 12px;
  width: 100%;
}

@media (max-width: 760px) {
  .support-header,
  .panel-heading,
  .session-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-form,
  dl {
    grid-template-columns: 1fr;
  }

  .admin-user-form .wide {
    grid-column: auto;
  }
}
