/* 农资平台 - 认证页样式（登录/注册/找回密码）对齐Next版 */
:root {
  --auth-primary: #22c55e;
  --auth-primary-dark: #16a34a;
  --auth-primary-bg: #f0fdf4;
  --auth-primary-light: #dcfce7;
  --auth-red: #ef4444;
  --auth-orange: #f59e0b;
  --auth-text: #111827;
  --auth-text-2: #4b5563;
  --auth-muted: #9ca3af;
  --auth-border: #e5e7eb;
  --auth-bg: #f9fafb;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--auth-text);
  background: #f8fafc;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--auth-primary); }
a:hover { color: var(--auth-primary-dark); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ====== 全屏容器 ====== */
.auth-shell {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 40%, #16a34a 100%);
  position: relative;
  overflow: hidden;
}
.auth-shell::before, .auth-shell::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.12); pointer-events: none;
}
.auth-shell::before { width: 500px; height: 500px; top: -180px; right: -100px; }
.auth-shell::after  { width: 380px; height: 380px; bottom: -140px; left: -120px; background: rgba(255,255,255,.08); }

.auth-deco {
  position: absolute; font-size: 56px; opacity: .18; pointer-events: none;
  animation: floatY 6s ease-in-out infinite;
}
.deco-1 { top: 12%; left: 8%; animation-delay: 0s; }
.deco-2 { top: 28%; left: 22%; font-size: 44px; animation-delay: 1.2s; }
.deco-3 { top: 58%; left: 6%; font-size: 50px; animation-delay: 2.4s; }
.deco-4 { bottom: 20%; left: 28%; font-size: 40px; animation-delay: 3.6s; }
.deco-5 { top: 18%; left: 36%; font-size: 36px; animation-delay: 1.8s; }
@keyframes floatY {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-14px) rotate(6deg); }
}

/* ====== 左侧品牌区 ====== */
.auth-left {
  flex: 1.1; display: flex; flex-direction: column; justify-content: center;
  padding: 60px 80px; color: #fff; position: relative; z-index: 2;
}
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 60px; }
.auth-logo-ic {
  width: 52px; height: 52px; border-radius: 14px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.auth-logo-name { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.auth-hero h1 {
  font-size: 42px; font-weight: 800; line-height: 1.25; margin: 0 0 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.auth-hero p {
  font-size: 17px; opacity: .92; line-height: 1.7; margin: 0 0 36px; max-width: 480px;
}
.auth-features { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.auth-feature { display: flex; align-items: center; gap: 14px; font-size: 15px; opacity: .95; }
.auth-feature-ic {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.22); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

/* ====== 右侧卡片区 ====== */
.auth-right {
  flex: 0 0 500px; display: flex; align-items: center; justify-content: center;
  padding: 40px; position: relative; z-index: 2;
}
.auth-card {
  width: 100%; max-width: 440px; background: #fff;
  border-radius: 20px; padding: 40px 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,.15);
  max-height: calc(100vh - 80px); overflow-y: auto;
}
.auth-card::-webkit-scrollbar { width: 6px; }
.auth-card::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

.auth-card-head { text-align: left; margin-bottom: 24px; }
.auth-card-head h2 {
  font-size: 28px; font-weight: 700; margin: 0 0 8px; color: var(--auth-text);
}
.auth-card-head p { font-size: 14px; color: var(--auth-muted); margin: 0; line-height: 1.6; }
.auth-card-head .link-back {
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--auth-primary);
  margin-bottom: 16px; font-weight: 500;
}
.auth-card-foot {
  text-align: center; font-size: 14px; color: var(--auth-text-2);
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--auth-bg);
}
.auth-card-foot a { color: var(--auth-primary); font-weight: 600; margin-left: 4px; }

/* ====== Tabs ====== */
.auth-tabs {
  display: flex; gap: 4px; background: var(--auth-bg); border-radius: 10px;
  padding: 4px; margin-bottom: 22px;
}
.auth-tab {
  flex: 1; padding: 10px 0; text-align: center; font-size: 14px; font-weight: 500;
  color: var(--auth-text-2); cursor: pointer; border: none; background: none;
  border-radius: 8px; transition: all .2s;
}
.auth-tab.active {
  background: #fff; color: var(--auth-primary); font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.auth-tab:hover:not(.active) { color: var(--auth-text); }

/* ====== 表单通用 ====== */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--auth-text-2); }
.form-label .req { color: var(--auth-red); margin-left: 2px; }

