/* Passwords and Authenticator pages (inside the dashboard, beside the rail). */

.rail-apps { padding-top: 14px; border-top: 1px solid var(--tile-edge); }

/* Website: no PC dashboard and no email settings (those are desktop-only). */
.web .desktop-only, .web #dash-scroll { display: none !important; }
.web .rail-apps { padding-top: 0; border-top: 0; }
.footer-link { color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.footer-link:hover { color: var(--text); }
.page { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; padding: 2px 4px 2px 2px; animation: page-in 0.45s var(--spring); }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }

.page-head { display: flex; align-items: center; gap: 14px; padding: 6px 4px 0; }
.page-title { margin-right: auto; min-width: 0; }
.page-title h1 { margin: 0; font-size: 26px; font-weight: 700; }
.page-title .muted-sm { margin: 0; }

#view-home .pill.compact { width: auto; margin-top: 0; padding: 8px 16px; font-size: 13px; }
#view-home .pill.compact.ghost { background: transparent; border-color: rgba(255, 255, 255, 0.22); box-shadow: none; }
#view-home .pill.compact.ghost:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.05); }
#view-home .pill.compact.danger { color: var(--danger); border-color: rgba(255, 123, 123, 0.4); }
#view-home .pill.compact.danger.confirm { background: rgba(255, 123, 123, 0.16); border-color: var(--danger); }

.search { display: flex; align-items: center; gap: 8px; width: min(280px, 36vw); padding: 7px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--tile-edge); color: var(--muted); transition: border-color 0.2s; }
.search:focus-within { border-color: rgba(255, 255, 255, 0.4); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }

.empty { color: var(--muted); text-align: center; margin: 0; padding: 18px 10px; font-size: 13px; }
.empty.big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; flex: 1; padding: 40px 20px; }
.empty.big .ico { width: 38px; height: 38px; stroke: rgba(155, 116, 230, 0.7); stroke-width: 1.4; }
.empty.big p { margin: 0; max-width: 280px; }

/* ---- passwords ---- */

.page-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr); gap: 16px; }
.page-split .tile:hover { translate: none; }
.list-tile { padding: 10px; overflow-y: auto; }
.detail-tile { display: flex; flex-direction: column; padding: 24px 28px; overflow-y: auto; }

.item-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.item-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 14px; background: transparent; text-align: left; cursor: pointer; transition: background 0.2s; }
.item-row:hover { background: rgba(255, 255, 255, 0.05); }
.item-row.active { background: rgba(155, 116, 230, 0.18); box-shadow: inset 0 0 0 1px rgba(155, 116, 230, 0.4); }
.item-txt { min-width: 0; display: flex; flex-direction: column; }
.item-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-txt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; background: #6a3fc4; text-transform: uppercase; }
.avatar.lg { width: 52px; height: 52px; border-radius: 16px; font-size: 22px; }

.view-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.view-title { min-width: 0; }
.view-title h2 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.view-title p { margin: 0; }

.fields { margin: 0 0 14px; display: flex; flex-direction: column; gap: 2px; }
.frow { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--tile-edge); }
.frow dt { font-size: 12px; color: var(--muted); }
.frow dd { margin: 0; display: flex; align-items: center; gap: 6px; min-width: 0; }
.frow dd > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mono { font-family: "Cascadia Mono", Consolas, monospace; letter-spacing: 0.5px; }
.notes { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: rgba(241, 241, 244, 0.85); }

.icon-btn { position: relative; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.05); color: var(--muted); cursor: pointer; transition: background 0.2s, color 0.2s; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.icon-btn.done { color: var(--ok); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }

.login-form { gap: 14px; }
.login-form h2 { margin: 0 0 4px; font-size: 20px; }
.field.area { align-items: flex-start; }
.field.area .ico { margin-top: 6px; }
.field textarea { flex: 1; min-width: 0; resize: vertical; min-height: 64px; max-height: 260px; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; padding: 4px 0; }
.field textarea::placeholder { color: var(--faint); }
.login-form .error { margin-top: -4px; }

