/* Security (/dashboard/profile/security/): sign-in protection (the 2FA method, its setup panels and recovery codes),
   change password and your data. Builds on /css/dash.css. */

/* Where the account stands */
.sec-status { padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-2); }
.sec-status p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.sec-status .sec-rec { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sec-rec > span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.sec-rec > span .i { color: var(--muted); }
.sec-rec b { color: var(--text); font-weight: 600; }

/* The four methods */
.sec-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.sec-opts .opt { align-items: flex-start; cursor: pointer; }
.sec-opts .opt-t b { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.twofactor-badge { display: none; }
.twofactor-choice.current .twofactor-badge { display: inline-flex; height: 21px; padding: 0 8px; font-size: 11.5px; }

/* Setup panels under the methods */
.sec-panel { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.sec-panel-t { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--text); }
.sec-panel > .note + .chk { margin-top: 14px; }

.sec-auth { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 22px; align-items: start; }
.sec-qr { width: 184px; padding: 10px; border-radius: 14px; background: #fff; }
.sec-qr svg { display: block; width: 100%; height: auto; }
.sec-auth .how li { color: var(--muted); }
.sec-key { margin-top: 9px; }
.sec-key code { letter-spacing: .04em; }
.sec-open { display: block; margin-top: 9px; font-size: 13px; }
.sec-newcode { margin-top: 9px; max-width: 280px; }
.sec-tg { display: block; margin-top: 10px; }
.sec-tg img { border-radius: 50%; }
.sec-wait { display: block; margin-top: 4px; color: var(--text-2); }
.sec-retry { display: block; margin-top: 6px; }

/* Confirm a change */
.sec-confirm .txt { margin-bottom: 14px; }
.sec-confirm .field + .field { margin-top: 12px; }
.sec-confirm .input > .i { color: var(--muted-2); }
.sec-toggle { margin: 10px 2px 0; }
.sec-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Fresh recovery codes */
.sec-codes { margin: 16px 0 0; padding: 18px; border-radius: 16px; border: 1px solid rgba(61, 214, 140, .3); background: linear-gradient(180deg, rgba(61, 214, 140, .06), rgba(61, 214, 140, 0) 160px), var(--surface); }
.sec-codes-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.sec-codes-h h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text); }
.sec-codes-h p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.sec-code-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; counter-reset: code; }
.sec-code-list li { counter-increment: code; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-2); font-family: 'YCP Mono', ui-monospace, monospace; font-size: 14.5px; letter-spacing: .06em; color: var(--text); }
.sec-code-list li::before { content: counter(code); min-width: 16px; font-family: 'YCP UI', sans-serif; font-size: 11.5px; letter-spacing: 0; color: var(--muted-2); }
.sec-saved { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* Change password */
.sec-pw-err { margin-top: 12px; }
.sec-pw-go { margin-top: 16px; }

/* Your data */
.sec-data .lst-r { padding: 11px 0; }
.sec-data .lst-r > .i { color: var(--muted); }
.sec-data .lst-t b { font-size: 14px; }
.ycp .sec-support { width: 100%; margin-top: 12px; }

@media (max-width: 1100px) {
  .sec-opts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 920px) {
  .sec-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 750px) {
  /* The four profile tabs fit a phone's width without their icons */
  .dp-tabs { gap: 2px; }
  .ycp .dp-tabs a { padding: 0 6px; font-size: 13px; }
  .dp-tabs a .i { display: none; }
  .sec-opts { grid-template-columns: minmax(0, 1fr); }
  .sec-auth { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sec-qr { margin: 0 auto; }
  .sec-newcode { max-width: none; }
  .sec-code-list li { padding: 9px 10px; font-size: 13.5px; }
  .sec-saved .btn { width: 100%; }
}

/* Code boxes: the code itself in the mono face, the label and the button in the normal one */
.sec .card-h { align-items: flex-start; }
.ycp .sec-codein input { font-family: 'YCP Mono', ui-monospace, monospace; font-size: 14.5px; letter-spacing: .08em; }
.ycp .sec-codein input::placeholder { letter-spacing: .08em; }