/* 输入框容器 */
.input-wrap {
  position: relative; display: flex; align-items: center;
}
.input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 17px; color: var(--auth-muted); pointer-events: none; z-index: 1;
}
.form-input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 44px;
  border: 1.5px solid var(--auth-border);
  border-radius: 10px;
  font-size: 14px; color: var(--auth-text);
  background: #fff;
  transition: all .2s; outline: none;
}
.form-input::placeholder { color: #c0c4cc; font-size: 14px; }
.form-input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}
.form-input.has-suffix { padding-right: 52px; }

/* 密码眼睛、验证码按钮贴在输入框右侧 */
.toggle-pwd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: var(--auth-muted); cursor: pointer;
  padding: 6px 8px; font-size: 18px; line-height: 1; z-index: 2;
}
.toggle-pwd:hover { color: var(--auth-primary); }

/* 验证码行 */
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row > .input-wrap { flex: 1; }
.sms-btn {
  flex-shrink: 0; width: 120px; height: 48px;
  padding: 0 10px;
  border: 1.5px solid var(--auth-primary);
  color: var(--auth-primary);
  background: var(--auth-primary-bg);
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.sms-btn:hover:not(:disabled) { background: var(--auth-primary); color: #fff; }
.sms-btn:disabled {
  opacity: .6; cursor: not-allowed;
  color: var(--auth-muted); border-color: var(--auth-border); background: #f9fafb;
}

/* 辅助行：记住我 + 忘记密码 */
.auth-helper {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; margin-top: -2px;
}
.remember {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--auth-text-2); cursor: pointer; user-select: none;
}
.remember input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--auth-primary); cursor: pointer;
  margin: 0;
}
.forgot-link { color: var(--auth-primary); font-weight: 500; font-size: 13px; }
.forgot-link:hover { color: var(--auth-primary-dark); text-decoration: underline; }

/* 主按钮 */
.auth-btn-primary {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: all .2s;
  box-shadow: 0 6px 18px rgba(34,197,94,.32);
  margin-top: 4px; position: relative; overflow: hidden;
}
.auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(34,197,94,.42);
}
.auth-btn-primary:active { transform: translateY(0); }
.auth-btn-primary:disabled {
  opacity: .6; cursor: not-allowed; transform: none;
  box-shadow: none;
}

/* 次要按钮（返回等） */
.auth-btn-ghost {
  width: 100%;
  height: 44px;
  background: #fff; color: var(--auth-primary);
  border: 1.5px solid var(--auth-primary);
  border-radius: 10px; font-size: 15px; font-weight: 500;
  cursor: pointer; transition: all .2s; margin-top: 10px;
}
.auth-btn-ghost:hover { background: var(--auth-primary-bg); }

