/* ============================================================
   Реестр паролей. Надстройка над hub.css — палитра, шрифт и
   скругления оттуда же, здесь только своё.
   ============================================================ */

.vault { padding-bottom: 40px; }

.v-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; padding-top: 26px; padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.v-add {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--purple); color: var(--on-purple); font-size: 16px;
  transition: background-color .15s, transform .15s;
}
.v-add:hover { background: var(--purple-600); transform: translateY(-1px); }

.v-note { color: var(--muted); font-size: 15px; padding: 22px 0; }
.v-err {
  margin-top: 10px; color: var(--danger); font-size: 15px;
}

/* ---------- вход ---------- */
.v-login {
  max-width: 400px; margin: 40px auto; padding: 30px;
  background: var(--card); border-radius: var(--r-card);
  display: flex; flex-direction: column; gap: 12px; text-align: center;
}
.v-login h2 { font-size: 26px; color: var(--purple); }
.v-login .v-note { padding: 0 0 8px; }
.v-login-ico {
  display: inline-grid; place-items: center; margin: 0 auto 6px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--purple); color: var(--on-purple);
}
.v-login-ico .ico { width: 24px; height: 24px; }

/* ---------- поля ---------- */
.v-input {
  width: 100%; height: 46px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); color: var(--ink);
  font: inherit; font-size: 16px;
}
.v-input::placeholder { color: var(--muted); }
.v-input:focus { outline: none; border-color: var(--purple); }
.v-area { height: auto; padding: 12px 16px; line-height: 1.35; resize: vertical; }
.v-search { margin: 22px 0 14px; }
.v-row { display: flex; gap: 8px; align-items: center; }
.v-row .v-input { flex: 1; }
.v-label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.v-label span { color: var(--purple); }

.v-btn {
  height: 46px; padding: 0 22px; border-radius: 999px;
  background: var(--purple); color: var(--on-purple); font-size: 16px;
  transition: background-color .15s, opacity .15s;
}
.v-btn:hover { background: var(--purple-600); }
.v-btn[disabled] { opacity: .5; }
.v-btn-ghost { background: none; color: var(--danger); border: 1px solid var(--line); }
.v-btn-ghost:hover { background: none; border-color: var(--danger); }

/* ---------- список ---------- */
.v-list { display: flex; flex-direction: column; gap: 10px; }
.v-item {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 6px 16px;
  padding: 18px 22px; background: var(--card); border-radius: var(--r-card);
}
.v-title { font-size: 19px; color: var(--purple); }
.v-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; font-size: 14px; color: var(--muted); }
.v-meta a:hover { color: var(--purple); }
.v-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.v-tag {
  font-size: 12px; letter-spacing: .04em; padding: 3px 10px;
  border-radius: 999px; background: var(--card-2); color: var(--muted);
}
.v-acts { display: flex; align-items: center; gap: 6px; }

/* Пароль показан: моноширинный, чтобы не спутать O и 0, l и 1. */
.v-secret {
  grid-column: 1 / -1; margin-top: 12px; padding: 12px 16px;
  border-radius: 14px; background: var(--bg); border: 1px dashed var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px; color: var(--ink); word-break: break-all;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.v-secret-note {
  grid-column: 1 / -1; margin-top: 8px; font-size: 15px; color: var(--ink);
  white-space: pre-wrap;
}
.v-timer { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---------- окна ---------- */
.v-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.v-back { position: absolute; inset: 0; background: rgba(60,40,25,.45); }
.v-sheet {
  position: relative; width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  padding: 26px 28px 28px; background: var(--bg); border-radius: var(--r-card);
  box-shadow: 0 20px 60px rgba(90,50,110,.25);
  display: flex; flex-direction: column;
}
.v-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.v-sheet-top h2 { font-size: 24px; color: var(--purple); }
.v-sheet-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.v-sheet-foot .v-btn:only-child { margin-left: auto; }

/* ---------- журнал и доступы ---------- */
.v-log { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.v-log-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.v-log-row:last-child { border-bottom: none; }
.v-log-when { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.v-log-act { color: var(--muted); font-size: 13px; white-space: nowrap; }
.v-log-act[data-a="view"] { color: var(--purple); }
.v-log-act[data-a="delete"], .v-log-act[data-a="revoke"] { color: var(--danger); }

.v-user { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.v-user:last-child { border-bottom: none; }
.v-user b { font-weight: 400; color: var(--purple); }
.v-user span { display: block; font-size: 13px; color: var(--muted); }

/* Переключатель доступа: маленький и однозначный, без «сохранить». */
.v-switch { width: 52px; height: 30px; border-radius: 999px; background: var(--track); position: relative; transition: background-color .15s; flex: none; }
.v-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); transition: transform .15s; }
.v-switch[aria-pressed="true"] { background: var(--purple); }
.v-switch[aria-pressed="true"]::after { transform: translateX(22px); }
.v-switch[disabled] { opacity: .4; }

@media (max-width: 720px) {
  .v-item { grid-template-columns: 1fr; }
  .v-acts { justify-content: flex-end; }
  .v-secret { flex-direction: column; align-items: flex-start; }
}
