* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f6f5f3;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1f2328;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px;
  min-height: 100vh;
}

.card {
  background: #fff;
  border: 1px solid #e2e0dc;
  border-radius: 10px;
  padding: 28px;
  width: 100%;
  max-width: 360px;
}

.auth-card { margin-top: 60px; }

.title { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.subtitle { font-size: 13px; color: #6b7280; margin-bottom: 20px; }

label { display: block; font-size: 13px; font-weight: 500; margin: 14px 0 6px; }

input {
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid #d7d5d0;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

button { font-family: inherit; cursor: pointer; }

.primary-btn {
  width: 100%;
  margin-top: 20px;
  padding: 10px 12px;
  border-radius: 6px;
  border: none;
  background: #2f6feb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.error { color: #c0362c; font-size: 13px; margin-top: 10px; }
.hidden { display: none !important; }

/* ---------------- dashboard layout with sidebar ---------------- */
.dashboard-body {
  flex-direction: row;
  align-items: flex-start;
  padding: 24px;
  gap: 24px;
}

.sidebar {
  position: sticky;
  top: 24px;
  background: #fff;
  border: 1px solid #e2e0dc;
  border-radius: 12px;
  padding: 12px;
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.side-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.side-btn:hover { background: #f6f5f3; }

.side-btn.active {
  background: #eaf0fe;
  color: #2f6feb;
}

.side-icon { font-size: 16px; }

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.panel { width: 100%; max-width: 640px; }

.topbar {
  width: 100%;
  max-width: 640px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dash-title { font-size: 18px; font-weight: 600; }

.logout-btn {
  background: none;
  border: 1px solid #d7d5d0;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: #1f2328;
  text-decoration: none;
}

.container { width: 100%; max-width: 640px; }
.search-wrap { margin-bottom: 16px; }

.entry {
  background: #fff;
  border: 1px solid #e2e0dc;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.entry-name { font-size: 13px; color: #6b7280; margin-bottom: 4px; }

.entry-code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 26px;
  letter-spacing: 2px;
  font-weight: 600;
}

.entry-right { display: flex; align-items: center; gap: 14px; }

.timer-ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #6b7280;
  border: 2px solid #e2e0dc;
  flex-shrink: 0;
}

.del-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
}

.add-form {
  background: #fff;
  border: 1px dashed #d7d5d0;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.empty-state {
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  padding: 40px 0;
}

.btn-row { display: flex; gap: 10px; margin-top: 4px; }

.small-btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #d7d5d0;
  background: #f6f5f3;
  font-size: 13px;
}

.primary-small-btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  background: #2f6feb;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

textarea {
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid #d7d5d0;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  resize: vertical;
}

/* generic list item used by Notes and Passwords panels */
.list-item {
  background: #fff;
  border: 1px solid #e2e0dc;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.list-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.list-item-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.list-item-sub {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.list-item-body {
  font-size: 14px;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0efec;
}

.pw-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.pw-value {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 15px;
}

.icon-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
}
.icon-btn:hover { color: #4b5563; }

@media (max-width: 640px) {
  .dashboard-body {
    flex-direction: column;
    align-items: center;
    padding: 16px;
  }
  .sidebar {
    position: static;
    flex-direction: row;
    width: 100%;
    max-width: 640px;
    justify-content: space-around;
  }
  .side-btn { width: auto; flex-direction: column; gap: 4px; text-align: center; font-size: 12px; }
}
