/* Auth Pages Shared Styles (login.html, signup.html)
   Scope: only used by auth pages to avoid conflicts with main site styles.css
*/

:root{
  --bg: #f4f6fb;
  --panel-bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #007bff; /* blue */
  --success: #22c55e; /* green for signup */
  --danger: #ef4444;
  --ring: rgba(0,123,255,0.35);
  --shadow: 0 10px 30px rgba(2, 8, 23, 0.08);
  --radius: 16px;
}

*{ box-sizing: border-box; }

html, body{
  height: 100%;
}

body{
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #eaf2ff 0%, transparent 60%),
              radial-gradient(800px 500px at 110% 10%, #f0fff5 0%, transparent 60%),
              var(--bg);
  display: grid;
  place-items: center;
}

.auth-wrap{
  width: 100%;
  padding: 32px 16px;
}

.auth-card{
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: var(--panel-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #eef2ff;
  overflow: hidden;
}

.auth-head{
  padding: 28px 28px 8px 28px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand__dot{
  width: 12px; height: 12px; border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 0 4px rgba(0,123,255,0.12);
}

.auth-title{
  margin: 8px 0 4px 0;
  font-size: 28px;
  line-height: 1.2;
}

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

.auth-body{
  padding: 16px 28px 28px 28px;
}

.form{
  display: grid;
  gap: 16px;
}

.form-row{
  display: grid;
  gap: 8px;
}

.label{
  font-size: 14px;
  color: #374151;
}

.input-wrap{
  position: relative;
}

.input{
  width: 100%;
  padding: 12px 44px 12px 14px; /* leave room for toggles */
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease, transform .05s ease;
}

.input:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

.input.error{
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(239,68,68,0.15);
}

.toggle-btn{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.toggle-btn:hover{ background: #f3f4f6; }

.hint, .error-msg{
  font-size: 12px;
  line-height: 1.4;
}

.hint{ color: #6b7280; }

.error-msg{ color: var(--danger); display: none; }

.error-msg.show{ display: block; }

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .2s ease, background-color .2s ease;
}

.btn:active{ transform: translateY(1px); }

.btn-success{
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 6px 18px rgba(34,197,94,0.35);
}

.btn-success:hover{ filter: brightness(1.03); }

.btn-primary-outline{
  background: #fff;
  color: var(--primary);
  border: 1px solid rgba(0,123,255,0.35);
}

.hr-text{
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  color: #6b7280; font-size: 12px; margin: 10px 0 0 0;
}
.hr-text::before, .hr-text::after{ content: ""; height: 1px; background: #e5e7eb; }

.alt{
  margin-top: 16px; text-align: center; color: #6b7280; font-size: 14px;
}
.alt a{ color: var(--primary); text-decoration: none; font-weight: 600; }
.alt a:hover{ text-decoration: underline; }

.alert{
  display:none; margin-top: 8px; padding: 10px 12px; border-radius: 10px; font-size: 14px;
}
.alert.success{ display:none; background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; }

@media (max-width: 420px){
  .auth-card{ border-radius: 12px; }
  .auth-title{ font-size: 24px; }
}

/* Close button for standalone auth pages */
.page-close{
  position:absolute; right:12px; top:12px; width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; text-decoration:none;
  border:1px solid #e5e7eb; border-radius:10px; color:#6b7280; background:#fff; font-size:20px; line-height:1;
}
.page-close:hover{ background:#f3f4f6; }