@import "/static/tokens.css";

/* ---------------------------------------------------------------- buttons
   Full family, not just the bare .btn: the sign in and password pages never
   load app.css (it stays behind the gate), so the primary action here needs
   its own working, correctly coloured .btn-primary rather than a plain box.
   Duplicated verbatim in app.css for the same reason in the other direction. */
.btn {
  border: 1px solid var(--border2); background: var(--ground); color: var(--text);
  height: 33px; padding: 0 13px; border-radius: var(--r); cursor: pointer;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--surface); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); border-color: var(--accent-d); }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12.5px; font-weight: 600; }
.btn-ghost { border-color: transparent; background: none; }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { color: var(--accent-d); border-color: #E9B5B0; }
.btn-danger:hover { background: var(--accent-w); }

/* ------------------------------------------------------------------ helper
   Duplicated verbatim in app.css: both bundles carry paragraphs of this
   class and neither page loads the other's stylesheet. */
.helper { font-size: 13px; color: var(--muted); }
/* Was an inline style="margin:0" in the approved mockup (the note under the
   sign in form). Moved to a class so the CSP's style-src 'self' is honoured. */
.helper-tight { margin: 0; }
/* Was an inline style="color:var(--accent-d)" on the error lines in the task
   brief's markup. Shared by the sign in and password forms' error paragraphs. */
.form-error { color: var(--accent-d); }

/* -------------------------------------------------------------- login */
.login { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 620px; }
.login-art { background: var(--chrome); color: #fff; padding: 54px 46px; display: flex; flex-direction: column; justify-content: space-between; gap: 38px; }
.login-art h1 { margin: 0 0 14px; font-size: 38px; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; font-weight: 700; }
.login-art p { margin: 0; color: #BFBFBF; max-width: 42ch; font-size: 16px; }
.login-rule { width: 56px; height: 4px; background: var(--accent); margin-bottom: 24px; }
.login-art ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.login-art li { color: #DEDEDE; font-size: 14.5px; display: flex; gap: 10px; align-items: baseline; }
.login-art li::before { content: ""; width: 6px; height: 6px; background: var(--accent); flex: none; }
/* Was an inline style="font-size:13px;color:#8C8C8C" on the url line in the
   approved mockup. Moved to a class so the CSP's style-src 'self' is honoured. */
.login-url { font-size: 13px; color: #8C8C8C; }

/* The circular mark: right of the panel and large, as Yen placed it. No filter,
   because this is the white master from the brand assets rather than the dark
   one recoloured. margin-right keeps it clear of the panel edge at full width,
   and it drops back to the left on a narrow screen, where "over to the right"
   stops meaning anything. */
.login-logo { display: block; align-self: flex-end; line-height: 0; margin-right: 6%; }
.login-logo img { width: 200px; max-width: 42vw; height: auto; opacity: .95; transition: opacity .15s ease; }
.login-logo:hover img { opacity: 1; }
.login-logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; border-radius: 50%; }

/* A checkbox and its words as one hit target, so the label is clickable too. */
.checkline {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: 14px; color: var(--muted); margin: -6px 0 0;
}
.checkline input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex: none; }
.checkline:hover { color: var(--text); }

.login-form { padding: 54px 46px; display: flex; flex-direction: column; justify-content: center; gap: 17px; background: var(--ground); }
.login-form h2 { margin: 0; font-size: 25px; letter-spacing: -.015em; }
.login-form .sub { margin: 0; color: var(--muted); }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 13px; font-weight: 600; }
.form-field input { height: 40px; padding: 0 12px; border: 1px solid var(--border2); border-radius: var(--r); background: var(--ground); }
.login-form .btn { height: 42px; font-size: 15px; }
.nolink { border-top: 1px solid var(--border); padding-top: 16px; display: flex; flex-direction: column; gap: 9px; }

/* The password page carries no art panel, just one form on its own page:
   this reuses the .login-form component from the two column layout above
   rather than inventing a new one, centred in a plain wrapper. */
.solo-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--surface2); padding: 24px; }
.solo-wrap .login-form { width: 100%; max-width: 420px; border: 1px solid var(--border); border-radius: var(--r); box-shadow: 0 4px 14px rgba(0,0,0,.10); }

/* -------------------------------------------------------------- scrim
   Duplicated verbatim in app.css: the reset password modal here shares the
   same backdrop the library's drawer and modals use, and this page never
   loads app.css. */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.34); z-index: 100; opacity: 0; pointer-events: none; transition: opacity .16s ease; }
.scrim.on { opacity: 1; pointer-events: auto; }

/* -------------------------------------------------------------- modal
   Duplicated verbatim in app.css (which also carries .secret, not needed
   here: no screen behind the gate this page can reach shows one). */
.modal {
  position: fixed; z-index: 120; left: 50%; top: 8vh; transform: translateX(-50%) scale(.98);
  width: min(520px, calc(100vw - 32px)); background: var(--ground);
  border: 1px solid var(--border2); border-radius: var(--r); box-shadow: 0 18px 50px rgba(0,0,0,.22);
  opacity: 0; pointer-events: none; transition: opacity .14s ease, transform .14s ease;
  max-height: 84vh; overflow-y: auto;
}
.modal.on { opacity: 1; pointer-events: auto; transform: translateX(-50%) scale(1); }
.modal-head { padding: 16px 18px 0; }
.modal-head h2 { margin: 0 0 4px; font-size: 19px; }
.modal-head p { margin: 0; color: var(--muted); font-size: 14px; }
.modal-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.modal-body textarea, .modal-body input[type=text] { width: 100%; border: 1px solid var(--border2); border-radius: var(--r); padding: 9px 11px; background: var(--ground); resize: vertical; }
.modal-foot { padding: 0 18px 16px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.sent { color: var(--ok); font-size: 14px; font-weight: 600; margin-right: auto; }

/* --------------------------------------------------------------- toast
   Duplicated verbatim in app.css. */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(10px); background: var(--chrome); color: #fff; padding: 10px 16px; border-radius: var(--r); font-size: 14px; z-index: 150; opacity: 0; pointer-events: none; transition: all .16s ease; }
.toast.on { opacity: 1; transform: translateX(-50%); }

/* --------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 34px 22px; }
  .login-form { padding: 30px 22px; }
  /* One column, so there is no "right hand side" to sit on: the mark goes back
     to the left with everything else, and shrinks so it does not become the
     whole first screen on a phone. */
  .login-logo { align-self: flex-start; margin-right: 0; }
  .login-logo img { width: 120px; }
}