.gen { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: -4px; }
.gen-len { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.gen-len b { min-width: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.gen-len input { width: 110px; accent-color: var(--accent); }
.check.sm { align-items: center; gap: 6px; font-size: 12px; }
.check.sm input { margin: 0; }

/* ---- authenticator ---- */

.totp-form { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.totp-form:hover { translate: none; }
#totp-scan { align-self: flex-start; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; align-content: start; }
.code-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; }
.code-top { display: flex; align-items: center; gap: 10px; }
.code-names { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.code-names b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-names small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-card .icon-btn { opacity: 0; transition: opacity 0.2s, background 0.2s, color 0.2s; }
.code-card:hover .icon-btn, .code-card .icon-btn:focus-visible, .code-card .icon-btn.confirm { opacity: 1; }
.code-card .icon-btn.confirm { color: var(--danger); background: rgba(255, 123, 123, 0.16); }

.code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.code { border: 0; background: transparent; padding: 0; cursor: pointer; font-size: 32px; font-weight: 700; letter-spacing: 2px; font-variant-numeric: tabular-nums; color: var(--text); transition: color 0.2s; }
.code:hover { color: #d8c6ff; }
.code.copied { color: var(--ok); }
.code.low { color: #ffb3a7; }

.timer { position: relative; flex: none; width: 38px; height: 38px; }
.timer svg { width: 100%; height: 100%; rotate: -90deg; }
.timer-track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 3.5; }
.timer-bar { fill: none; stroke: var(--c1); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 100.5; transition: stroke-dashoffset 1s linear, stroke 0.3s; }
.timer.low .timer-bar { stroke: #ff8f7a; }
.timer span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- notes ---- */

.item-txt small.preview { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-editor { flex: 1; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.note-title { background: transparent; border: 0; border-bottom: 1px solid var(--tile-edge); outline: 0; color: var(--text); font: inherit; font-size: 22px; font-weight: 600; padding: 2px 0 10px; }
.note-title::placeholder, .note-body::placeholder { color: var(--faint); }
.note-title:focus { border-bottom-color: rgba(255, 255, 255, 0.35); }
.note-body { flex: 1; min-height: 240px; resize: none; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14.5px; line-height: 1.65; }
.note-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--tile-edge); }

/* ---- files ---- */

.quota { padding: 14px 20px; }
.quota:hover, .files-tile:hover { translate: none; }
.quota .meter-fill { background: linear-gradient(90deg, #6a3fc4, var(--c1)); box-shadow: 0 0 10px rgba(155, 116, 230, 0.5); transition: width 0.6s var(--spring); }
.quota .meter-fill.warn { background: linear-gradient(90deg, #c2552f, #ff8b5c); }
.files-tile { position: relative; flex: 1; min-height: 260px; display: flex; flex-direction: column; padding: 10px; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; transition: background 0.2s; }
.file-row:hover { background: rgba(255, 255, 255, 0.05); }
.file-ico { position: relative; flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(155, 116, 230, 0.14); }
.file-ico .ico { stroke: #c4a8f7; }
.file-ico i { position: absolute; bottom: -3px; right: -6px; padding: 0 4px; border-radius: 5px; font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; background: #6a3fc4; color: #fff; max-width: 40px; overflow: hidden; }
.file-row .item-txt { flex: 1; }
.file-row .icon-btn { opacity: 0.55; }
.file-row:hover .icon-btn, .file-row .icon-btn:focus-visible, .file-row .icon-btn.confirm { opacity: 1; }
.file-row .icon-btn.confirm { color: var(--danger); background: rgba(255, 123, 123, 0.16); }
.drop-hint { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-radius: 22px; border: 2px dashed rgba(155, 116, 230, 0.8); background: rgba(40, 26, 80, 0.75); font-weight: 600; pointer-events: none; }
.drop-hint .ico { width: 32px; height: 32px; stroke: #d8c6ff; }

/* ---- toast ---- */

.toast { position: fixed; left: 50%; bottom: 28px; translate: -50% 0; margin: 0; padding: 9px 18px; border-radius: 999px; background: rgba(20, 20, 26, 0.95); border: 1px solid rgba(110, 231, 160, 0.4); color: var(--text); font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); z-index: 20; animation: toast-in 0.35s var(--spring); pointer-events: none; }
.toast.bad { border-color: rgba(255, 123, 123, 0.5); }
@keyframes toast-in { from { opacity: 0; translate: -50% 12px; } }

@media (max-width: 900px) {
  .page-split { grid-template-columns: minmax(0, 1fr); }
  .list-tile { max-height: 260px; }
  .page-head { flex-wrap: wrap; }
  .search { width: 100%; order: 3; }
  .two { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .page, .toast { animation: none; }
  .timer-bar { transition: none; }
}

/* Lock screen: Windows Hello as the alternative to the password (desktop app). */
.quick-or .or { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; font-size: 12px; color: var(--faint); }
.quick-or .or::before, .quick-or .or::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.14); }
.quick-or .pill { width: 100%; }
#login-quick-row { margin: 2px 0 10px; }
#hello-finish { margin-top: 10px; }
#btn-lock-hello { width: 100%; margin-top: 0; }
.quick-or .error { margin-top: 8px; }

/* Account: signed-in devices. */
.devices { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.devices li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.03); }
.devices li.current { border-color: rgba(255, 255, 255, 0.25); }
.devices li div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.devices b { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.devices small { font-size: 12px; color: var(--muted); }
.devices .link { flex: none; font-size: 12.5px; }

/* Desktop app: the update screen shown before sign-in. */
.update-track { height: 8px; margin: 18px 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.update-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #6a3fc4, #b997f5); transition: width 0.2s; }
#btn-update-skip { width: 100%; }

/* Passwords > Cards. */
#pw-tabs { flex: none; }
.tab { font: inherit; font-size: 12px; }
.card-chip .ico { stroke: #fff; width: 18px; height: 18px; }
.card-chip, .card-face { background: linear-gradient(145deg, #4a4a58, #23232c); }
[data-brand="Visa"] { background: linear-gradient(145deg, #2a4bd7, #14217a); }
[data-brand="Mastercard"] { background: linear-gradient(145deg, #e0662a, #8f1f2b); }
[data-brand="American Express"] { background: linear-gradient(145deg, #2f8fd0, #155a8a); }
[data-brand="Discover"] { background: linear-gradient(145deg, #f08a24, #8a4a12); }
[data-brand="JCB"], [data-brand="Diners Club"] { background: linear-gradient(145deg, #2a9a6a, #145a3e); }
.item-txt small.bad { color: #ff8a8a; }

.card-face {
  position: relative;
  max-width: 360px;
  aspect-ratio: 1.586;
  margin-bottom: 18px;
  padding: 20px 22px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 14px 30px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.card-face::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, 0.22), transparent 55%); pointer-events: none; }
.cf-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cf-top b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-top span { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; opacity: 0.9; white-space: nowrap; }
.cf-number { font-size: clamp(15px, 4.6vw, 21px); letter-spacing: 0.08em; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.cf-bottom { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; letter-spacing: 0.06em; opacity: 0.92; }
.cf-bottom span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .field-pair { grid-template-columns: 1fr; } }

/* Links to the Privacy Policy and Terms (sign-up, Account). */
.legal-note { margin-top: 10px; }
.legal-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.legal-note a:hover { color: var(--text); }

/* Account > Your data: the warning about the unencrypted export. */
.hint.warn { color: #ffc27a; margin-top: 6px; }
#form-export .hint:first-child { margin-bottom: 0; }
