.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0; }
.metric { font-size: 30px; font-weight: 700; margin: 8px 0 10px; }

.btn { border: 1px solid transparent; border-radius: var(--radius-sm); padding: 10px 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled, .btn.disabled { opacity: .6; cursor: not-allowed; }
.btn.loading::after { content: ''; width: 14px; height: 14px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .input, .toolbar select { max-width: 320px; }

.input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; font-size: var(--fs-base); color: #0f172a; }
.input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 3px solid rgba(37,99,235,.12); }
.input.error, select.error, textarea.error { border-color: var(--danger); outline: 3px solid rgba(220,38,38,.12); }
label { display: inline-block; margin-bottom: 6px; font-size: var(--fs-sm); color: #475569; font-weight: 500; }
.field { margin-bottom: var(--space-4); }

.badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; }
.badge.info { background: #dbeafe; color: #1e40af; }
.badge.success { background: #dcfce7; color: #166534; }
.badge.warn { background: #ffedd5; color: #9a3412; }
.badge.danger { background: #fee2e2; color: #991b1b; }

.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; font-size: 14px; }
th { font-size: 12px; color: #64748b; background: #f8fafc; letter-spacing: .02em; text-transform: uppercase; }
tr:hover td { background: #fcfdff; }

.list { margin: 0; padding-left: 18px; color: #334155; }
.list li { margin: 6px 0; }

.modal { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal.open { display: flex; }
.modal-dialog { width: min(560px, 100%); background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-5); border: 1px solid var(--border); box-shadow: var(--shadow-md); }

.toast-stack { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; }
.toast { background: #0f172a; color: #fff; padding: 10px 12px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }

.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp input { text-align: center; font-size: 20px; padding: 10px; }

@media (max-width: 680px) {
  .toolbar .input, .toolbar select { max-width: unset; }
}
