/*
 * 로그인 화면 전용.
 *
 * 파이썬 monitoring-stock 의 view/login.html <style> 을 그대로 옮긴 것이다.
 * 두 앱이 같은 옷을 입어야 하므로 값을 임의로 바꾸지 않는다.
 *
 * 이 화면은 상단바가 없다. body 를 화면 가운데 정렬로 쓰므로,
 * 다른 화면과 섞이지 않도록 로그인 화면에서만 읽는다.
 */
body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .box { width: 100%; max-width: 400px; }
  .brand {
    text-align: center;
    margin-bottom: 20px;
  }
  .brand .icon { font-size: 34px; line-height: 1; }
  .brand .name { font-size: 19px; font-weight: 700; margin-top: 8px; letter-spacing: -0.02em; }
  .brand .desc { color: var(--muted); font-size: 12px; margin-top: 4px; }

  .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 22px;
  }
  .row { margin-bottom: 12px; }
  .row label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 5px;
  }
  .row input {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
  }
  .row input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
  .row .help { font-size: 11px; color: var(--muted); margin-top: 4px; }

  .submit {
    width: 100%;
    border: none;
    background: var(--accent);
    color: #fff;
    border-radius: 9px;
    padding: 11px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    margin-top: 4px;
  }
  .submit:hover { filter: brightness(1.08); }
  .submit:disabled { opacity: 0.6; cursor: progress; }

  .msg {
    display: none;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 12.5px;
    margin-bottom: 12px;
    line-height: 1.45;
  }
  .msg.show { display: block; }
  .msg.error { background: var(--up-soft); color: var(--up); }
  .msg.info { background: var(--accent-soft); color: var(--accent); }
  .msg.warn { background: var(--warn-soft); color: var(--warn); }

  .register-only { display: none; }
  body.mode-register .register-only { display: block; }
  body.mode-register .login-only { display: none; }

  /* 2단계 인증 단계 - 코드 입력만 남기고 나머지는 감춘다 */
  .totp-only { display: none; }
  body.mode-totp .totp-only { display: block; }
  body.mode-totp .login-only,
  body.mode-totp .register-only { display: none; }
  #code {
    font-size: 24px; letter-spacing: 10px; text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  }

  .back {
    display: none;
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
  }
  body.mode-register .back,
  body.mode-totp .back { display: block; }

  .foot {
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    margin-top: 16px;
    line-height: 1.6;
  }
  .lock { display: inline-flex; align-items: center; gap: 4px; }
