/* SellOut 登入頁樣式（登入／註冊／管理登入共用） */
:root {
  --fm-primary: #479fd6;
  --fm-dark: #173a52;
  --fm-muted: #6c7a86;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: 
    linear-gradient(135deg, 
      var(--fm-dark) 0%, 
      #1a3a5c 20%, 
      #2c5f85 40%, 
      #3a7ab5 60%, 
      var(--fm-primary) 80%, 
      #5ab0e6 100%
    );
  background-size: 300% 300%;
  animation: aurora 20s ease infinite;
  font-family: system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  overflow-x: hidden;
}

@keyframes aurora {
  0% { background-position: 0% 50%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}

/* 登入卡片容器 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  z-index: 1;
}

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

.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(10, 35, 55, 0.45);
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--fm-dark) !important;
  text-decoration: none !important;
  text-align: center;
  display: block;
}

.brand::after {
  content: "·";
  color: var(--fm-primary);
  margin-left: 6px;
}

.brand-tagline {
  margin: 0 0 6px;
  text-align: center;
  color: var(--fm-muted);
  font-size: 13.5px;
}

.tabbar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e3e9ee;
  margin-bottom: 4px;
}

.tabbar a {
  display: block;
  padding: 10px 14px;
  color: var(--fm-muted);
  text-decoration: none !important;
  border-bottom: 2px solid transparent;
  font-weight: 600;
}

.tabbar a.active {
  color: var(--fm-dark);
  border-bottom-color: var(--fm-primary);
}

.login-pane { padding-top: 8px; }

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-card input,
.login-card select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cdd8e0;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
}

.login-card input:focus,
.login-card select:focus {
  border-color: var(--fm-primary);
  box-shadow: 0 0 0 3px rgba(71, 159, 214, 0.25);
}

.login-card .btn {
  margin-top: 4px;
  padding: 10px 14px;
}

.login-footer {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--fm-muted);
}

.login-footer a { color: var(--fm-muted); }

/* 多步驟補充樣式 */
.back-link { display:inline-flex; align-items:center; gap:5px; margin:6px 0 0; font-size:12.5px; color:var(--fm-muted); text-decoration:none !important; }
.back-link:hover { color:var(--fm-dark); }
.back-link .back-icon { display:inline-flex; }
.back-link .back-icon svg { display:block; }
.hint-left { font-size:12.5px; color:var(--fm-muted); margin-top:2px; }
.hint-center { text-align:center; font-size:13px; color:var(--fm-muted); margin-top:10px; }
.hint-center a { color: var(--fm-primary); font-weight:600; text-decoration:none !important; }
.recovery-box { display:flex; flex-direction:column; gap:10px; }
.recovery-box h3 { font-size:16px; margin:4px 0 0; color:var(--fm-dark); }
.recovery-list { font-family: ui-monospace, Menlo, monospace; font-size:13px; columns:2; color:var(--fm-dark); margin:0; padding-left:20px; }
.recovery-list li { margin-bottom:4px; word-break: break-all; }

/* Loading button state */
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  background-color: var(--fm-primary) !important;
  opacity: 0.85;
}
.btn.loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2.5px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  animation: fm-spin 0.7s linear infinite;
}
@keyframes fm-spin {
  to { transform: rotate(360deg); }
}
