/* css/auth.css — matches portal card styling (light + dark mode) */

:root{
  /* Light theme defaults */
  --bg1:#169bd7;
  --bg2:#4f7df6;

  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;

  --input-bg:#ffffff;
  --input-border:#e5e7eb;

  --blue:#2563eb;
  --green:#22c55e;

  --shadow: 0 18px 45px rgba(0,0,0,0.18);
  --radius: 18px;
}

/* Dark theme overrides */
html[data-theme="dark"]{
  --bg1:#0b1220;
  --bg2:#0f1b33;

  --card:#0f172a;
  --text:#e5e7eb;
  --muted:#94a3b8;

  --input-bg:#0b1220;
  --input-border:#243244;

  --shadow: 0 18px 45px rgba(0,0,0,0.45);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* ✅ IMPORTANT: keep portal gradient background */
  background: linear-gradient(180deg, var(--bg1), var(--bg2));

  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px;
}

.auth-wrap{
  width:100%;
  max-width: 560px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 26px;
  padding: 24px;
}

/* ✅ Dark-mode wrapper tweak (keeps it from looking “washed out”) */
html[data-theme="dark"] .auth-wrap{
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148,163,184,0.18);
}

.auth-card{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-bottom: 14px;
}

.brand-badge{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green), #10b981);
  color: white;
}

h1{
  margin:0;
  font-size: 26px;
  color: var(--text);
}

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

.form{
  margin-top: 18px;
  display:grid;
  gap: 12px;
}

.label{
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  display:block;
}

/* ✅ Fixed: input styling (padding/radius/width) */
.input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  outline: none;
  font-size: 14px;

  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
}

.input::placeholder{
  color: rgba(100,116,139,0.85);
}
html[data-theme="dark"] .input::placeholder{
  color: rgba(148,163,184,0.75);
}

.input:focus{
  border-color: rgba(37,99,235,0.7);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px){
  .row{ grid-template-columns: 1fr; }
}

.actions{
  display:flex;
  gap: 10px;
  align-items:center;
  margin-top: 6px;
}

.btn{
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}

.btn-primary{
  background: var(--blue);
  color: white;
}
.btn-primary:hover{ filter: brightness(0.95); }

.btn-secondary{
  background: var(--green);
  color: white;
}
.btn-secondary:hover{ filter: brightness(0.95); }

.link-row{
  display:flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 13px;
}

a{
  color: var(--blue);
  text-decoration:none;
  font-weight: 600;
}
a:hover{ text-decoration: underline; }

/* ✅ Optional: soften links in dark mode */
html[data-theme="dark"] a{
  color: #60a5fa;
}

.note{
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.msg{
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

/* Secondary auth action (signup/login switch) */
.alt-action{
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: left;
}

.alt-action a{
  margin-left: 6px;
  font-weight: 600;
}