/* ====== 角色选择（注册页） ====== */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.role-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--auth-border);
  border-radius: 10px; cursor: pointer;
  transition: all .2s; background: #fff;
}
.role-item:hover { border-color: var(--auth-primary); background: var(--auth-primary-bg); }
.role-item.selected {
  border-color: var(--auth-primary); background: var(--auth-primary-bg);
  box-shadow: 0 0 0 4px rgba(34,197,94,.1);
}
.role-item input[type="radio"] { display: none; }
.role-ic {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--auth-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.role-item.selected .role-ic { background: #fff; }
.role-name { font-size: 14px; font-weight: 600; color: var(--auth-text); }
.role-desc { font-size: 11px; color: var(--auth-muted); margin-top: 1px; }
.role-check {
  margin-left: auto; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--auth-border); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.role-item.selected .role-check { background: var(--auth-primary); border-color: var(--auth-primary); }
.role-item.selected .role-check::after { content: '✓'; }

/* ====== 步骤指示器（注册/找回） ====== */
.step-indicator { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 24px; }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--auth-bg); color: var(--auth-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.step-dot.active { background: var(--auth-primary); color: #fff; }
.step-dot.done { background: var(--auth-primary-bg); color: var(--auth-primary); }
.step-line { width: 36px; height: 2px; background: var(--auth-bg); }
.step-line.done { background: var(--auth-primary); }

/* ====== 密码强度条 ====== */
.pwd-strength { display: flex; align-items: center; gap: 6px; margin-top: -8px; }
.strength-bars { display: flex; gap: 4px; flex: 1; }
.strength-bar { flex: 1; height: 4px; border-radius: 2px; background: #e5e7eb; transition: background .2s; }
.strength-tip { font-size: 12px; color: var(--auth-muted); }
.strength.weak .strength-bar:nth-child(1) { background: var(--auth-red); }
.strength.mid  .strength-bar:nth-child(-n+2) { background: var(--auth-orange); }
.strength.strong .strength-bar { background: var(--auth-primary); }

/* ====== 协议勾选 ====== */
.agreement {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--auth-text-2); line-height: 1.6;
  margin-top: -2px;
}
.agreement input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--auth-primary);
  margin-top: 2px; flex-shrink: 0; cursor: pointer;
}
.agreement a { color: var(--auth-primary); }

/* ====== 提示 / 错误 ====== */
.quick-demo {
  margin-top: 18px; padding: 10px 12px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
  font-size: 12px; color: #92400e; line-height: 1.6;
}
.quick-demo b { color: #b45309; }

.flash-msg {
  padding: 10px 14px; border-radius: 8px; font-size: 13px;
  margin-bottom: 16px; display: none;
}
.flash-msg.error {
  display: block; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
}
.flash-msg.success {
  display: block; background: var(--auth-primary-bg); border: 1px solid #bbf7d0; color: #166534;
}

/* ====== 其他登录方式 ====== */
.auth-other { margin-top: 22px; }
.auth-other-tip {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--auth-muted); margin-bottom: 14px;
}
.auth-other-tip::before, .auth-other-tip::after {
  content: ''; flex: 1; height: 1px; background: var(--auth-border);
}
.social-row { display: flex; gap: 12px; justify-content: center; }
.social-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--auth-border); background: #fff;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.08); }

/* ====== 成功图标（找回密码完成） ====== */
.auth-success {
  text-align: center; padding: 24px 0;
}
.auth-success-ic {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--auth-primary-bg); color: var(--auth-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin: 0 auto 16px;
}

/* ====== 响应式 ====== */
@media (max-width: 900px) {
  .auth-left { display: none; }
  .auth-right { flex: 1; padding: 20px; }
  .auth-card { padding: 28px 22px; max-height: none; }
}

