/* src/static/css/auth.css */

body.auth-page{
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--bg);
  color: var(--text);
}

body.auth-page > .messages-wrap{
  flex: 0 0 auto;
}

body.auth-page .auth-content{
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: auto;
  overflow: visible;
}

.auth-content{
  padding: 0;
}

/* Layout */
.auth-shell{
  box-sizing: border-box;

  display: grid;
  gap: 18px;

  /* Key: cap and centre so ultrawide screens do not look odd */
  width: 100%;
  max-width: 1200px;
  margin: auto;

  /* Comfortable gutters */
  padding: 18px 16px;

  /* Equal height columns */
  align-items: stretch;

  /* Balanced columns that do not over-stretch */
  grid-template-columns: minmax(560px, 1fr) minmax(420px, 520px);
}

/* LEFT: hero */
.auth-hero{
  display: flex;
  align-items: stretch;
  min-height: 100%;
}

.auth-hero-card{
  width: 100%;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.auth-hero-badge{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(53, 205, 53, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.auth-hero h1{
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
  color: var(--text-heading);
}

.auth-hero p{
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 58ch;
}

.auth-hero-points{
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.auth-point{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(53, 205, 53, 0.06);
  border: 1px solid rgba(53, 205, 53, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
}

.auth-point-text{
  font-weight: 700;
  font-size: 13px;
  color: var(--text-heading);
}

.auth-icon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(53, 205, 53, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-hero-image{
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 360px;
  height: 360px;
  pointer-events: none;
}

.auth-hero-blob{
  width: 100%;
  height: 100%;
  border-radius: 60px;
  background:
    radial-gradient(circle at 30% 30%, rgba(53, 205, 53, 0.30), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(255, 122, 0, 0.25), transparent 55%),
    rgba(53, 205, 53, 0.06);
  transform: rotate(18deg);
  border: 1px solid rgba(53, 205, 53, 0.18);
}

/* RIGHT: panel */
.auth-panel{
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;

  justify-content: flex-start;
  justify-self: stretch;
  align-self: stretch;

  box-sizing: border-box;
}

.auth-brand{
  text-align: left;
  padding: 0 4px;
}

.auth-wordmark{
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.2px;
}

.auth-wordmark-black{ color: var(--text-heading); }
.auth-wordmark-green{ color: var(--brand-green-dark); }

.auth-tagline{
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.auth-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
  box-sizing: border-box;
}

.auth-card h2{
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--text-heading);
}

.auth-subtitle{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.auth-messages{
  margin: 0 0 14px;
}

.alert{
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.45;
}

.alert:last-child{
  margin-bottom: 0;
}

.alert-warning{
  background: var(--msg-warning-bg);
  border-color: var(--msg-warning-border);
  color: var(--msg-warning-text);
}

.alert-error,
.alert-danger{
  background: var(--msg-error-bg);
  border-color: var(--msg-error-border);
  color: var(--msg-error-text);
}

.alert-success{
  background: var(--msg-success-bg);
  border-color: var(--msg-success-border);
  color: var(--msg-success-text);
}

.alert-info{
  background: var(--msg-info-bg);
  border-color: var(--msg-info-border);
  color: var(--msg-info-text);
}

.field{
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label{
  font-weight: 800;
  font-size: 12px;
  color: var(--text-heading);
}

.req{
  color: #b91c1c;
}

.field input{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  background-color: var(--surface-elevated);
  color: var(--text);
  box-sizing: border-box;
}

.field input:focus{
  border-color: rgba(53, 205, 53, 0.45);
  box-shadow: 0 0 0 4px rgba(53, 205, 53, 0.15);
}

.password-wrap{
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-wrap input{
  flex: 1;
}

.password-toggle{
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 9px 10px;
  cursor: pointer;
}

.error{
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(185, 28, 28, 0.25);
  background: rgba(185, 28, 28, 0.06);
  color: #991b1b;
  font-size: 13px;
}

.btn{
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.btn-wide{
  width: 100%;
}

.btn-primary{
  background: var(--brand-green);
  border-color: rgba(47, 175, 47, 0.55);
  color: #ffffff;
}

.btn-primary:hover{
  background: var(--brand-green-dark);
  color: #fff;
}

.auth-links{
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.link{
  color: var(--text-heading);
  text-decoration: underline;
  text-decoration-color: rgba(17, 17, 17, 0.25);
  text-underline-offset: 3px;
}

.link:hover{
  text-decoration-color: rgba(47, 175, 47, 0.75);
}

.auth-support{
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.auth-trust-footer{
  flex: 0 0 auto;
  margin-top: auto;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--surface-muted);
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.auth-trust-footer-inner{
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.auth-trust-links{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
}

.auth-trust-links a{
  color: var(--muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.auth-trust-links a:hover{
  color: var(--text-heading);
  border-color: rgba(53, 205, 53, 0.35);
  background: rgba(53, 205, 53, 0.08);
}

.auth-trust-powered{
  margin: 8px 0 0;
  padding: 0;
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.auth-trust-powered .wordmark-fin{
  color: var(--wordmark-fin);
  font-weight: 800;
  letter-spacing: 0.03em;
}
.auth-trust-powered .wordmark-hub{
  color: var(--brand-green);
  font-weight: 800;
  letter-spacing: 0.03em;
}
.auth-trust-powered .wordmark-powered-lead{
  color: rgba(17, 17, 17, 0.68);
  font-weight: 600;
}

/* Mobile / narrow — single column, full page scrolls (hero + form + footer) */
@media (max-width: 980px){
  body.auth-page .auth-content{
    padding-bottom: 8px;
  }

  .auth-shell{
    grid-template-columns: 1fr;
    max-width: none;
    padding: 16px 16px 12px;
    gap: 14px;
  }

  .auth-hero{
    min-height: auto;
  }

  .auth-hero-card{
    height: auto;
    padding: 18px;
  }

  .auth-hero h1{
    font-size: 24px;
  }

  .auth-hero-image{
    right: -120px;
    bottom: -120px;
    width: 280px;
    height: 280px;
    opacity: 0.85;
  }

  .auth-panel{
    min-height: auto;
    justify-content: flex-start;
  }

  .auth-card{
    margin-bottom: 4px;
  }

  .auth-support{
    margin-bottom: 4px;
  }

  .auth-trust-footer{
    margin-top: 0;
    padding-top: 12px;
  }

  .support-quick-actions{
    grid-template-columns: 1fr;
  }
}

/* Small phones — slightly tighter hero, same scrollable stack */
@media (max-width: 480px){
  .auth-shell{
    padding: 12px 12px 10px;
    gap: 12px;
  }

  .auth-hero-card{
    padding: 14px;
  }

  .auth-hero h1{
    font-size: 21px;
  }

  .auth-hero p{
    font-size: 14px;
    margin-bottom: 12px;
  }

  .auth-hero-points{
    gap: 8px;
  }

  .auth-point{
    padding: 8px 10px;
  }

  .auth-hero-image{
    right: -100px;
    bottom: -100px;
    width: 220px;
    height: 220px;
  }
}

/* Contact support (/support) */
.support-page-shell{
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 16px 40px;
  box-sizing: border-box;
}

.auth-card.support-card{
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(15, 23, 42, 0.06);
}

.support-enquiry-form{
  position: relative;
}

.support-field-control{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  background: var(--surface);
  box-sizing: border-box;
  font-size: 14px;
  color: var(--text-heading);
  font-family: inherit;
}

.support-field-control:focus{
  border-color: rgba(53, 205, 53, 0.45);
  box-shadow: 0 0 0 4px rgba(53, 205, 53, 0.15);
}

.support-msg-textarea{
  resize: vertical;
  min-height: 132px;
  line-height: 1.45;
}

.support-topic-field select.support-field-control{
  cursor: pointer;
}

.support-topic-hint{
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.support-honey-wrap{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.support-quick-actions{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.support-quick-btn{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  box-shadow: var(--shadow);
  color: var(--text-heading);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.support-quick-btn:hover{
  border-color: rgba(53, 205, 53, 0.45);
  background: rgba(53, 205, 53, 0.06);
}

.support-quick-wa .support-quick-btn-title{
  color: #075e54;
}

.support-quick-btn-title{
  font-weight: 800;
  font-size: 14px;
}

.support-quick-btn-sub{
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.support-section-title{
  margin: 18px 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-heading);
}

.support-section-intro{
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.support-send-btn{
  margin-top: 6px;
}

.support-field-msg textarea{
  min-height: 140px;
}

.support-channels{
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.support-channel{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(249, 250, 251, 0.72);
}

.support-channel-label{
  font-weight: 800;
  font-size: 12px;
  color: var(--text-heading);
}

.support-channel-action{
  font-size: 14px;
}

.support-back-wrap{
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 13px;
  text-align: center;
}