/* Кнопки */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius); font-family: var(--font);
    font-size: 0.875rem; font-weight: 500;
    padding: 0.5rem 1rem; border: 1px solid transparent;
    cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { border-color: var(--border); background: transparent; color: var(--text); }
.btn-outline:hover { background: var(--bg-card); border-color: var(--text-muted); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-card); color: var(--text); }
.btn-destructive { background: var(--negative); color: #fff; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }

/* Инпуты */
.input, .textarea, .select {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text);
    font-family: var(--font); font-size: 0.875rem;
    padding: 0.5rem 0.75rem; width: 100%;
    transition: border-color 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
    outline: none; border-color: var(--accent);
}

/* Карточки */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); font-weight: 600; }
.card-content { padding: 1.5rem; }

/* Бейджи */
.badge {
    display: inline-flex; align-items: center;
    border-radius: 9999px; font-size: 0.75rem; font-weight: 500;
    padding: 0.125rem 0.625rem;
}
.badge-default { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); }
.badge-success { background: hsl(142 70% 14%); color: hsl(142 70% 60%); }
.badge-warning { background: hsl(40 70% 14%); color: hsl(40 80% 60%); }
.badge-destructive { background: hsl(0 70% 14%); color: hsl(0 70% 60%); }

/* Таблица */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; color: var(--text-muted); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.table tr:hover td { background: var(--bg-card); }
.table tr:last-child td { border-bottom: none; }

/* Чат-бабл */
.chat-bubble {
    max-width: 75%; padding: 0.625rem 0.875rem;
    border-radius: var(--radius); font-size: 0.875rem;
    line-height: 1.5; word-break: break-word;
}
.chat-bubble-in { background: var(--bg-card); border: 1px solid var(--border); align-self: flex-start; }
.chat-bubble-out { background: var(--accent); color: #fff; align-self: flex-end; }
.chat-image { max-width: 300px; border-radius: var(--radius); }
.chat-time { font-size: 0.6875rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Формы */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-label { font-size: 0.875rem; font-weight: 500; color: var(--text-muted); }

/* Прогресс-бар */
.metric-bar {
    height: 0.5rem; background: var(--bg); border-radius: 9999px; overflow: hidden;
    margin-bottom: 0.75rem;
}
.metric-bar-fill {
    height: 100%; border-radius: 9999px; transition: width 0.3s;
}

/* Утилиты */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
