* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f7;
  color: #1c1c1e;
}
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}
h1 { font-size: 24px; font-weight: 600; margin: 0; }

.pin-screen {
  text-align: center;
  padding-top: 80px;
}
.subtitle { color: #6e6e73; margin-bottom: 24px; }
#pinInput {
  font-size: 28px;
  letter-spacing: 12px;
  text-align: center;
  width: 160px;
  padding: 12px;
  border: 1px solid #d1d1d6;
  border-radius: 10px;
  margin-bottom: 16px;
}
button {
  cursor: pointer;
  font-size: 16px;
  border: none;
  border-radius: 10px;
}
#unlockBtn {
  display: block;
  margin: 0 auto;
  padding: 12px 32px;
  background: #0071e3;
  color: white;
  font-weight: 600;
}
.error { color: #d70015; margin-top: 12px; min-height: 20px; }

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.link-btn {
  background: none;
  color: #0071e3;
  font-size: 14px;
  padding: 4px;
}

.add-btn {
  width: 100%;
  padding: 14px;
  background: #0071e3;
  color: white;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 20px;
}

.card-list { display: flex; flex-direction: column; gap: 12px; }
.password-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.card-platform { font-weight: 600; font-size: 16px; }
.card-username { color: #6e6e73; font-size: 14px; margin-top: 2px; }
.card-password { color: #a1a1a6; font-size: 14px; margin-top: 2px; letter-spacing: 2px; }
.edit-btn {
  background: #f2f2f7;
  color: #0071e3;
  padding: 8px 16px;
  font-weight: 500;
}
.empty-state { text-align: center; color: #6e6e73; margin-top: 40px; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: white;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
}
.modal h2 { margin: 0 0 16px; font-size: 18px; }
.modal label { display: block; font-size: 13px; color: #6e6e73; margin: 12px 0 4px; }
.modal input[type="text"], .modal input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d1d6;
  border-radius: 8px;
  font-size: 16px;
}
.password-row { display: flex; gap: 8px; align-items: center; }
.password-row input { flex: 1; }
.modal-actions { display: flex; gap: 12px; margin-top: 24px; }
.primary-btn, .secondary-btn { flex: 1; padding: 12px; font-weight: 600; }
.primary-btn { background: #0071e3; color: white; }
.secondary-btn { background: #f2f2f7; color: #1c1c1e; }
