/* base.css */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 16px; border-radius: var(--r-m);
  font-size: 0.875rem; font-weight: 500; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, transform 0.1s, opacity 0.12s;
  border: 1px solid transparent;
}
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-d); border-color: var(--accent-d); }
.btn--primary:active { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border2); }
.btn--ghost:hover { background: var(--surface2); }
.btn--active { border-color: var(--accent) !important; color: var(--accent); background: var(--accent-s); }
.btn--danger { background: rgba(239,68,68,.09); color: var(--red); border-color: rgba(239,68,68,.2); }
.btn--danger:hover { background: rgba(239,68,68,.16); }
.btn--icon { width: 34px; height: 34px; padding: 0; border-radius: var(--r-s); flex-shrink: 0; }
.btn--sm { padding: 6px 12px; font-size: 0.8rem; }
.btn--xs { padding: 3px 8px; font-size: 0.73rem; }
.btn--full { width: 100%; }
.btn:disabled, .btn--disabled { opacity: 0.35; pointer-events: none; }

.input {
  width: 100%; background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--r-m); color: var(--text); padding: 9px 13px; outline: none;
  transition: border-color 0.14s;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--dim); }
.input--sm { padding: 6px 10px; font-size: 0.875rem; }

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); }
.modal-card {
  position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 20px; width: 100%; max-width: 600px;
  margin-bottom: calc(var(--nav-h) + var(--safe-b)); animation: slideUp 0.22s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-title { font-size: 0.85rem; font-family: var(--fm); color: var(--muted); margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

.rep-circle { display: inline-flex; align-items: center; vertical-align: middle; line-height: 1; }
.rep-circle svg { display: block; }

.pro-badge { display: inline-block; background: var(--accent); color: #fff; font-size: 0.67rem; font-weight: 600; padding: 2px 8px; border-radius: var(--r-p); font-family: var(--fm); text-transform: uppercase; letter-spacing: 0.06em; }

.toggle { display: inline-block; position: relative; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track { display: block; width: 38px; height: 21px; background: var(--dim); border-radius: var(--r-p); transition: background 0.2s; position: relative; }
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.toggle input:checked + .toggle-track::after { transform: translateX(17px); }

.error-msg   { color: var(--red);   font-size: 0.77rem; margin-top: 5px; font-family: var(--fm); min-height: 1.1em; }
.success-msg { color: var(--green); font-size: 0.77rem; margin-top: 5px; font-family: var(--fm); }
.empty-state { text-align: center; color: var(--muted); font-size: 0.9rem; padding: 48px 16px; }
.empty-sub   { color: var(--dim); font-size: 0.77rem; margin-top: 5px; font-family: var(--fm); }
.loading-state { display: flex; justify-content: center; padding: 48px; }
.loading-spinner { width: 24px; height: 24px; border: 2px solid var(--border2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.section-title { font-size: 0.7rem; font-family: var(--fm); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px; }
