* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f4f2;
  color: #1f1f1d;
}
a { color: #185fa5; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #e3e2dc;
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 500; }
.container { max-width: 900px; margin: 0 auto; padding: 24px 16px 60px; }
.container.narrow { max-width: 560px; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid #e3e2dc; border-radius: 10px; padding: 16px; flex: 1; min-width: 140px; }
.stat-card.danger { background: #fcebeb; border-color: #f0c1c1; }
.stat-card.warning { background: #faeeda; border-color: #f4d9a9; }
.stat-label { font-size: 13px; color: #6b6a63; margin: 0 0 4px; }
.stat-value { font-size: 24px; font-weight: 600; margin: 0; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar input[type="text"] { flex: 1; min-width: 200px; }

.empty-state { text-align: center; padding: 40px 20px; color: #6b6a63; }

.client-block { margin-bottom: 28px; }
.client-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.client-header h2 { font-size: 16px; margin: 0; font-weight: 500; }

.project-card { background: #fff; border: 1px solid #e3e2dc; border-radius: 12px; padding: 16px 18px; margin-bottom: 10px; }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.project-name { font-weight: 500; font-size: 15px; margin: 0; }
.small { font-size: 13px; }
.muted { color: #6b6a63; }

.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.badge { font-size: 12px; padding: 4px 10px; border-radius: 6px; }
.badge.success { background: #eaf3de; color: #27500a; }
.badge.warning { background: #faeeda; color: #633806; }
.badge.danger { background: #fcebeb; color: #791f1f; }
.badge.neutral { background: #f1efe8; color: #444441; }

.accesses { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #e3e2dc; padding-top: 10px; }
.access-item { background: #f7f7f4; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.access-label { font-weight: 500; margin: 0 0 6px; }
.access-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; word-break: break-all; }
.password-mask { font-family: monospace; }

.notes { font-size: 12px; color: #6b6a63; margin: 8px 0 0; }

.btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #cfcec6; background: #fff; border-radius: 8px;
  padding: 8px 14px; font-size: 14px; cursor: pointer; text-decoration: none; color: #1f1f1d;
}
.btn:hover { background: #f1efe8; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-ghost { background: transparent; }
.btn-primary { background: #1f1f1d; color: #fff; border-color: #1f1f1d; }
.btn-primary:hover { background: #3a3a37; }
.btn-danger { color: #a32d2d; border-color: #e6b3b3; }
.copy-btn, .toggle-pw-btn, .toggle-input-pw-btn { font-size: 11px; padding: 3px 8px; border-radius: 6px; border: 1px solid #cfcec6; background: #fff; cursor: pointer; }

.form-card { background: #fff; border: 1px solid #e3e2dc; border-radius: 12px; padding: 20px; }
.form-card label { display: block; font-size: 13px; color: #6b6a63; margin: 14px 0 4px; }
.form-card label:first-child { margin-top: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #cfcec6; border-radius: 8px; font-size: 14px; background: #fff;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.form-actions .btn-danger { margin-right: auto; }

.accesses-editor { border-top: 1px solid #e3e2dc; margin-top: 16px; padding-top: 12px; }
.access-row-form { border: 1px solid #e3e2dc; border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.access-row-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.access-label-input { font-weight: 500; }
.access-row-form input[type="text"], .access-row-form input[type="password"] { margin-bottom: 8px; }
.password-field { position: relative; display: flex; gap: 6px; }
.password-field input { flex: 1; }

.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card { background: #fff; border: 1px solid #e3e2dc; border-radius: 12px; padding: 28px; width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 18px; margin: 0 0 8px; font-weight: 500; }
.auth-card label { display: block; font-size: 13px; color: #6b6a63; margin: 14px 0 4px; }
.auth-card button { width: 100%; margin-top: 18px; padding: 10px; background: #1f1f1d; color: #fff; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; }

.error { color: #a32d2d; font-size: 13px; }
.success { color: #27500a; font-size: 13px; }
