/* CasaDurante — Web: tema "Focolare" (mirror di Design/Theme.swift, caso .focolare). */
:root {
  --bg: #0b0d08;
  --surface: #141a0f;
  --surface2: #1b2213;
  --line: #28331a;
  --text: #f3ede6;
  --mut: #9fb08c;
  --soft: #b89b84;
  --accent: #d98a4e;
  --accent-ink: #1a120c;
  --accent2: #8fd14f;
  --card: #1c130d;
  --card-line: #3a2417;
  --danger: #e24b4b;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: radial-gradient(ellipse at top, #2f3a2233 0%, transparent 60%), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
#app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.topbar-brand { font-size: 18px; font-weight: 800; }
.brand-c { font-weight: 800; }
.brand-d { font-weight: 800; color: var(--accent); }

.screen { flex: 1; display: flex; flex-direction: column; padding: 18px; max-width: 520px; margin: 0 auto; width: 100%; }
.screen-center { align-items: center; justify-content: center; text-align: center; gap: 14px; }

.brand { font-size: 34px; margin-top: 10px; }
.tagline { color: var(--soft); font-style: italic; margin: 0 0 10px; }
.hint { color: var(--mut); font-size: 13px; }
.hint.center { text-align: center; margin-top: 40px; }
.error { color: var(--danger); font-size: 13px; }

.btn {
  font: inherit; font-weight: 700; font-size: 15px;
  padding: 11px 22px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-ms { background: #2f3a7a; color: #fff; border-color: #2f3a7a; }
.btn-link { background: none; border: none; color: var(--mut); cursor: pointer; font: inherit; }
.btn-icon { background: none; border: none; color: var(--text); font-size: 18px; cursor: pointer; padding: 4px 8px; }

.pin-input {
  font: inherit; font-size: 22px; letter-spacing: 6px; text-align: center;
  width: 220px; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
}
.lock-icon { font-size: 44px; }

.vault-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.vault-header h2 { margin: 0; font-size: 20px; }
.spacer { flex: 1; }

.entry-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.entry-row {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px; border-radius: 13px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; font: inherit;
}
.entry-icon { font-size: 18px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: var(--surface2); border-radius: 10px; }
.entry-texts { display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.entry-title { font-weight: 700; font-size: 15px; }
.entry-subtitle { font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.add-menu { position: fixed; bottom: 24px; right: 24px; }
.fab {
  width: 54px; height: 54px; border-radius: 50%; border: none;
  background: var(--accent); color: var(--accent-ink); font-size: 24px; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 14px #0007;
}
.add-menu-options {
  display: none; position: absolute; bottom: 64px; right: 0;
  background: var(--card); border: 1px solid var(--card-line); border-radius: 12px;
  padding: 6px; min-width: 200px; flex-direction: column; gap: 2px;
}
.add-menu.open .add-menu-options { display: flex; }
.add-menu-option {
  background: none; border: none; color: var(--text); text-align: left;
  padding: 9px 12px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer;
}
.add-menu-option:hover { background: var(--surface2); }

.detail-card {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 14px;
  padding: 16px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px;
}
.detail-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.detail-label { color: var(--mut); }
.masked-value { font-family: ui-monospace, monospace; }
.notes { color: var(--soft); font-size: 13px; white-space: pre-wrap; }
.code { font-family: ui-monospace, monospace; font-size: 16px; }

.actions-row { display: flex; gap: 10px; margin-top: 16px; }

.edit-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mut); }
.field input, .field select {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
}
.field-checkbox { flex-direction: row; align-items: center; gap: 8px; }
.field-checkbox input { width: auto; }
