/* 登录页样式。
 * 单独成文件（而不是内联在 login.html 里）是为了让 CSP 能去掉 style-src 的
 * 'unsafe-inline' —— 内联样式必须靠它放行，而放开它就等于允许注入的样式生效。
 */
  :root {
    --ink: #16202c; --ink2: #5b6b7c; --line: #e3e8ee;
    --brand: #232f3e; --brand2: #37475a; --accent: #ff9900; --accent2: #146eb4;
    --bad: #cc2b2b; --bad-bg: #fdecec;
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #232f3e 0%, #3b4d63 55%, #2b3a4d 100%);
    font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
    color: var(--ink); -webkit-font-smoothing: antialiased;
    padding: 20px;
  }
  /* 背景装饰 */
  body::before {
    content: ""; position: fixed; inset: 0; pointer-events: none;
    background:
      radial-gradient(600px 300px at 15% 15%, rgba(255,153,0,.16), transparent 65%),
      radial-gradient(500px 260px at 88% 82%, rgba(20,110,180,.22), transparent 65%);
  }
  .card {
    position: relative; z-index: 1; width: 100%; max-width: 400px;
    background: #fff; border-radius: 16px; padding: 34px 32px 28px;
    box-shadow: 0 24px 60px rgba(6, 16, 28, .38), 0 2px 6px rgba(6, 16, 28, .2);
    animation: rise .35s cubic-bezier(.2,.7,.3,1);
  }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @media (prefers-reduced-motion: reduce) { .card { animation: none; } }

  .logo { display: flex; align-items: center; gap: 11px; margin-bottom: 6px; }
  .logo .mark {
    flex: 0 0 auto; /* 窄屏下别被 flex 压扁 */
    width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), #e07b00); font-size: 21px;
    box-shadow: 0 4px 12px rgba(255,153,0,.35);
  }
  h1 { margin: 0; font-size: 19px; letter-spacing: .2px; }
  .sub { color: var(--ink2); font-size: 13px; margin: 2px 0 24px; }

  .field { margin-bottom: 15px; }
  label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink2); margin-bottom: 6px; }
  input {
    width: 100%; height: 42px; padding: 0 13px; color: var(--ink);
    /* ⚠️ 必须 >= 16px：iOS Safari 对字号更小的输入框会自动放大整个页面 */
    font-size: 16px;
    border: 1px solid var(--line); border-radius: 9px; background: #fff; outline: none;
    transition: border-color .15s, box-shadow .15s;
  }
  input:focus-visible {
    border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(20,110,180,.18);
  }
  input:disabled { background: #f7f9fb; color: var(--ink2); }

  /* 密码可见切换 */
  .pw-wrap { position: relative; }
  .pw-wrap input { padding-right: 46px; }
  .pw-toggle {
    position: absolute; top: 0; right: 0; width: 42px; height: 42px;
    display: grid; place-items: center; padding: 0;
    background: none; border: 0; box-shadow: none; cursor: pointer;
    font-size: 17px; line-height: 1; color: var(--ink2); opacity: .75;
  }
  .pw-toggle:hover:not(:disabled) { opacity: 1; box-shadow: none; }
  .pw-toggle:active:not(:disabled) { transform: none; }
  .pw-toggle:focus-visible { outline: 2px solid var(--accent2); outline-offset: -4px; border-radius: 9px; }

  /* 提交按钮之外的按钮不要继承整块渐变样式 */
  button.pw-toggle { width: 42px; height: 42px; border-radius: 9px; }

  .row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 20px; }
  .remember { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink2); cursor: pointer; }
  .remember input { width: 16px; height: 16px; accent-color: var(--accent2); margin: 0; }

  button {
    width: 100%; height: 44px; border: 0; border-radius: 9px; cursor: pointer;
    background: linear-gradient(135deg, var(--accent), #f08800); color: #1a1206;
    font-size: 15.5px; font-weight: 700; letter-spacing: .3px;
    box-shadow: 0 4px 14px rgba(255,153,0,.32);
    transition: transform .08s, box-shadow .15s, opacity .15s;
  }
  button:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(255,153,0,.42); }
  button:active:not(:disabled) { transform: translateY(1px); }
  button:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }
  button:disabled:active { transform: none; }
  button:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }

  .msg {
    margin: 0 0 16px; padding: 10px 13px; border-radius: 9px; font-size: 13.5px;
    background: var(--bad-bg); color: var(--bad); border: 1px solid #f6cccc;
    display: none; align-items: flex-start; gap: 8px;
  }
  .msg.show { display: flex; }
  .msg.ok { background: #eaf7ef; color: #0a5c34; border-color: #c9e9d6; }

  .foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink2); font-size: 12px; text-align: center; line-height: 1.7; }
  .foot code { background: #f1f4f8; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
  .caps { font-size: 12px; color: #8a5a12; background: #fdf3e0; border: 1px solid #f0dcb4; border-radius: 7px; padding: 6px 10px; margin-top: 8px; display: none; }
  .caps.show { display: block; }

/* 版本号：低调一点，但必须能看清（排查问题时要让用户念出来） */
.foot .ver { font-size: 11px; opacity: .55; letter-spacing: .02em; }
/* ⚠️ 不要引用 style.css 里的 --mono：登录页**不加载** style.css，
   那个变量在这里是未定义的（引用未定义变量会让整条声明失效）。
   自己的字体栈自己写全。 */
.foot .ver b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; }