/* ===== 表单补充样式 ===== */
.form-row{margin-bottom:16px;}
.form-label{display:block;font-size:13px;font-weight:500;color:#374151;margin-bottom:8px;}
.req{color:#ef4444;margin-left:2px;}
.opt{color:#9ca3af;font-weight:400;font-size:12px;margin-left:4px;}
.input-wrap{position:relative;}
.input-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:17px;color:#9ca3af;pointer-events:none;z-index:2;}
.form-input{width:100%;height:48px;padding:0 44px 0 44px;border:1.5px solid #e5e7eb;border-radius:12px;font-size:14px;color:#111827;background:#fff;transition:all .18s;box-sizing:border-box;outline:none;font-family:inherit;}
.form-input:focus{border-color:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.12);background:#fff;}
.form-input::placeholder{color:#c0c4ca;}
.form-input[type=password]{letter-spacing:1px;}
.toggle-pwd{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:transparent;border:none;font-size:18px;cursor:pointer;color:#9ca3af;padding:4px;z-index:3;line-height:1;}
.toggle-pwd:hover{color:#22c55e;}

/* 验证码行 */
.captcha-row{display:grid;grid-template-columns:1fr 120px;gap:10px;}
.captcha-row .input-wrap{margin:0;}
.sms-btn{height:48px;background:#fff;border:1.5px solid #22c55e;color:#22c55e;padding:0 14px;border-radius:12px;font-size:13px;font-weight:600;cursor:pointer;transition:all .18s;white-space:nowrap;font-family:inherit;}
.sms-btn:hover:not(:disabled){background:#f0fdf4;}
.sms-btn:disabled{border-color:#d1d5db;color:#9ca3af;cursor:not-allowed;background:#f9fafb;}

/* 角色选择 */
.role-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:4px;}
.role-item{border:1.5px solid #e5e7eb;border-radius:12px;padding:14px 10px;cursor:pointer;transition:all .18s;text-align:center;background:#fff;user-select:none;}
.role-item:hover{border-color:#86efac;background:#f0fdf4;transform:translateY(-1px);}
.role-item.selected{border-color:#22c55e;background:#f0fdf4;box-shadow:0 0 0 3px rgba(34,197,94,.1);}
.role-ic{font-size:26px;margin-bottom:6px;line-height:1;}
.role-name{font-size:13px;font-weight:600;color:#111827;margin-bottom:2px;}
.role-desc{font-size:11px;color:#9ca3af;line-height:1.3;}

/* 步骤指示器 */
.step-row{display:flex;align-items:center;justify-content:center;gap:0;margin:4px 0 22px;padding:0 10px;}
.step-item{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:54px;}
.step-dot{width:30px;height:30px;border-radius:50%;background:#f3f4f6;color:#9ca3af;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;transition:all .3s;border:2px solid #e5e7eb;}
.step-item.active .step-dot{background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;border-color:#16a34a;box-shadow:0 4px 10px rgba(34,197,94,.3);}
.step-line{flex:1;height:2px;background:#e5e7eb;margin:0 4px;max-width:40px;position:relative;top:-12px;}
.step-text{font-size:11px;color:#9ca3af;}
.step-item.active .step-text{color:#16a34a;font-weight:600;}

/* 协议 */
.agreement{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:#6b7280;margin:0 0 18px;line-height:1.6;}
.agreement input{margin-top:3px;accent-color:#22c55e;width:14px;height:14px;flex-shrink:0;cursor:pointer;}
.agreement a{color:#16a34a;text-decoration:none;font-weight:500;}
.agreement a:hover{text-decoration:underline;}

/* 密码强度 */
.pwd-strength{margin-top:8px;display:flex;align-items:center;gap:8px;}
.pwd-bar{flex:1;height:4px;background:#e5e7eb;border-radius:2px;overflow:hidden;}
.pwd-bar span{display:block;height:100%;width:0;border-radius:2px;transition:all .3s;}
.pwd-bar span.lv1{width:33%;background:#ef4444;}
.pwd-bar span.lv2{width:66%;background:#f59e0b;}
.pwd-bar span.lv3{width:100%;background:#22c55e;}
.pwd-tip{font-size:11px;color:#9ca3af;min-width:40px;}

/* 找回密码图标 */
.forgot-ic{font-size:46px;text-align:center;margin-bottom:6px;display:block;line-height:1;}

/* flash消息 */
.flash-msg{padding:12px 14px;border-radius:10px;margin-bottom:14px;font-size:13px;display:flex;align-items:center;gap:8px;}
.flash-msg.error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca;}
.flash-msg.success{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0;}

/* 演示提示 */
.demo-tip{text-align:center;font-size:12px;color:#9ca3af;margin:12px 0 0;line-height:1.5;}
.demo-tip b{color:#ea580c;}

/* footer links */
.foot-sep{color:#d1d5db;margin:0 8px;}
