.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 10px 16px; color: var(--text-primary); background: var(--surface); font-size: 13px; font-weight: 700; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--brand-strong); box-shadow: var(--shadow-sm); }
.button-primary:hover { background: var(--brand); }
.button-secondary { border-color: var(--border); background: var(--surface); }
.button-secondary:hover { border-color: var(--brand); color: var(--brand-strong); }
.button-quiet { min-height: 36px; padding: 7px 11px; color: var(--text-secondary); background: transparent; }
.button-danger { color: var(--danger); background: var(--danger-soft); }
.button-block { width: 100%; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: var(--radius-sm); color: var(--text-secondary); background: transparent; font-size: 18px; }
.icon-button:hover { color: var(--brand-strong); background: var(--brand-soft); }
.card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.card-pad { padding: var(--space-6); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); min-width: 0; }
.card-head h2, .card-head h3 { margin: 0; font-size: 17px; }
.card-head p { margin: 6px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.badge { display: inline-flex; align-items: center; min-height: 26px; border-radius: 999px; padding: 4px 9px; color: var(--text-secondary); background: var(--surface-muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-brand { color: var(--brand-strong); background: var(--brand-soft); }
.badge-success { color: var(--success); background: var(--success-soft); }
.badge-warning { color: var(--warning); background: var(--warning-soft); }
.badge-danger { color: var(--danger); background: var(--danger-soft); }
.progress { height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-muted); }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.stat-card { padding: var(--space-5); }
.stat-card span, .stat-card strong { display: block; }
.stat-card span { color: var(--text-secondary); font-size: 12px; }
.stat-card strong { margin-top: 8px; font-size: 28px; letter-spacing: -.04em; }
.state-box { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 10px; padding: var(--space-6); color: var(--text-secondary); text-align: center; }
.state-box strong { color: var(--text-primary); font-size: 16px; }
.state-box p { max-width: 480px; margin: 0; line-height: 1.6; }
.skeleton { min-height: 14px; border-radius: 5px; background: linear-gradient(90deg, #edf1f5 25%, #f7f9fb 45%, #edf1f5 65%); background-size: 300% 100%; animation: skeleton 1.4s infinite; }
@keyframes skeleton { to { background-position: -300% 0; } }
.toast-region { position: fixed; z-index: 40; top: 76px; right: 24px; display: grid; gap: 8px; width: min(360px, calc(100% - 32px)); }
.toast { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text-primary); background: var(--surface); box-shadow: var(--shadow-md); font-size: 13px; }
.toast.error { border-color: #f0c5ca; color: var(--danger); background: var(--danger-soft); }
.toast.success { border-color: #bce6d9; color: var(--success); background: var(--success-soft); }
.source-citation { display: grid; gap: 5px; margin-top: 12px; padding: 11px 12px; border-left: 3px solid var(--brand); background: var(--brand-soft); font-size: 12px; line-height: 1.55; }
.source-citation small { color: var(--text-secondary); }
.tool-status { display: flex; align-items: center; gap: 9px; padding: 9px 11px; color: var(--text-secondary); background: var(--surface-muted); border-radius: var(--radius-sm); font-size: 12px; }
.tool-status.is-running::before { content: ''; width: 8px; height: 8px; border: 2px solid #b6c0cd; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.tool-status.is-done::before { content: '✓'; color: var(--success); font-weight: 800; }
@keyframes spin { to { transform: rotate(360deg); } }
