:root { color-scheme: light; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f5f7;
  color: #1f2328;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 20px 20px 60px; }
.auth-wrap { max-width: 360px; margin: 80px auto; padding: 0 20px; }

header.app-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
header.app-header h1 { font-size: 20px; margin: 0 0 4px; }
header.app-header p { margin: 0; color: #6b7280; font-size: 13px; }
nav.app-nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
nav.app-nav a { color: #374151; text-decoration: none; font-size: 13px; font-weight: 600; }
nav.app-nav a:hover { color: #2563eb; }
nav.app-nav .who { color: #6b7280; font-size: 12px; margin-right: 6px; }

.btn { border: none; border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-block; text-decoration: none; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #fff; color: #374151; border: 1px solid #d1d5db; }
.btn-secondary:hover { background: #f3f4f6; }
.btn-danger { background: #fff; color: #dc2626; border: 1px solid #fecaca; padding: 5px 10px; font-size: 12px; }
.btn-danger:hover { background: #fef2f2; }
.btn-small { padding: 5px 10px; font-size: 12px; }

.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.card h2 { font-size: 15px; margin: 0 0 4px; }
.card .sub { color: #6b7280; font-size: 12px; margin: 0 0 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.field-grid label, label.block { font-size: 11px; color: #6b7280; display: block; margin-bottom: 3px; font-weight: 600; }
input, select, textarea { font-family: inherit; }
.field-grid input, .form-field input, .form-field select { width: 100%; border: 1px solid #d1d5db; border-radius: 6px; padding: 7px 9px; font-size: 13px; }
.form-field { margin-bottom: 12px; }
textarea.paste-box { width: 100%; min-height: 78px; resize: vertical; border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 8px; font-size: 12px; margin-bottom: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
table th, table td { padding: 8px 10px; text-align: center; border: 1px solid #e5e7eb; }
table th:first-child, table td:first-child { text-align: left; }
.snapshot-table th { font-weight: 700; }

.summary-box { background: #fafafa; border: 1px dashed #d1d5db; border-radius: 10px; padding: 14px 16px; margin-top: 14px; font-size: 13px; line-height: 1.7; }
.summary-box strong { font-size: 14px; }

.chart-wrap { height: 280px; margin-top: 8px; }
.empty-state { text-align: center; color: #9ca3af; padding: 30px 10px; font-size: 13px; }

.alert { border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.member-card { border-radius: 10px; overflow: hidden; border: 1px solid #e5e7eb; }
.member-card .head { padding: 8px 12px; font-weight: 700; font-size: 13px; }
.member-card .body { padding: 10px 12px; background: #fafafa; }

.creds-table td, .creds-table th { text-align: left; }
code.pw { background: #fef9c3; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
