:root{
  color-scheme: light;

  --bg: #f5f7fb;
  --card: #ffffff;
  --border: rgba(15, 23, 42, 0.12);

  --text: #0b1020;
  --muted: #55647a;

  --danger: #b42318;
  --ok: #027a48;

  --brand: #1f4ed8;
  --brand2: #014d89;

  --shadow: 0 26px 90px rgba(15, 23, 42, 0.14);
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(900px 700px at 18% 12%, rgba(31, 78, 216, 0.16) 0%, transparent 60%),
    radial-gradient(900px 700px at 82% 88%, rgba(1, 77, 137, 0.12) 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.page{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.card{
  position: relative;
  overflow: hidden;

  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px 24px 22px;
  box-shadow: var(--shadow);
}

.card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
}

.brand{
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 10px;
}

/* Logo */
.logo-frame{
  width: min(340px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo{
  display: block;
  width: 100%;
  height: auto;
}
.header{
  text-align: center;
  margin-bottom: 16px;
}

.header h1{
  margin: 6px 0 8px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

.header p{
  margin: 0 auto;
  max-width: 34ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.form{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span{
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.2px;
}

input{
  width: 100%;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #ffffff;
  color: var(--text);
  outline: none;
}

input::placeholder{
  color: rgba(15, 23, 42, 0.35);
}

/* Keep autofill from changing the “premium” look */
input:-webkit-autofill{
  -webkit-box-shadow: 0 0 0 40px #ffffff inset !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 9999s ease-in-out 0s;
}

input:focus{
  border-color: rgba(31, 78, 216, 0.55);
  box-shadow: 0 0 0 4px rgba(31, 78, 216, 0.14);
}

.password-row{
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.toggle{
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.03);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  min-width: 84px;
}

.toggle:hover{
  border-color: rgba(31, 78, 216, 0.35);
}

.primary{
  margin-top: 4px;
  padding: 16px 16px;
  border-radius: 18px;
  border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #ffffff;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(31, 78, 216, 0.18);
}

.primary:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

.links{
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.link{
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--brand);
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.link:hover{ text-decoration: underline; }

/* Message: only visible when set */
.msg{
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  line-height: 1.45;
  display: none;
  padding: 10px 12px;
  border-radius: 14px;
}

.msg:empty{ display: none; padding: 0; margin-top: 0; }
.msg.ok{
  display: block;
  color: var(--ok);
  background: rgba(2, 122, 72, 0.08);
  border: 1px solid rgba(2, 122, 72, 0.22);
}
.msg.error{
  display: block;
  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.22);
}

.hr{
  margin: 18px 0 12px;
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
  border: 0;
}

.footer{
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}


.small{
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
}

/* Safety: if any old markup still includes .badge, hide it */
.badge{ display:none !important; }

@media (max-width: 420px){
  .card{ padding: 24px 18px 20px; }
  .header h1{ font-size: 28px; }
  .links{ flex-direction: column; align-items: stretch; }
  .link{ text-align: center; }
}
