/* ============================================
   NestAway shared styles — auth pages
   Tokens match the main site's style.css
   ============================================ */

:root {
  --green-dark: #3f4a2e;
  --green-mid: #5a6b3f;
  --green-header: #394d1e;   /* header bar */
  --green-active: #425a20;   /* active toggle / buttons */
  --green-accent: #5a6f27;   /* headings on cream */
  --green-pale: #e7e3d4;
  --cream: #f4f1e8;
  --card-cream: #f1eedf;
  --gold: #c9a227;
  --maroon: #7a2e2e;
  --white: #ffffff;
  --text: #2c3320;
  --text-muted: #6d6a5c;
  --text-light: #f4f1e8;
  --error: #7a2e2e;
  --error-bg: #f6e9e9;
  --success: #425a20;
  --success-bg: #eaf0df;
  --radius: 14px;
  --radius-pill: 999px;
  --shadow: 0 8px 20px rgba(58, 66, 38, 0.08);
  --max-width: 640px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
}

/* ---------- Header band ---------- */

.site-header {
  background: var(--green-header);
  color: var(--text-light);
  padding: 24px 24px 48px;
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
}

.brand__mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.site-header__content {
  max-width: 1040px;
  margin: 0 auto;
}

.site-header h1 {
  margin: 0 0 8px;
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--text-light);
}

.site-header p {
  margin: 0;
  font-size: 1.05rem;
  opacity: 0.85;
  font-weight: 300;
}

/* ---------- Page shell ---------- */

.page-content {
  max-width: var(--max-width);
  margin: -16px auto 64px;
  padding: 0 24px;
}

/* ---------- Role toggle ---------- */

.role-toggle {
  display: inline-flex;
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin: 32px 0 24px;
  box-shadow: var(--shadow);
}

.role-toggle a {
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--green-dark);
  transition: background 0.15s ease, color 0.15s ease;
}

.role-toggle a .role-toggle__sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.75;
  margin-top: 1px;
}

.role-toggle a.active {
  background: var(--green-active);
  color: var(--text-light);
}

/* ---------- Form card ---------- */

.form-card {
  background: var(--card-cream);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.form-card h2 {
  color: var(--green-accent);
  font-size: 2rem;
  margin: 0 0 6px;
}

.form-card .subtitle {
  color: var(--text-muted);
  margin: 0 0 28px;
  font-size: 1rem;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.field .optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--green-pale);
  border-radius: 10px;
  background: var(--white);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(90, 107, 63, 0.18);
}

.phone-field {
  display: flex;
  gap: 8px;
}

.phone-field .phone-country-code {
  flex: 0 0 110px;
  width: 110px;
}

.phone-field .phone-number-input {
  flex: 1;
}

@media (max-width: 480px) {
  .phone-field .phone-country-code {
    flex: 0 0 90px;
    width: 90px;
    font-size: 0.85rem;
  }
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.field-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}

.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: var(--error);
}

.field.has-error .field-error {
  display: block;
}

/* ---------- Buttons ---------- */

.btn-primary {
  width: 100%;
  padding: 15px 20px;
  background: var(--green-active);
  color: var(--text-light);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--green-mid);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: var(--green-mid);
  cursor: not-allowed;
  opacity: 0.75;
  transform: none;
}

/* ---------- Alerts ---------- */

.alert {
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.95rem;
  margin-bottom: 20px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(179, 38, 30, 0.25);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(47, 93, 52, 0.25);
}

/* ---------- Footer links ---------- */

.form-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text);
}

.form-footer a {
  color: var(--green-accent);
  font-weight: 600;
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

.form-footer .divider {
  margin: 14px 0;
  border: none;
  border-top: 1px solid var(--green-pale);
}

/* ---------- Dashboard (placeholder pages) ---------- */

.dashboard-card {
  background: var(--card-cream);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px;
  margin-top: 32px;
}

.dashboard-card h2 {
  color: var(--green-accent);
  margin-top: 0;
}

.btn-logout {
  margin-top: 20px;
  background: transparent;
  color: var(--green-dark);
  border: 1px solid var(--green-dark);
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
}

.btn-logout:hover {
  background: var(--cream);
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .site-header {
    padding: 20px 18px 40px;
  }

  .site-header h1 {
    font-size: 1.6rem;
  }

  .page-content {
    padding: 0 16px;
  }

  .form-card h2 {
    font-size: 1.5rem;
  }
}