*{ margin:0; padding:0; box-sizing:border-box; }

.sf-auth{
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 20px;
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow:hidden;
}

.sf-wrap{
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 2;
}

.sf-card{
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 30px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .08);
  position: relative;
  overflow:hidden;
}

.sf-card > *{ position: relative; z-index: 1; }

/* Header */
.sf-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.sf-brand{
  display:flex;
  align-items:center;
  gap: 10px;
}
.sf-logo{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background-color: var(--accent-weak);
  background-image: url("../images/logo/logo.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70%;
  border: 1px solid rgba(37, 99, 235, .22);
}
.sf-brand strong{
  display:block;
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: -.2px;
}
.sf-brand span{
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.sf-back{
  color: var(--text);
  text-decoration:none;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 10px 12px;
  border-radius: 12px;
}
.sf-back:hover{ background: var(--accent-weak); }

/* Title */
.sf-title{
  margin-top: 8px;
}
.sf-title h1{
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.sf-title p{
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

/* Form */
.sf-form{
  margin-top: 18px;
  display:grid;
  gap: 14px;
}

.sf-field label{
  display:block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.sf-field input{
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  outline:none;
  transition: border-color .2s ease, background .2s ease;
}

.sf-field input::placeholder{ color: var(--muted); }
.sf-field input:focus{
  border-color: var(--accent);
  background: #fff;
}

.sf-field input.error{ border-color: #ef4444; }

.sf-otp{
  letter-spacing: 6px;
  text-align: center;
}

.sf-feedback{
  min-height: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.sf-feedback.error{ color: #ef4444; }
.sf-feedback.success{ color: var(--accent); }

.sf-timer{
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

/* Password row */
.sf-pw{
  display:flex;
  align-items:center;
  gap: 10px;
}
.sf-pw-toggle{
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor:pointer;
  font-weight: 900;
  white-space: nowrap;
}
.sf-pw-toggle:hover{ opacity:.85; }

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

.sf-check{
  display:flex;
  align-items:center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.sf-check input{
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.sf-link{
  color: var(--accent);
  text-decoration:none;
  font-weight: 800;
  font-size: 13px;
}
.sf-link:hover{ opacity:.7; }
.sf-link.strong{ font-weight: 1000; }

/* Errors */
.sf-error{
  margin-top: 10px;
  color: #ef4444;
  font-size: 13px;
  font-weight: 700;
  display:none;
  animation: fadeIn .25s ease;
}
.sf-error.show{ display:block; }

@keyframes fadeIn{ from{opacity:0} to{opacity:1} }

/* Buttons */
.sf-btn{
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  cursor:pointer;
  font-weight: 1000;
  font-size: 15px;
  color:#fff;
  background: var(--accent);
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 10px 30px rgba(37, 99, 235, .18);
  position: relative;
  overflow:hidden;
}
.sf-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(37, 99, 235, .22);
}

/* Footer */
.sf-foot{
  margin-top: 6px;
  display:flex;
  gap: 10px;
  justify-content:center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* Note */
.sf-note{
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align:center;
}
.sf-note a{ border-bottom: 1px solid rgba(37, 99, 235, .35); }

/* Responsive */
@media (max-width: 520px){
  .sf-card{ padding: 38px 22px; }
  .sf-row{ flex-direction: column; align-items:flex-start; }
  .sf-back{ display:none; }
}
