:root {
  --bg: #efe9dd;
  --panel: rgba(255, 252, 245, 0.88);
  --panel-strong: #fffaf1;
  --line: rgba(31, 25, 18, 0.1);
  --text: #191610;
  --muted: #61584c;
  --accent: #9f4f2c;
  --accent-deep: #713017;
  --shadow: 0 30px 90px rgba(62, 36, 12, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 20%, rgba(159, 79, 44, 0.18), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(25, 96, 74, 0.12), transparent 22%),
    linear-gradient(180deg, #f7f3ea 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(25, 22, 16, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 22, 16, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 88%);
}

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

.auth-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  padding: 34px;
  border-radius: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

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

.brand-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #1d1813 0%, #8b4d2d 100%);
  color: #fff7ea;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-deep);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.1rem);
  line-height: 0.95;
}

.subtitle,
.auth-copy p,
.field span,
.auth-note {
  color: var(--muted);
}

.subtitle {
  margin: 6px 0 0;
}

.auth-copy {
  margin-top: 28px;
}

.auth-copy h2 {
  font-size: 1.55rem;
}

.auth-copy p {
  margin: 12px 0 0;
  line-height: 1.7;
}

.auth-form {
  margin-top: 28px;
}

.role-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.role-switch label {
  position: relative;
}

.role-switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.role-switch span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.7);
  font-weight: 700;
  text-align: center;
}

.role-switch input:checked + span {
  background: var(--panel-strong);
  border-color: rgba(159, 79, 44, 0.4);
  box-shadow: inset 0 0 0 1px rgba(159, 79, 44, 0.22);
}

.field {
  display: block;
  margin-top: 14px;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.94rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf9;
  color: var(--text);
  font: inherit;
}

.field input:focus {
  outline: 2px solid rgba(159, 79, 44, 0.24);
  border-color: rgba(159, 79, 44, 0.44);
}

.submit {
  width: 100%;
  min-height: 56px;
  margin-top: 20px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff8f1;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-note {
  margin: 18px 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .auth-panel {
    padding: 22px;
    border-radius: 24px;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .role-switch {
    grid-template-columns: 1fr;
  }
}
