/* Conservation Resources — investor portal & auth.
   Extracted from the original bespoke login page so login / signup / reset /
   update-password / portal / admin all share one stylesheet instead of six copies. */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0d0d0d;
  --white: #ffffff;
  --green: #2c4a2e;
  --green-light: #3a6140;
  --green-pale: #eef3ee;
  --gold: #b8973a;
  --grey: #f5f5f3;
  --text-muted: #6b7280;
  --border: #d8ddd8;
}

html, body {
  min-height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--grey);
  color: var(--black);
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 100;
}
.navbar a { text-decoration: none; }
.navbar-logo img { height: 32px; display: block; }
.navbar-right { display: flex; align-items: center; gap: 24px; }
.navbar-back, .navbar-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.navbar-back:hover, .navbar-link:hover { color: var(--green); }
.navbar-back svg { width: 16px; height: 16px; }
.navbar-user { font-size: 13px; color: var(--text-muted); }

/* ── Split layout (auth pages) ── */
.page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }

.panel-visual {
  background: var(--green);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 60px 56px;
  padding-top: 72px;
}
.panel-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/67770a641c8bfe60b83658b3_Untitled%20design%20-%202025-01-02T165122.535.png') center/cover no-repeat;
  opacity: 0.22;
}
.panel-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,38,22,0.95) 0%, rgba(44,74,46,0.5) 60%, transparent 100%);
}
.visual-content { position: relative; z-index: 1; }
.visual-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(184,151,58,0.15);
  border: 1px solid rgba(184,151,58,0.3);
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 20px;
}
.visual-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}
.visual-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 360px;
}
.visual-divider { width: 40px; height: 2px; background: var(--gold); margin: 28px 0; }
.visual-stats { display: flex; gap: 36px; }
.stat-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
}
.stat-value { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--white); }

.panel-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 72px 48px 48px;
  background: var(--white);
}
.form-card { width: 100%; max-width: 400px; animation: fadeUp 0.5s ease both; }
.form-card.wide { max-width: 460px; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
}
.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 8px;
}
.form-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 36px; line-height: 1.6; }

.field { margin-bottom: 20px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.field textarea { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(44,74,46,0.08);
}
.field input::placeholder, .field textarea::placeholder { color: #b0b8b0; }
.field-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.field-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.remember-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.remember-wrap input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; }
.remember-wrap span { font-size: 13px; color: var(--text-muted); }
.forgot-link {
  font-size: 13px;
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}
.forgot-link:hover { text-decoration: underline; }

.btn-login {
  width: 100%;
  height: 50px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-login:hover { background: var(--green-light); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--white); color: var(--green); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--green-pale); border-color: var(--green); }
.btn-sm { height: 36px; padding: 0 16px; width: auto; font-size: 12px; }
.btn-danger { background: #fff; color: #b91c1c; border: 1.5px solid #fecaca; }
.btn-danger:hover { background: #fef2f2; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.divider { display: flex; align-items: center; gap: 12px; margin: 28px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.signup-prompt { text-align: center; font-size: 14px; color: var(--text-muted); }
.signup-prompt a { color: var(--green); font-weight: 500; text-decoration: none; }
.signup-prompt a:hover { text-decoration: underline; }

.alert {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 20px;
  display: none;
  line-height: 1.5;
}
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-success { background: var(--green-pale); border: 1px solid #c6d9c7; color: var(--green); }
.alert-info    { background: #f4f6f8; border: 1px solid var(--border); color: var(--text-muted); }

/* ── Success / confirmation state ── */
.state-panel { text-align: center; animation: fadeUp 0.4s ease both; }
.state-icon {
  width: 56px; height: 56px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--green-pale);
  display: flex; align-items: center; justify-content: center;
}
.state-icon svg { width: 26px; height: 26px; stroke: var(--green); }

/* ── Portal (document library) ── */
.portal-main { max-width: 1000px; margin: 0 auto; padding: 120px 32px 80px; }
.portal-header { margin-bottom: 40px; }
.portal-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  margin-bottom: 10px;
}
.portal-header p { color: var(--text-muted); font-size: 15px; line-height: 1.7; max-width: 640px; }

.doc-group { margin-bottom: 40px; }
.doc-group-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.doc-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.doc-row:hover { background: rgba(44,74,46,0.03); }
.doc-icon { flex: 0 0 auto; width: 20px; height: 20px; stroke: var(--green); }
.doc-text { flex: 1; min-width: 0; }
.doc-title { font-size: 15px; font-weight: 500; color: var(--black); margin-bottom: 3px; }
.doc-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.doc-meta { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.empty-state {
  text-align: center;
  padding: 72px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.empty-state h2 { font-family: 'Playfair Display', serif; font-size: 20px; margin-bottom: 10px; }
.empty-state p { color: var(--text-muted); font-size: 14px; line-height: 1.7; max-width: 420px; margin: 0 auto; }

.gate-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 48px 44px;
  text-align: center;
}
.gate-card h1 { font-family: 'Playfair Display', serif; font-size: 26px; margin-bottom: 12px; }
.gate-card p { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin-bottom: 28px; }

/* ── Admin table ── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.admin-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--grey);
}
.admin-table td { padding: 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-actions { display: flex; gap: 8px; }
.badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  font-weight: 500;
}
.badge-pending  { background: #fff7e6; color: #92670c; border: 1px solid #f3dfae; }
.badge-approved { background: var(--green-pale); color: var(--green); border: 1px solid #c6d9c7; }
.badge-rejected, .badge-revoked { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.table-scroll { overflow-x: auto; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .page { grid-template-columns: 1fr; }
  .panel-visual { display: none; }
  .panel-form { padding: 88px 24px 40px; }
  .navbar { padding: 0 20px; }
  .field-pair { grid-template-columns: 1fr; }
  .portal-main { padding: 100px 20px 60px; }
}
