/* User/admin auth pages - modern premium auth styling */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root{
  --auth-bg: #f5f5f5;
  --auth-card: #ffffff;
  --auth-text: #222;
  --auth-muted: #666;
  --auth-border: rgba(0,0,0,0.10);
  --auth-shadow: 0 20px 50px rgba(30, 41, 59, 0.12), 0 8px 20px rgba(0,0,0,0.05);

  --auth-primary: #d12c62;
  --auth-primary-dark: #b02052;
  --auth-accent: #519e87;          /* matches --site-accent */

  --auth-danger-bg: #fee2e2;
  --auth-danger-text: #b91c1c;
  --auth-success-bg: #dcfce7;
  --auth-success-text: #166534;

  --auth-radius: 18px;
  --auth-font: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --auth-title-font: "Sora", "Manrope", system-ui, sans-serif;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(209,44,98,0.09), transparent 38%),
    radial-gradient(circle at 90% 90%, rgba(81,158,135,0.10), transparent 35%),
    var(--auth-bg);
  color: var(--auth-text);
  font-family: var(--auth-font);
  display:flex;
  flex-direction:column;
}

a{
  color: var(--auth-primary);
  text-decoration:none;
}
a:hover{ text-decoration: underline; }

/* Wrapper works with nav.php above it */
.auth-page{
  width:100%;
  padding: 36px 16px 56px;
  display:flex;
  justify-content:center;
  align-items:center;
  flex: 1;
}

.auth-card{
  width:100%;
  max-width: 440px;
  background: var(--auth-card);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  border: 1px solid rgba(15,23,42,0.07);
  overflow:hidden;
  position: relative;
}

.auth-card::before{
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--auth-primary), #f97316, #0ea5e9);
}

.auth-card__inner{
  padding: 34px 28px 30px;
}

.auth-logo{
  text-align:center;
  margin: 2px 0 22px;
}

.auth-logo img{
  max-width: 100px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.08));
}

.auth-title{
  margin: 0 0 7px;
  font-size: 2.35rem;
  letter-spacing: -0.02em;
  color: var(--auth-text);
  text-align:center;
  font-family: var(--auth-title-font);
  font-weight: 800;
  line-height: 1.08;
}

.auth-subtitle{
  margin: 0 0 24px;
  text-align:center;
  color: var(--auth-muted);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
}

.auth-alert{
  padding: 12px 13px;
  border-radius: 12px;
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.35;
  border: 1px solid transparent;
}
.auth-alert--error{
  background: var(--auth-danger-bg);
  color: var(--auth-danger-text);
  border-color: rgba(185, 28, 28, 0.22);
}
.auth-alert--success{
  background: var(--auth-success-bg);
  color: var(--auth-success-text);
  border-color: rgba(22, 101, 52, 0.22);
}

.auth-form{
  display:flex;
  flex-direction:column;
  gap: 13px;
}

.auth-field label{
  display:block;
  margin: 0 0 7px;
  font-size: 0.78rem;
  color: #475569;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.auth-input,
.auth-select{
  width:100%;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid var(--auth-border);
  background:#fcfdff;
  font-size: 0.95rem;
  outline:none;
  color: var(--auth-text);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.auth-input:focus,
.auth-select:focus{
  border-color: rgba(209, 44, 98, 0.55);
  box-shadow: 0 0 0 3px rgba(209, 44, 98, 0.12);
  transform: translateY(-1px);
}

.auth-file{
  display:flex;
  align-items:center;
  gap: 10px;
  width:100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px dashed rgba(0,0,0,0.18);
  background: #fff;
  cursor:pointer;
}

.auth-file:hover{
  border-color: rgba(209, 44, 98, 0.45);
  box-shadow: 0 0 0 3px rgba(209, 44, 98, 0.08);
}

.auth-file__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
  color:#fff;
  font-weight: 700;
  font-size: 0.9rem;
  white-space:nowrap;
}

.auth-file__name{
  color: var(--auth-muted);
  font-size: 0.92rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.auth-file__input{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.auth-password{
  position:relative;
}

.auth-password__wrap{
  position:relative;
}

.auth-password__wrap .auth-input{
  padding-right: 50px;
}

.auth-toggle{
  position:absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: none;
  background: rgba(0,0,0,0.04);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(0,0,0,0.55);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.auth-toggle:hover{
  background: rgba(0,0,0,0.07);
  color: rgba(0,0,0,0.75);
}

.auth-toggle:focus{
  outline:none;
  box-shadow: 0 0 0 3px rgba(209, 44, 98, 0.16);
}

.auth-toggle svg{
  width: 18px;
  height: 18px;
  display:block;
}

.auth-actions{
  display:flex;
  flex-direction:column;
  gap: 11px;
  margin-top: 10px;
}

.auth-btn{
  width:100%;
  padding: 14px 16px;
  border-radius: 13px;
  border: none;
  cursor:pointer;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.auth-btn--primary{
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
  color:#fff;
  box-shadow: 0 12px 26px rgba(209, 44, 98, 0.26);
}
.auth-btn--primary:hover{
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.auth-linkrow{
  display:flex;
  justify-content:center;
  gap: 10px;
  margin-top: 9px;
  font-size: 0.9rem;
}

.auth-linkrow .muted{
  color: var(--auth-muted);
}

.auth-linkrow--between{
  justify-content:space-between;
}

.auth-divider{
  margin: 22px 0 16px;
  display:flex;
  align-items:center;
  gap: 10px;
  color: var(--auth-muted);
  font-size: 0.83rem;
  font-weight: 600;
}
.auth-divider::before,
.auth-divider::after{
  content:"";
  height: 1px;
  background: rgba(0,0,0,0.12);
  flex: 1;
}

.auth-social{
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.auth-social a{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 13px 12px;
  border-radius: 13px;
  border: 1px solid rgba(0,0,0,0.12);
  color: var(--auth-text);
  background:#fff;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-social a:hover{
  background:#fafafa;
  text-decoration:none;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15,23,42,0.08);
}
.auth-social img{ width: 18px; height: 18px; }
.auth-google-icon{ width: 20px; height: 20px; object-fit: contain; }

.auth-bottom-links{
  margin-top: 14px;
  text-align:center;
  color: #7e8da3;
  font-size: 0.9rem;
}

.auth-bottom-links a{
  color: #188fd7;
  font-weight: 700;
}

/* Resend OTP button */
.resend-btn{
  appearance:none;
  border:none;
  background: transparent;
  color: var(--auth-primary);
  font-weight: 700;
  font-size: 0.92rem;
  cursor:pointer;
  padding: 8px 10px;
  border-radius: 10px;
}

.resend-btn:hover{
  background: rgba(209, 44, 98, 0.08);
}

.resend-btn:focus{
  outline:none;
  box-shadow: 0 0 0 3px rgba(209, 44, 98, 0.16);
}

/* Back-compat: keep existing classnames working if any page still uses them */
.containerB{ width:100%; max-width: 460px; margin: 0 auto; }
.main-btn{ all: unset; }
.forgot-btn{ all: unset; }
.or-divider{ all: unset; }
.social-login{ all: unset; }

/* Small screens */
@media (max-width: 420px){
  .auth-card__inner{ padding: 22px 16px; }
  .auth-linkrow{ flex-direction:column; align-items:center; text-align:center; }
  .auth-title{ font-size: 1.95rem; }
  .auth-logo img{ max-width: 220px; }
  .auth-subtitle{ font-size: 0.95rem; }
}
