/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; transition: all .15s;
}
.btn-primary  { background: var(--accent); color: #000; }
.btn-primary:hover  { background: #d97706; }
.btn-ghost   { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover   { border-color: var(--accent); color: var(--accent); }
.btn-danger  { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .4; pointer-events: none; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card-hover:hover { border-color: var(--accent-dim); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.badge-work    { background: #1e3a5f; color: #60a5fa; }
.badge-private { background: #1a3a2a; color: #4ade80; }
.badge-family  { background: #3a2a10; color: #fbbf24; }
.badge-unknown { background: var(--surface2); color: var(--text-muted); }
.badge-done    { background: #1a2a1a; color: #6b7280; }

/* Tags */
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 99px; font-size: 12px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text-muted);
}

/* Divider */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Loading spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
#toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 10px 20px; border-radius: var(--radius);
  font-size: 14px; z-index: 1000; white-space: nowrap;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
#toast.show { opacity: 1; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  z-index: 500; display: flex; align-items: flex-end;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--surface); border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 24px; border-top: 1px solid var(--border);
}
.modal-handle {
  width: 40px; height: 4px; background: var(--border);
  border-radius: 2px; margin: 0 auto 20px;
}

/* Form rows */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.form-row-inline { display: flex; gap: 10px; align-items: center; }

/* Select chips */
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 14px; border-radius: 99px; font-size: 13px;
  border: 1px solid var(--border); background: var(--surface2); color: var(--text-muted);
  cursor: pointer; transition: all .15s;
}
.chip.active { border-color: var(--accent); color: var(--accent); background: rgba(245,158,11,.1); }

/* Scrollable list */
.scroll-list { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
