/* ── Salary Manager — Custom Login Page ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

.sm-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
  background: #0f4c35;
  background: linear-gradient(160deg, #0a3d2b 0%, #1D9E75 55%, #0e5c40 100%);
  background-attachment: fixed;
}

.sm-login-page {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ── Brand ── */
.sm-login-brand { text-align: center; }

.sm-login-logo {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 1.5px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
}
.sm-login-logo svg { width: 48px; height: 48px; }

.sm-login-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.sm-login-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  margin-top: 6px;
}

/* ── Card ── */
.sm-login-card {
  width: 100%;
  background: #ffffff;
  border-radius: 20px;
  padding: 32px;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.04),
    0 8px 24px rgba(0,0,0,0.12),
    0 32px 64px rgba(0,0,0,0.18);
}

.sm-login-heading {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}
.sm-login-hint {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 24px;
}

/* ── Error alert ── */
.sm-login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  font-size: 13px;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
  line-height: 1.4;
}
.sm-login-error svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Form ── */
.sm-login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sm-login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sm-login-field > label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sm-forgot-link {
  font-size: 12px;
  color: #1D9E75;
  text-decoration: none;
  font-weight: 400;
}
.sm-forgot-link:hover { text-decoration: underline; }

/* Input wrapper */
.sm-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sm-input-icon {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: #9ca3af;
  pointer-events: none;
  flex-shrink: 0;
}

.sm-input-wrap input[type="text"],
.sm-input-wrap input[type="password"],
.sm-input-wrap input[type="email"] {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 40px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.sm-input-wrap input:focus {
  border-color: #1D9E75;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29,158,117,0.15);
}
.sm-input-wrap input::placeholder { color: #d1d5db; }

/* Show/hide password */
.sm-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.sm-toggle-pw svg { width: 17px; height: 17px; }
.sm-toggle-pw:hover, .sm-toggle-pw.active { color: #1D9E75; }

/* Remember me */
.sm-login-remember { margin-top: -4px; }

.sm-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
}
.sm-checkbox-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1D9E75;
  cursor: pointer;
  flex-shrink: 0;
}

/* Submit button */
.sm-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  background: #1D9E75;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(29,158,117,0.35);
  letter-spacing: 0.01em;
  margin-top: 4px;
}
.sm-login-btn svg { width: 17px; height: 17px; }
.sm-login-btn:hover {
  background: #18896a;
  box-shadow: 0 6px 18px rgba(29,158,117,0.4);
}
.sm-login-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(29,158,117,0.3);
}

/* Footer */
.sm-login-footer {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

/* ── Mobile ── */
@media (max-width: 420px) {
  .sm-login-card { padding: 24px 20px; border-radius: 16px; }
  .sm-login-title { font-size: 22px; }
  .sm-login-logo { width: 68px; height: 68px; }
}
