/* Diskanban — Componentes: botones, inputs, drawer, modal, toast */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--sp-2);
    height: 32px;
    padding: 0 var(--sp-4);
    background: var(--color-primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--fs-sm);
    transition: all var(--t-fast) var(--ease-out);
    white-space: nowrap;
}
.btn:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: 0 6px 16px -4px rgba(50, 152, 186, 0.5); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
    background: var(--color-surface-2);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: var(--color-surface-3); border-color: var(--color-border-strong); box-shadow: none; }
.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    border: 0;
}
.btn-ghost:hover { background: var(--color-surface-2); color: var(--color-text-primary); box-shadow: none; }
.btn-danger { background: var(--color-danger); }
.btn-danger:hover { background: #dc2626; }
.btn-sm { height: 26px; padding: 0 var(--sp-3); font-size: var(--fs-xs); }
.btn-icon {
    width: 32px; height: 32px;
    padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon svg { width: 16px; height: 16px; }

.input, .textarea, .select {
    width: 100%;
    height: 36px;
    padding: 0 var(--sp-3);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-size: var(--fs-md);
    outline: none;
    transition: border-color var(--t-fast);
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.textarea { height: auto; min-height: 80px; padding: var(--sp-3); resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a96a8' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; padding-right: 32px; }
.label { display: block; font-size: var(--fs-sm); color: var(--color-text-muted); margin-bottom: var(--sp-1); font-weight: 500; }
.field { margin-bottom: var(--sp-3); }

.card {
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--sp-4);
    box-shadow: var(--shadow-card);
}
.card-hover { transition: all var(--t-base) var(--ease-out); cursor: pointer; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--color-border-strong); }

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    height: 20px;
    padding: 0 var(--sp-2);
    font-size: var(--fs-xs);
    font-weight: 600;
    border-radius: var(--radius-pill);
    background: var(--color-surface-3);
    color: var(--color-text-muted);
}
.badge-primary { background: var(--color-primary-soft); color: var(--color-primary); }
.badge-success { background: rgba(16, 185, 129, 0.14); color: var(--color-success); }
.badge-warning { background: rgba(245, 158, 11, 0.14); color: var(--color-warning); }
.badge-danger { background: rgba(239, 68, 68, 0.14); color: var(--color-danger); }

.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--color-surface-3);
    display: inline-flex; align-items: center; justify-content: center;
    overflow: hidden;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: var(--fs-sm);
    flex-shrink: 0;
    border: 2px solid var(--color-surface-1);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 22px; height: 22px; font-size: var(--fs-xs); border-width: 1px; }
.avatar-lg { width: 48px; height: 48px; font-size: var(--fs-md); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -8px; }

/* Drawer */
.drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    animation: fadeIn 160ms var(--ease-out);
}
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: var(--drawer-w);
    max-width: 100vw;
    background: var(--color-surface-1);
    border-left: 1px solid var(--color-border);
    box-shadow: var(--shadow-drawer);
    z-index: 51;
    display: flex; flex-direction: column;
    animation: slideIn 220ms var(--ease-out);
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
.drawer-header {
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; gap: var(--sp-3);
    flex-shrink: 0;
}
.drawer-title { flex: 1; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--sp-5); }
.drawer-footer { padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--color-border); display: flex; gap: var(--sp-2); justify-content: flex-end; flex-shrink: 0; }
@media (max-width: 1024px) {
    .drawer { width: 100%; bottom: auto; height: 70vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: 0; animation: slideUp 220ms var(--ease-out); }
    @keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
}

/* Modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 60;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 160ms var(--ease-out);
    padding: var(--sp-4);
}
.modal {
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lift);
}
.modal-header { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--color-border); display: flex; align-items: center; gap: var(--sp-3); }
.modal-body { padding: var(--sp-5); overflow-y: auto; }
.modal-footer { padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--color-border); display: flex; gap: var(--sp-2); justify-content: flex-end; }

/* Toast */
.toast-root { position: fixed; bottom: var(--sp-5); right: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); z-index: 100; }
.toast {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--sp-3) var(--sp-4);
    min-width: 240px; max-width: 360px;
    box-shadow: var(--shadow-lift);
    animation: slideInRight 220ms var(--ease-out);
}
.toast-success { border-left-color: var(--color-success); }
.toast-error { border-left-color: var(--color-danger); }
.toast-warning { border-left-color: var(--color-warning); }
@keyframes slideInRight { from { transform: translateX(120%); } to { transform: none; } }

/* Empty state */
.empty {
    text-align: center;
    padding: var(--sp-8) var(--sp-5);
    color: var(--color-text-muted);
}
.empty svg { width: 48px; height: 48px; opacity: 0.5; margin-bottom: var(--sp-3); }
