/* ==========================================================================
   Agent Diary — Subscriber Login
   Signature idea: the logo's three triangles become a "summit" motif —
   an ascending peak marker beside each step of Track / Follow / Close,
   and a faint layered ridge line along the base of the left panel.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Inter:wght@400;500;600&display=swap');

:root {
  --forest-950: #102821;
  --forest-800: #1c4636;
  --forest-600: #2e6b52;
  --forest-500: #3c8265;
  --gold-400: #cba057;
  --gold-300: #ddb872;
  --cream-50: #faf7f1;
  --cream-100: #f2ede2;
  --ink-900: #1c1b18;
  --ink-600: #55534b;
  --ink-400: #8a877c;
  --line: rgba(250, 247, 241, 0.16);
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-card: 0 30px 60px -20px rgba(16, 40, 33, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream-50);
  color: var(--ink-900);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.ad-shell {
  width: 100%;
  max-width: 1040px;
  min-height: 620px;
  background: var(--cream-50);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ---------------------------------------------------------------------- */
/* Left panel — brand + summit motif                                      */
/* ---------------------------------------------------------------------- */

.ad-brand {
  position: relative;
  background:
    radial-gradient(120% 140% at 15% -10%, rgba(60, 130, 101, 0.55), transparent 55%),
    linear-gradient(160deg, var(--forest-800) 0%, var(--forest-950) 78%);
  color: var(--cream-50);
  padding: 56px 52px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ad-brand-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ad-logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(160deg, var(--forest-600), var(--forest-950));
  border: 1px solid rgba(250, 247, 241, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ad-logo-mark img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.ad-wordmark {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.ad-brand-copy {
  margin-top: 76px;
  max-width: 380px;
}

.ad-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-300);
  font-weight: 600;
  margin: 0 0 18px;
}

.ad-headline {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 40px;
  line-height: 1.18;
  margin: 0 0 20px;
  color: var(--cream-50);
}

.ad-headline em {
  font-style: normal;
  font-weight: 500;
  color: var(--gold-300);
}

.ad-subcopy {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(250, 247, 241, 0.72);
  margin: 0;
}

/* Summit steps — ascending triangles echo the mark's peaks */
.ad-summit {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ad-summit li {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.ad-summit li:last-child {
  border-bottom: none;
}

.ad-peak {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ad-peak svg {
  display: block;
}

.ad-summit .ad-step-label {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--cream-50);
  min-width: 76px;
}

.ad-summit .ad-step-desc {
  font-size: 13px;
  color: rgba(250, 247, 241, 0.6);
  line-height: 1.4;
}

/* Ridge line silhouette pinned to the base of the panel */
.ad-ridge {
  margin-top: auto;
  position: relative;
  height: 132px;
}

.ad-ridge svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------------------------------------------------------------------- */
/* Right panel — form                                                     */
/* ---------------------------------------------------------------------- */

.ad-form-panel {
  background: var(--cream-50);
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ad-form-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--forest-600);
  font-weight: 600;
  margin: 0 0 10px;
}

.ad-form-title {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--ink-900);
}

.ad-form-hint {
  font-size: 14px;
  color: var(--ink-400);
  margin: 0 0 30px;
}

.ad-alert {
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 13.5px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.ad-alert-error {
  background: #fbeceb;
  border-color: #f0c9c6;
  color: #9a3730;
}

.ad-alert-success {
  background: #eaf3ee;
  border-color: #c9e0d3;
  color: var(--forest-800);
}

.ad-alert ul {
  margin: 0;
  padding-left: 18px;
}

.ad-field {
  margin-bottom: 20px;
}

.ad-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-600);
  margin-bottom: 8px;
}

.ad-input-wrap {
  position: relative;
}

.ad-input-wrap svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-400);
  pointer-events: none;
}

.ad-field input {
  width: 100%;
  border: 1px solid #ddd7c9;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 13px 15px 13px 42px;
  font-size: 14.5px;
  font-family: 'Inter', sans-serif;
  color: var(--ink-900);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ad-field input#password {
  padding-right: 44px;
}

.ad-field input::placeholder {
  color: var(--ink-400);
}

.ad-field input:focus {
  outline: none;
  border-color: var(--forest-500);
  box-shadow: 0 0 0 3px rgba(46, 107, 82, 0.15);
}

.ad-toggle-pw {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  color: var(--ink-400);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.ad-toggle-pw svg {
  position: static;
  transform: none;
}

.ad-toggle-pw:hover {
  color: var(--forest-600);
  background: var(--cream-100);
}

.ad-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.ad-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-600);
}

.ad-remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--forest-600);
}

.ad-forgot {
  font-size: 13.5px;
  color: var(--forest-600);
  font-weight: 600;
  text-decoration: none;
}

.ad-forgot:hover {
  text-decoration: underline;
}

.ad-submit {
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  padding: 15px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--cream-50);
  background: linear-gradient(135deg, var(--forest-600), var(--forest-950));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 12px 24px -10px rgba(16, 40, 33, 0.55);
}

.ad-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -10px rgba(16, 40, 33, 0.6);
}

.ad-submit:active {
  transform: translateY(0);
}

.ad-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0;
  color: var(--ink-400);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-divider::before,
.ad-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e4dfd2;
}

.ad-create {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1px solid #ddd7c9;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ad-create:hover {
  border-color: var(--forest-500);
  background: var(--cream-100);
}

.ad-legal {
  text-align: center;
  font-size: 12px;
  color: var(--ink-400);
  margin-top: 24px;
  line-height: 1.6;
}

.ad-legal a {
  color: var(--forest-600);
  font-weight: 600;
  text-decoration: none;
}

.ad-legal a:hover {
  text-decoration: underline;
}

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

@media (max-width: 860px) {
  .ad-shell {
    grid-template-columns: 1fr;
  }

  .ad-brand {
    padding: 40px 32px 0;
  }

  .ad-brand-copy {
    margin-top: 32px;
  }

  .ad-headline {
    font-size: 30px;
  }

  .ad-ridge {
    height: 90px;
    margin-top: 32px;
  }

  .ad-form-panel {
    padding: 40px 32px 48px;
  }
}

@media (max-width: 420px) {
  body {
    padding: 0;
  }

  .ad-shell {
    border-radius: 0;
    min-height: 100vh;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ad-submit,
  .ad-create {
    transition: none;
  }
}

/* Visible keyboard focus for non-input interactive elements */
.ad-forgot:focus-visible,
.ad-create:focus-visible,
.ad-submit:focus-visible,
.ad-toggle-pw:focus-visible {
  outline: 2px solid var(--forest-500);
  outline-offset: 2px;
}