/* ==========================================================
   GrowBizConnect – Member Login
   Theme: navy / blue / purple / cyan (matches admin login)
   ========================================================== */

:root {
  --navy-900: #0a1630;
  --navy-800: #0f2347;
  --blue-600: #0c54a0;
  --blue-500: #1f6fe0;
  --purple-500: #6d4ee0;
  --cyan-400: #22c7e6;
  --ink: #0f1b33;
  --muted: #5b6785;
  --line: #d9e0ee;
  --surface: #ffffff;
  --danger-bg: #fdecee;
  --danger-ink: #a3182b;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(34, 199, 230, 0.28), transparent 60%),
    radial-gradient(800px 520px at 100% 10%, rgba(109, 78, 224, 0.32), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, #14306a 100%);
  background-attachment: fixed;
  padding:
    max(20px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.auth-shell {
  min-height: calc(100vh - 40px);
  min-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

/* ---------- Card ---------- */
.modal {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 20px;
  padding: 36px 36px 30px;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 24px 60px -12px rgba(5, 12, 35, 0.55),
    0 8px 20px -8px rgba(5, 12, 35, 0.35);
  animation: card-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.modal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan-400), var(--blue-500), var(--purple-500));
}

.modal.show {
  display: flex;
}

.modal-content {
  width: 100%;
  text-align: center;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Logo & headings ---------- */
.logo img {
  display: block;
  margin: 0 auto 18px;
  max-width: 108px;
  height: auto;
}

.modal-content h3,
.login-form h2 {
  text-align: center;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.login-sub {
  margin: 8px 0 26px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Form ---------- */
form {
  text-align: left;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: #2a3656;
}

.input-wrap {
  position: relative;
}

.input-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: #7d8aa8;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke 0.2s ease;
}

form input[type="email"],
form input[type="password"],
form input[type="text"] {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #f6f8fd;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

form #password {
  padding-right: 46px;
}

form input::placeholder {
  color: #98a3bd;
}

form input[type="email"]:hover,
form input[type="password"]:hover,
form input[type="text"]:hover {
  border-color: #bfcae4;
}

form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="text"]:focus {
  background: #fff;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(31, 111, 224, 0.15);
}

.input-wrap:focus-within .icon {
  stroke: var(--blue-500);
}

/* Show / hide password */
.toggle-pass {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: #7d8aa8;
}

.toggle-pass svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toggle-pass:hover { color: var(--blue-500); background: rgba(31, 111, 224, 0.08); }
.toggle-pass[aria-pressed="true"] { color: var(--blue-500); }

.toggle-pass:focus-visible,
.keep-signed input:focus-visible,
.back-home:focus-visible,
.btn-primary:focus-visible {
  outline: 3px solid rgba(31, 111, 224, 0.45);
  outline-offset: 2px;
}

/* Keep me signed in */
.keep-signed {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 20px;
  font-size: 14px;
  font-weight: 400;
  color: #3a4666;
  cursor: pointer;
  user-select: none;
}

.keep-signed input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue-500);
  cursor: pointer;
}

/* Primary button */
button[type="submit"],
.btn-primary {
  width: 100%;
  height: 50px;
  display: block;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--purple-500) 100%);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 22px -8px rgba(60, 80, 220, 0.6);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button[type="submit"]:hover {
  filter: brightness(1.07);
  box-shadow: 0 14px 26px -8px rgba(60, 80, 220, 0.7);
  transform: translateY(-1px);
}

button[type="submit"]:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

/* Messages */
.message {
  margin-bottom: 18px;
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  border-radius: 10px;
}

.message.error,
.error {
  color: var(--danger-ink);
  background: var(--danger-bg);
  border: 1px solid #f6c4cb;
  border-left: 4px solid var(--danger-ink);
}

.success {
  color: #146c43;
  background: #e8f7ef;
  border: 1px solid #b9e4cd;
  border-left: 4px solid #146c43;
}

/* Back link */
.back-home {
  display: inline-block;
  margin-top: 22px;
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue-600);
  text-decoration: none;
  border-radius: 6px;
}

.back-home:hover {
  color: var(--purple-500);
  text-decoration: underline;
}

/* Developed by */
.developed-by {
  text-align: center;
  font-size: 13.5px;
  color: rgba(226, 234, 255, 0.75);
}

.developed-by strong {
  color: #fff;
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .modal {
    padding: 30px 22px 24px;
    border-radius: 18px;
  }

  .modal-content h3,
  .login-form h2 { font-size: 23px; }

  .login-sub { margin-bottom: 22px; font-size: 14px; }
  .logo img { max-width: 92px; }
}

@media (max-width: 360px) {
  .modal { padding: 26px 16px 20px; }
  .modal-content h3,
  .login-form h2 { font-size: 21px; }
}

/* Short landscape phones */
@media (max-height: 640px) {
  .auth-shell {
    justify-content: flex-start;
    padding: 12px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal { animation: none; }
  * { transition: none !important; }
}
/* =========================================================
   GROWBIZCONNECT - "Dashboard" back button (shared by every page)
   Load AFTER the page's own CSS:
   <link rel="stylesheet" href="css/back-button.css?v=1">
   ========================================================= */
a.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 40px;
    margin: 0 auto 16px 0;      
  padding: 0 18px 0 14px;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  color: #0c54a0;
  background: #fff;
  border: 1px solid #cfdcf3;
  border-radius: 999px;
  box-shadow: 0 6px 16px -10px rgba(10, 22, 48, 0.45);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

a.back-link:hover {
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #1f6fe0, #0c54a0);
  border-color: transparent;
  box-shadow: 0 12px 22px -12px rgba(12, 84, 160, 0.9);
  transform: translateY(-1px);
}

a.back-link:active {
  transform: translateY(0);
}

a.back-link:focus-visible {
  outline: 3px solid rgba(31, 111, 224, 0.45);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  a.back-link {
    min-height: 38px;
    margin-bottom: 12px;
    font-size: 0.88rem;
  }
}
