@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary:       #2C9B6F;
  --primary-dark:  #1E7A54;
  --primary-light: #E6F4EE;
  --bg:            #F2F7F4;
  --surface:       #FFFFFF;
  --border:        #D8E6DE;
  --text:          #1B2B23;
  --text-muted:    #5E7A6A;
  --shadow-md:     0 4px 16px rgba(0,0,0,0.09);
  --radius:        8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* Keyboard focus: brand-colored ring instead of the browser-default blue. */
button:focus-visible,
a:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ── Card ── */
.register-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Title ──
   Brand-first: "Aviary" is the page identity (injected via ::before, matching
   this stylesheet's pseudo-content idiom); the existing "Register" text
   becomes a small caps label beneath it. Screen readers announce
   "Aviary Register". */
.register-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: center;
  margin-bottom: 14px;
}

.register-title::before {
  content: "Aviary";
  font-size: 30px;
  font-weight: 700;
  color: var(--primary-dark);
  text-transform: none;
  letter-spacing: -0.5px;
  margin-bottom: 2px;
}

/* ── Field group ── */
.username-password {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* ── Labels via pseudo-elements (preserved from original HTML structure) ── */
.username-label,
.password-label {
  display: block;
  width: 100%;
}

.username-label::before {
  content: "Username";
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.password-label::before {
  content: "Password";
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

/* ── Inputs ── */
.username-input-box,
.password-input-box {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.username-input-box:focus,
.password-input-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44,155,111,0.15);
}

.username-input-box::placeholder,
.password-input-box::placeholder {
  color: #B0C4BB;
  font-size: 14px;
}

/* ── Password row with eye toggle ── */
.password-eyeball-container {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
}

.password-eyeball-container .password-input-box {
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.toggle-password i {
  color: var(--text-muted);
  font-size: 15px;
  transition: color 0.15s;
}

.toggle-password:hover i {
  color: var(--primary);
}

/* ── Error message ── */
[style*="color: red"] {
  font-size: 13px;
  color: #CC3355 !important;
  background: #FFF0F3;
  border: 1px solid #FFC0CB;
  border-radius: var(--radius);
  padding: 8px 12px;
  text-align: center;
}

/* ── Primary button (Register) ── */
.register-button {
  width: 100%;
  height: 46px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.register-button::before {
  content: "Register";
}

.register-button:hover {
  background: var(--primary-dark);
}

.register-button:active {
  transform: translateY(1px);
}

/* ── Footer link ── */
p {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

p a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

p a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

label {
  display: none; /* labels use pseudo-elements; hide any bare label elements */
}

/* ── Mobile ── */
@media screen and (max-width: 480px) {
  .register-form {
    padding: 28px 20px;
    border-radius: 12px;
  }
}
