/* =====================================================================
   MegaPay - Password Reset
   Built on the same design system as login.css / register.css.
   passwordreset.php has always linked this file; it did not exist, so the
   page rendered with no styling at all. Class names match the existing
   markup exactly - no HTML changes required.
   ===================================================================== */

:root {
  --primary-color: #eb2525;
  --primary-light: #feecdb;
  --secondary-color: #b9106d;
  --accent-color: #f59e0b;
  --danger-color: #ef4444;
  --success-color: #16a34a;
  --dark-color: #1e293b;
  --light-color: #ffffff;
  --gray-color: #94a3b8;
  --muted-color: #64748b;
  --border-color: #e5e7eb;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, .10), 0 2px 4px -1px rgba(0, 0, 0, .06);
  --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, .10), 0 4px 6px -2px rgba(0, 0, 0, .05);
}

/* ---- Reset and base ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
               Noto Sans, 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  color: var(--dark-color);
  background: linear-gradient(180deg, #fff, var(--primary-light));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Layout ---- */
.section {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* The card. #sign-in is the id the markup already carries. */
.container {
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  background: var(--light-color);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 32px;
}

#Loginform { display: grid; gap: 14px; }

/* ---- Title ---- */
.title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.title .logo img { width: 40px; height: 40px; object-fit: contain; }
.title h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark-color);
  line-height: 1.25;
}

/* ---- Card body ---- */
.email-card { display: grid; gap: 16px; }

/* ---- Inputs ---- */
.input-control { position: relative; display: grid; gap: 8px; }
.input-control label {
  font-size: .95rem;
  color: var(--dark-color);
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-control label i { color: var(--primary-color); }

.input-control input[type="text"],
.input-control input[type="email"],
.input-control input[type="password"] {
  width: 100%;
  padding: 12px 44px 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
  color: var(--dark-color);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.input-control input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(235, 37, 37, .18);
}
.input-control input::placeholder { color: var(--gray-color); }

/* Inline field errors (#email_error / #pass_error) */
.input-control > span {
  font-size: .85rem;
  color: var(--danger-color);
  min-height: 1em;
}

/* ---- Show / hide password ---- */
.show-password { position: relative; }
.show-password input { width: 100%; }
.show-password .icons {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  margin: 0;
}
.show-password .icons i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--gray-color);
  cursor: pointer;
  font-size: .95rem;
  transition: background .2s ease, color .2s ease;
}
.show-password .icons i:hover { background: #f3f4f6; color: var(--dark-color); }

/* ---- Button ---- */
.button { display: grid; }
.button button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  color: var(--light-color);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 8px 20px -8px rgba(235, 37, 37, .55);
  cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease, filter .2s ease;
}
.button button:hover { box-shadow: var(--hover-shadow); filter: brightness(1.03); }
.button button:active { transform: translateY(1px); }

/* ---- Social icon row (the one outside .show-password) ---- */
.container > .icons,
#Loginform > .icons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  color: var(--muted-color);
}
.container > .icons i,
#Loginform > .icons i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: #fff;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
}
.container > .icons i:hover,
#Loginform > .icons i:hover {
  color: var(--primary-color);
  border-color: rgba(235, 37, 37, .3);
  box-shadow: var(--card-shadow);
  transform: translateY(-1px);
}

/* ---- Helper links / footer text ---- */
.signin-signup, .footer {
  font-size: .95rem;
  color: var(--muted-color);
}
.footer {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  font-size: .9rem;
}
.signin-signup a, .footer a {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
}
.signin-signup a:hover, .footer a:hover { text-decoration: underline; }

/* =====================================================================
   ALERTS - matches the dashboard treatment in styles.css
   ===================================================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin: 0 0 4px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-left: 6px solid var(--gray-color);
  box-shadow: var(--card-shadow);
  font-size: .95rem;
  line-height: 1.5;
  animation: alert-in .25s ease-out both;
}
.alert p { margin: 0; flex: 1; min-width: 0; color: #475569; word-break: break-word; }
.alert p strong { display: block; margin-bottom: 2px; font-weight: 700; }
.alert .close-icon {
  flex: 0 0 auto;
  cursor: pointer;
  color: var(--gray-color);
  font-size: 14px;
  padding: 4px;
  border-radius: 6px;
  transition: background .2s ease, color .2s ease;
}
.alert .close-icon:hover { background: #f8fafc; color: var(--dark-color); }

.alert.success-alert { border-left-color: var(--success-color); }
.alert.success-alert p strong { color: var(--success-color); }
.alert.error-alert { border-left-color: var(--danger-color); }
.alert.error-alert p strong { color: var(--danger-color); }

@keyframes alert-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Accessibility ---- */
:focus-visible {
  outline: 3px solid rgba(185, 16, 109, .4);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .container { padding: 24px; border-radius: 14px; }
  .title h2 { font-size: 1.2rem; }
}
@media (max-width: 480px) {
  .section { padding: 16px; }
  .container { padding: 20px; border-radius: 12px; }
  .title { gap: 10px; }
  .title .logo img { width: 34px; height: 34px; }
  .title h2 { font-size: 1.08rem; }
  .input-control label { font-size: .9rem; }
  .input-control input { padding: 11px 42px 11px 12px; font-size: .98rem; border-radius: 9px; }
  .button button { padding: 11px 16px; font-size: .98rem; border-radius: 10px; }
  .alert { padding: 12px 13px; gap: 10px; font-size: .9rem; border-left-width: 5px; }
}
@media (max-width: 360px) {
  .container { padding: 16px; }
  .title h2 { font-size: 1rem; }
  .container > .icons, #Loginform > .icons { flex-wrap: wrap; gap: 10px; }
}
